Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2014-05-20 19:46:57 +0000
committerAnsgar Radermacher2014-05-20 19:47:56 +0000
commita2127999aa76c92fcf5b6e3794e9f9f3ab13c426 (patch)
treeea34237035c5f92fc7237359fe51f3c7d7bb095f /plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext
parent84c367c81ac8cdbd0107eb8e8ea814ca241d1466 (diff)
downloadorg.eclipse.papyrus-a2127999aa76c92fcf5b6e3794e9f9f3ab13c426.tar.gz
org.eclipse.papyrus-a2127999aa76c92fcf5b6e3794e9f9f3ab13c426.tar.xz
org.eclipse.papyrus-a2127999aa76c92fcf5b6e3794e9f9f3ab13c426.zip
433647 - [OCL Editor] Properties View OCL Editor for OpaqueExpression is Buggy
Diffstat (limited to 'plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext')
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/UndoRedoStack.java4
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/XtextLanguageEditor.java13
2 files changed, 13 insertions, 4 deletions
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/UndoRedoStack.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/UndoRedoStack.java
index d5638ac69e1..1b43d31bb9e 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/UndoRedoStack.java
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/UndoRedoStack.java
@@ -35,6 +35,10 @@ public class UndoRedoStack<T> {
return res;
}
+ public void clearUndo() {
+ undo.clear();
+ }
+
public void clearRedo() {
redo.clear();
}
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/XtextLanguageEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/XtextLanguageEditor.java
index 7a0b69e88fb..c975e24ad67 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/XtextLanguageEditor.java
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/XtextLanguageEditor.java
@@ -235,23 +235,28 @@ public class XtextLanguageEditor implements BodyEditor, IContextElementProvider
public void setInput(String value) {
if(value != null) {
textControl.setText(value);
+ // clear undo redo/stack, since we do not want to give the user the possibility
+ // to undo the initial input.
+ undoRedoStack.clearUndo();
+ undoRedoStack.clearRedo();
}
}
- public void dispose() { //TODO
+ public void dispose() {
+ // TODO?
}
- public void addChangeListener(Listener listener) { //TODO
+ public void addChangeListener(Listener listener) {
}
- public void removeChangeListener(Listener listener) { //TODO
+ public void removeChangeListener(Listener listener) {
}
public String getValue() {
return null;
}
- public void setReadOnly(boolean readOnly) { //TODO
+ public void setReadOnly(boolean readOnly) {
}
public void setContext(ModelElement context) {

Back to the top