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 174197 - Code formatting inserts a blank between variable and colon
Summary: Code formatting inserts a blank between variable and colon
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Anton Chechel
URL:
Keywords: REGRESSION
Depends on:
Blocks: 173487
  Show dependency tree
 
Reported: 2009-10-09 10:33 UTC by Alexandr Scherbatiy
Modified: 2009-11-18 02:34 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-10-09 10:33:38 UTC
Product Version         = NetBeans IDE Dev (Build 200910080418) (#4925e52d6715)
  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:
---------------------------------------------------
var a:String = "Hello World";

function sqr(x:Number):Number {
    x * x
}
---------------------------------------------------

- Format the code
The result is:
---------------------------------------------------
var a : String = "Hello World";  

function sqr(x : Number) : Number {
    x * x
}
---------------------------------------------------

There are blanks:
  - a : String
  - x : Number
  - ) : Number
Comment 1 Anton Chechel 2009-10-16 14:56:24 UTC
It's not a bug but feature. User can change this in reformatting settings.
Comment 2 Alexandr Scherbatiy 2009-10-27 12:06:37 UTC
Could the default settings be changed to 
--------------------------------------
var a: String;
function sqr(x: Number):Number {
    x * x
}
--------------------------------------

Comment 3 Alexandr Scherbatiy 2009-10-29 13:45:31 UTC
The old code formatter did not place a space between a variable and a colon
Comment 4 Anton Chechel 2009-11-11 10:56:11 UTC
Будь по-твоему. :)

fixed
http://hg.netbeans.org/javafx/rev/5cb7728f79b2
Comment 5 Alexandr Scherbatiy 2009-11-18 02:34:01 UTC
verified in Build 200911170201