summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSzymon Ptaszkiewicz2013-10-27 04:05:16 (EDT)
committer Dani Megert2013-10-27 04:05:51 (EDT)
commitd20d2f31690f0455be41b288f0b02f4582835c1f (patch)
treed30c316983fe2786fc7b911a0aae4b8880d71caa
parentfd38b14fba5f0425b4e201ef3214e2c106ab6c1c (diff)
downloadeclipse.platform.text-d20d2f31690f0455be41b288f0b02f4582835c1f.zip
eclipse.platform.text-d20d2f31690f0455be41b288f0b02f4582835c1f.tar.gz
eclipse.platform.text-d20d2f31690f0455be41b288f0b02f4582835c1f.tar.bz2
Fixed bug 420057: [block selection] Block selection slower for large selectionsI20131030-0800I20131029-2000
Signed-off-by: Szymon Ptaszkiewicz <szymon.ptaszkiewicz@pl.ibm.com>
-rw-r--r--org.eclipse.jface.text/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java14
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/HyperlinkManager.java6
3 files changed, 11 insertions, 11 deletions
diff --git a/org.eclipse.jface.text/META-INF/MANIFEST.MF b/org.eclipse.jface.text/META-INF/MANIFEST.MF
index c5796a1..dd6f22c 100644
--- a/org.eclipse.jface.text/META-INF/MANIFEST.MF
+++ b/org.eclipse.jface.text/META-INF/MANIFEST.MF
@@ -32,7 +32,7 @@ Export-Package:
Require-Bundle:
org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.text;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
- org.eclipse.swt;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.swt;bundle-version="[3.103.0,4.0.0)",
org.eclipse.jface;bundle-version="[3.5.0,4.0.0)"
Bundle-RequiredExecutionEnvironment: J2SE-1.4
Import-Package: com.ibm.icu.text
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java
index 90b92d8..a0b465b 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -1418,7 +1418,7 @@ public class TextViewer extends Viewer implements
* @see KeyListener#keyPressed(org.eclipse.swt.events.KeyEvent)
*/
public void keyReleased(KeyEvent e) {
- if (fTextWidget.getSelectionCount() == 0) {
+ if (!fTextWidget.isTextSelected()) {
fLastSentSelectionChange= null;
queuePostSelectionChanged(e.character == SWT.DEL);
}
@@ -1440,7 +1440,7 @@ public class TextViewer extends Viewer implements
* @see MouseListener#mouseUp(org.eclipse.swt.events.MouseEvent)
*/
public void mouseUp(MouseEvent event) {
- if (fTextWidget.getSelectionCount() == 0)
+ if (!fTextWidget.isTextSelected())
queuePostSelectionChanged(false);
}
}
@@ -3947,9 +3947,9 @@ public class TextViewer extends Viewer implements
switch (operation) {
case CUT:
- return isEditable() &&(fTextWidget.getSelectionCount() > 0 || !isMarkedRegionEmpty());
+ return isEditable() && (fTextWidget.isTextSelected() || !isMarkedRegionEmpty());
case COPY:
- return fTextWidget.getSelectionCount() > 0 || !isMarkedRegionEmpty();
+ return fTextWidget.isTextSelected() || !isMarkedRegionEmpty();
case DELETE:
case PASTE:
return isEditable();
@@ -4001,7 +4001,7 @@ public class TextViewer extends Viewer implements
}
break;
case CUT:
- if (fTextWidget.getSelectionCount() == 0)
+ if (!fTextWidget.isTextSelected())
copyMarkedRegion(true);
else
wrapCompoundChange(new Runnable() {
@@ -4015,7 +4015,7 @@ public class TextViewer extends Viewer implements
break;
case COPY:
- if (fTextWidget.getSelectionCount() == 0)
+ if (!fTextWidget.isTextSelected())
copyMarkedRegion(false);
else
fTextWidget.copy();
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/HyperlinkManager.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/HyperlinkManager.java
index f858f8d..cb64429 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/HyperlinkManager.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/HyperlinkManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -408,7 +408,7 @@ public class HyperlinkManager implements ITextListener, Listener, KeyListener, M
return;
}
- if (text.getSelectionCount() != 0) {
+ if (text.isTextSelected()) {
deactivate();
return;
}
@@ -461,7 +461,7 @@ public class HyperlinkManager implements ITextListener, Listener, KeyListener, M
return;
}
- if ((event.stateMask & SWT.BUTTON1) != 0 && text.getSelectionCount() != 0) {
+ if ((event.stateMask & SWT.BUTTON1) != 0 && text.isTextSelected()) {
deactivate();
return;
}