Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2014-05-21 16:57:59 +0000
committerDani Megert2014-05-28 10:40:12 +0000
commite71f40f39058783d873e2600761536af27f286b9 (patch)
tree5a4405d2f10b54c8a82ecf01e75427b6e9d716a7
parent2c186e8ecaf5f513824aa33ec65e9867626c48f1 (diff)
downloadeclipse.platform.text-e71f40f39058783d873e2600761536af27f286b9.tar.gz
eclipse.platform.text-e71f40f39058783d873e2600761536af27f286b9.tar.xz
eclipse.platform.text-e71f40f39058783d873e2600761536af27f286b9.zip
Backported bug 434791: [inline][quick assist] Delete key does not work after Inline local variable
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java16
1 files changed, 15 insertions, 1 deletions
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 90b92d84f42..cd9d466c394 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, 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
@@ -3969,6 +3969,11 @@ public class TextViewer extends Viewer implements
return isPrintable();
case HyperlinkManager.OPEN_HYPERLINK:
return fHyperlinkManager != null;
+
+ // Workaround to fix bug 434791 during 4.4 RC2. Will be replaced by official API during 4.5.
+ case -100:
+ return true;
+
}
return false;
@@ -4058,6 +4063,15 @@ public class TextViewer extends Viewer implements
MessageDialog.openInformation(getControl().getShell(),
JFaceTextMessages.getString("TextViewer.open_hyperlink_error_title"), JFaceTextMessages.getString("TextViewer.open_hyperlink_error_message")); //$NON-NLS-1$ //$NON-NLS-2$
return;
+
+ // Workaround to fix bug 434791 during 4.4 RC2. Will be replaced by official API during 4.5.
+ case -100:
+ if (fLastSentSelectionChange != null) {
+ ISelection lastSelection= new TextSelection(getDocument(), fLastSentSelectionChange.getOffset(), fLastSentSelectionChange.getLength());
+ fireSelectionChanged(new SelectionChangedEvent(this, lastSelection));
+ }
+ return;
+
}
}

Back to the top