diff options
author | cletavernie | 2012-07-06 10:05:25 +0000 |
---|---|---|
committer | cletavernie | 2012-07-06 10:05:25 +0000 |
commit | bf7a0036dcf4f37fa9a60154102b9415b01bb496 (patch) | |
tree | eeeaf769696b71afad82330953b7064038c81f13 /sandbox | |
parent | 9e032ff601bbd7f18a77455a4997813ae8c0681c (diff) | |
download | org.eclipse.papyrus-bf7a0036dcf4f37fa9a60154102b9415b01bb496.tar.gz org.eclipse.papyrus-bf7a0036dcf4f37fa9a60154102b9415b01bb496.tar.xz org.eclipse.papyrus-bf7a0036dcf4f37fa9a60154102b9415b01bb496.zip |
Sandbox commit
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/org.eclipse.papyrus.emf.commandstack/src/org/eclipse/papyrus/emf/commandstack/view/CommandStackView.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sandbox/org.eclipse.papyrus.emf.commandstack/src/org/eclipse/papyrus/emf/commandstack/view/CommandStackView.java b/sandbox/org.eclipse.papyrus.emf.commandstack/src/org/eclipse/papyrus/emf/commandstack/view/CommandStackView.java index 99c67dd73a8..028e2b50027 100644 --- a/sandbox/org.eclipse.papyrus.emf.commandstack/src/org/eclipse/papyrus/emf/commandstack/view/CommandStackView.java +++ b/sandbox/org.eclipse.papyrus.emf.commandstack/src/org/eclipse/papyrus/emf/commandstack/view/CommandStackView.java @@ -52,9 +52,11 @@ public class CommandStackView extends AbstractTreeView { private final Map<IUndoableOperation, String> dates = new HashMap<IUndoableOperation, String>();
+ private final IOperationHistoryListener historyListener;
+
public CommandStackView() {
this.history = OperationHistoryFactory.getOperationHistory();
- this.history.addOperationHistoryListener(new IOperationHistoryListener() {
+ this.history.addOperationHistoryListener(historyListener = new IOperationHistoryListener() {
public void historyNotification(final OperationHistoryEvent event) {
if(!CommandStackView.this.commandList.contains(event.getOperation())) {
@@ -238,6 +240,7 @@ public class CommandStackView extends AbstractTreeView { @Override
public void dispose() {
super.dispose();
+ history.removeOperationHistoryListener(historyListener);
clear();
}
|