Commit 3973624f authored by Müller, Marco's avatar Müller, Marco
Browse files

Fixes compilation error

parent 52d25933
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -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) {
+2 −2
Original line number Diff line number Diff line
@@ -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) {
+2 −4
Original line number Diff line number Diff line
@@ -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;
			}
		}