Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2014-03-03 09:03:17 +0000
committerAnsgar Radermacher2014-03-03 09:03:17 +0000
commit0c01eb1b92b5a5ba4e6129bb6e55662575b47572 (patch)
treee12813dd20a5f9f02e2e4ea050e3cef2b2167322 /plugins/uml/xtext
parent7a5d4de2d8e4630c081f0f03570f8e0707e7bdbe (diff)
downloadorg.eclipse.papyrus-0c01eb1b92b5a5ba4e6129bb6e55662575b47572.tar.gz
org.eclipse.papyrus-0c01eb1b92b5a5ba4e6129bb6e55662575b47572.tar.xz
org.eclipse.papyrus-0c01eb1b92b5a5ba4e6129bb6e55662575b47572.zip
Bug 429413 - [Xtext] New editor integration looses focus after using content assist (on GTK)
amended: regain focus after selection (previous commit prevented quitting, but still lost focus after content assist)
Diffstat (limited to 'plugins/uml/xtext')
-rw-r--r--plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/src/org/eclipse/papyrus/uml/xtext/integration/XtextStyledTextCellEditor.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/src/org/eclipse/papyrus/uml/xtext/integration/XtextStyledTextCellEditor.java b/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/src/org/eclipse/papyrus/uml/xtext/integration/XtextStyledTextCellEditor.java
index e996f0fa428..83b8ea788ab 100644
--- a/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/src/org/eclipse/papyrus/uml/xtext/integration/XtextStyledTextCellEditor.java
+++ b/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui/src/org/eclipse/papyrus/uml/xtext/integration/XtextStyledTextCellEditor.java
@@ -25,6 +25,7 @@ import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
@@ -199,6 +200,14 @@ public class XtextStyledTextCellEditor extends StyledTextCellEditor {
if (SWT.getPlatform().equals(GTK)) {
if (ignoreNextFocusLost) {
ignoreNextFocusLost = false;
+ // styledText has lost focus, set it again.
+ Display.getDefault().asyncExec(new Runnable() {
+
+ public void run() {
+ styledText.setFocus();
+ }
+ });
+
return;
}

Back to the top