This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 127439 - The file badges should also reflect hints results
Summary: The file badges should also reflect hints results
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Rastislav Komara
URL:
Keywords:
: 232497 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-02-15 02:42 UTC by _ gtzabari
Modified: 2013-09-24 21:50 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2008-02-15 02:42:42 UTC
dev build 200802141203

I believe this bug is a regression because this used to work in past releases.

1) Define class Foo inside folder MyFolder
2) Foo.java does not contain a package declaration. It thinks it is defined in the default package.
3) Clean and Build the project
4) I am expecting Netbeans to issue an error telling me that there is a mismatch between the class package and folder
but it does not. What actually happens is that Netbeans compiles the class file into the root directory of build/classes
instead of build/classes/MyFolder as expected.

This triggers bugs such as issue 125694.
Comment 1 Jan Lahoda 2008-02-22 19:40:08 UTC
In what past releases did this work?

Actually, placing a source file into a "incorrect" "package" is not an error allowed in Java (it may cause problems
during build and it can also cause problems for the IDE, but it is not an error). So the build (which is done by the
command line compiler, not by the IDE) does not report this as an error.

In the IDE, there is a hint (which is set to behave as an error) which warns about this, but the hints are being
currently run only for opened files. Issue(s) (do not have the number(s) offhand) are filled that request adding the
hints into the tasklist.
Comment 2 _ gtzabari 2008-02-22 20:17:53 UTC
I guess I was confusing this error with "class Foo should be in file Foo.java" which you get if your filename is wrong.
I was expecting to get a similar error: "class com.sun.swing.Foo should be in folder com/sun/swing". Thanks for the
clarification. I look forward to having this show up even for unopened files as you mentioned.

In truth I never use the tasklist. I would personally prefer it if the file icon reflected hints. Right now if a file
contains a compilation error its icon contains a red exclamation mark. Ideally this badge should also reflect
warning/error hints. Is there a RFE to this effect or should I reopen this issue as an enhancement request?
Comment 3 Jan Lahoda 2008-02-25 09:10:20 UTC
Ok, I am fine with changing the scope of this issue to "The file badges should also reflect hints result" (feel free to
adjust the wording so the meaning is more obvious). But please do not expect this happen anytime soon - such a change
will quite difficult.
Comment 4 Rastislav Komara 2009-02-03 10:52:15 UTC
Overtake.
Comment 5 Jiri Prox 2013-07-10 11:22:36 UTC
*** Bug 232497 has been marked as a duplicate of this bug. ***
Comment 6 Jiri Prox 2013-09-24 21:50:57 UTC
*** Bug 235958 has been marked as a duplicate of this bug. ***