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 186456

Summary: Comments at the end of methods are not indented correctly
Product: javafx Reporter: Torbjorn Norbye <tor>
Component: EditorAssignee: Adam Sotona <asotona>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 173487    

Description Torbjorn Norbye 2010-05-20 20:47:04 UTC
The formatter will indent the following function:

function foo() {
    // Comment
}

as

function foo() {
// Comment
}


This seems to be a special case of the more general problem that line comments at the end of functions are outdented one level:

function foo() {
    lastStatement();
// Comment
}

We had a number of these cases in various interface/abstract classes -- e.g.

...
    public function onMouseClicked(event: MouseEvent): Void {
        // Called when a mouse button has been clicked (pressed and released) on this Element.
    }

    public function onMouseDragged(event: MouseEvent): Void {
        // Called when a mouse button is pressed on this Element and then dragged.
    }

These are intended to be optionally overridden, which is why there is an empty method body.


(This is with the latest formatting fixes as of JavaFX repository changeset 9f90359f8d24)
Comment 1 Martin Ryzl 2010-10-21 11:56:19 UTC
.
Comment 2 David Strupl 2011-05-16 13:52:06 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.