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 177055 - Code formatting shifts brace to the left
Summary: Code formatting shifts brace to the left
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P4 normal (vote)
Assignee: Anton Chechel
URL:
Keywords:
Depends on:
Blocks: 173487
  Show dependency tree
 
Reported: 2009-11-18 02:37 UTC by Alexandr Scherbatiy
Modified: 2010-02-02 03:37 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 2009-11-18 02:37:56 UTC
Product Version         = NetBeans IDE Dev (Build 200911170201) (#3dca89945b8c)
  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 some times:
--------------------------------------------
var action : function ();

function run() {
}
--------------------------------------------

The result is:
--------------------------------------------
var action: function();

function run()          {  // <- Shifted brace
}
--------------------------------------------
Comment 1 Anton Chechel 2009-11-25 06:00:53 UTC
Works for me.
Product Version: NetBeans Platform Dev (Build 091113-975c8f5fea8c)
Java: 1.6.0_12; Java HotSpot(TM) Server VM 11.2-b01
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU
Userdir: C:\Projects\NetBeans\trunk\javafx\build\testuserdir
Comment 2 Alexandr Scherbatiy 2009-12-11 04:45:07 UTC
The issue is still reproduced in NetBeans-JavaFX-Soma:  #62

Just copy the code to the editor and format it several times.
Comment 3 Anton Chechel 2009-12-14 03:30:26 UTC
Product Version: NetBeans Platform Dev (Build 091113-975c8f5fea8c)
Java: 1.6.0_12; Java HotSpot(TM) Server VM 11.2-b01
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU
Userdir: C:\Projects\NetBeans\trunk\javafx\build\testuserdir


Works for me. Even for few times of reformatting.
Comment 4 Alexandr Scherbatiy 2009-12-17 03:41:12 UTC
I see that the issue is reproduced if a file contains comments and a package statement:
------------------------------------------------------------
/*
 * Main.fx
 *
 * Created on Dec 17, 2009, 1:26:50 PM
 */

package javafxapplication10;

var action: function();

function run() {
}
------------------------------------------------------------

In this case the bracket is shifted to the right.

After removing the comments the all works fine.
Comment 5 Anton Chechel 2010-01-25 06:38:32 UTC
fixed
http://hg.netbeans.org/javafx/rev/248fb811b56e
Comment 6 Alexandr Scherbatiy 2010-02-02 03:37:34 UTC
verified in NetBeans-JavaFX-Soma: #140