Bug 3562

Summary: Outliner bug for initializers (1G93CS3)
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: UIAssignee: Olivier Thomann <Olivier_Thomann>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P4    
Version: 2.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Olivier Thomann CLA 2001-10-10 22:57:10 EDT
STEPS TO REPRODUCE:

	1) Create a new java project.
	2) Switch to Java perspective
	3) Add a file through the navigator called A.java.
	4) Paste this code in the source panel for this class A.
[	class A 
	 { {}
	 		static{}
 	void f(){}
	}]

	5) You should have two initializers. One initializer followed by a static initializer.
	6) In the outliner select the non-static initializer.
	7) Save the resulting code.
	8) Add an non-static initializer (  {  } ) at the same location then before.
	9) In the outliner you will see two static initializers.
	
(2/13/01 10:53:44 AM)

NOTES:

OT (2/13/01 10:53:52 AM)
	After step 9, if you remove the first static initializer, both initializers disappear from the outliner, but the initializer is still in the source view.

JBL (2/14/2001 2:31:37 PM)
	In step 8, the delta sent to the UI is:
		A.java[*]: {CHILDREN}
			class A[*]: {CHILDREN}
				initializer[*]: {MODIFIERS CHANGED}
				static initializer[+]: {}
	
	meaning that the modifier of the first initializer has been changed and that a new static initializer has been added,
	which is one possible behavior (the other possible behavior being that the first initializer is unchanged, and that
	a second initializer is inserted before)
	However, the UI doesn't handle this correctly and doesn't update the icon of the first initializer. It just adds a new 
	static initializer.
	Moving to ITPJUI.
Comment 1 Martin Aeschlimann CLA 2001-10-16 11:16:31 EDT
moved to 'active'
Comment 2 Martin Aeschlimann CLA 2001-10-22 10:30:50 EDT
Is this still reproducable,? I couldn't.
I don't understand step 9. Where should the new non-static initializer be added?
Comment 3 Olivier Thomann CLA 2001-10-22 13:37:24 EDT
Could not reproduce either.
Moved to closed.
Comment 4 Olivier Thomann CLA 2001-10-22 13:37:48 EDT
Moved to closed
Comment 5 DJ Houghton CLA 2001-10-24 07:12:39 EDT
PRODUCT VERSION:
	22a