Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 65264 - [typing] Correct Indentation doesn't work for longer statements (with '.')
Summary: [typing] Correct Indentation doesn't work for longer statements (with '.')
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 250134 283533 331353 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-06-02 06:35 EDT by Danny Dig CLA
Modified: 2020-04-25 18:26 EDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Danny Dig CLA 2004-06-02 06:35:00 EDT
I have something like this in my code:

ImageDescriptor descriptor = PlatformUI.getWorkbench()
   .getSharedImages().getImageDescriptor(
       ISharedImages.IMG_TOOL_REDO);

If I do a correct indentation on the above statement this is what I get:

ImageDescriptor descriptor = PlatformUI.getWorkbench()
.getSharedImages().getImageDescriptor(
    ISharedImages.IMG_TOOL_REDO);

I tried to do a correct indentation for other statements which span more than 
one line and the same bug occurs.

Build id: 200405290105
Comment 1 John M Flinchbaugh CLA 2005-12-08 09:23:54 EST
Here's another example of this discrepency between "source->correct indentation" and "source->format".

format:
public class Configuration extends java.lang.Object implements
        Serializable, Comparable {

correct indentation:
public class Configuration extends java.lang.Object implements
Serializable, Comparable {
Comment 2 Dani Megert CLA 2008-10-09 04:22:08 EDT
*** Bug 250134 has been marked as a duplicate of this bug. ***
Comment 3 Markus Keller CLA 2010-06-18 12:36:27 EDT
*** Bug 283533 has been marked as a duplicate of this bug. ***
Comment 4 Markus Keller CLA 2010-06-18 12:41:24 EDT
Same problem when line break is at binary operator:

public class TestCase {
    TestCase thisIsALongMethoName() {
        return null;
    }

    void bar() {
        thisIsALongMethoName().thisIsALongMethoName().thisIsALongMethoName()
                .thisIsALongMethoName();
    }

    void bar2() {
        boolean b = thisIsALongMethoName().thisIsALongMethoName() == null
                && thisIsALongMethoName().thisIsALongMethoName() != null;
    }

}


See also bug 65463 (conditional expression).
Comment 5 Markus Keller CLA 2010-06-24 11:27:11 EDT
> See also bug 65463 (conditional expression).
... and bug 296943 (string concatenation) and bug 75573 (string argument).
Comment 6 Dani Megert CLA 2011-04-13 09:07:51 EDT
*** Bug 331353 has been marked as a duplicate of this bug. ***
Comment 7 Dani Megert CLA 2011-04-13 09:10:07 EDT
>    void bar2() {
>        boolean b = thisIsALongMethoName().thisIsALongMethoName() == null
>                && thisIsALongMethoName().thisIsALongMethoName() != null;
>    }
This is fixed in 3.7 M6.
Comment 8 Seiji Komatsu CLA 2012-09-30 15:46:28 EDT
Has this being pending?
I'm using Eclipse 4.2.1, and stressed a little by chained method indentation behavior that reported as the above.
Comment 9 Dani Megert CLA 2012-10-02 08:05:59 EDT
(In reply to comment #8)
> Has this being pending?
> I'm using Eclipse 4.2.1, and stressed a little by chained method indentation
> behavior that reported as the above.

There's currently no one working in this.
Comment 10 Eclipse Genie CLA 2020-04-25 18:26:59 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.