Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2004-04-06 06:08:59 +0000
committerDani Megert2004-04-06 06:08:59 +0000
commit59737b88b961e9ac9cba57ced363b398d8235590 (patch)
tree0a954dcfdc0c64827afe11b57f7fef214dd35450 /org.eclipse.ui.editors
parentffbe644c2761760cfa0947f5643ef936ca77fa46 (diff)
downloadeclipse.platform.text-59737b88b961e9ac9cba57ced363b398d8235590.tar.gz
eclipse.platform.text-59737b88b961e9ac9cba57ced363b398d8235590.tar.xz
eclipse.platform.text-59737b88b961e9ac9cba57ced363b398d8235590.zip
Added support for override indicators
Diffstat (limited to 'org.eclipse.ui.editors')
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/SelectMarkerRulerAction.java22
1 files changed, 17 insertions, 5 deletions
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/SelectMarkerRulerAction.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/SelectMarkerRulerAction.java
index 3cabadd5f..3c13a4891 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/SelectMarkerRulerAction.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/SelectMarkerRulerAction.java
@@ -137,10 +137,7 @@ public class SelectMarkerRulerAction extends ResourceAction implements IUpdate {
protected IMarker chooseMarker(List markers) {
AbstractMarkerAnnotationModel model= getAnnotationModel();
- IAnnotationAccessExtension access= null;
- Object adapter= fTextEditor.getAdapter(IAnnotationAccess.class);
- if (adapter instanceof IAnnotationAccessExtension)
- access= (IAnnotationAccessExtension) adapter;
+ IAnnotationAccessExtension access= getAnnotationAccessExtension();
IMarker marker= null;
int maxLayer= 0;
@@ -168,6 +165,21 @@ public class SelectMarkerRulerAction extends ResourceAction implements IUpdate {
return marker;
}
+ /**
+ * Returns the annotation access extension.
+ *
+ * @return the annotation access extension or <code>null</code> if
+ * this action's editor has no such extension
+ * @since 3.0
+ */
+ protected IAnnotationAccessExtension getAnnotationAccessExtension() {
+ Object adapter= fTextEditor.getAdapter(IAnnotationAccess.class);
+ if (adapter instanceof IAnnotationAccessExtension)
+ return (IAnnotationAccessExtension)adapter;
+
+ return null;
+ }
+
/**
* Returns the resource for which to create the marker,
* or <code>null</code> if there is no applicable resource.
@@ -234,7 +246,7 @@ public class SelectMarkerRulerAction extends ResourceAction implements IUpdate {
/**
* Handles core exceptions. This implementation logs the exceptions
- * with the workbech plug-in and shows an error dialog.
+ * with the workbench plug-in and shows an error dialog.
*
* @param exception the exception to be handled
* @param message the message to be logged with the given exception

Back to the top