@@ -0,0 +1,1894 @@
+/*******************************************************************************%0D%0A * Copyright (c) 2011 Bolton University, UK.%0D%0A * All rights reserved. This program and the accompanying materials%0D%0A * are made available under the terms of the License%0D%0A * which accompanies this distribution in the file LICENSE.txt%0D%0A *******************************************************************************/%0D%0Apackage uk.ac.bolton.archimate.editor.model.commands;%0D%0A%0D%0Aimport org.eclipse.emf.common.notify.Notification;%0D%0Aimport org.eclipse.emf.common.notify.impl.NotificationImpl;%0D%0Aimport org.eclipse.emf.ecore.EObject;%0D%0Aimport org.eclipse.gef.commands.CompoundCommand;%0D%0A%0D%0A%0D%0A/**%0D%0A * Compound Command that will send an ECore Notification to listeners to warn them that a series of Notifications is coming%0D%0A * related to a given EObject.%0D%0A * Used where many commands might cause excessive amounts of UI refreshes in clients listening to model changes. %0D%0A * %0D%0A * @author Phillip Beauvoir%0D%0A */%0D%0Apublic class EObjectNonNotifyingCompoundCommand extends CompoundCommand %7B%0D%0A%0D%0A%09public static final int START = 999;%0D%0A%09public static final int END = 1000;%0D%0A%0D%0A%09protected EObject eObject;%0D%0A%09protected Notification msgStart, msgEnd;%0D%0A%0D%0A%09public EObjectNonNotifyingCompoundCommand(EObject eObject) %7B%0D%0A%09%09this(eObject, null);%0D%0A%09%7D%0D%0A%0D%0A%09public EObjectNonNotifyingCompoundCommand(EObject eObject, String label) %7B%0D%0A%09%09super(label);%0D%0A%09%09this.eObject = eObject;%0D%0A%09%09msgStart = new NotificationImpl(START, null, eObject);%0D%0A%09%09msgEnd = new NotificationImpl(END, null, eObject);%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public void execute() %7B%0D%0A%09%09eObject.eNotify(msgStart);%0D%0A%09%09super.execute();%0D%0A%09%09eObject.eNotify(msgEnd);%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public void undo() %7B%0D%0A%09%09eObject.eNotify(msgStart);%0D%0A%09%09super.undo();%0D%0A%09%09eObject.eNotify(msgEnd);%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public void redo() %7B%0D%0A%09%09eObject.eNotify(msgStart);%0D%0A%09%09super.redo();%0D%0A%09%09eObject.eNotify(msgEnd);%0D%0A%09%7D%0D%0A%7D%0D%0A

Add EObjectNonNotifyingCompoundCommand class