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 172368 - Java classes are not refactored in JavaFX from Java
Summary: Java classes are not refactored in JavaFX from Java
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: J Bachorik
URL:
Keywords:
Depends on: 181796
Blocks:
  Show dependency tree
 
Reported: 2009-09-16 10:50 UTC by Alexandr Scherbatiy
Modified: 2010-03-18 11:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
JavaFX project (120.31 KB, application/zip)
2010-03-11 05:14 UTC, Alexandr Scherbatiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2009-09-16 10:50:28 UTC
netbeans-trunk-nightly-200909151512-javafx-full.zip 

  Product Version         = NetBeans IDE Dev (Build 200909151512) (#ebf350cbb86b)
  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' Java class
----------------------------------
public class A {

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

- Create an empty JavaFX file
- Copy the code to the JavaFX file:
-----------------------------------------
new A();
-----------------------------------------

- Go to the 'A' java class
- Refactor-Rename the  'A' name in the Java file to 'B'

The A name class is changed to B. However the 'A' class has not been changed in JavaFX file:

Main.fx:9: cannot find symbol
symbol  : class A
location: class javafxapplication3.Main
new A();
1 error
Comment 1 Lukas Hasik 2009-11-12 07:56:33 UTC
as this bug is either caused by the fx compiler or it too complicated to fix it in 6.8 - > approved
Comment 2 J Bachorik 2010-03-11 03:00:02 UTC
should be implemented in http://hg.netbeans.org/javafx/rev/1ead46aa3bb4
Comment 3 Alexandr Scherbatiy 2010-03-11 05:13:52 UTC
NetBeans-JavaFX-Soma:  #181

It does not work in more complicated case.

Steps to reproduce:

- Open the attached project
- Go to the mathematics.multidimensional package
- Refactor->Rename the IMDVector java class to IMDVector2
- Clean and build the project



MultiDim\src\mathematics\multidimensional\AMDMatrix.fx:19: cannot find symbol
symbol  : class IMDVector
location: class mathematics.multidimensional.AMDMatrix
    override function transform (vector:IMDVector):IMDVector {
MultiDim\src\mathematics\multidimensional\AMDMatrix.fx:19: cannot find symbol
symbol  : class IMDVector
location: class mathematics.multidimensional.AMDMatrix
    override function transform (vector:IMDVector):IMDVector {
MultiDim\src\mathematics\multidimensional\AMDTransform.fx:39: cannot find symbol
symbol  : class IMDVector
location: class AMDTransform$ObjLit$5
            override function transform(vector: IMDVector):IMDVector{
MultiDim\src\mathematics\multidimensional\AMDTransform.fx:39: cannot find symbol
symbol  : class IMDVector
location: class AMDTransform$ObjLit$5
            override function transform(vector: IMDVector):IMDVector{
Comment 4 Alexandr Scherbatiy 2010-03-11 05:14:42 UTC
Created attachment 95034 [details]
JavaFX project
Comment 5 J Bachorik 2010-03-11 10:47:14 UTC
The latest problem you experienced wasn't bound to Java->JavaFX refactoring. It was caused by incorrect indexing of references to arrays of interface.
This changeset (http://hg.netbeans.org/javafx/rev/04770dc024da) fixes the problem
Comment 6 Alexandr Scherbatiy 2010-03-15 10:34:40 UTC
NetBeans-JavaFX-Soma: #185 (Mar 15, 2010 12:01:00 AM) 

Tried the same steps:

- Open the attached project
- Go to the mathematics.multidimensional package
- Refactor->Rename the IMDVector java class to IMDVector2
- Clean and build the project


and got:

deps-jar:
MultiDim\src\mathematics\multidimensional\ICMDMatrix.java:16: cannot find symbol
symbol  : class IMDVector
location: interface mathematics.multidimensional.ICMDMatrix
    void setRow(int n, IMDVector row);
MultiDim\src\mathematics\multidimensional\ICMDMatrix.java:17: cannot find symbol
symbol  : class IMDVector
location: interface mathematics.multidimensional.ICMDMatrix
    void setColumn(int m, IMDVector column);
MultiDim\src\mathematics\multidimensional\IMDMatrix.java:16: cannot find symbol
symbol  : class IMDVector
location: interface mathematics.multidimensional.IMDMatrix
    IMDVector mul(IMDVector vector);
12 errors
Comment 7 Alexandr Scherbatiy 2010-03-15 10:36:18 UTC
Sometimes the IMDVector  class refactoring is not propagated only to Java.
Sometimes it is not propagated to JavaFX classes.
Comment 8 J Bachorik 2010-03-15 10:54:45 UTC
Please, make sure you are testing it on a clean userdir. Some residual indexing information from older versions could (even though it should not) confuse the classindex.
However, it is mighty suspicious that even java refactoring is not correct in some cases - please note that the javafx side only provides additional changes as the response to java initiated rename of the IMDVector interface, thus the java refactoring should work as expected.
Any reproducible test case would be highly appreciated (as I am not able to get the source code to uncompilable state just by renaming IMDVector interface)
Comment 9 Alexandr Scherbatiy 2010-03-15 15:05:42 UTC
I tried on Mac, and on Windows XP with the fresh userdir and the issue is not reproduced now.
Comment 10 J Bachorik 2010-03-17 13:52:36 UTC
Closing as per the last comment
Comment 11 Alexandr Scherbatiy 2010-03-18 11:06:14 UTC
verified in NetBeans-JavaFX-Soma: #189