Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/AnnotationColumn.java')
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/AnnotationColumn.java24
1 files changed, 10 insertions, 14 deletions
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/AnnotationColumn.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/AnnotationColumn.java
index ba70bcc94d5..7de33bf4cb5 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/AnnotationColumn.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/AnnotationColumn.java
@@ -23,7 +23,6 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.text.source.Annotation;
import org.eclipse.jface.text.source.AnnotationRulerColumn;
@@ -128,19 +127,16 @@ public class AnnotationColumn extends AbstractContributedRulerColumn implements
column.addAnnotationType(Annotation.TYPE_UNKNOWN);
// link to preference store
- fPropertyListener= new IPropertyChangeListener() {
- @Override
- public void propertyChange(PropertyChangeEvent event) {
- String property= event.getProperty();
- AnnotationPreference annotationPreference= getVerticalRulerAnnotationPreference(property);
- if (annotationPreference != null && property.equals(annotationPreference.getVerticalRulerPreferenceKey())) {
- Object type= annotationPreference.getAnnotationType();
- if (getPreferenceStore().getBoolean(property))
- column.addAnnotationType(type);
- else
- column.removeAnnotationType(type);
- column.redraw();
- }
+ fPropertyListener= event -> {
+ String property= event.getProperty();
+ AnnotationPreference annotationPreference= getVerticalRulerAnnotationPreference(property);
+ if (annotationPreference != null && property.equals(annotationPreference.getVerticalRulerPreferenceKey())) {
+ Object type= annotationPreference.getAnnotationType();
+ if (getPreferenceStore().getBoolean(property))
+ column.addAnnotationType(type);
+ else
+ column.removeAnnotationType(type);
+ column.redraw();
}
};
store.addPropertyChangeListener(fPropertyListener);

Back to the top