View | Details | Raw Unified | Return to bug 138516
Collapse All | Expand All

(-)src/org/eclipse/gmf/runtime/diagram/core/DiagramEditingDomainFactory.java (-1 / +10 lines)
Lines 38-43 Link Here
38
import org.eclipse.emf.transaction.impl.ReadWriteValidatorImpl;
38
import org.eclipse.emf.transaction.impl.ReadWriteValidatorImpl;
39
import org.eclipse.emf.transaction.impl.TransactionValidator;
39
import org.eclipse.emf.transaction.impl.TransactionValidator;
40
import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl;
40
import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl;
41
import org.eclipse.emf.transaction.util.ConditionalRedoCommand;
41
import org.eclipse.emf.transaction.util.TriggerCommand;
42
import org.eclipse.emf.transaction.util.TriggerCommand;
42
import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
43
import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
43
import org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl;
44
import org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl;
Lines 220-226 Link Here
220
		}
221
		}
221
	}
222
	}
222
	
223
	
223
	private static class DiagramEventBrokerCommand extends AbstractCommand {
224
	private static class DiagramEventBrokerCommand
225
			extends AbstractCommand
226
			implements ConditionalRedoCommand {
224
		private final TransactionChangeDescription change;
227
		private final TransactionChangeDescription change;
225
		
228
		
226
		DiagramEventBrokerCommand(TransactionChangeDescription change) {
229
		DiagramEventBrokerCommand(TransactionChangeDescription change) {
Lines 245-250 Link Here
245
			}
248
			}
246
		}
249
		}
247
		
250
		
251
		public boolean canRedo() {
252
			return (change != null) && change.canApply();
253
		}
254
		
248
		public final void redo() {
255
		public final void redo() {
249
			if (change != null) {
256
			if (change != null) {
250
				change.applyAndReverse();
257
				change.applyAndReverse();
Lines 257-262 Link Here
257
				protected boolean prepare() { return true; }
264
				protected boolean prepare() { return true; }
258
				public void execute() {}
265
				public void execute() {}
259
				public boolean canUndo() { return true;	}
266
				public boolean canUndo() { return true;	}
267
				// this command does not need to implement canRedo() because it
268
				//    is assumed to be redoable, anyway, which is what we want
260
				public void undo() {}
269
				public void undo() {}
261
				public void redo() {}}));
270
				public void redo() {}}));
262
	
271
	

Return to bug 138516