Commit 9e52de87 authored by Müller, Marco's avatar Müller, Marco
Browse files

Removes unused code

parent 87a65070
Loading
Loading
Loading
Loading
+1 −32
Original line number Diff line number Diff line
@@ -30,14 +30,12 @@ public class ChildOperationTransformation
		implements IALTransformation<StereotypeApplication, IType> {

	private IALHolder holder = new IALHolder();
	private ComponentType componentType;

	public ChildOperationTransformation(ChildTypeTransformation childTypeTransformation, ComponentType componentType) {
	public ChildOperationTransformation(ChildTypeTransformation childTypeTransformation) {
		super(null,
				ProfilesUtils.getEReference(
						ProfilesUtils.getStereotype("OperationInterface", Profiles.INTERFACES_TYPE_OPERATIONS.load()),
						"operations"));
		this.componentType = componentType;
	}

	@Override
@@ -118,35 +116,6 @@ public class ChildOperationTransformation
		List<EObject> children = Models.getTargetsAsList(modelElement, ProfilesUtils.getEReference(
				Profiles.COMPONENTS_HIERARCHY_SCOPED.load(), "HierarchicalComponentTypeScoped", "childTypes"));
		createProvidedOperationRecursively(children, null);

		// IType type = (IType) codeElement;
		// List<EObject> targets = Models.getTargetsAsList(modelElement, eReference);
		// for (EObject target : targets) {
		// if (type.getMethod(getNameAttributeValue(target), new String[0]).exists()) {
		// // Method already exists. Do nothing
		// } else {
		// // Method does not exist. Create a new one.
		// String targetName = getNameAttributeValue(target);
		//
		// // For presentation purposes. This is currently only able to handle the name
		// of
		// // Annotated Member References (Single) references.
		// String content = "public void " + targetName.substring(0, 1).toLowerCase() +
		// targetName.substring(1)
		// + "(){" + componentType.getName().substring(0, 1).toLowerCase()
		// + componentType.getName().substring(1) + "." + targetName.substring(0,
		// 1).toLowerCase()
		// + targetName.substring(1) + "();" + "}";
		//
		// try {
		// type.createMethod(content, null, true, null);
		// } catch (JavaModelException e) {
		// addWarning(MessageFormat.format("Could not add method [{0}] to [{1}].",
		// target,
		// codeElement.getElementName()), e);
		// }
		// }
		// }
	}

	private void createProvidedOperationRecursively(List<EObject> children, ComponentType topmostProvidingComponent) {
+1 −2
Original line number Diff line number Diff line
@@ -66,8 +66,7 @@ public class ChildTypeTransformation
	@Override
	protected void doCreateChildTransformationsToCode(
			List<AbstractModelCodeTransformation<? extends EObject, ? extends IJavaElement>> result) {
		ChildOperationTransformation child = new ChildOperationTransformation(this,
				(ComponentType) modelElement.getAppliedTo());
		ChildOperationTransformation child = new ChildOperationTransformation(this);
		child.setModelElement(modelElement);
		child.getIALHolder().setFoundationalIALElement(holder.getFoundationalIALElement());
		child.getIALHolder().setPriorFoundationalIALElement(holder.getPriorFoundationalIALElement());