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 173468 - Formatting breaks line for simple function body
Summary: Formatting breaks line for simple function body
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Anton Chechel
URL:
Keywords:
Depends on:
Blocks: 173487
  Show dependency tree
 
Reported: 2009-10-01 10:13 UTC by Alexandr Scherbatiy
Modified: 2010-01-25 04:24 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 2009-10-01 10:13:53 UTC
netbeans-trunk-nightly-200909301401-javafx-full.zip 

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

 - Create a JavaFX Script file:
---------------------------------------------------------------
function sqr( x:Number) { x * x } 
---------------------------------------------------------------

- Format code
  The result is:
---------------------------------------------------------------
     function sqr(x : Number) {
        x*x
    }
---------------------------------------------------------------

Code formatting should not break a function body which is written in the same line.
The result of the formatting should be:
function sqr( x:Number) { x * x }
Comment 1 Anton Chechel 2009-10-16 13:43:49 UTC
This not a bug but feature. New lines behavior is described in formatting settings (Tools-Options-Editor-Formatting).
For now I am using java settings, but later it will be rewritten for javafx. See
http://www.netbeans.org/issues/show_bug.cgi?id=174445
Comment 2 Alexandr Scherbatiy 2009-10-27 15:55:28 UTC
The issue is still valid and the implementing the  JavaFX editor settings does not mean that the issue automatically
will be fixed.
Comment 3 Anton Chechel 2009-11-11 10:45:57 UTC
fixed
http://hg.netbeans.org/javafx/rev/d6747a96c94b
Comment 4 Alexandr Scherbatiy 2009-11-20 04:43:33 UTC
The issue is still reproduced in build 200911200201.

The result of the code 'function sqr( x:Number) { x * x }' formatting is
---------------------------------------------------
function sqr(x: Number) {
    x * x
}
---------------------------------------------------
Comment 5 Petr Suchomel 2009-11-20 05:39:16 UTC
Sorry, but does this qualify to be a P2 issue?
Comment 6 Alexandr Scherbatiy 2009-11-20 05:43:53 UTC
Lowered priority to P3
Comment 7 Anton Chechel 2009-11-24 08:12:23 UTC
fixed
http://hg.netbeans.org/javafx/rev/656d5d76be1f
Comment 8 Alexandr Scherbatiy 2009-12-09 03:46:16 UTC
verified in NetBeans-JavaFX-Soma  #60
Comment 9 Petr Suchomel 2010-01-15 03:25:41 UTC
Fixed in release68_fixes
http://hg.netbeans.org/javafx/rev/f2e9dd8bdb1f
Comment 10 Alexandr Scherbatiy 2010-01-25 04:24:29 UTC
Verified in netbeans-6.8-201001241915-javafx-full.zip from /builds/netbeans/6.8/fixes