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

Bug 370913

Summary: [implementation] No images for annotations on platform startup
Product: [Eclipse Project] Platform Reporter: Wojciech Trocki <wtrocki>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, pwebster, remy.suen
Version: 4.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Wojciech Trocki CLA 2012-02-08 03:29:26 EST
Build Identifier: 

Class  org.eclipse.ui.texteditor.AnnotationPreference has following method:

public IAnnotationImageProvider getAnnotationImageProvider() {
if (fAnnotationImageProvider == null) {
  if (fConfigurationElement != null && fAnnotationImageProviderAttribute != null) {
	Bundle bundle= Platform.getBundle( fConfigurationElement.getContributor().getName());
	  if (bundle != null && bundle.getState() == Bundle.ACTIVE) {
		...performs action if bundle is started 		
	  }
	}
  }
		return fAnnotationImageProvider; 
}

This method returns null if plugin is not started. So annotations from not started plugins will not have right images.
But this null is cached (see references) and if our bundle is started it always return null. Only removing and adding the same markers helps. 

So when starting eclipse all markers images are red triangles. 
I think that plugin should be started there or.. caching for image provider should prevent null. 
I found several workaround (using IStartup extension point) in some plugins like boxing-plugin or checkstyle. 


Reproducible: Always
Comment 1 Lars Vogel CLA 2019-11-14 03:26:51 EST
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.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.