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 180129 - Class moving does not update imports in the dependent classes
Summary: Class moving does not update imports in the dependent classes
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: J Bachorik
URL:
Keywords:
Depends on:
Blocks: 173077
  Show dependency tree
 
Reported: 2010-02-02 02:37 UTC by Alexandr Scherbatiy
Modified: 2010-02-09 04:27 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 2010-02-02 02:37:32 UTC
NetBeans-JavaFX-Soma: #140

  Product Version         = NetBeans IDE Dev (Build 201001280200) (#eeef33500a1a)
  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' package
- Create 'B' JavaFX class under the 'b' package:
---------------------------------------------
package b;

import a.A;

public class B extends A{

}
---------------------------------------------

- Refactor -> Move the 'A' class to the 'b' package 

- Clean and build the project

JavaFXApplication2\src\b\B.fx:10: package a does not exist
import a.A;
1 error
Comment 1 J Bachorik 2010-02-04 03:11:02 UTC
fixed by http://hg.netbeans.org/javafx/rev/28b65c9f3678
Comment 2 Alexandr Scherbatiy 2010-02-05 03:58:13 UTC
 NetBeans-JavaFX-Soma: #143

The sample above works now.

More complicated case:
- Open the attached project:
https://netbeans.org/bugzilla/attachment.cgi?id=93747

- Select the mathematics.multidimensional.shape.MDShape class and move it
to 'aaa' package

- Clean and build the project

-----------------------------------------------------------------------
deps-jar:
MultiDim\src\mathematics\multidimensional\shape\MDCustomShape.fx:13: cannot find symbol
symbol  : class MDShape
location: class mathematics.multidimensional.shape.MDCustomShape
public abstract class MDCustomShape extends MDShape {
MultiDim\src\aaa\MDShape.fx:20: cannot find symbol
symbol  : class MDNode
location: class aaa.MDShape
    public function getPoints(): MDNode[] { [] }
MultiDim\src\aaa\MDShape.fx:34: cannot find symbol
symbol  : function duplicate()
location: class java.lang.Byte
            override function getPoints() { for(p in shape.getPoints()) p.duplicate() }
MultiDim\src\aaa\MDShape.fx:22: cannot find symbol
symbol  : class MDSegment
location: class aaa.MDShape
    public function getSegments(): MDSegment[] { [] }
MultiDim\src\aaa\MDShape.fx:35: cannot find symbol
symbol  : function duplicate()
location: class java.lang.Byte
            override function getSegments() { for(s in shape.getSegments()) s.duplicate() }
MultiDim\src\mathematics\multidimensional\MDVector.fx:15: warning: Forward reference: variable dim might not have been initialized.
    public var metric:IMDSquareTransform = MDIdentity{ dim: dim };
MultiDim\src\mathematics\multidimensional\shape\MDCustomShape.fx:16: cannot find symbol
symbol  : class MDShape
location: class mathematics.multidimensional.shape.MDCustomShape
    var shape:MDShape;
MultiDim\src\mathematics\multidimensional\shape\MDCustomShape.fx:18: cannot find symbol
symbol  : class MDShape
location: class mathematics.multidimensional.shape.MDCustomShape
    public abstract function create():MDShape;
MultiDim\src\mathematics\multidimensional\shape\MDCustomShape.fx:21: Function getPoints() declared 'override' but does not override another function.
    override function getPoints(){
MultiDim\src\mathematics\multidimensional\shape\MDCustomShape.fx:25: Function getSegments() declared 'override' but does not override another function.
    override function getSegments(){
MultiDim\src\mathematics\multidimensional\shape\MDCustomShape.fx:31: cannot find symbol
symbol  : variable dim
location: class mathematics.multidimensional.shape.MDCustomShape
        dim = shape.dim;
MultiDim\src\mathematics\multidimensional\shape\MDGroup.fx:18: incompatible types
found   : Byte[]
required: mathematics.multidimensional.shape.MDSegment[]
        for(shape in shapes) [ shape.getSegments() ] ;
MultiDim\src\mathematics\multidimensional\shape\MDUniverse.fx:98: incompatible types
found   : Byte[]
required: mathematics.multidimensional.shape.MDSegment[]
        for(shape in shapes) [ shape.getSegments() ] ;
MultiDim\src\mathematics\multidimensional\shape\MDUniverse.fx:160: incompatible types
found   : Byte[]
required: mathematics.multidimensional.shape.MDNode[]
        points =  getPoints();
...

MultiDim\src\samples\physics\RelativitySample.fx:28: cannot find symbol
symbol  : variable color
location: class physics.relativity.RelativityRod
                color: Color.BLUE
MultiDim\src\samples\physics\RelativitySample.fx:35: cannot find symbol
symbol  : variable color
location: class physics.relativity.RelativityRod
                color: Color.GREEN
MultiDim\src\samples\physics\RelativitySample.fx:43: incompatible types
found   : Byte[]
required: aaa.MDShape[]
    [
41 errors
1 warning
ERROR: javafxc execution failed, exit code: 1
MultiDim\nbproject\build-impl.xml:148: exec returned: -1
BUILD FAILED (total time: 14 seconds)
-----------------------------------------------------------------------
Comment 3 J Bachorik 2010-02-05 07:51:04 UTC
this should fix it for good - http://hg.netbeans.org/javafx/rev/d11b331f9388
Comment 4 Alexandr Scherbatiy 2010-02-08 02:55:37 UTC
The issue is still reproduced in build NetBeans-JavaFX-Soma: #146 Feb 8, 2010 12:01:12 AM

MultiDim\src\mathematics\multidimensional\shape\MDCustomShape.fx:13: cannot find symbol
symbol  : class MDShape
location: class mathematics.multidimensional.shape.MDCustomShape

...
36 errors
Comment 5 J Bachorik 2010-02-08 08:47:10 UTC
I hope this change will fix it - http://hg.netbeans.org/javafx/rev/fa82694ed037 (at least it does in my testbuild)
Comment 6 Alexandr Scherbatiy 2010-02-09 04:27:34 UTC
verified in  NetBeans-JavaFX-Soma: #147