Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormvelten2011-10-17 13:45:32 +0000
committermvelten2011-10-17 13:45:32 +0000
commit466ee71ca1a842d623aa32dd5f4fb0310310c16b (patch)
tree4d6c949b04942ce4a3ca9bf3fe51bba8b59a30c5 /plugins/core/org.eclipse.xtext.gmf.glue/src/org/eclipse/xtext
parent95fe9cb5faeb46dc4283b3fc546cbb4a1d8d7266 (diff)
downloadorg.eclipse.papyrus-466ee71ca1a842d623aa32dd5f4fb0310310c16b.tar.gz
org.eclipse.papyrus-466ee71ca1a842d623aa32dd5f4fb0310310c16b.tar.xz
org.eclipse.papyrus-466ee71ca1a842d623aa32dd5f4fb0310310c16b.zip
NEW - bug 357250: [General] Application reacts different ways when trying to modify a read-only resource
https://bugs.eclipse.org/bugs/show_bug.cgi?id=357250 backport from branch
Diffstat (limited to 'plugins/core/org.eclipse.xtext.gmf.glue/src/org/eclipse/xtext')
-rw-r--r--plugins/core/org.eclipse.xtext.gmf.glue/src/org/eclipse/xtext/gmf/glue/edit/part/PopupXtextEditorHelper.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/core/org.eclipse.xtext.gmf.glue/src/org/eclipse/xtext/gmf/glue/edit/part/PopupXtextEditorHelper.java b/plugins/core/org.eclipse.xtext.gmf.glue/src/org/eclipse/xtext/gmf/glue/edit/part/PopupXtextEditorHelper.java
index d722334e51a..77d2783e9f0 100644
--- a/plugins/core/org.eclipse.xtext.gmf.glue/src/org/eclipse/xtext/gmf/glue/edit/part/PopupXtextEditorHelper.java
+++ b/plugins/core/org.eclipse.xtext.gmf.glue/src/org/eclipse/xtext/gmf/glue/edit/part/PopupXtextEditorHelper.java
@@ -11,10 +11,8 @@ package org.eclipse.xtext.gmf.glue.edit.part;
import java.util.List;
import java.util.Map;
-import org.eclipse.core.commands.operations.DefaultOperationHistory;
import org.eclipse.core.commands.operations.IOperationHistory;
import org.eclipse.core.commands.operations.IUndoContext;
-import org.eclipse.core.commands.operations.OperationHistoryFactory;
import org.eclipse.core.expressions.Expression;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -27,13 +25,13 @@ import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain;
import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramEditDomain;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.commands.ActionHandler;
-import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.text.ITextOperationTarget;
import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.SourceViewer;
import org.eclipse.jface.text.templates.TemplateException;
import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.papyrus.commands.CheckedOperationHistory;
import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
@@ -376,7 +374,7 @@ public class PopupXtextEditorHelper implements IPopupEditorHelper {
protected void installUndoRedoSupport(SourceViewer viewer) {
IDocumentUndoManager undoManager = DocumentUndoManagerRegistry.getDocumentUndoManager(viewer.getDocument());
final IUndoContext context = undoManager.getUndoContext();
- IOperationHistory operationHistory = OperationHistoryFactory.getOperationHistory() ;
+ IOperationHistory operationHistory = CheckedOperationHistory.getInstance();
operationHistoryListener = new OperationHistoryListener(context, new IUpdate() {
public void update() {
updateAction(ITextEditorActionConstants.REDO);

Back to the top