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

Bug 364695

Summary: [implementation] DelegatingAnnotationPreference does not override all get-methods of AnnotationPreference
Product: [Eclipse Project] Platform Reporter: Ulf Caspers <UCaspers>
Component: TextAssignee: Dani Megert <daniel_megert>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.6.2   
Target Milestone: 3.8 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
test plug-in (sources included) none

Description Ulf Caspers CLA 2011-11-24 05:17:05 EST
org.eclipse.ui.internal.texteditor.DelegatingAnnotationPreference extends org.eclipse.ui.texteditor.AnnotationPreference so that the attributes are created on request and no longer stored in the fAttributes-Map of AnnotationPreference. Unfortunately some of the get-methods of AnnotationPreference have no override in DelegatingAnnotationPreference (e.g. getTextStylePreferenceKey()) and try to find their vaue in the fAttributs-Map. That causes the result of those methods to be always null even if that value is defined in the extensionpoint.
Comment 1 Dani Megert CLA 2011-11-24 05:23:00 EST
Where does this cause a problem? Please provide steps to reproduce or a sample plug-in that shows the problem.
Comment 2 Ulf Caspers CLA 2011-11-24 06:17:19 EST
Created attachment 207473 [details]
test plug-in (sources included)

The testcase is a simple toolbar action showing the results of a read of the annotation preferences. Allthough the sample annotation in the plugin specifies a key for textStyle, the value for that key is reportetd as null.