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 37425 - Merge JDK 1.4 Source option for compiler and editor
Summary: Merge JDK 1.4 Source option for compiler and editor
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks: 37742
  Show dependency tree
 
Reported: 2003-11-21 19:55 UTC by Sreenivasa Viswanadha
Modified: 2007-09-26 09:14 UTC (History)
1 user (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 Sreenivasa Viswanadha 2003-11-21 19:55:21 UTC
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.
Comment 1 Jan Becicka 2003-11-24 09:02:02 UTC
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.
Comment 2 Sreenivasa Viswanadha 2003-11-24 14:02:30 UTC
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.
Comment 3 Jan Pokorsky 2003-12-15 17:16:29 UTC
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.
Comment 4 Jesse Glick 2004-04-20 17:53:53 UTC
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.
Comment 5 David Konecny 2004-04-28 10:14:47 UTC
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).