svn commit: r13421 - branches/gsoc2007/b00__1/tags/gsoc2007_deadline/model-euml/src/org/argouml/model/euml/CommandStackImpl.java
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: b00__1
Date: 2007-08-20 10:04:35-0700
New Revision: 13421
Modified:
branches/gsoc2007/b00__1/tags/gsoc2007_deadline/model-euml/src/org/argouml/model/euml/CommandStackImpl.java
Log:
Fix the CommandStack for the demo
Modified: branches/gsoc2007/b00__1/tags/gsoc2007_deadline/model-euml/src/org/argouml/model/euml/CommandStackImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/tags/gsoc2007_deadline/model-euml/src/org/argouml/model/euml/CommandStackImpl.java?view=diff&rev=13421&p1=branches/gsoc2007/b00__1/tags/gsoc2007_deadline/model-euml/src/org/argouml/model/euml/CommandStackImpl.java&p2=branches/gsoc2007/b00__1/tags/gsoc2007_deadline/model-euml/src/org/argouml/model/euml/CommandStackImpl.java&r1=13420&r2=13421
==============================================================================
--- branches/gsoc2007/b00__1/tags/gsoc2007_deadline/model-euml/src/org/argouml/model/euml/CommandStackImpl.java (original)
+++ branches/gsoc2007/b00__1/tags/gsoc2007_deadline/model-euml/src/org/argouml/model/euml/CommandStackImpl.java 2007-08-20 10:04:35-0700
@@ -26,25 +26,15 @@
package org.argouml.model.euml;
-import org.argouml.model.ModelMemento;
+import org.argouml.model.CommandStack;
-public class CommandStackImpl extends ModelMemento {
+public class CommandStackImpl implements CommandStack {
private EUMLModelImplementation modelImplementation;
-
- private static CommandStackImpl instance;
-
- public static final String COMMAND_STACK_UPDATE_EVENT = "MEMENTO_CHANGED"; //$NON-NLS-1$
- private CommandStackImpl(EUMLModelImplementation modelImplementation) {
+ public CommandStackImpl(EUMLModelImplementation modelImplementation) {
this.modelImplementation = modelImplementation;
- }
-
- public static ModelMemento getInstance(EUMLModelImplementation modelImplementation) {
- if (instance == null) {
- instance = new CommandStackImpl(modelImplementation);
- }
- return instance;
+ modelImplementation.getEditingDomain().getCommandStack().flush();
}
public boolean canRedo() {
@@ -65,6 +55,10 @@
: null;
}
+ public boolean isCommandStackCapabilityAvailable() {
+ return true;
+ }
+
public void redo() {
modelImplementation.getEditingDomain().getCommandStack().redo();
}