Bug 67324 - Package Explorer doesn't update included package after moving contents of source folder
Summary: Package Explorer doesn't update included package after moving contents of sou...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 RC3   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-15 14:17 EDT by Markus Keller CLA
Modified: 2004-06-18 10:38 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (1.20 KB, patch)
2004-06-16 10:40 EDT, Jerome Lanneluc CLA
no flags Details | Diff
Regression tests (2.12 KB, patch)
2004-06-16 10:41 EDT, Jerome Lanneluc CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2004-06-15 14:17:29 EDT
200406111814

- setup as of bug 65234 comment 0, Package Explorer flat, all filters disabled
- add a new folder proj/parking/
- move folder proj/src/org/ into folder /proj/parking
Expected: package fragment org.eclipse.mypack goes away
Was: org.eclipse.mypack is still there, opening A.java in it gives
newNotPresentException

- close proj / open proj => state is OK again

- move folder proj/parking/org into proj/src
Expected: package fragment org.eclipse.mypack appears
Was: proj/src has only folder org as child
Comment 1 Markus Keller CLA 2004-06-16 04:30:58 EDT
I think we're not getting correct deltas here. We only get this:
Java Model[*]: {CHILDREN}
	proj[*]: {CHILDREN | CONTENT}
		src[*]: {CONTENT}
			ResourceDelta(/proj/src/org)[-]
		ResourceDelta(/proj/parking)[*]

... but I would expect to see a REMOVED IJavaElementDelta for the removed
package 'org.eclipse.mypack'.

Since there was no REMOVED delta for the package, A is also still in the
AllTypesCache and appears in the Open Type... dialog (and fails when opened).

Moving to core for comments.
Comment 2 Philipe Mulet CLA 2004-06-16 05:22:07 EDT
Delta indeed looks wrong. 
Jerome - pls investigate for RC13
Comment 3 Jerome Lanneluc CLA 2004-06-16 10:40:56 EDT
Created attachment 12250 [details]
Proposed patch
Comment 4 Jerome Lanneluc CLA 2004-06-16 10:41:25 EDT
Created attachment 12251 [details]
Regression tests
Comment 5 Darin Wright CLA 2004-06-16 11:41:33 EDT
+1 for RC3
Comment 6 Jerome Lanneluc CLA 2004-06-16 11:44:40 EDT
Released fix and tests.
Comment 7 David Audel CLA 2004-06-18 10:38:13 EDT
Verified for 3.0RC3 I200406180010