Bug 176894

Summary: Moving file to another package does not update imports
Product: javafx Reporter: Alexandr Scherbatiy <sunflower>
Component: UnsupportedAssignee: J Bachorik <yardus>
Status: VERIFIED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P2    
Version: 6.x   
Target Milestone: 6.x   
Hardware: PC   
OS: Windows XP   
Whiteboard: 68patch1-verified
Issue Type: DEFECT Exception Report:

Description Alexandr Scherbatiy 2009-11-16 06:26:18 UTC
Product Version         = NetBeans IDE Dev (Build 200911160201) (#aa08ab571103)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02; Sun Microsystems Inc.


Steps to reproduce:

- Create 'a' package
- Create 'A' JavaFX class under the 'a' package
------------------------------
package a;

public class A {}
------------------------------

- Create 'B' JavaFX class under the 'a' package
------------------------------
package a;

public class B {
        public var a:A;
}
------------------------------

- Create 'b' package
- Move the 'B' class to the 'b' package
- Build the project

JavaFXApplication1\src\b\B.fx:10: cannot find symbol
symbol  : class A
location: class b.B
        public var a:A;
1 error
Comment 1 J Bachorik 2010-01-11 04:59:11 UTC
Fixed in trunk - http://hg.netbeans.org/javafx/rev/62f2a6f45e43
Comment 2 rbalada 2010-01-22 09:26:58 UTC
Please verify on trunk builds.

Due to significant amount of code changed between FCS and a fix for issue 179218, I've ported a bugfix for this issue to branch release68_fixes too.

http://hg.netbeans.org/javafx/rev/4a484aa724db
Comment 3 Alexandr Scherbatiy 2010-01-25 05:04:17 UTC
Verified in netbeans-6.8-201001241915-javafx-full.zip from
/builds/netbeans/6.8/fixes
Comment 4 Alexandr Scherbatiy 2010-01-25 07:04:52 UTC
NetBeans-JavaFX-Soma:  #126

Now I see the following behavior:

- Create a JavaFX project with the main File
- Create 'A' JavaFX  class under the existed package:
----------------------------------------------
package javafxapplication14;

public class A {

}
----------------------------------------------
- Create 'B' JavaFX  class under the existed package:
package javafxapplication14;

public class B {
    public var a:A;
}
----------------------------------------------

- Create 'b' package
- Move the 'B' class to the 'b' package

The result is:
----------------------------------------------
package b;

public class B {
 import javafxapplication14.A;
   public var a:A;
}
----------------------------------------------

JavaFXApplication14\src\b\B.fx:4: There is a garbled class member definition starting here, I have tried to ignore it. Class members can be 'var', 'def', 'function', 'init' or 'postinit' only.
 import javafxapplication14.A;
1 error
Comment 5 J Bachorik 2010-01-29 05:09:07 UTC
I can not reproduce it as of time of changeset http://hg.netbeans.org/javafx/rev/aeedcd8eec48
Comment 6 Alexandr Scherbatiy 2010-02-02 03:34:06 UTC
Verified in NetBeans-JavaFX-Soma: #140

Create a separate issue 180134  for the incorrect import inserting.
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo