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 180146 - Last curly bracket is not properly formatted
Summary: Last curly bracket is not properly formatted
Status: RESOLVED WONTFIX
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Adam Sotona
URL:
Keywords:
: 180149 185665 (view as bug list)
Depends on:
Blocks: 173487
  Show dependency tree
 
Reported: 2010-02-02 05:54 UTC by Alexandr Scherbatiy
Modified: 2011-05-16 13:50 UTC (History)
1 user (show)

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-02-02 05:54:48 UTC
NetBeans-JavaFX-Soma: #140

  Product Version         = NetBeans IDE Dev (Build 201001280200)
(#eeef33500a1a)
  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.scene.*;
import javafx.scene.shape.*;
import javafx.scene.text.*;

public class MyText extends CustomNode {

    var content = "Hello World!";

    override function create() {
        Group {
            content: [
                Rectangle {
                    }
                Text {
                    cursor: Cursor.MOVE
                    content: bind content
                }
            ]
        }
    }

    }
------------------------------------------------------------
- Format the code

The last bracket is not properly formatted:
------------------------------------------------------------
public class MyText extends CustomNode {
     // ....
    }
------------------------------------------------------------
Comment 1 Anton Chechel 2010-02-03 07:11:18 UTC
*** Bug 180149 has been marked as a duplicate of this bug. ***
Comment 2 Alexandr Scherbatiy 2010-02-05 04:04:02 UTC
The same is for functions:

Steps to reproduce:

- Copy the code to the editor:
------------------------------------------------------------
function run() {
    } 
------------------------------------------------------------
- Format the code

The last bracket is not properly formatted:
------------------------------------------------------------
function run() {
    } 
------------------------------------------------------------
Comment 3 Anton Chechel 2010-02-10 07:12:10 UTC
Decreasing priority. It's not P2.
Comment 4 Alexandr Scherbatiy 2010-02-11 04:56:02 UTC
1. It is the regression from the previous relese
2. It is common use case. 
  Usually the JavaFX classes have methods and incorrect formatting makes it useless for using for the whole code.
Comment 5 Anton Chechel 2010-02-11 05:57:35 UTC
1. It's not regression. That bug was before.
2. It is not common, it occurs only when there is exact number of spaces as current indent (4 in example below). If you add or remove one space - it formatted correctly. And it's not in methods, it is in any block.
Comment 6 Alexandr Scherbatiy 2010-02-11 07:40:24 UTC
NetBeans-JavaFX-Soma:  #149

- Format the code
-----------------------------------
import javafx.scene.layout.HBox;

HBox {
}
-----------------------------------

The result is:
-----------------------------------
import javafx.scene.layout.HBox;

HBox {
    }
-----------------------------------
Comment 7 Alexandr Scherbatiy 2010-04-22 09:56:38 UTC
The code is not formatted:

-----------------------------------
import javafx.util.Math;

public class FXVector {

    public-init var x: Number;
    public-init var y: Number;

    public function getLength(): Number {
        return Math.sqrt(x * x + y * y);
    }

    }
-----------------------------------
Comment 8 Anton Chechel 2010-06-14 12:44:39 UTC
*** Bug 185665 has been marked as a duplicate of this bug. ***
Comment 9 Martin Ryzl 2010-10-21 11:54:59 UTC
.
Comment 10 David Strupl 2011-05-16 13:50:37 UTC
Closing all bugs filed against JavaFX 1.x as wontfix. We will support JavaFX 2.0 - please keep opened only bugs against the new release. Thanks.