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 158110 - Code does not format well
Summary: Code does not format well
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Anton Chechel
URL:
Keywords:
Depends on:
Blocks: 155841
  Show dependency tree
 
Reported: 2009-02-06 23:41 UTC by shche123
Modified: 2009-04-16 11:44 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 shche123 2009-02-06 23:41:23 UTC
var images = 
for (i in [1..17]) {
    Image { 
        url: "{__DIR__}images/T{i}.gif"};
}
Comment 1 shche123 2009-02-07 00:52:03 UTC
fix imports also formats code

from:
-----
var t = Timeline {
    repeatCount: Timeline.INDEFINITE
    keyFrames: 
    for (image in images)[
        KeyFrame {
            time: 100ms * indexof image
            action: function(){
                currDuke = image;
            }
        }
    ]
}

to:
---
var t = Timeline {
    repeatCount: Timeline.INDEFINITE
    keyFrames: for (image in images)[
            KeyFrame {
                time: 100ms * indexof image
                action: function(){
                    currDuke = image;
                }
            }
        ]
}

format reformats the code back 
to:
---
var t = Timeline {
    repeatCount: Timeline.INDEFINITE
    keyFrames: 
    for (image in images)[
        KeyFrame {
            time: 100ms * indexof image
            action: function(){
                currDuke = image;
            }
        }
    ]
}
Comment 2 shche123 2009-02-07 01:19:00 UTC
formatter does not seem to adjust white space:
> space before and after equals sign
> white space before closing '}'
> multiple blank lines between code
------------------------------------

var imageView=ImageView {
    image: Image {
        url: "{__DIR__}images/java_duke_mascot.jpg"
    }
    effect: Reflection { 
        fraction: 0.7 
    }
    x: 200
    y: 100
           }
           
           
Stage {
Comment 3 Anton Chechel 2009-03-19 18:26:04 UTC
fixed, old reformat has been disabled
Comment 4 Alexandr Scherbatiy 2009-04-16 11:44:46 UTC
code formating has been disabled