Commit 9e52de87 authored by Marco Konersmann's avatar Marco Konersmann

Removes unused code

parent 87a65070
......@@ -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) {
......
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment