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 184279 - Keep one line formatting if the expression is written only on one line
Summary: Keep one line formatting if the expression is written only on one line
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:
Depends on:
Blocks: 173487
  Show dependency tree
 
Reported: 2010-04-15 13:36 UTC by Alexandr Scherbatiy
Modified: 2011-05-16 13:51 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
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-15 13:36:37 UTC
NetBeans IDE 6.9 Beta 

  Product Version         = NetBeans IDE 6.9 Beta (Build 201004142028)
(#b0fcf3f1c0b5)
  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:
-------------------------------------
var N = 5;
var fact = {var n = 1; for(i in [1..N]){ n = i * n}  n };
-------------------------------------

The result is:
-------------------------------------
var N = 5;
var fact = {
            var n = 1;
            for (i in [1..N]) {
                n = i * n
            }
            n
        };
-------------------------------------
Comment 1 Anton Chechel 2010-04-19 13:36:51 UTC
So what is the problem? :)
Comment 2 Anton Chechel 2010-04-26 11:21:53 UTC
Currently formatter will keep one line formatting if block contains one expression only.

Like:
var a = if true 10 else 20;

In code above there are more expressions so formatter algorithm's complication should be increased significantly. You can create ENCHANCEMENT issue if you want.
Comment 3 Alexandr Scherbatiy 2010-05-12 13:00:34 UTC
Keep one line formatting if the expression is written only on one line
Comment 4 Martin Ryzl 2010-10-21 11:55:38 UTC
.
Comment 5 David Strupl 2011-05-16 13:51:24 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.