blob: 1c69bd39a26cc97a9030fe86530d08cf0e383f9c [file] [log] [blame]
//------------------------------------------------------------------------------
// Copyright (c) 2005, 2006 IBM Corporation and others.
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// which accompanies this distribution, and is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// Contributors:
// IBM Corporation - initial implementation
//------------------------------------------------------------------------------
package org.eclipse.epf.library.tester.impl.testcommands;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.epf.library.tester.TesterOutputUtil;
import org.eclipse.epf.library.tester.iface.TCExeReply;
import org.eclipse.epf.library.tester.iface.TestCommand;
import org.eclipse.epf.library.tester.impl.TestCommandImpl;
import org.eclipse.epf.uma.ContentDescription;
import org.eclipse.epf.uma.ContentElement;
import org.eclipse.epf.uma.MethodElement;
import org.eclipse.epf.uma.MethodLibrary;
import org.eclipse.epf.uma.UmaPackage;
import org.w3c.dom.Element;
/**
* A test command class
*
* @author Weiping Lu
* @since 1.0
*
*/
public class TCEditMethodElement extends TestCommandImpl {
private TestCommand delegated;
public void parse(Element element) {
String type = element.getAttribute(AT_Type);
EClass eclass = getEClass(type);
if (eclass == null) {
return;
}
if (UmaPackage.eINSTANCE.getContentElement().isSuperTypeOf(eclass)) {
delegated = new TCEditContentElement(eclass, getOwner());
delegated.parse(element);
}
}
public TCExeReply execute() {
return delegated == null ? null : delegated.execute();
}
}