Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2009-02-26 09:43:59 +0000
committerDani Megert2009-02-26 09:43:59 +0000
commit18c08cb5ca7ff4833980a73d53fd26ed3d975cce (patch)
treedbbfb001bc1d672f6784906db3d37c5fb91a5bad /org.eclipse.jface.text/projection/org/eclipse
parentfa20f38fdd23559e6846c439119099dab0a83272 (diff)
downloadeclipse.platform.text-18c08cb5ca7ff4833980a73d53fd26ed3d975cce.tar.gz
eclipse.platform.text-18c08cb5ca7ff4833980a73d53fd26ed3d975cce.tar.xz
eclipse.platform.text-18c08cb5ca7ff4833980a73d53fd26ed3d975cce.zip
Fixed bug 266269: [projection] Folding should only be toggled if mouse up happens at mouse down location
Diffstat (limited to 'org.eclipse.jface.text/projection/org/eclipse')
-rw-r--r--org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionRulerColumn.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionRulerColumn.java b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionRulerColumn.java
index 67d745943e4..17a385a7092 100644
--- a/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionRulerColumn.java
+++ b/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionRulerColumn.java
@@ -42,6 +42,12 @@ class ProjectionRulerColumn extends AnnotationRulerColumn {
private ProjectionAnnotation fCurrentAnnotation;
/**
+ * Line number recorded on mouse down.
+ * @since 3.5
+ */
+ private int fMouseDownLine;
+
+ /**
* Creates a new projection ruler column.
*
* @param model the column's annotation model
@@ -67,6 +73,8 @@ class ProjectionRulerColumn extends AnnotationRulerColumn {
*/
protected void mouseClicked(int line) {
clearCurrentAnnotation();
+ if (fMouseDownLine != line)
+ return;
ProjectionAnnotation annotation= findAnnotation(line, true);
if (annotation != null) {
ProjectionAnnotationModel model= (ProjectionAnnotationModel) getModel();
@@ -75,6 +83,14 @@ class ProjectionRulerColumn extends AnnotationRulerColumn {
}
/*
+ * @see org.eclipse.jface.text.source.AnnotationRulerColumn#mouseDown(int)
+ * @since 3.5
+ */
+ protected void mouseDown(int rulerLine) {
+ fMouseDownLine= rulerLine;
+ }
+
+ /*
* @see org.eclipse.jface.text.source.AnnotationRulerColumn#mouseDoubleClicked(int)
* @since 3.5
*/

Back to the top