Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348368 - [syntax highlighting] Add highlight for inherited fields
Summary: [syntax highlighting] Add highlight for inherited fields
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.8 M7   Edit
Assignee: Björn Michael CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 349411 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-06-06 05:13 EDT by Aaron Digulla CLA
Modified: 2012-04-02 09:37 EDT (History)
2 users (show)

See Also:
daniel_megert: review+


Attachments
Patch to support Syntax Coloring of inherited fields (16.06 KB, patch)
2012-03-03 09:40 EST, Björn Michael CLA
daniel_megert: iplog+
daniel_megert: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Digulla CLA 2011-06-06 05:13:45 EDT
Please add support to highlight inherited fields.

Example:

class A {
    ...
    protected int a;
    protected int x;
    ...
}

class B extends A {
    ...
    protected int b;
    void isntThatCoolIfSomeoneOverridesA() {
        a = b;
        x = b * b;
    }
    ...
}

In the example, "a" and "x" should be highlighted using a special "inherited field" style.
Comment 1 Dani Megert CLA 2011-06-15 06:02:31 EDT
*** Bug 349411 has been marked as a duplicate of this bug. ***
Comment 2 Björn Michael CLA 2012-03-03 09:40:57 EST
Created attachment 212025 [details]
Patch to support Syntax Coloring of inherited fields

May be too late for 3.8
Comment 3 Dani Megert CLA 2012-03-12 07:47:44 EDT
(In reply to comment #2)
> Created attachment 212025 [details] [diff]
> Patch to support Syntax Coloring of inherited fields
> 
> May be too late for 3.8

I'll take a look during M7.
Comment 4 Dani Megert CLA 2012-04-02 09:36:43 EDT
Thanks for the patch Björn. It works and even adds a test case!

I committed your patch with three changes:
- added copyright information
- adjusted copyright date
- ignored the change in AbstractSemanticHighlightingTest since it's not related
  to this bug

Fixed in master: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=cfd27e285557bf393c955344ac00ab86a9c53c4b