Commit 957dda4d authored by Marco Konersmann's avatar Marco Konersmann

Fixes imports in generated code.

parent 53e5d28c
......@@ -83,9 +83,9 @@ class ConstantMemberAttributeMechanism extends AttributeMechanism {
}
@Override
protected void doCreateChildTransformationsToCode(
List<AbstractModelCodeTransformation<? extends EObject, ? extends IJavaElement>> result) {
// TODO Auto-generated method stub
protected ClassMechanismTransformation<? extends EObject, ? extends IJavaElement> createSpecificTransformation(
EObject targetModelElement) {
new «eAttribute.EType.name»Transformation(this);
}
@Override
......
......@@ -86,7 +86,7 @@ class MarkerInterfaceMechanism extends ClassMechanism {
import org.eclipse.jdt.core.IJavaElement;
import org.codeling.lang.base.java.transformation.AbstractModelCodeTransformation;
import de.mkonersmann.advert.utils.CodelingException;
import org.codeling.utils.CodelingException;
import org.codeling.lang.«languageName».mm.«eClass.packageName».«eClass.packageName»Package;
import org.codeling.lang.«languageName».mm.«eClass.packageName».«eClass.name»;
......
......@@ -73,7 +73,7 @@ class NinjaSingletonMechanism extends ClassMechanism {
import org.eclipse.jdt.core.IJavaElement;
import org.codeling.lang.base.java.transformation.AbstractModelCodeTransformation;
import de.mkonersmann.advert.utils.CodelingException;
import org.codeling.utils.CodelingException;
import org.codeling.lang.«languageName».mm.«eClass.packageName».«eClass.packageName»Package;
import org.codeling.lang.«languageName».mm.«eClass.packageName».«eClass.name»;
......
......@@ -34,7 +34,7 @@ class ProjectMechanism extends ClassMechanism {
import org.eclipse.jdt.core.IJavaElement;
import org.codeling.lang.base.java.transformation.AbstractModelCodeTransformation;
import de.mkonersmann.advert.utils.CodelingException;
import org.codeling.utils.CodelingException;
import org.codeling.lang.«languageName».mm.«eClass.packageName».«eClass.packageName»Package;
import org.codeling.lang.«languageName».mm.«eClass.packageName».«eClass.name»;
......
......@@ -47,7 +47,7 @@ class StaticInterfaceMechanism extends ClassMechanism {
import org.eclipse.jdt.core.IJavaElement;
import org.codeling.lang.base.java.transformation.AbstractModelCodeTransformation;
import de.mkonersmann.advert.utils.CodelingException;
import org.codeling.utils.CodelingException;
import org.codeling.lang.«languageName».mm.«eClass.packageName».«eClass.packageName»Package;
import org.codeling.lang.«languageName».mm.«eClass.packageName».«eClass.name»;
......
......@@ -94,7 +94,7 @@ class TypeAnnotationMechanism extends ClassMechanism {
import org.eclipse.jdt.core.IJavaElement;
import org.codeling.lang.base.java.transformation.AbstractModelCodeTransformation;
import de.mkonersmann.advert.utils.CodelingException;
import org.codeling.utils.CodelingException;
import org.codeling.lang.«languageName».mm.«eClass.packageName».«eClass.packageName»Package;
import org.codeling.lang.«languageName».mm.«eClass.packageName».«eClass.name»;
......
......@@ -41,7 +41,7 @@ class NinjaSingletonContainmentReferenceMechanism extends ContainmentMechanism {
import org.codeling.lang.base.java.ASTUtils;
import org.codeling.lang.base.java.transformation.AbstractModelCodeTransformation;
import de.mkonersmann.advert.utils.Models;
import org.codeling.utils.Models;
public class «typeName»Transformation extends NinjaSingletonContainmentTransformation<«eReference.EContainingClass.name», «eReference.EType.name»> {
......@@ -57,13 +57,9 @@ class NinjaSingletonContainmentReferenceMechanism extends ContainmentMechanism {
}
@Override
protected void doCreateChildTransformationsToCode(
List<AbstractModelCodeTransformation<? extends EObject, ? extends IJavaElement>> result) {
for (EObject target : Models.getTargetsAsList(modelElement, eReference)) {
«eReference.EType.name»Transformation t = new «eReference.EType.name»Transformation(this);
t.setModelElement(target);
result.add(t);
}
protected ClassMechanismTransformation<? extends EObject, ? extends IJavaElement> createSpecificTransformation(
EObject targetModelElement) {
new «eReference.EType.name»Transformation(this);
}
@Override
......
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