diff options
author | Kai Maetzel | 2004-04-01 10:54:57 +0000 |
---|---|---|
committer | Kai Maetzel | 2004-04-01 10:54:57 +0000 |
commit | 80588cb26fc0f1dee750d3c0186e6faee4a7a209 (patch) | |
tree | c65e03182c3b7fd58c519a55534427f1842c7bed /org.eclipse.jface.text | |
parent | 7e02f95a40c6b169cb2661396e7048b4f2c6663c (diff) | |
download | eclipse.platform.text-80588cb26fc0f1dee750d3c0186e6faee4a7a209.tar.gz eclipse.platform.text-80588cb26fc0f1dee750d3c0186e6faee4a7a209.tar.xz eclipse.platform.text-80588cb26fc0f1dee750d3c0186e6faee4a7a209.zip |
changed subclass API
Diffstat (limited to 'org.eclipse.jface.text')
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationModel.java | 19 | ||||
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java | 10 |
2 files changed, 29 insertions, 0 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationModel.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationModel.java index 0ec393086aa..f193f3a058f 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationModel.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationModel.java @@ -625,6 +625,25 @@ public class AnnotationModel implements IAnnotationModel, IAnnotationModelExtens } } + /** + * Modifies the given annotation if the annotation is managed by this + * annotation model. + * <p> + * If requested, all annotation model change listeners will be informed + * about the change. + * + * @param annotation the annotation to be modified + * @param fireModelChanged indicates whether to notify all model listeners + * @since 3.0 + */ + protected void modifyAnnotation(Annotation annotation, boolean fireModelChanged) { + if (fAnnotations.containsKey(annotation)) { + getAnnotationModelEvent().annotationChanged(annotation); + if (fireModelChanged) + fireModelChanged(); + } + } + /* * @see IAnnotationModel#removeAnnotationModelListener(IAnnotationModelListener) */ diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java index 3da29996c5b..df3bd632db3 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java @@ -218,6 +218,8 @@ public class AnnotationRulerColumn implements IVerticalRulerColumn, IVerticalRul fCanvas.addMouseListener(new MouseListener() { public void mouseUp(MouseEvent event) { + fParentRuler.setLocationOfLastMouseButtonActivity(event.x, event.y); + mouseClicked(fParentRuler.getLineOfLastMouseButtonActivity()); } public void mouseDown(MouseEvent event) { @@ -245,6 +247,14 @@ public class AnnotationRulerColumn implements IVerticalRulerColumn, IVerticalRul */ protected void mouseDoubleClicked(int rulerLine) { } + + /** + * Hook method for a mouse click event on the given ruler line. + * + * @param rulerLine the ruler line + */ + protected void mouseClicked(int rulerLine) { + } /** * Disposes the ruler's resources. |