Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorteicher2004-02-10 10:51:48 +0000
committerteicher2004-02-10 10:51:48 +0000
commit4591e0b9d096c58752b827b50a555f260376f4b4 (patch)
tree06d3587013a01c0a1804055d2faaa8b499bfdb6f /org.eclipse.ui.editors
parentc910e9067972186d4174470608ae79c38c0f20eb (diff)
downloadeclipse.platform.text-4591e0b9d096c58752b827b50a555f260376f4b4.tar.gz
eclipse.platform.text-4591e0b9d096c58752b827b50a555f260376f4b4.tar.xz
eclipse.platform.text-4591e0b9d096c58752b827b50a555f260376f4b4.zip
- made decoration style constants follow enumeration pattern
- drawing strategies can be registered with annotation painter, giving an id
Diffstat (limited to 'org.eclipse.ui.editors')
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerAnnotationPreferences.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerAnnotationPreferences.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerAnnotationPreferences.java
index 509b1baa4..d814c4d67 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerAnnotationPreferences.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerAnnotationPreferences.java
@@ -326,14 +326,11 @@ public class MarkerAnnotationPreferences {
s= element.getAttribute("textStylePreferenceValue"); //$NON-NLS-1$
if (s != null && s.trim().length() > 0) {
- if (s.equals("SQUIGGLIES"))
- info.setTextStyleValue(AnnotationPreference.STYLE_SQUIGGLIES);
- else if (s.equals("BOX"))
- info.setTextStyleValue(AnnotationPreference.STYLE_BOX);
- else if (s.equals("UNDERLINE"))
- info.setTextStyleValue(AnnotationPreference.STYLE_UNDERLINE);
- else if (s.equals("IBEAM"))
- info.setTextStyleValue(AnnotationPreference.STYLE_IBEAM);
+ if (AnnotationPreference.STYLE_BOX.equals(s)
+ || AnnotationPreference.STYLE_IBEAM.equals(s)
+ || AnnotationPreference.STYLE_SQUIGGLIES.equals(s)
+ || AnnotationPreference.STYLE_UNDERLINE.equals(s))
+ info.setTextStyleValue(s);
else
info.setTextStyleValue(AnnotationPreference.STYLE_NONE);

Back to the top