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

Summary: static imports not recognized in javafx; fix imports causes compilation error
Product: javafx Reporter: steveonjava <steveonjava>
Component: EditorAssignee: J Bachorik <yardus>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

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