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 173368 - Triggers are not properly formatted
Summary: Triggers are not properly formatted
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:
Depends on:
Blocks: 173487
  Show dependency tree
 
Reported: 2009-09-30 10:39 UTC by Alexandr Scherbatiy
Modified: 2009-11-17 07:31 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-09-30 10:39:46 UTC
Product Version         = NetBeans IDE 6.8 Beta (Build 200909281634) (#066b555e5ecf)
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 = 3 on replace{
    println(a);
}
--------------------------------------------------

- Format the code
The result is:
--------------------------------------------------
     var a  =  3 

on replace{
    println(a);
}
--------------------------------------------------
Comment 1 Alexandr Scherbatiy 2009-10-01 10:22:55 UTC
The same is for the class triggers.

Format the code:
------------------------------------------------- 
class Foo {
    var x : Integer on replace = newV { println("x: =>{newV}={x}"); };
    var y : Integer on replace { println("y: {y}"); };
    var z : String = "Ralph" on replace { println("z: {z}"); };
}
------------------------------------------------- 

The result is:
------------------------------------------------- 
 class Foo {

       

        var x : Integer 
          
            on replace = newV { println("x: =>{newV}={x}"); };
    var y : Integer on replace { println("y: {y}"); };
    var z : String = "Ralph" 
    

on replace { println("z: {z}"); };
}
------------------------------------------------- 
Comment 2 Anton Chechel 2009-11-11 06:52:26 UTC
Formatting it-self has been fixed: http://hg.netbeans.org/javafx/rev/87263c31d320

Formatting of block expression in the "on replace" clause depends on wrapping "Brace Placement" settings. If wrapping is incorrect, then it's another issue, not P2 for sure. Formatting settings are not implemented yet, but should be asap.
Comment 3 Alexandr Scherbatiy 2009-11-17 07:31:51 UTC
verified in Build 200911170201