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.
|Summary:||The file badges should also reflect hints results|
|Product:||java||Reporter:||_ gtzabari <gtzabari>|
|Component:||Source||Assignee:||Rastislav Komara <moonko>|
|Issue Type:||ENHANCEMENT||Exception Reporter:|
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
Comment 5 Jiri Prox 2013-07-10 11:22:36 UTC
*** Bug 232497 has been marked as a duplicate of this bug. ***