refactoring REMOVE EMPTY SUPERCLASS added
diff --git a/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringController$1.class b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringController$1.class
new file mode 100644
index 0000000..26b6dc1
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringController$1.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringController$InternalRefactoringProcessor.class b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringController$InternalRefactoringProcessor.class
new file mode 100644
index 0000000..73fde75
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringController$InternalRefactoringProcessor.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringController.class b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringController.class
new file mode 100644
index 0000000..a83d062
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringController.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringDataManagement.class b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringDataManagement.class
new file mode 100644
index 0000000..df578c1
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringDataManagement.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringGuiHandler.class b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringGuiHandler.class
new file mode 100644
index 0000000..eb98ed4
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringGuiHandler.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringTest$1.class b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringTest$1.class
new file mode 100644
index 0000000..90be564
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringTest$1.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringTest.class b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringTest.class
new file mode 100644
index 0000000..bed9b40
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringTest.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringWizard.class b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringWizard.class
new file mode 100644
index 0000000..63316cd
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringWizard.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringWizardPage.class b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringWizardPage.class
new file mode 100644
index 0000000..8571b89
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactorings.uml24/bin/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringWizardPage.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.refactorings.uml24/plugin.xml b/org.eclipse.emf.refactor.refactorings.uml24/plugin.xml
index b920677..9bbbfda 100644
--- a/org.eclipse.emf.refactor.refactorings.uml24/plugin.xml
+++ b/org.eclipse.emf.refactor.refactorings.uml24/plugin.xml
@@ -44,6 +44,12 @@
menulabel="Remove Empty Subclass"
namespaceUri="http://www.eclipse.org/uml2/4.0.0/UML"/>
<refactoring
+ controller="org.eclipse.emf.refactor.refactorings.uml24.removeemptysuperclass.RefactoringController"
+ gui="org.eclipse.emf.refactor.refactorings.uml24.removeemptysuperclass.RefactoringGuiHandler"
+ id="org.eclipse.emf.refactor.refactorings.uml24.removeemptysuperclass"
+ menulabel="Remove Empty Superclass"
+ namespaceUri="http://www.eclipse.org/uml2/4.0.0/UML"/>
+<refactoring
controller="org.eclipse.emf.refactor.refactorings.uml24.renameclass.RefactoringController"
gui="org.eclipse.emf.refactor.refactorings.uml24.renameclass.RefactoringGuiHandler"
id="org.eclipse.emf.refactor.refactorings.uml24.renameclass"
diff --git a/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringController.java b/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringController.java
new file mode 100644
index 0000000..77ef829
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringController.java
@@ -0,0 +1,226 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: RefactoringController.javajet,v 1.3 2011/01/21 13:08:06 tarendt Exp $
+ */
+package org.eclipse.emf.refactor.refactorings.uml24.removeemptysuperclass;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.refactor.refactoring.core.Refactoring;
+import org.eclipse.emf.refactor.refactoring.interfaces.IController;
+import org.eclipse.emf.refactor.refactoring.interfaces.IDataManagement;
+import org.eclipse.emf.refactor.refactoring.runtime.ltk.LtkEmfRefactoringProcessorAdapter;
+import org.eclipse.emf.refactor.refactorings.uml24.UmlUtils;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.Package;
+
+
+public final class RefactoringController implements IController{
+
+ /**
+ * Refactoring supported by the controller.
+ * @generated
+ */
+ private Refactoring parent;
+
+ /**
+ * DataManagement object of the model refactoring.
+ * @generated
+ */
+ private RefactoringDataManagement dataManagement =
+ new RefactoringDataManagement();
+
+ /**
+ * Invocation context of the model refactoring.
+ * @generated
+ */
+ private List<EObject> selection = new ArrayList<EObject>();
+
+ /**
+ * Ltk RefactoringProcessor of the model refactoring.
+ * @generated
+ */
+ private InternalRefactoringProcessor refactoringProcessor = null;
+
+ /**
+ * Gets the Refactoring supported by the controller.
+ * @return Refactoring supported by the controller.
+ * @see org.eclipse.emf.refactor.common.core.IController#getParent()
+ * @generated
+ */
+ @Override
+ public Refactoring getParent() {
+ return this.parent;
+ }
+
+ /**
+ * Sets the Refactoring supported by the controller.
+ * @param emfRefactoring Refactoring supported by the controller.
+ * @see org.eclipse.emf.refactor.common.core.IController#
+ * setParent(org.eclipse.emf.refactor.common.core.Refactoring)
+ * @generated
+ */
+ @Override
+ public void setParent(Refactoring emfRefactoring) {
+ this.parent = emfRefactoring;
+ }
+
+ /**
+ * Returns the DataManagement object of the model refactoring.
+ * @return DataManagement object of the model refactoring.
+ * @see org.eclipse.emf.refactor.common.core.IController#
+ * getDataManagementObject()
+ * @generated
+ */
+ @Override
+ public IDataManagement getDataManagementObject() {
+ return this.dataManagement;
+ }
+
+ /**
+ * Returns the ltk RefactoringProcessor of the model refactoring.
+ * @return Ltk RefactoringProcessor of the model refactoring.
+ * @see org.eclipse.emf.refactor.common.core.IController#
+ * getLtkRefactoringProcessor()
+ * @generated
+ */
+ @Override
+ public RefactoringProcessor getLtkRefactoringProcessor() {
+ return this.refactoringProcessor;
+ }
+
+ /**
+ * Sets the selected EObject (invocation context of the model refactoring).
+ * @param selection Invocation context of the model refactoring.
+ * @see org.eclipse.emf.refactor.common.core.IController#
+ * setSelection(java.util.List)
+ * @generated
+ */
+ @Override
+ public void setSelection(List<EObject> selection) {
+ this.selection = selection;
+ this.refactoringProcessor =
+ new InternalRefactoringProcessor(this.selection);
+ }
+
+ /**
+ * Returns a Runnable object that executes the model refactoring.
+ * @return Runnable object that executes the model refactoring.
+ * @generated
+ */
+ private Runnable applyRefactoring() {
+ return new Runnable() {
+ /**
+ * @see java.lang.Runnable#run()
+ * @generated
+ */
+ @Override
+ public void run() {
+ org.eclipse.uml2.uml.Class selectedEObject =
+ (org.eclipse.uml2.uml.Class) dataManagement.
+ getInPortByName(dataManagement.SELECTEDEOBJECT).getValue();
+ // execute: delete generalizations to selected class
+ List<Class> allClasses = UmlUtils.getAllClasses(selectedEObject.getModel());
+ for (Class cl : allClasses) {
+ if (cl.getSuperClasses().contains(selectedEObject)){
+ Generalization gen = cl.getGeneralization(selectedEObject);
+ cl.getGeneralizations().remove(gen);
+ }
+ }
+ // execute: delete selected class from owning package
+ Package p = selectedEObject.getPackage();
+ p.getPackagedElements().remove(selectedEObject);
+ }
+ };
+ }
+
+ /**
+ * Internal class for providing an instance of a LTK RefactoringProcessor
+ * used for EMF model refactorings.
+ * @generated
+ */
+ public final class InternalRefactoringProcessor extends
+ LtkEmfRefactoringProcessorAdapter {
+
+ /**
+ * Constructor using the invocation context of the model refactoring.
+ * @param selection Invocation context of the model refactoring.
+ * @generated
+ */
+ private InternalRefactoringProcessor(List<EObject> selection){
+ super(getParent(), selection, applyRefactoring());
+ }
+
+ /**
+ * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#
+ * checkInitialConditions(org.eclipse.core.runtime.IProgressMonitor)
+ * @generated
+ */
+ @Override
+ public RefactoringStatus checkInitialConditions(){
+ RefactoringStatus result = new RefactoringStatus();
+ Class selectedEObject =
+ (Class) dataManagement.getInPortByName(dataManagement.SELECTEDEOBJECT).getValue();
+ // test: the selected class must be owned by a package
+ String msg = "This refactoring can only be applied" +
+ " on classes which are owned by a package!";
+ if (selectedEObject.getPackage() == null) result.addFatalError(msg);
+ // test: the selected class must have at least one subclass
+ msg = "Class '" + selectedEObject.getName() + "' does not have any subclasses!";
+ if (! UmlUtils.hasSubclasses(selectedEObject)) result.addFatalError(msg);
+ // test: the selected class must not own any attributes
+ msg = "Class '" + selectedEObject.getName() + "' owns at least one attribute!";
+ if (UmlUtils.hasAttributes(selectedEObject)) result.addFatalError(msg);
+ // test: the selected class must not own any operations
+ msg = "Class '" + selectedEObject.getName() + "' owns at least one operation!";
+ if (UmlUtils.hasOperations(selectedEObject)) result.addFatalError(msg);
+ // test: the selected class must not have any superclasses
+ msg = "Class '" + selectedEObject.getName() + "' has at least one superclass!";
+ if (UmlUtils.hasSuperclasses(selectedEObject)) result.addFatalError(msg);
+ // test: the class must not have any inner classes
+ msg = "Class '" + selectedEObject.getName() + "' has at least one inner class!";
+ if (UmlUtils.hasInnerClasses(selectedEObject)) result.addFatalError(msg);
+ // test: the class must not have any outgoing associations
+ msg = "Class '" + selectedEObject.getName() + "' has at least one outgoing association!";
+ if (UmlUtils.hasOutgoingAssociations(selectedEObject)) result.addFatalError(msg);
+ // test: the class must not have any incoming associations
+ msg = "Class '" + selectedEObject.getName() + "' has at least one incoming association!";
+ if (UmlUtils.hasIncomingAssociations(selectedEObject)) result.addFatalError(msg);
+ // test: the class must not implement any interfaces
+ msg = "Class '" + selectedEObject.getName() + "' implements at least one interface!";
+ if (UmlUtils.implementsInterfaces(selectedEObject)) result.addFatalError(msg);
+ // test: the class must not use any interfaces
+ msg = "Class '" + selectedEObject.getName() + "' uses at least one interface!";
+ if (UmlUtils.usesInterfaces(selectedEObject)) result.addFatalError(msg);
+ // test: the class must not be used as attribute type
+ msg = "Class '" + selectedEObject.getName() + "' is used as attribute type!";
+ if (UmlUtils.isUsedAsAttributeType(selectedEObject)) result.addFatalError(msg);
+ // test: the class must not be used as operation/parameter type
+ msg = "Class '" + selectedEObject.getName() + "' is used as operation/parameter type!";
+ if (UmlUtils.isUsedAsParameterType(selectedEObject)) result.addFatalError(msg);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#
+ * checkFinalConditions(org.eclipse.core.runtime.IProgressMonitor,
+ * org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext)
+ * @generated
+ */
+ @Override
+ public RefactoringStatus checkFinalConditions(){
+ RefactoringStatus result = new RefactoringStatus();
+ // no final checks
+ return result;
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringDataManagement.java b/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringDataManagement.java
new file mode 100644
index 0000000..f4b2451
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringDataManagement.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: RefactoringDataManagement.javajet,v 1.2 2011/01/21 13:08:06 tarendt Exp $
+ */
+ package org.eclipse.emf.refactor.refactorings.uml24.removeemptysuperclass;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.refactor.refactoring.core.Port;
+import org.eclipse.emf.refactor.refactoring.runtime.DataManagementAdapter;
+
+/**
+ * Class for specific data concerning a model refactoring.
+ * @generated
+ */
+public class RefactoringDataManagement extends DataManagementAdapter {
+
+ protected final String SELECTEDEOBJECT = "selectedEObject";
+
+ /**
+ * Default constructor.
+ * @generated
+ */
+ public RefactoringDataManagement() {
+ this.addPorts();
+ }
+
+ /**
+ * Adds the ports to the data management used for parameter passing.
+ * @generated
+ */
+ private void addPorts(){
+ this.inPorts.add
+ (new Port<org.eclipse.uml2.uml.Class>
+ (SELECTEDEOBJECT, org.eclipse.uml2.uml.Class.class));
+ }
+
+ /**
+ * @see org.eclipse.emf.refactor.common.core.IDataManagement#
+ * preselect(java.util.List)
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void preselect(List<EObject> selection) {
+ getInPortByName(SELECTEDEOBJECT).
+ setValue((org.eclipse.uml2.uml.Class) selection.get(0));
+ }
+
+}
+
\ No newline at end of file
diff --git a/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringGuiHandler.java b/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringGuiHandler.java
new file mode 100644
index 0000000..abae9a2
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringGuiHandler.java
@@ -0,0 +1,76 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: RefactoringGuiHandler.javajet,v 1.1 2010/07/15 13:08:44 tarendt Exp $
+ */
+ package org.eclipse.emf.refactor.refactorings.uml24.removeemptysuperclass;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.refactor.refactoring.core.Refactoring;
+import org.eclipse.emf.refactor.refactoring.interfaces.IGuiHandler;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
+
+/**
+ * Class used for specifying gui topics of a specific model refactoring.
+ * @generated
+ */
+public class RefactoringGuiHandler implements IGuiHandler {
+
+ /**
+ * Refactoring supported by the GuiHandler.
+ * @generated
+ */
+ Refactoring parent;
+
+ /**
+ * @see org.eclipse.emf.refactor.common.core.ui.IGuiHandler#getParent()
+ * @generated
+ */
+ @Override
+ public Refactoring getParent() {
+ return parent;
+ }
+
+ /**
+ * @see org.eclipse.emf.refactor.common.core.ui.IGuiHandler#
+ * setParent(org.eclipse.emf.refactor.common.core.Refactoring)
+ * @generated
+ */
+ @Override
+ public void setParent(Refactoring emfRefactoring) {
+ this.parent = emfRefactoring;
+ }
+
+ /**
+ * @see org.eclipse.emf.refactor.common.core.ui.IGuiHandler#show()
+ * @generated
+ */
+ @Override
+ public RefactoringWizard show() {
+ return new org.eclipse.emf.refactor.refactorings.uml24.removeemptysuperclass.RefactoringWizard
+ ((RefactoringController)this.parent.getController());
+ }
+
+ /**
+ * @see org.eclipse.emf.refactor.common.core.ui.IGuiHandler#
+ * showInMenu(java.util.List)
+ * @generated
+ */
+ @Override
+ public boolean showInMenu(List<EObject> selection) {
+ if (selection.size() > 1) return false;
+ for(EObject o:selection){
+ if(null != o){
+ if (o instanceof org.eclipse.uml2.uml.Class) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+}
+
\ No newline at end of file
diff --git a/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringTest.java b/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringTest.java
new file mode 100644
index 0000000..792ad15
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringTest.java
@@ -0,0 +1,97 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: RefactoringTest.javajet,v 1.2 2011/03/16 16:14:21 tarendt Exp $
+ */
+
+package org.eclipse.emf.refactor.refactorings.uml24.removeemptysuperclass;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.refactor.refactoring.core.Refactoring;
+import org.eclipse.emf.refactor.refactoring.runtime.test.JUnitTestCaseAdapter;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+/**
+ * Class used for running individual JUnit test cases
+ * of the specific model refactoring.
+ * @generated
+ */
+@RunWith(value = Parameterized.class)
+public class RefactoringTest extends JUnitTestCaseAdapter {
+
+ /**
+ * Number of test cases.
+ * @generated
+ */
+ private String number;
+
+ /**
+ * Constructor implementation.
+ * @param number Number of test cases.
+ * @generated
+ */
+ public RefactoringTest(String number) throws IOException {
+ super("de.unimarburg.swt.refactorings.uml.removeemptysuperclass",
+ "uml",
+ new File(".").getCanonicalPath(),
+ new Refactoring(null, "", "http://www.eclipse.org/uml2/3.0.0/UML", new RefactoringGuiHandler(), new RefactoringController()));
+ register(UMLPackage.eINSTANCE);
+ this.number = number;
+ }
+
+ @Parameters
+ public static Collection<Object[]> data() {
+ List<String> testNumbers = getTestNumbers();
+ Object[][] data = new Object[testNumbers.size()][1];
+ for (int i = 0; i < testNumbers.size(); i++) {
+ data[i][0] = testNumbers.get(i);
+ }
+ return Arrays.asList(data);
+ }
+
+ private static List<String> getTestNumbers() {
+ List<String> numbers = new ArrayList<String>();
+ try {
+ String pathPrefix = new File(".").getCanonicalPath() + "/tests/" + "de.unimarburg.swt.refactorings.uml.removeemptysuperclass";
+ File testCaseDir = new File(pathPrefix,"/");
+ FilenameFilter filter = new FilenameFilter() {
+ public boolean accept(File dir, String name) {
+ return name.startsWith("test_");
+ }
+ };
+ String[] children = testCaseDir.list(filter);
+ if (children != null) {
+ for (String child : children) {
+ numbers.add(
+ child.substring(
+ child.indexOf('_') + 1));
+ }
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return numbers;
+ }
+
+ /**
+ * Runs the test.
+ */
+ @Test
+ public void test() {
+ System.out.println("running test test_" + number);
+ executeTestCase(number);
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringWizard.java b/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringWizard.java
new file mode 100644
index 0000000..20df562
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringWizard.java
@@ -0,0 +1,40 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: RefactoringWizard.javajet,v 1.1 2010/07/15 13:08:44 tarendt Exp $
+ */
+ package org.eclipse.emf.refactor.refactorings.uml24.removeemptysuperclass;
+
+import org.eclipse.emf.refactor.refactoring.interfaces.IController;
+import org.eclipse.emf.refactor.refactoring.runtime.ltk.ui.AbstractRefactoringWizard;
+
+/**
+ * Class used for providing an implementation of an LTK
+ * RefactoringWizard in EMF Refactor.
+ * @generated
+ */
+public class RefactoringWizard
+ extends AbstractRefactoringWizard {
+
+ /**
+ * Default constructor implementation.
+ * @param controller Controller of the EMF model refactoring.
+ * @generated
+ */
+ public RefactoringWizard(IController controller) {
+ super(controller);
+ }
+
+ /**
+ * @see org.eclipse.ltk.ui.refactoring.RefactoringWizard#
+ * addUserInputPages()
+ * @generated
+ */
+ @Override
+ protected void addUserInputPages() {
+ addPage(new RefactoringWizardPage
+ (controller.getParent().getName(), (RefactoringController)controller));
+ }
+
+}
diff --git a/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringWizardPage.java b/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringWizardPage.java
new file mode 100644
index 0000000..db5f5d5
--- /dev/null
+++ b/org.eclipse.emf.refactor.refactorings.uml24/src/org/eclipse/emf/refactor/refactorings/uml24/removeemptysuperclass/RefactoringWizardPage.java
@@ -0,0 +1,80 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: RefactoringWizardPage.javajet,v 1.1 2010/07/15 13:08:44 tarendt Exp $
+ */
+ package org.eclipse.emf.refactor.refactorings.uml24.removeemptysuperclass;
+
+import java.util.List;
+
+import org.eclipse.emf.refactor.refactoring.runtime.ltk.ui.AbstractRefactoringWizard;
+import org.eclipse.emf.refactor.refactoring.runtime.ui.IInputPageButtonCreator;
+import org.eclipse.emf.refactor.refactoring.runtime.ui.InputPageButtonLoader;
+import org.eclipse.ltk.ui.refactoring.UserInputWizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+
+/**
+ * Class for setting model refactoring specific parameters
+ * by the user.
+ * @generated
+ */
+public class RefactoringWizardPage extends
+ UserInputWizardPage implements Listener {
+
+ /**
+ * Controller of the EMF model refactoring.
+ * @generated
+ */
+ private final RefactoringController controller;
+
+
+ /**
+ * Default constructor using a name and the controller of the
+ * EMF model refactoring.
+ * @param name Name of the WizardPage.
+ * @param controller Controller of the EMF model refactoring.
+ * @generated
+ */
+ public RefactoringWizardPage
+ (String name, RefactoringController controller) {
+ super(name);
+ this.controller = controller;
+ }
+
+ /**
+ * @see org.eclipse.swt.widgets.Listener#
+ * handleEvent(org.eclipse.swt.widgets.Event)
+ * @generated
+ */
+ @Override
+ public void handleEvent(Event event) {
+ getWizard().getContainer().updateButtons();
+ }
+
+ /**
+ * @see org.eclipse.jface.dialogs.IDialogPage#
+ * createControl(org.eclipse.swt.widgets.Composite)
+ * @generated
+ */
+ @Override
+ public void createControl(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout gl = new GridLayout();
+ gl.numColumns = 2;
+ composite.setLayout(gl);
+
+ List<IInputPageButtonCreator> buttonCreators = InputPageButtonLoader.iNSTANCE.getInputPageButtonCreatorClasses();
+ for(IInputPageButtonCreator creator : buttonCreators){
+ creator.createButton(composite, controller, (AbstractRefactoringWizard)this.getWizard());
+ }
+
+ setControl(composite);
+ }
+
+}
+
\ No newline at end of file