Bug 526645 - [typing] Indentation is not respected after manually formatted conditional expression
Summary: [typing] Indentation is not respected after manually formatted conditional ex...
Status: REOPENED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.7.1a   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-30 12:02 EDT by Lukas Eder CLA
Modified: 2024-04-22 10:06 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Eder CLA 2017-10-30 12:02:42 EDT
Consider the following code:

----------------------------------------------------------------
public class Indent {
    void method() {
        Object x = 1 == 0 || 2 == 1
            ? new Object()
            : null;
//          ^
        int y = 1 == 0 || 2 == 1
            ? 1
            : 0;
//      ^
    }
}
----------------------------------------------------------------

Now put the cursor after either of the semi colons and hit enter. The cursor will continue on a different indentation level each time, indicated by the "^" comments. I would consider the first case to be wrong.
Comment 1 Eclipse Genie CLA 2020-05-09 18:38:22 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.
Comment 2 Lukas Eder CLA 2020-05-11 02:58:06 EDT
Still wrong
Comment 3 Eclipse Genie CLA 2022-05-02 19:02:09 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.

If you have further information on the current state of the bug, please add it. 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.
Comment 4 Eclipse Genie CLA 2024-04-22 10:06:05 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.

If you have further information on the current state of the bug, please add it. 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.