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.
Product Version = NetBeans IDE Dev (Build 200910061401) (#941078cbc4d4) 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 JavaFX project with the Main file - Create 'A' JavaFX class - Right-click the 'A' class in the project tree and select Refactor->Rename The Rename dialog appears with message 'Cannot refactor library class "javafxapplication.A"'
Could you, plz, attach a project exhibiting this problem? I've followed your instructions but was not able to reproduce it.
Created attachment 88984 [details] JavaFX project
I have attached the JavaFX project. What I see is: 1. I opened the attached project and renamed the JavaFX class. It works. 2. I deleted the NB userdir and started the IDE. I am able to rename a JavaFX class. 3. I crated a JavaFX project and tried renaming the Stage class from the Main file. It said that "cannot refactor library class" I tried it with the Stage declaration and the stage importing: --------------------------------------- import javafx.stage.Stage; Stage { } --------------------------------------- Than I created 'A' JavaFX class. Now I am not able to refactor the 'A' class because it says 'Cannot refactor library class "javafxapplication.A"'
One more case: - Copy the code to the editor: --------------------------------------------------- import javafx.scene.*; class MyCustomNode extends CustomNode { public override function create(): Node { Group { }; } } Scene{ content: MyCustomNode{} } --------------------------------------------------- - Refactor->Rename the MyCustomNode class to MyCustomNode2 - Refactor->Rename the MyCustomNode2 class to MyCustomNode3 The Rename dialog appears with message 'Cannot refactor library class "javafxapplication.Main.MyCustomNode2"'
I am still not able to reproduce it reliably. I get the message in 1 case out of cca. 20 - mostly when there is background scanning active. However, when I close the dialog and retry the action everything works fine. SourceForBinaryQuery is used to determine whether a certain element is eligible for refactoring or not. It seems that the result of the query depends on the background scanning state. If we are able to come up with a 100% reproducible test case we should probably file an issue on Parsing API. Until then, I am lowering the priority as it doesn't seem to occur frequently and the workaround seems to be quite easy - just try the action again after few seconds.
This seems to be fixed as a side effect of changes in http://hg.netbeans.org/javafx/rev/83520bd3960f
It seems that the issue is not reproduced in Build 200910271401