Bug 6563 - Package view does not refresh ok when adding both package and unit at once
Summary: Package view does not refresh ok when adding both package and unit at once
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 2.0 M1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-12-04 13:00 EST by Philipe Mulet CLA
Modified: 2002-01-14 10:37 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2001-12-04 13:00:11 EST
Build 20011127 + latest JDTCORE (v_216c)

In a new project, empty source folder, add a type p1/X.java all at once using 
the class wizard (package p1 must not pre-exist).

The package view does only display added package p1 (i.e. does not show the 
added type).

Deltas look confusing, the unit addition got notified, but an extra package 
addition notification is likely fooling the package view.
Comment 1 Jerome Lanneluc CLA 2001-12-05 05:25:06 EST
When a class is created at the same time as its package, here is what happens 
in an IWorkspaceRunnable:
- the package is created (in a Java Model Operation) and opened (it has no 
children)
- the compilation unit is created (in a Java Model Operation) by creating an 
IFile
- when the IResourceDelta is sent, the delta processsor only sees the addition 
of the package, and since it is already opened, it remains with no children.

Fixed by forcing and added element to be closed (this is a noop if it is 
already closed).