Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 348368

Summary: [syntax highlighting] Add highlight for inherited fields
Product: [Eclipse Project] JDT Reporter: Aaron Digulla <digulla>
Component: TextAssignee: Björn Michael <b.michael>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: b.michael, daniel_megert
Version: 3.7Flags: daniel_megert: review+
Target Milestone: 3.8 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch to support Syntax Coloring of inherited fields daniel_megert: iplog+, daniel_megert: review+

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