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 122841 - Formatting of method call chain
Summary: Formatting of method call chain
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-27 13:22 UTC by witoldsz
Modified: 2008-03-19 10:30 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 witoldsz 2007-11-27 13:22:24 UTC
Hello there,
NB6 (tested on RC1) has some problem with formatter.
Look on this example:

Number transAfterCnt = (Number) em.createQuery(
        "SELECT COUNT(t) " +
        " ...many lines here..." +
        " ...final Sttring "
        )
        .setParameter(1, loan)
        .setParameter(2, txDate)
        .setParameter(2, txId)
        .getSingleResult();


And this is what NB6 formatter does:

Number transAfterCnt = (Number) em.createQuery(
        "SELECT COUNT(t) " +
        " ...many lines here..." +
        " ...final Sttring ").setParameter(1, loan).setParameter(2, txDate).setParameter(2, txId).getSingleResult();

It is happening with everything which looks like the above, every time you have something like

SomeClass s =  something()
 .someMethod1()
 .someMethod2() 
 .someMethod3()
 .someMethod4()
 .someMethod5();

[alt+shift+f]

SomeClass s =  something().someMethod1().someMethod2().someMethod3().someMethod4().someMethod5();

It is formatting everything to be in one line, very problematic issue :(
Comment 1 Dusan Balek 2008-03-19 10:30:32 UTC
Should be fixed in the current dev build.