Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364695 - [implementation] DelegatingAnnotationPreference does not override all get-methods of AnnotationPreference
Summary: [implementation] DelegatingAnnotationPreference does not override all get-met...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.6.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.8 M7   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-24 05:17 EST by Ulf Caspers CLA
Modified: 2012-03-21 13:08 EDT (History)
1 user (show)

See Also:


Attachments
test plug-in (sources included) (4.98 KB, application/octet-stream)
2011-11-24 06:17 EST, Ulf Caspers CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.