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 - Comments at the end of methods are not indented correctly
Summary: Comments at the end of methods are not indented correctly
Status: RESOLVED WONTFIX
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Adam Sotona
URL:
Keywords:
Depends on:
Blocks: 173487
  Show dependency tree
 
Reported: 2010-05-20 20:47 UTC by Torbjorn Norbye
Modified: 2011-05-16 13:52 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 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.