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.
When I have file with some assert statements, it doesn't compile. I get compile errors saying 'assert is a keyword ...'. I checked that the Tools->Options->Editing->Java Sources->Enable JDK 1.4 Sources option is set to true. But I still get the error.
Please use another option Tools | Options | Building | Compiler Types | External Compilation | Enable JDK 1.4 Source Java Sources | Enable JDK 1.4 Source option is used for Error Annotations in the Editor. Thanks.
It is a bad idea to have two different options for doing a very similar thing. Also, then why are thed defaults different values? This is bad from usability point of view.
True. From the user point of view it will be best to use the option from the related compiler. The current editor option is an overkill.
David Konecny was going to work on a SourceLevelQuery or something similar in java/api which would permit the editor to discover the correct source encoding for a given class. (As well as other code, like refactoring support etc.) This would obsolete both of the existing options mentioned; the proper source level (1.1/1.2/1.3, 1.4, 1.5) would be selected acc. to the configured JDK for the project. Targeted for NB 4.0.
The source option is now configured in one place in project. There is no UI for it and value is based on the JDK the project is configured to use. From API point of view check java/api module which now has org.netbeans.api.java.queries.SourceLevelQuery class with static method String getSourceLevel(FileObject).