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 157298 - Java imports are marked as unused
Summary: Java imports are marked as unused
Status: REOPENED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Rastislav Komara
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-22 11:20 UTC by Alexandr Scherbatiy
Modified: 2019-05-16 07:56 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 Alexandr Scherbatiy 2009-01-22 11:20:06 UTC
Steps to reproduce:

- Copy the code to the editor:
-------------------------------------------
import java.lang.System;

System.out.println("10");
-------------------------------------------

'import java.lang.System;' line is marked as unused.

- Fix imports 
 The code is uncompilable:

Main.fx:11: package System does not exist
System.out.println("10");
1 error
Comment 1 Alexandr Scherbatiy 2009-01-22 11:23:14 UTC
JavaFX_NB_Plugin_Franca_NB_65_fixes #50 22-Jan-2009 00:11:59

  Product Version         = NetBeans IDE 6.5 (Build 200811100001)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.6.0_12-ea; Java HotSpot(TM) Client VM 11.2-b01; Sun Microsystems Inc.
Comment 2 David Strupl 2009-01-22 11:46:08 UTC
Rasto, can you please check this one?
Comment 3 Alexandr Scherbatiy 2009-01-26 08:41:17 UTC
It is reproduced for the imports from the Java library.
For example:
---------------------------------------------------
import javafx.stage.*;

import java.lang.Math;
import java.lang.System;

function sqrt(x:Number):Number{
        Math.sqrt(x)
}

Stage {
    onClose: function(){
            System.exit(0);
    }
}
---------------------------------------------------

Java imports are marked as unused.

- Fix imports

  BUILD FAILED

Main.fx:17: cannot find symbol
symbol  : variable System
location: class javafxapplication3.Main
            System.exit(0);
Main.fx:12: cannot find symbol
symbol  : variable Math
location: class javafxapplication3.Main
        Math.sqrt(x)
2 errors
Comment 4 Rastislav Komara 2009-01-26 09:20:24 UTC
Fixed.
Comment 5 Alexandr Scherbatiy 2009-01-27 11:46:59 UTC
verified in JavaFX_NB_Plugin_Franca_NB_65_fixes_promoted_SDK: #5 27-Jan-2009 12:35:08
Comment 6 Martin73 2019-05-16 07:56:28 UTC
Hello guys,

where I find this plugin?
I have same problem. I made calculate and i need atribut sqrt and pow.

write error:
error: incompatible types: possible lossy conversion from double to int
    result = Math.pow(num1, num2);

I'm wrote:

else if (this.mocnina.isSelected())
    {
    result = Math.pow(num1, num2);
    }