Bug 24182 - Import declaration scopes
Summary: Import declaration scopes
Status: CLOSED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-27 10:09 EDT by Vijay Aravamudhan CLA
Modified: 2008-01-09 17:22 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 Vijay Aravamudhan CLA 2002-09-27 10:09:11 EDT
hi,
JDK 1.4 has "fixed" a bug which can be found at:
http://developer.java.sun.com/developer/bugParade/bugs/4361575.html

But this breaks Eclipse: I am a developer on an open source project called 
jfcunit where we have the JDK Swing demo jar file. I changed the sources to put 
all the sources in a package called 'demo' instead of the default package. Then 
I put the jar file in my project area and refreshed it in Eclipse. Once I did 
this, I (obviously) had to change the actual source files that refer to any 
classes from the jar to include the package declaration. After doing this, I 
thought that everything should be fine and dandy - but, there still appears 
a "problem indication" marker wherever the new pcakge or its classes are used. 
The marker is not the fully filled red rectangle, but the white rectangle with 
the red border. If I turn on the "show problems before compilation" in the 
preferences, these same lines are also underlined with red wavy lines. Is this 
a bug in Eclipse?
Comment 1 Philipe Mulet CLA 2002-09-30 06:12:43 EDT
The URL you mentionned in your description doesn't seem to work at the moment. 
Can you please describe a little more the nature of your problem ?

Comment 2 Vijay Aravamudhan CLA 2002-09-30 17:00:47 EDT
Well, according to the bug report, Sun has "fixed" the specs and the javac 
compiler to error out when any class files are not in a namespace (package). In 
other words, if anyone tries to compile their demo sources (which are not in 
any package), the compile would error out.

So I had to change some files to be in some dummy package - and when this was 
done, no errors/warnings showed up in the "Tasks" area - but there were still 
white boxes with red borders which showed up in the right margin area (which is 
used to normally indicate that there are compile warnings/errors).
Comment 3 Philipe Mulet CLA 2002-10-02 06:45:32 EDT
Got it. Now this change in javac is only part of JDK1.4. In a consistent 
manner, you will notice that when toggling our compiler in 1.4 mode, you'll get 
the same behavior (see Window>Preferences>Java>Compiler>JDK Compliance>Compiler 
Compliance Level>1.4).
Comment 4 Vijay Aravamudhan CLA 2002-10-02 08:48:19 EDT
Thanks - that did it!
Comment 5 Vijay Aravamudhan CLA 2008-01-09 17:22:15 EST
Closing