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 183870 - Formatting uncompilable code breaks object literals
Summary: Formatting uncompilable code breaks object literals
Status: VERIFIED WONTFIX
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Anton Chechel
URL:
Keywords:
Depends on:
Blocks: 173487
  Show dependency tree
 
Reported: 2010-04-12 08:56 UTC by Alexandr Scherbatiy
Modified: 2010-04-22 11:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2010-04-12 08:56:15 UTC
NetBeans-JavaFX-Soma:  #217

  Product Version         = NetBeans IDE Dev (Build 201004110201)
(#ca66f5e3f93f)
  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:

- Format the code which is not compilable:
---------------------------------------
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.CustomNode;
import javafx.scene.Group;
import javafx.scene.Node;

class MyButton extends CustomNode {

    public override function create(): Node {
        Group {
            content: []
        }


}

Stage {
    title: "Application title"
    scene: Scene {
        width: 250
        height: 80
        content: [
            Text {
                font: Font {
                    size: 16
                }
                x: 10
                y: 30
                content: "Application content"
            }
        ]
    }
}
---------------------------------------

The result is:
---------------------------------------
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.CustomNode;
import javafx.scene.Group;
import javafx.scene.Node;

class MyButton extends CustomNode {

    public override function create(): Node {
        Group {
            content: []
        }
    }

    Stage {
    title: "Application title"
    scene: Scene {
        width: 250
        height: 80
        content: [
            Text {
                font: Font {
                    size: 16
}

x: 10
y



: 30
content



: "Application content"
}

]
    }
}
---------------------------------------
Comment 1 Anton Chechel 2010-04-22 11:27:22 UTC
Uncompilable code can not be formatted.
Comment 2 Alexandr Scherbatiy 2010-04-22 11:30:53 UTC
Does it mean the the format code action should does nothing in case if code is uncompilable?
Comment 3 Anton Chechel 2010-04-22 11:35:56 UTC
I don't know and I don't think this is important.
Comment 4 Alexandr Scherbatiy 2010-04-22 11:38:51 UTC
verified as unimportant issue.