Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332405

Summary: IDE gets confused when declaring class member of type EventsHandler
Product: [Eclipse Project] JDT Reporter: burek <burek021>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: minor    
Priority: P3 CC: daniel_megert, ob1.eclipse
Version: 3.6.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description burek CLA 2010-12-12 21:46:03 EST
Build Identifier: 20100917-0705

Well, pretty self explanatory. I've created a class named EventsHandler:

public class EventsHandler implements Runnable {
	@Override
	public void run() {
	}
}

and in another class, I've declared a class member of that class:

public static EventsHandler eventHandler = null;

and from that moment, IDE got somehow weird and funny :) all the syntax highlighting and code coloring started to act weird :) half of the text words (variable names) were normal and half italic and such things :) also, i couldn't save that class, because after CTRL+S it would get saved and later again showed an asterisk, indicating it's not saved :) i had to close the file (clicking Yes to save it) and reopen it and after that I've chosen to fix errors in that class and imported my class (instead of netbeans and similar) and after that, everything was ok :)

my guess is that IDE somehow got confused, because the same class name is present in many system packages, i don't know, really, but it was fun to watch :)

I couldn't reproduce this behaviour again :( sorry..

Reproducible: Couldn't Reproduce
Comment 1 Oleg Besedin CLA 2010-12-13 10:35:33 EST
Was it an e4 build or 3.x build?
Comment 2 burek CLA 2010-12-13 11:02:54 EST
Eclipse IDE for Java Developers

Version: Helios Service Release 1
Build id: 20100917-0705
(c) Copyright Eclipse contributors and others 2000, 2010.  All rights reserved.
Visit http://eclipse.org/

This product includes software developed by the
Apache Software Foundation http://apache.org/
Comment 3 Oleg Besedin CLA 2010-12-13 11:09:32 EST
(In reply to comment #2)
> Eclipse IDE for Java Developers
> Version: Helios Service Release 1

Thank you! You had version "4.1" which is for e4 which is a somewhat different code base. 

(As you are saying, chances are that not much can be done before this issue can be reproduced. It is still worth filing a bug as then there is a chance that, at least for common problems, some similarities will emerge. Thank you for taking time to do that!)
Comment 4 Dani Megert CLA 2010-12-13 15:02:13 EST
Sorry, could not reproduce either. Please reopen if you see this again.