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 164354 - static imports not recognized in javafx; fix imports causes compilation error
Summary: static imports not recognized in javafx; fix imports causes compilation error
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: J Bachorik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-04 01:43 UTC by steveonjava
Modified: 2009-07-17 08:00 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description steveonjava 2009-05-04 01:43:49 UTC
If you use any static imports in javafx code, Netbeans will give you an error that it is an unused import.  If you then
choose Fix Imports (ctl-shift-I) it will remove the static import, resulting in code that can no longer compile.

Here is a very simple example:
import java.lang.Math.*;
println(PI);

The import statement will be underlined in yellow with a code fix to remove it since it is unused.  If you accept this
code fix or choose Fix Imports from the menu, it will remove the static import leaving you with code that cannot compile.

This error was present in NetBeans 6.5 and still exists in the current 6.5.1 builds.
Comment 1 J Bachorik 2009-05-19 14:17:59 UTC
fixed- http://hg.netbeans.org/javafx/rev/9b5e2db5de7d
Comment 2 Alexandr Scherbatiy 2009-05-21 13:33:22 UTC
verified in marina-netbeans-plugin: #176