Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2012-02-22 17:37:46 +0000
committerMarkus Keller2012-02-22 17:37:46 +0000
commit6c3a7b4301f75433ebbd03ae094935aa066f48ed (patch)
tree8c77112853b7adb15aa755b9457337d0eaa7f7bd
parent0cfb9b481be22e581b008d11f97ddbe249ce561d (diff)
downloadeclipse.platform.text-6c3a7b4301f75433ebbd03ae094935aa066f48ed.tar.gz
eclipse.platform.text-6c3a7b4301f75433ebbd03ae094935aa066f48ed.tar.xz
eclipse.platform.text-6c3a7b4301f75433ebbd03ae094935aa066f48ed.zip
Bug 71406: [rulers] request for click & event modifiers from rulerv20120222-1737
annotations
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRulerEvent.java25
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java1
2 files changed, 25 insertions, 1 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRulerEvent.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRulerEvent.java
index 22cf7e2db05..73481fbea0b 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRulerEvent.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRulerEvent.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.jface.text.source;
+import org.eclipse.swt.widgets.Event;
+
/**
* An event sent to {@link org.eclipse.jface.text.source.IVerticalRulerListener} instances when annotation
@@ -20,6 +22,7 @@ package org.eclipse.jface.text.source;
public class VerticalRulerEvent {
private Annotation fAnnotation;
+ private Event fEvent;
/**
* Creates a new event.
@@ -31,6 +34,18 @@ public class VerticalRulerEvent {
}
/**
+ * Creates a new event.
+ *
+ * @param annotation the annotation concerned, or <code>null</code>
+ * @param event the SWT event that triggered this vertical ruler event, or <code>null</code>
+ * @since 3.8
+ */
+ public VerticalRulerEvent(Annotation annotation, Event event) {
+ fAnnotation= annotation;
+ fEvent= event;
+ }
+
+ /**
* @return the concerned annotation or <code>null</code>
*/
public Annotation getSelectedAnnotation() {
@@ -43,4 +58,12 @@ public class VerticalRulerEvent {
public void setSelectedAnnotation(Annotation annotation) {
fAnnotation= annotation;
}
+
+ /**
+ * @return the SWT event that triggered this vertical ruler event, or <code>null</code>.
+ * @since 3.8
+ */
+ public Event getEvent() {
+ return fEvent;
+ }
}
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
index dad6a8330c3..c7a284d73ad 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
@@ -3064,6 +3064,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
((IUpdate) action).update();
if (action.isEnabled()) {
Event event= new Event();
+ event.type= fDoubleClicked ? SWT.MouseDoubleClick : SWT.MouseUp;
event.display= e.display;
event.widget= e.widget;
event.time= e.time;

Back to the top