@@ -0,0 +1,2036 @@
+/*******************************************************************************%0A * Copyright (C) 2007 The University of Manchester   %0A * %0A *  Modifications to the initial code base are copyright of their%0A *  respective authors, or their employers as appropriate.%0A * %0A *  This program is free software; you can redistribute it and/or%0A *  modify it under the terms of the GNU Lesser General Public License%0A *  as published by the Free Software Foundation; either version 2.1 of%0A *  the License, or (at your option) any later version.%0A *    %0A *  This program is distributed in the hope that it will be useful, but%0A *  WITHOUT ANY WARRANTY; without even the implied warranty of%0A *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU%0A *  Lesser General Public License for more details.%0A *    %0A *  You should have received a copy of the GNU Lesser General Public%0A *  License along with this program; if not, write to the Free Software%0A *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307%0A ******************************************************************************/%0Apackage net.sf.taverna.t2.workflowmodel.impl;%0A%0Aimport java.util.List;%0A%0Aimport net.sf.taverna.t2.workflowmodel.EditException;%0Aimport net.sf.taverna.t2.workflowmodel.Processor;%0Aimport net.sf.taverna.t2.workflowmodel.processor.activity.Activity;%0A%0A/**%0A * Remove an Activity from a Processor.%0A * %0A * @author alanrw%0A * %0A */%0Apublic class RemoveActivityEdit extends AbstractProcessorEdit %7B%0A%0A%09private Activity%3C?%3E activityToRemove;%0A%0A%09public RemoveActivityEdit(Processor processor, Activity%3C?%3E activity) %7B%0A%09%09super(processor);%0A%09%09this.activityToRemove = activity;%0A%09%7D%0A%0A%09@Override%0A%09protected void doEditAction(ProcessorImpl processor) throws EditException %7B%0A%09%09List%3CActivity%3C?%3E%3E activities = processor.activityList;%0A%09%09%09synchronized (processor) %7B%0A%09%09%09%09activities.remove(activityToRemove);%0A%09%09%09%7D%0A%0A%09%7D%0A%0A%09@Override%0A%09protected void undoEditAction(ProcessorImpl processor) %7B%0A%09%09synchronized (processor) %7B%0A%09%09%09processor.activityList.add(activityToRemove);%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

Edit to remove an Activity from a Processor. Needed for T2-1231