Bug 458739 - Better control flow scope indication when applying bracket highlighting
Summary: Better control flow scope indication when applying bracket highlighting
Status: CLOSED DUPLICATE of bug 84878
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-29 08:39 EST by Lukas Eder CLA
Modified: 2015-07-23 09:40 EDT (History)
1 user (show)

See Also:


Attachments
Better scope indication (36.33 KB, image/png)
2015-01-29 08:39 EST, Lukas Eder CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Eder CLA 2015-01-29 08:39:09 EST
Created attachment 250351 [details]
Better scope indication

I love bracket highlighting and related features. However, as it is right now, it only works for rather short scopes. When a control flow structure spans dozens of lines, it's rather hard to see what the matching element is.

Take this piece of code, for example:

------------------------------------------------------------------------
public class Test {

    public static void main(String[] args) {
        boolean condition = true;

        label: for (;;) {
            if (condition)
                break label;

            if (condition)
                return;
        }
    }

}
------------------------------------------------------------------------

When I put the caret on "return", then "void" and the curly brace closing the method are highlighted only subtly.

When I put the caret on "break", then "label" and the curly brace closing the for loop are highlighted only subtly.

For me, it would be very useful if there would be some visual help tracing the whole block from top to bottom either directly in the editor, or at the left side of the editor, where line numbers and tags are located.

Currently, there is a blue-ish box showing the scope of the whole method, but when I highlight "break", I'm more interested in the scope of the for loop.

I've attached a screenshot with an illustration of what I mean.
Comment 1 Dani Megert CLA 2015-07-23 09:40:12 EDT

*** This bug has been marked as a duplicate of bug 84878 ***