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.
Summary: | Unable to refactor a JavaFX class | ||
---|---|---|---|
Product: | javafx | Reporter: | Alexandr Scherbatiy <sunflower> |
Component: | Unsupported | Assignee: | J Bachorik <yardus> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 173077 | ||
Attachments: | JavaFX project |
Description
Alexandr Scherbatiy
2009-10-07 10:06:22 UTC
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 |