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.
Steps to reproduce: - Open the attached project - Right-click on the mathematics.graph.GView class and select Refactor->Move - Select the mathematics.graph.simple package - Press Refactor - clean and build the project: MultiDim\src\mathematics\graph\simple\GSimpleVertex.fx:12: Loose expressions are not permitted in scripts with exported ('public', etc) members. Any expressions to be run on script invocation should be moved into run(). importmathematics.graph.simplet.Text; MultiDim\src\mathematics\graph\simple\GSimpleEdge.fx:8: cannot find symbol symbol : class GEdge location: package mathematics.graph.simple import mathematics.graph.simple.GEdge; MultiDim\src\mathematics\graph\simple\GSimpleEdge.fx:17: cannot find symbol symbol : class GEdge location: class mathematics.graph.simple.GSimpleEdge public class GSimpleEdge extends GEdge { MultiDim\src\mathematics\graph\simple\GSimpleVertex.fx:48: cannot find symbol symbol : class Text location: class mathematics.graph.simple.GSimpleVertex.Text$ObjLit$5 Text { MultiDim\src\mathematics\graph\simple\GSimpleEdge.fx:32: cannot find symbol symbol : variable vertex1 location: class mathematics.graph.simple.GSimpleEdge var v1 = vertex1 as GSimpleVertex; MultiDim\src\mathematics\graph\simple\GSimpleEdge.fx:33: cannot find symbol symbol : variable vertex2 location: class mathematics.graph.simple.GSimpleEdge var v2 = vertex2 as GSimpleVertex; MultiDim\src\mathematics\graph\simple\GSimpleEdge.fx:60: cannot find symbol symbol : variable vertex1 location: class mathematics.graph.simple.GSimpleEdge "Edge {vertex1}, {vertex2}" MultiDim\src\mathematics\graph\simple\GSimpleEdge.fx:60: cannot find symbol symbol : variable vertex2 location: class mathematics.graph.simple.GSimpleEdge "Edge {vertex1}, {vertex2}" MultiDim\src\mathematics\graph\simple\GSimpleEdge.fx:59: function toString() declared 'override' but does not override another function. override function toString() { MultiDim\src\mathematics\graph\simple\GSimpleGraph.fx:89: cannot find symbol symbol : variable vertex1 location: class mathematics.graph.simple.GSimpleEdge edge = GSimpleEdge {vertex1: v1 vertex2: v2 }; MultiDim\src\mathematics\graph\simple\GSimpleGraph.fx:89: cannot find symbol symbol : variable vertex2 location: class mathematics.graph.simple.GSimpleEdge edge = GSimpleEdge {vertex1: v1 vertex2: v2 }; MultiDim\src\mathematics\graph\simple\GSimpleGraph.fx:48: inconvertible types found : mathematics.graph.GEdge required: mathematics.graph.simple.GSimpleEdge for(edge in edges) (edge as GSimpleEdge).shape(), MultiDim\src\mathematics\graph\simple\GSimpleVertex.fx:49: Invalid assignment x: -5 y: 5 MultiDim\src\mathematics\graph\simple\GSimpleVertex.fx:49: Invalid assignment x: -5 y: 5 MultiDim\src\mathematics\graph\simple\GSimpleVertex.fx:50: Invalid assignment content: bind "{n}" MultiDim\src\mathematics\graph\simple\GSimpleVertex.fx:51: Invalid assignment fill: bind view.textFill MultiDim\src\mathematics\graph\simple\GSimpleVertex.fx:52: Invalid assignment font: Font {size: 16 } MultiDim\src\mathematics\graph\simple\GSimpleGraph.fx:47: incompatible types found : Object[] required: javafx.scene.Node[] content: bind [
Created attachment 97459 [details] JavaFX project
NetBeans IDE 6.9 Beta Product Version = NetBeans IDE 6.9 Beta (Build 201004142028) (#b0fcf3f1c0b5) 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.
This seems as an issue in the editor library - when I check the transformations for the move in the refactoring preview everything seems fine but when I run the refactoring the text is garbled rather randomly - from out of cca. 5 runs the GSimpleVertex class was corrupted 2 times - the rest of the runs it was transformed correctly. Also, when I run the IDE under debugger and put a breakpoint at each transformation call the refactoring runs fine. The "undo refactoring" action seems to be broken randomly as well - we are using the shared backup/restore infrastructure provided by the refactoring api but in spite of that the "undo refactoring" action corrupts the sources (leaving some parts of the refactoring in place or just rewriting parts of the text with another text part). I'm looking into this but it seems that this might be a pretty nasty stopper if my suspicions are confirmed :(
Mea culpa .. It was completely my fault - the text modifying infrastructure couldn't handle correctly replacing a text occurrence after the text to be modified has been removed previously. The fix consists of tracking such removals and handling replacements correctly. However, this heals only symptoms - it will probably require a more robust smart text modifying support in the future. http://hg.netbeans.org/javafx/rev/94d1dbb81a7f
verified in NetBeans-JavaFX-Soma: #227