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

Bug 332124

Summary: [syntax highlighting] Semantic highlighting sometimes doesn't appear in class file editor
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: TextAssignee: Dani Megert <daniel_megert>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.7   
Target Milestone: 3.7 M5   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Fix none

Description Markus Keller CLA 2010-12-08 08:29:47 EST
I20101207-2000

Semantic highlighting sometimes doesn't appear in class file editor.

Steps:
- set an access and modification breakpoint on JavaEditor.fSemanticManager
- open a class file editor
=> suspended in JavaEditor.installSemanticHighlighting() and in ClassFileEditor.doSetInput(...).new Job() {...}.run(IProgressMonitor)

When the Job proceeds first, semantic highlighting are missing.

Furthermore, fSemanticManager and other fields are not volatile, so they aren't guaranteed to be up-to-date (this is not an issue any more if you know that the field will not be modified after the job has been scheduled).
Comment 1 Dani Megert CLA 2011-01-24 11:47:25 EST
Created attachment 187445 [details]
Fix
Comment 2 Dani Megert CLA 2011-01-24 11:47:37 EST
Fixed in HEAD.
Available in builds > I20110124-0916.
Comment 3 Dani Megert CLA 2011-01-25 10:35:46 EST
Verified in I20110124-1800.