Commit a9caf20a authored by Marco Konersmann's avatar Marco Konersmann

Major Refactoring

* Some Names aligned to thesis
* Removes unused IntegrationMechanismTransformation
* Corrects Type Hierarchy of some mechanism transformations. They used AMCT as super type before
parent e43b8427
......@@ -28,21 +28,21 @@ import org.eclipse.emf.henshin.model.Module;
*/
public class HenshinTGGBasedLanguageDefinitionHelper {
public TransformationResult transformCMToIL(LanguageDefinition languageDefinition, URI henshinTGGFileURI,
public TransformationResult transformIMToTM(LanguageDefinition languageDefinition, URI henshinTGGFileURI,
List<EObject> cmRoots, IDRegistry idregistry, IProgressMonitor monitor) throws CodelingException {
final HenshinTGGTransformation task = new HenshinTGGTransformation(languageDefinition, henshinTGGFileURI,
"Transforming Implementation Model to Implementation Model", TGGDirection.FORWARD, idregistry, cmRoots);
TransformationResult result = task.execute(monitor);
task.addIntermediateLanguageElementsToRegistry();
task.addTranslationModelElementsToRegistry();
return result;
}
public TransformationResult transformILToCM(LanguageDefinition languageDefinition, URI henshinTGGFileURI,
public TransformationResult transformTMToIM(LanguageDefinition languageDefinition, URI henshinTGGFileURI,
List<EObject> ilRoots, IDRegistry idRegistry, IProgressMonitor monitor) throws CodelingException {
final HenshinTGGTransformation task = new HenshinTGGTransformation(languageDefinition, henshinTGGFileURI,
"Transforming Translation Model to Implementation Model", TGGDirection.BACKWARD, idRegistry, ilRoots);
TransformationResult result = task.execute(monitor);
task.propagateIDsFromIL2CMInRegistry();
task.propagateIDsFromTM2IMInRegistry();
return result;
}
......
......@@ -65,7 +65,7 @@ public class HenshinTGGTransformation extends ModelTransformation {
return result;
}
public void propagateIDsFromIL2CMInRegistry() {
public void propagateIDsFromTM2IMInRegistry() {
Map<List<EObject>, List<EObject>> initial2resultElements = getInitial2ResultElements();
if (initial2resultElements == null)
throw new IllegalStateException(
......@@ -190,7 +190,7 @@ public class HenshinTGGTransformation extends ModelTransformation {
return updatedIDs;
}
public void addIntermediateLanguageElementsToRegistry() {
public void addTranslationModelElementsToRegistry() {
Map<List<EObject>, List<EObject>> initial2resultElements = getInitial2ResultElements();
if (initial2resultElements == null)
throw new IllegalStateException(
......
......@@ -17,7 +17,6 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
import org.osgi.framework.FrameworkUtil;
import de.mkonersmann.advert.java.embed.JavaBasedImplementationLanguageDefinition;
......@@ -55,13 +54,13 @@ public class CoCoMELanguageDefinition extends JavaBasedImplementationLanguageDef
@Override
public TransformationResult transformIMToTM(List<EObject> cmRoots, IDRegistry idregistry) throws CodelingException {
return new HenshinTGGBasedLanguageDefinitionHelper().transformCMToIL(this, henshinTGGFileURI, cmRoots,
return new HenshinTGGBasedLanguageDefinitionHelper().transformIMToTM(this, henshinTGGFileURI, cmRoots,
idregistry, monitor);
}
@Override
public TransformationResult transformTMToIM(List<EObject> ilRoots, IDRegistry idRegistry) throws CodelingException {
return new HenshinTGGBasedLanguageDefinitionHelper().transformILToCM(this, henshinTGGFileURI, ilRoots,
return new HenshinTGGBasedLanguageDefinitionHelper().transformTMToIM(this, henshinTGGFileURI, ilRoots,
idRegistry, monitor);
}
......
......@@ -34,15 +34,15 @@ public class ComponentTransformation extends ClassMechanismTransformation<Compon
@Override
protected void doCreateChildTransformationsToCode(
List<AbstractModelCodeTransformation<? extends EObject, ? extends IJavaElement>> result) {
result.add(new ChildrenTransformation(this));
result.add(new EventsTransformation<IPackageFragment>(this));
result.add(new ChildrenTransformation<Component, Component, IPackageFragment>(this));
result.add(new EventsTransformation<Component, IPackageFragment>(this));
}
@Override
protected void doCreateChildTransformationsToModel(
List<AbstractModelCodeTransformation<? extends EObject, ? extends IJavaElement>> result) {
result.add(new ChildrenTransformation(this));
result.add(new EventsTransformation<IPackageFragment>(this));
result.add(new ChildrenTransformation<Component, Component, IPackageFragment>(this));
result.add(new EventsTransformation<Component, IPackageFragment>(this));
}
@Override
......
......@@ -4,6 +4,7 @@ import java.util.List;
import org.codeling.lang.cocome.mm.CoCoME.CoCoMEFactory;
import org.codeling.lang.cocome.mm.CoCoME.CoCoMEPackage;
import org.codeling.lang.cocome.mm.CoCoME.Component;
import org.codeling.lang.cocome.mm.CoCoME.Console;
import org.codeling.lang.cocome.transformation.component_feature.ChildrenTransformation;
import org.codeling.lang.cocome.transformation.component_feature.DispatchedTransformation;
......@@ -30,25 +31,25 @@ public class ConsoleTransformation extends ClassMechanismTransformation<Console,
public void doCreateCrossReferencesTransformations(
List<AbstractModelCodeTransformation<? extends EObject, ? extends IJavaElement>> result) {
// Child transformations for cross references
result.add(new RequiresTransformation(this));
result.add(new HandledTransformation<IType>(this));
result.add(new DispatchedTransformation<IType>(this));
result.add(new RequiresTransformation<Console>(this));
result.add(new HandledTransformation<Console, IType>(this));
result.add(new DispatchedTransformation<Console, IType>(this));
}
@Override
protected void doCreateChildTransformationsToCode(
List<AbstractModelCodeTransformation<? extends EObject, ? extends IJavaElement>> result) {
result.add(new ChildrenTransformation<IType>(this));
result.add(new ProvidesTransformation(this));
result.add(new EventsTransformation<IType>(this));
result.add(new ChildrenTransformation<Console, Component, IType>(this));
result.add(new ProvidesTransformation<Console>(this));
result.add(new EventsTransformation<Console, IType>(this));
}
@Override
protected void doCreateChildTransformationsToModel(
List<AbstractModelCodeTransformation<? extends EObject, ? extends IJavaElement>> result) {
result.add(new ChildrenTransformation<IType>(this));
result.add(new ProvidesTransformation(this));
result.add(new EventsTransformation<IType>(this));
result.add(new ChildrenTransformation<Console, Component, IType>(this));
result.add(new ProvidesTransformation<Console>(this));
result.add(new EventsTransformation<Console, IType>(this));
}
@Override
......
......@@ -5,6 +5,8 @@ import java.util.List;
import org.codeling.lang.cocome.mm.CoCoME.CoCoMEFactory;
import org.codeling.lang.cocome.mm.CoCoME.CoCoMEPackage;
import org.codeling.lang.cocome.mm.CoCoME.Component;
import org.codeling.lang.cocome.mm.CoCoME.Console;
import org.codeling.lang.cocome.mm.CoCoME.Model;
import org.codeling.lang.cocome.transformation.component_feature.ChildrenTransformation;
import org.codeling.lang.cocome.transformation.component_feature.DispatchedTransformation;
......@@ -35,9 +37,9 @@ public class ModelTransformation extends ClassMechanismTransformation<Model, ITy
@Override
public void doCreateCrossReferencesTransformations(
List<AbstractModelCodeTransformation<? extends EObject, ? extends IJavaElement>> result) {
result.add(new RequiresTransformation(this));
result.add(new HandledTransformation<IType>(this));
result.add(new DispatchedTransformation<IType>(this));
result.add(new RequiresTransformation<Model>(this));
result.add(new HandledTransformation<Model,IType>(this));
result.add(new DispatchedTransformation<Model,IType>(this));
// Child transformations for cross references
result.add(new InitialStateTransformation(this));
......@@ -46,9 +48,9 @@ public class ModelTransformation extends ClassMechanismTransformation<Model, ITy
@Override
protected void doCreateChildTransformationsToCode(
List<AbstractModelCodeTransformation<? extends EObject, ? extends IJavaElement>> result) {
result.add(new ChildrenTransformation<IType>(this));
result.add(new ProvidesTransformation(this));
result.add(new EventsTransformation<IType>(this));
result.add(new ChildrenTransformation<Model, Component, IType>(this));
result.add(new ProvidesTransformation<Model>(this));
result.add(new EventsTransformation<Model,IType>(this));
// Child transformations for containment references
result.add(new StatesTransformation(this));
......@@ -58,9 +60,9 @@ public class ModelTransformation extends ClassMechanismTransformation<Model, ITy
@Override
protected void doCreateChildTransformationsToModel(
List<AbstractModelCodeTransformation<? extends EObject, ? extends IJavaElement>> result) {
result.add(new ChildrenTransformation<IType>(this));
result.add(new ProvidesTransformation(this));
result.add(new EventsTransformation<IType>(this));
result.add(new ChildrenTransformation<Model, Console, IType>(this));
result.add(new ProvidesTransformation<Model>(this));
result.add(new EventsTransformation<Model,IType>(this));
// Child transformations for containment references
result.add(new StatesTransformation(this));
......
......@@ -5,7 +5,7 @@ import java.util.List;
import org.codeling.lang.cocome.mm.CoCoME.CoCoMEPackage;
import org.codeling.lang.cocome.mm.CoCoME.Operation;
import org.codeling.lang.cocome.transformation.interface_feature.OperationsTransformation;
import org.codeling.mechanisms.transformations.references.ContainmentOperationTargetTransformation;
import org.codeling.mechanisms.transformations.classes.ContainmentOperationTargetTransformation;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jdt.core.IJavaElement;
......
......@@ -4,6 +4,7 @@ import java.util.List;
import org.codeling.lang.cocome.mm.CoCoME.CoCoMEFactory;
import org.codeling.lang.cocome.mm.CoCoME.CoCoMEPackage;
import org.codeling.lang.cocome.mm.CoCoME.Component;
import org.codeling.lang.cocome.mm.CoCoME.Server;
import org.codeling.lang.cocome.transformation.component_feature.ChildrenTransformation;
import org.codeling.lang.cocome.transformation.component_feature.DispatchedTransformation;
......@@ -31,9 +32,9 @@ public class ServerTransformation extends ClassMechanismTransformation<Server, I
public void doCreateCrossReferencesTransformations(
List<AbstractModelCodeTransformation<? extends EObject, ? extends IJavaElement>> result) {
// Child transformations for cross references
result.add(new RequiresTransformation(this));
result.add(new HandledTransformation<IType>(this));
result.add(new DispatchedTransformation<IType>(this));
result.add(new RequiresTransformation<Server>(this));
result.add(new HandledTransformation<Server, IType>(this));
result.add(new DispatchedTransformation<Server, IType>(this));
// Child transformations for cross references
}
......@@ -41,9 +42,9 @@ public class ServerTransformation extends ClassMechanismTransformation<Server, I
@Override
protected void doCreateChildTransformationsToCode(
List<AbstractModelCodeTransformation<? extends EObject, ? extends IJavaElement>> result) {
result.add(new ChildrenTransformation<IType>(this));
result.add(new ProvidesTransformation(this));
result.add(new EventsTransformation<IType>(this));
result.add(new ChildrenTransformation<Server, Component, IType>(this));
result.add(new ProvidesTransformation<Server>(this));
result.add(new EventsTransformation<Server, IType>(this));
// Child transformations for containment references
result.add(new TransferObjectsTransformation(this));
......@@ -52,9 +53,9 @@ public class ServerTransformation extends ClassMechanismTransformation<Server, I
@Override
protected void doCreateChildTransformationsToModel(
List<AbstractModelCodeTransformation<? extends EObject, ? extends IJavaElement>> result) {
result.add(new ChildrenTransformation<IType>(this));
result.add(new ProvidesTransformation(this));
result.add(new EventsTransformation<IType>(this));
result.add(new ChildrenTransformation<Server, Component, IType>(this));
result.add(new ProvidesTransformation<Server>(this));
result.add(new EventsTransformation<Server, IType>(this));
// Child transformations for containment references
result.add(new TransferObjectsTransformation(this));
......
......@@ -6,7 +6,7 @@ import org.codeling.lang.cocome.mm.CoCoME.CoCoMEPackage;
import org.codeling.lang.cocome.mm.CoCoME.Transition;
import org.codeling.lang.cocome.transformation.model_feature.TransitionsTransformation;
import org.codeling.lang.cocome.transformation.transition_feature.TargetTransformation;
import org.codeling.mechanisms.transformations.references.ContainmentOperationTargetTransformation;
import org.codeling.mechanisms.transformations.classes.ContainmentOperationTargetTransformation;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jdt.core.IJavaElement;
......
......@@ -27,7 +27,7 @@ import de.mkonersmann.advert.java.embed.transformation.AbstractModelCodeTransfor
public class ComponentsTransformation extends NinjaSingletonContainmentTransformation<Architecture, Component> {
public ComponentsTransformation(
AbstractModelCodeTransformation<? extends EObject, IJavaElement> parentTransformation) {
ClassMechanismTransformation<Architecture, IJavaElement> parentTransformation) {
super(parentTransformation, CoCoMEPackage.eINSTANCE.getArchitecture_Components());
}
......
......@@ -11,6 +11,7 @@ import org.codeling.lang.cocome.transformation.ConsoleTransformation;
import org.codeling.lang.cocome.transformation.ModelTransformation;
import org.codeling.lang.cocome.transformation.ServerTransformation;
import org.codeling.lang.cocome.transformation.architecture_feature.ComponentsTransformation;
import org.codeling.mechanisms.transformations.ClassMechanismTransformation;
import org.codeling.mechanisms.transformations.ReferenceMechanismTransformation;
import org.codeling.utils.CodelingException;
import org.eclipse.emf.ecore.EObject;
......@@ -22,10 +23,10 @@ import org.eclipse.jdt.core.JavaModelException;
import de.mkonersmann.advert.java.embed.ASTUtils;
import de.mkonersmann.advert.java.embed.transformation.AbstractModelCodeTransformation;
public class ChildrenTransformation<OWNERCLASS extends IJavaElement>
extends ReferenceMechanismTransformation<Component, Component, OWNERCLASS> {
public class ChildrenTransformation<OWNINGCOMPONENTTYPE extends Component, TARGETCOMPONENTTYPE extends Component, CODEELEMENT extends IJavaElement>
extends ReferenceMechanismTransformation<OWNINGCOMPONENTTYPE, TARGETCOMPONENTTYPE, CODEELEMENT> {
public ChildrenTransformation(AbstractModelCodeTransformation<? extends EObject, OWNERCLASS> parentTransformation) {
public ChildrenTransformation(ClassMechanismTransformation<OWNINGCOMPONENTTYPE, CODEELEMENT> parentTransformation) {
super(parentTransformation, CoCoMEPackage.eINSTANCE.getComponent_Children());
}
......@@ -99,7 +100,7 @@ public class ChildrenTransformation<OWNERCLASS extends IJavaElement>
}
@Override
public Component transformToModel() throws CodelingException {
public OWNINGCOMPONENTTYPE transformToModel() throws CodelingException {
if (modelElement == null)
throw new IllegalStateException(
"modelElement must not be null. Please set the field value to the object that owns the reference.");
......@@ -123,7 +124,7 @@ public class ChildrenTransformation<OWNERCLASS extends IJavaElement>
addError("Error while finding subpackge components.", e);
}
List<Component> targetElements = getTargetObjects(modelElement, eReference, targets);
List<TARGETCOMPONENTTYPE> targetElements = getTargetObjects(modelElement, eReference, targets);
if (eReference.isMany()) {
((List<Component>) modelElement.eGet(eReference)).addAll(targetElements);
} else {
......
......@@ -8,6 +8,7 @@ import java.util.regex.Pattern;
import org.codeling.lang.cocome.mm.CoCoME.CoCoMEPackage;
import org.codeling.lang.cocome.mm.CoCoME.Component;
import org.codeling.lang.cocome.mm.CoCoME.Event;
import org.codeling.mechanisms.transformations.ClassMechanismTransformation;
import org.codeling.mechanisms.transformations.ReferenceMechanismTransformation;
import org.codeling.utils.CodelingException;
import org.eclipse.emf.ecore.EObject;
......@@ -17,11 +18,11 @@ import org.eclipse.jdt.core.JavaModelException;
import de.mkonersmann.advert.java.embed.transformation.AbstractModelCodeTransformation;
public class DispatchedTransformation<OWNERCLASS extends IJavaElement>
extends ReferenceMechanismTransformation<Component, Event, OWNERCLASS> {
public class DispatchedTransformation<COMPONENTTYPE extends Component, OWNERCLASS extends IJavaElement>
extends ReferenceMechanismTransformation<COMPONENTTYPE, Event, OWNERCLASS> {
public DispatchedTransformation(
AbstractModelCodeTransformation<? extends EObject, OWNERCLASS> parentTransformation) {
ClassMechanismTransformation<COMPONENTTYPE, OWNERCLASS> parentTransformation) {
super(parentTransformation, CoCoMEPackage.eINSTANCE.getComponent_Dispatched());
}
......@@ -62,7 +63,7 @@ public class DispatchedTransformation<OWNERCLASS extends IJavaElement>
}
@Override
public Component transformToModel() throws CodelingException {
public COMPONENTTYPE transformToModel() throws CodelingException {
try {
LinkedList<String> dispatchedEvents = new LinkedList<String>();
if (codeElement instanceof IType) { // Package Fragment Components do not dispatch events
......
......@@ -8,6 +8,7 @@ import org.codeling.lang.cocome.mm.CoCoME.CoCoMEPackage;
import org.codeling.lang.cocome.mm.CoCoME.Component;
import org.codeling.lang.cocome.mm.CoCoME.Event;
import org.codeling.lang.cocome.transformation.EventTransformation;
import org.codeling.mechanisms.transformations.ClassMechanismTransformation;
import org.codeling.mechanisms.transformations.ReferenceMechanismTransformation;
import org.codeling.utils.CodelingException;
import org.eclipse.emf.ecore.EObject;
......@@ -20,9 +21,9 @@ import org.eclipse.jdt.core.JavaModelException;
import de.mkonersmann.advert.java.embed.ASTUtils;
import de.mkonersmann.advert.java.embed.transformation.AbstractModelCodeTransformation;
public class EventsTransformation<OWNERTYPE extends IJavaElement> extends ReferenceMechanismTransformation<Component, Event, OWNERTYPE> {
public class EventsTransformation<COMPONENTTYPE extends Component, OWNERTYPE extends IJavaElement> extends ReferenceMechanismTransformation<COMPONENTTYPE, Event, OWNERTYPE> {
public EventsTransformation(AbstractModelCodeTransformation<? extends EObject, OWNERTYPE> parentTransformation) {
public EventsTransformation(ClassMechanismTransformation<COMPONENTTYPE, OWNERTYPE> parentTransformation) {
super(parentTransformation, CoCoMEPackage.eINSTANCE.getComponent_Events());
}
......@@ -71,7 +72,7 @@ public class EventsTransformation<OWNERTYPE extends IJavaElement> extends Refere
}
@Override
public Component transformToModel() throws CodelingException {
public COMPONENTTYPE transformToModel() throws CodelingException {
try {
List<String> targets = getEventTypes().stream()
.map(t -> t.getElementName().substring(0, t.getElementName().length() - "Event".length()))
......
......@@ -6,6 +6,7 @@ import java.util.List;
import org.codeling.lang.cocome.mm.CoCoME.CoCoMEPackage;
import org.codeling.lang.cocome.mm.CoCoME.Component;
import org.codeling.lang.cocome.mm.CoCoME.Event;
import org.codeling.mechanisms.transformations.ClassMechanismTransformation;
import org.codeling.mechanisms.transformations.ReferenceMechanismTransformation;
import org.codeling.utils.CodelingException;
import org.eclipse.emf.ecore.EObject;
......@@ -18,10 +19,10 @@ import org.eclipse.jdt.core.Signature;
import de.mkonersmann.advert.java.embed.transformation.AbstractModelCodeTransformation;
public class HandledTransformation<OWNERCLASS extends IJavaElement>
extends ReferenceMechanismTransformation<Component, Event, OWNERCLASS> {
public class HandledTransformation<COMPONENTTYPE extends Component, OWNERCLASS extends IJavaElement>
extends ReferenceMechanismTransformation<COMPONENTTYPE, Event, OWNERCLASS> {
public HandledTransformation(AbstractModelCodeTransformation<? extends EObject, OWNERCLASS> parentTransformation) {
public HandledTransformation(ClassMechanismTransformation<COMPONENTTYPE, OWNERCLASS> parentTransformation) {
super(parentTransformation, CoCoMEPackage.eINSTANCE.getComponent_Handled());
}
......@@ -62,7 +63,7 @@ public class HandledTransformation<OWNERCLASS extends IJavaElement>
}
@Override
public Component transformToModel() throws CodelingException {
public COMPONENTTYPE transformToModel() throws CodelingException {
try {
LinkedList<String> handledEvents = new LinkedList<String>();
if (codeElement instanceof IType) { // Package Fragment Components do not dispatch events
......
......@@ -6,6 +6,7 @@ import org.codeling.lang.cocome.mm.CoCoME.CoCoMEPackage;
import org.codeling.lang.cocome.mm.CoCoME.Component;
import org.codeling.lang.cocome.mm.CoCoME.Interface;
import org.codeling.lang.cocome.transformation.InterfaceTransformation;
import org.codeling.mechanisms.transformations.ClassMechanismTransformation;
import org.codeling.mechanisms.transformations.references.StaticInterfaceImplementationTransformation;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jdt.core.IJavaElement;
......@@ -16,9 +17,10 @@ import org.eclipse.jdt.core.Signature;
import de.mkonersmann.advert.java.embed.ASTUtils;
import de.mkonersmann.advert.java.embed.transformation.AbstractModelCodeTransformation;
public class ProvidesTransformation extends StaticInterfaceImplementationTransformation<Component, Interface> {
public class ProvidesTransformation<COMPONENTTYPE extends Component>
extends StaticInterfaceImplementationTransformation<COMPONENTTYPE, Interface> {
public ProvidesTransformation(AbstractModelCodeTransformation<? extends EObject, IType> parentTransformation) {
public ProvidesTransformation(ClassMechanismTransformation<COMPONENTTYPE, IType> parentTransformation) {
super(parentTransformation, CoCoMEPackage.eINSTANCE.getComponent_Provides());
}
......
......@@ -8,6 +8,7 @@ import org.codeling.lang.cocome.mm.CoCoME.CoCoMEPackage;
import org.codeling.lang.cocome.mm.CoCoME.Component;
import org.codeling.lang.cocome.mm.CoCoME.Interface;
import org.codeling.lang.cocome.transformation.InterfaceTransformation;
import org.codeling.mechanisms.transformations.ClassMechanismTransformation;
import org.codeling.mechanisms.transformations.ReferenceMechanismTransformation;
import org.codeling.utils.CodelingException;
import org.eclipse.emf.ecore.EObject;
......@@ -20,11 +21,11 @@ import de.mkonersmann.advert.java.embed.ASTUtils;
import de.mkonersmann.advert.java.embed.transformation.AbstractModelCodeTransformation;
import de.mkonersmann.advert.java.embed.transformation.IModelCodeTransformation;
public class RequiresTransformation extends ReferenceMechanismTransformation<Component, Interface, IType> {
public class RequiresTransformation<COMPONENTTYPE extends Component> extends ReferenceMechanismTransformation<COMPONENTTYPE, Interface, IType> {
private List<IType> targetTypes = new LinkedList<>();
public RequiresTransformation(AbstractModelCodeTransformation<? extends EObject, IType> parentTransformation) {
public RequiresTransformation(ClassMechanismTransformation<COMPONENTTYPE, IType> parentTransformation) {
super(parentTransformation, CoCoMEPackage.eINSTANCE.getComponent_Requires());
}
......@@ -64,7 +65,7 @@ public class RequiresTransformation extends ReferenceMechanismTransformation<Com
}
@Override
public Component transformToModel() throws CodelingException {
public COMPONENTTYPE transformToModel() throws CodelingException {
// Find the element that is referenced by the field's type and set it as
// eReference value
List<String> typeNames = resolveTargetTypes().stream().map(t -> t.getElementName())
......
......@@ -6,7 +6,8 @@ import org.codeling.lang.cocome.mm.CoCoME.CoCoMEPackage;
import org.codeling.lang.cocome.mm.CoCoME.Interface;
import org.codeling.lang.cocome.mm.CoCoME.Operation;
import org.codeling.lang.cocome.transformation.OperationTransformation;
import org.codeling.mechanisms.transformations.classes.ContainmentOperationTransformation;
import org.codeling.mechanisms.transformations.ClassMechanismTransformation;
import org.codeling.mechanisms.transformations.references.ContainmentOperationTransformation;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
......@@ -16,7 +17,7 @@ import de.mkonersmann.advert.java.embed.transformation.AbstractModelCodeTransfor
public class OperationsTransformation extends ContainmentOperationTransformation<Interface, Operation> {
public OperationsTransformation(AbstractModelCodeTransformation<? extends EObject, IType> parentTransformation) {
public OperationsTransformation(ClassMechanismTransformation<Interface, IType> parentTransformation) {
super(parentTransformation, CoCoMEPackage.eINSTANCE.getInterface_Operations());
}
......
......@@ -6,6 +6,7 @@ import java.util.List;
import org.codeling.lang.cocome.mm.CoCoME.CoCoMEPackage;
import org.codeling.lang.cocome.mm.CoCoME.Model;
import org.codeling.lang.cocome.mm.CoCoME.State;
import org.codeling.mechanisms.transformations.ClassMechanismTransformation;
import org.codeling.mechanisms.transformations.ReferenceMechanismTransformation;
import org.codeling.utils.CodelingException;
import org.eclipse.emf.ecore.EObject;
......@@ -19,7 +20,7 @@ import de.mkonersmann.advert.java.embed.transformation.AbstractModelCodeTransfor
public class InitialStateTransformation extends ReferenceMechanismTransformation<Model, State, IType> {
public InitialStateTransformation(AbstractModelCodeTransformation<? extends EObject, IType> parentTransformation) {
public InitialStateTransformation(ClassMechanismTransformation<Model, IType> parentTransformation) {
super(parentTransformation, CoCoMEPackage.eINSTANCE.getModel_InitialState());
}
......
......@@ -7,6 +7,7 @@ import org.codeling.lang.cocome.mm.CoCoME.CoCoMEPackage;
import org.codeling.lang.cocome.mm.CoCoME.Model;
import org.codeling.lang.cocome.mm.CoCoME.State;
import org.codeling.lang.cocome.transformation.StateTransformation;
import org.codeling.mechanisms.transformations.ClassMechanismTransformation;
import org.codeling.mechanisms.transformations.ReferenceMechanismTransformation;
import org.codeling.utils.CodelingException;
import org.eclipse.emf.ecore.EObject;
......@@ -22,7 +23,7 @@ public class StatesTransformation extends ReferenceMechanismTransformation<Model
LinkedList<String> targetNames = new LinkedList<>();
public StatesTransformation(AbstractModelCodeTransformation<? extends EObject, IType> parentTransformation) {
public StatesTransformation(ClassMechanismTransformation<Model, IType> parentTransformation) {
super(parentTransformation, CoCoMEPackage.eINSTANCE.getModel_States());
}
......
......@@ -6,7 +6,8 @@ import org.codeling.lang.cocome.mm.CoCoME.CoCoMEPackage;
import org.codeling.lang.cocome.mm.CoCoME.Model;
import org.codeling.lang.cocome.mm.CoCoME.Transition;
import org.codeling.lang.cocome.transformation.TransitionTransformation;
import org.codeling.mechanisms.transformations.classes.ContainmentOperationTransformation;
import org.codeling.mechanisms.transformations.ClassMechanismTransformation;
import org.codeling.mechanisms.transformations.references.ContainmentOperationTransformation;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
......@@ -17,7 +18,7 @@ import de.mkonersmann.advert.java.embed.transformation.AbstractModelCodeTransfor
public class TransitionsTransformation extends ContainmentOperationTransformation<Model, Transition> {
public TransitionsTransformation(AbstractModelCodeTransformation<? extends EObject, IType> parentTransformation) {
public TransitionsTransformation(ClassMechanismTransformation<Model, IType> parentTransformation) {
super(parentTransformation, CoCoMEPackage.eINSTANCE.getModel_Transitions());
}
......
......@@ -7,6 +7,7 @@ import org.codeling.lang.cocome.mm.CoCoME.CoCoMEPackage;
import org.codeling.lang.cocome.mm.CoCoME.Server;
import org.codeling.lang.cocome.mm.CoCoME.TransferObject;
import org.codeling.lang.cocome.transformation.TransferObjectTransformation;
import org.codeling.mechanisms.transformations.ClassMechanismTransformation;
import org.codeling.mechanisms.transformations.ReferenceMechanismTransformation;
import org.codeling.utils.CodelingException;
import org.eclipse.emf.ecore.EObject;
......@@ -22,7 +23,7 @@ public class TransferObjectsTransformation extends ReferenceMechanismTransformat
LinkedList<String> targetNames = new LinkedList<>();
public TransferObjectsTransformation(
AbstractModelCodeTransformation<? extends EObject, IType> parentTransformation) {
ClassMechanismTransformation<Server, IType> parentTransformation) {
super(parentTransformation, CoCoMEPackage.eINSTANCE.getServer_TransferObjects());
}
......
......@@ -5,6 +5,7 @@ import java.util.List;
import org.codeling.lang.cocome.mm.CoCoME.CoCoMEPackage;
import org.codeling.lang.cocome.mm.CoCoME.State;
import org.codeling.lang.cocome.mm.CoCoME.Transition;
import org.codeling.mechanisms.transformations.ClassMechanismTransformation;
import org.codeling.mechanisms.transformations.ReferenceMechanismTransformation;
import org.codeling.utils.CodelingException;
import org.eclipse.emf.ecore.EObject;
......@@ -15,7 +16,7 @@ import de.mkonersmann.advert.java.embed.transformation.AbstractModelCodeTransfor
public class TargetTransformation extends ReferenceMechanismTransformation<Transition, State, IMethod> {
public TargetTransformation(AbstractModelCodeTransformation<? extends EObject, IMethod> parentTransformation) {
public TargetTransformation(ClassMechanismTransformation<Transition, IMethod> parentTransformation) {
super(parentTransformation, CoCoMEPackage.eINSTANCE.getTransition_Target());
}
......
......@@ -6,7 +6,6 @@ import java.util.List;
import java.util.concurrent.RecursiveAction;
import org.codeling.languageregistry.LanguageDefinition;
import org.codeling.mechanisms.transformations.IntegrationMechanismTransformation;
import org.codeling.utils.CodelingException;
import org.codeling.utils.CodelingLogger;
import org.codeling.utils.IDRegistry;
......
......@@ -10,7 +10,7 @@ import org.eclipse.jdt.core.IJavaElement;
import de.mkonersmann.advert.java.embed.transformation.AbstractModelCodeTransformation;
public abstract class AttributeMechanismTransformation<OWNERECLASS extends EObject, JAVAELEMENT extends IJavaElement>
extends IntegrationMechanismTransformation<OWNERECLASS, JAVAELEMENT> {
extends AbstractModelCodeTransformation<OWNERECLASS, JAVAELEMENT> {
protected EAttribute eAttribute = null;
......
......@@ -8,7 +8,7 @@ import org.eclipse.jdt.core.IJavaElement;
import de.mkonersmann.advert.java.embed.transformation.AbstractModelCodeTransformation;
public abstract class ClassMechanismTransformation<ECLASS extends EObject, JAVAELEMENT extends IJavaElement>
extends IntegrationMechanismTransformation<ECLASS, JAVAELEMENT> {
extends AbstractModelCodeTransformation<ECLASS, JAVAELEMENT> {
protected EClass eClass = null;
......
package org.codeling.mechanisms.transformations;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jdt.core.IJavaElement;
import de.mkonersmann.advert.java.embed.transformation.AbstractModelCodeTransformation;