Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2014-04-14 10:13:41 +0000
committerDani Megert2014-04-14 10:13:41 +0000
commit4263670aaa042797f3b74edc91302c97d10ba64c (patch)
tree4ab7b687029767ed38e9f0b8ddda9f610eee68bf
parent68e461273a0d70c7f3ccad86b52e496d7910a4dd (diff)
downloadeclipse.platform.text-4263670aaa042797f3b74edc91302c97d10ba64c.tar.gz
eclipse.platform.text-4263670aaa042797f3b74edc91302c97d10ba64c.tar.xz
eclipse.platform.text-4263670aaa042797f3b74edc91302c97d10ba64c.zip
Backported bug 368354: Copy/Paste fails intermittentlyr362_v20140414
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java12
1 files changed, 6 insertions, 6 deletions
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 4a55e674e..165c614b9 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 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
@@ -1804,9 +1804,6 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
if (getRuler() == null)
return false;
- if (descriptor == null)
- return false;
-
return descriptor.matchesEditor(fEditor);
}
@@ -2963,6 +2960,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
public void run() {
// check whether editor has not been disposed yet
if (fSourceViewer != null && fSourceViewer.getDocument() != null) {
+ handleCursorPositionChanged();
updateSelectionDependentActions();
}
}
@@ -2973,8 +2971,10 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
public void selectionChanged(SelectionChangedEvent event) {
if (fDisplay == null)
fDisplay= getSite().getShell().getDisplay();
- fDisplay.asyncExec(fRunnable);
- handleCursorPositionChanged();
+ if (Display.getCurrent() == fDisplay)
+ fRunnable.run();
+ else
+ fDisplay.asyncExec(fRunnable);
}
};
}

Back to the top