Skip to content

Commit

Permalink
Bug 434791: [inline][quick assist] Delete key does not work after Inl…
Browse files Browse the repository at this point in the history
…ine local variable
  • Loading branch information
dmegert authored and mkeller committed May 21, 2014
1 parent 882b452 commit cd8d58c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -31,6 +31,7 @@

import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRewriteTarget;
import org.eclipse.jface.text.ITextOperationTarget;
import org.eclipse.jface.text.contentassist.ICompletionProposalExtension5;
import org.eclipse.jface.text.contentassist.ICompletionProposalExtension6;
import org.eclipse.jface.text.contentassist.IContextInformation;
Expand Down Expand Up @@ -197,6 +198,10 @@ public void keyTraversed(TraverseEvent e) {
if (disabledStyledText != null) {
disabledStyledText.setEditable(true);
disabledStyledText.removeTraverseListener(traverseBlocker);
// Workaround to fix bug 434791 during 4.4 RC2. Will be replaced by official API during 4.5.
ITextOperationTarget textOperationTarget= (ITextOperationTarget) activeEditor.getAdapter(ITextOperationTarget.class);
if (textOperationTarget != null && textOperationTarget.canDoOperation(-100))
textOperationTarget.doOperation(-100);
}
if (rewriteTarget != null) {
rewriteTarget.endCompoundChange();
Expand Down

0 comments on commit cd8d58c

Please sign in to comment.