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 175582

Summary: Code formating shifts class name
Product: javafx Reporter: Alexandr Scherbatiy <sunflower>
Component: EditorAssignee: Anton Chechel <manowar>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 173487    

Description Alexandr Scherbatiy 2009-10-28 12:00:41 UTC
Product Version         = NetBeans IDE Dev (Build 200910271401) (#32576b20b4bb)
  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:
- Copy the code to the editor:
----------------------------------------------------
import javafx.stage.Stage;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;

class MyFrame extends Stage {

    public var content:Node[];

    init{
        scene = Scene{
            content:content
        }
    }
}


MyFrame{
    content: [
        Text {
                font : Font { size: 24   }
                x: 10   , y: 30
                content : "Hello World!"
        }
    ]
}
----------------------------------------------------

- Format the code

The result is
----------------------------------------------------
         class MyFrame extends Stage {

    public var content:Node[];

    init{
        scene = Scene{
            content:content
        }
    }
}
----------------------------------------------------

There are spaces before the 'class MyFrame extends Stage {' line
Comment 1 Anton Chechel 2009-10-31 17:31:11 UTC
This bug caused by http://javafx-jira.kenai.com/browse/JFXC-3581
Compiler scans first javafx$run$() method in which MyFrame is instantiated.
Comment 2 Anton Chechel 2009-11-02 14:24:20 UTC
*** Issue 175652 has been marked as a duplicate of this issue. ***
Comment 3 Anton Chechel 2009-11-11 11:00:20 UTC
fixed by http://hg.netbeans.org/javafx/rev/2e6affd7a86e
Comment 4 Alexandr Scherbatiy 2009-11-18 03:17:23 UTC
verified in Build 200911170201