Commit 3973624f authored by Marco Konersmann's avatar Marco Konersmann

Fixes compilation error

parent 52d25933
Pipeline #3019 failed with stages
in 1 minute and 21 seconds
......@@ -30,9 +30,9 @@ public class ChildOperationTransformation extends ContainmentOperationTransforma
private IALHolder holder = new IALHolder();
private ComponentType componentType;
public ChildOperationTransformation(ChildTypeTransformation childTypeTransformation,
ComponentType componentType) {
super((ClassMechanismTransformation<StereotypeApplication, IType>) childTypeTransformation.getParentTransformation(),
public ChildOperationTransformation(ChildTypeTransformation childTypeTransformation, ComponentType componentType) {
super((ClassMechanismTransformation<StereotypeApplication, IType>) childTypeTransformation
.getParentTransformation(),
ProfilesUtils.getEReference(
ProfilesUtils.getStereotype("OperationInterface", Profiles.INTERFACES_TYPE_OPERATIONS.load()),
"operations"));
......@@ -56,7 +56,8 @@ public class ChildOperationTransformation extends ContainmentOperationTransforma
// 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.
// 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()
......@@ -104,8 +105,8 @@ public class ChildOperationTransformation extends ContainmentOperationTransforma
}
@Override
public StereotypeApplication resolveTranslatedIALElement() {
EList<StereotypeApplication> appliedStereotypes = ProfilesUtils.getAppliedStereotypes(holder.getFoundationalIALElement());
public StereotypeApplication resolveTranslatedIALElement(EObject foundationalElement) {
EList<StereotypeApplication> appliedStereotypes = ProfilesUtils.getAppliedStereotypes(foundationalElement);
Stereotype scopedComponent = ProfilesUtils.getStereotype("HierarchicalComponentTypeScoped",
Profiles.COMPONENTS_HIERARCHY_SCOPED.load());
for (StereotypeApplication app : appliedStereotypes) {
......
......@@ -88,8 +88,8 @@ public class ChildTypeTransformation
}
@Override
public StereotypeApplication resolveTranslatedIALElement() {
EList<StereotypeApplication> appliedStereotypes = ProfilesUtils.getAppliedStereotypes(holder.getFoundationalIALElement());
public StereotypeApplication resolveTranslatedIALElement(EObject foundationalElement) {
EList<StereotypeApplication> appliedStereotypes = ProfilesUtils.getAppliedStereotypes(foundationalElement);
Stereotype scopedComponent = ProfilesUtils.getStereotype("HierarchicalComponentTypeScoped",
Profiles.COMPONENTS_HIERARCHY_SCOPED.load());
for (StereotypeApplication app : appliedStereotypes) {
......
......@@ -130,14 +130,12 @@ public class ChildTransformation extends AbstractModelCodeTransformation<Stereot
}
@Override
public StereotypeApplication resolveTranslatedIALElement() {
EList<StereotypeApplication> appliedStereotypes = ProfilesUtils
.getAppliedStereotypes(holder.getFoundationalIALElement());
public StereotypeApplication resolveTranslatedIALElement(EObject foundationalElement) {
EList<StereotypeApplication> appliedStereotypes = ProfilesUtils.getAppliedStereotypes(foundationalElement);
Stereotype scopedComponent = ProfilesUtils.getStereotype("HierarchicalComponentTypeScoped",
Profiles.COMPONENTS_HIERARCHY_SCOPED.load());
for (StereotypeApplication app : appliedStereotypes) {
if (app.getStereotype() == scopedComponent) {
modelElement = app;
return app;
}
}
......
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