Bug 3562 - Outliner bug for initializers (1G93CS3)
Summary: Outliner bug for initializers (1G93CS3)
Status: CLOSED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:57 EDT by Olivier Thomann CLA
Modified: 2001-10-24 07:12 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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