Community
Participate
Working Groups
The JDT plugin generates IJavaElementDelta with kind of CHANGED and flag F_REMOVED_FROM_CLASSPATH for source folder upon renaming. There is no moved to element. There is also another delta with kind of ADDED and flag MOVED_FROM. For every other rename refactoring there are two deltas: REMOVED with F_MOVED_TO and ADDED with F_MOVED_FROM. This situation happens only on special case of source folders. Steps to reproduce: 1) Create Java Project with source folder 'src' 2) Change the build path of the project so the output folder is the source folder itself (but still use separate source folder and output folder) 3) Refactor->rename the source folder to something else The example delta which I receive: Java Model[*]: {CHILDREN} bug[*]: {CHILDREN | CLASSPATH CHANGED} src2[*]: {REMOVED FROM CLASSPATH} src[+]: {MOVED_FROM(src2 [in bug])} ResourceDelta(/bug/.classpath)[*] Here is the delta when the output folder and the source folder doesn't overlap: Java Model[*]: {CHILDREN} bug[*]: {CHILDREN | CLASSPATH CHANGED} src[-]: {MOVED_TO(src3 [in bug])} src3[+]: {MOVED_FROM(src [in bug])} ResourceDelta(/bug/.classpath)[*] Valid for Build id: I20060512-1600
Reproduced with 3.3RC4
We ran out of time. Sorry. Deferring post 3.4
Following the steps, I believe the delta you're seeing is actually: Java Model[*]: {CHILDREN} bug[*]: {CHILDREN | CLASSPATH CHANGED} src[*]: {REMOVED FROM CLASSPATH} src2[+]: {MOVED_FROM(src [in bug])} ResourceDelta(/bug/.classpath)[*] You get this delta because the rename operation doesn't actually rename the folder 'src' since it is referred to as an output folder. It creates a 'src2' folder instead and it moves the classpath entry to this folder. Marking as WONTFIX. Please reopen if you disagree.
You are perfectly correct and I agree.