Loading Language Integration/JEE/org.codeling.lang.jee.transformation/src/main/java/org/codeling/lang/jee7/transformation/bean_feature/ChildOperationTransformation.java +7 −6 Original line number Diff line number Diff line Loading @@ -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")); Loading @@ -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() Loading Loading @@ -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) { Loading Language Integration/JEE/org.codeling.lang.jee.transformation/src/main/java/org/codeling/lang/jee7/transformation/bean_feature/ChildTypeTransformation.java +2 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading Language Integration/examples/ase2017/ejbWithStatemachine.transformation/src/main/java/org/codeling/lang/ejbWithStatemachine/transformation/component_feature/ChildTransformation.java +2 −4 Original line number Diff line number Diff line Loading @@ -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; } } Loading Loading
Language Integration/JEE/org.codeling.lang.jee.transformation/src/main/java/org/codeling/lang/jee7/transformation/bean_feature/ChildOperationTransformation.java +7 −6 Original line number Diff line number Diff line Loading @@ -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")); Loading @@ -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() Loading Loading @@ -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) { Loading
Language Integration/JEE/org.codeling.lang.jee.transformation/src/main/java/org/codeling/lang/jee7/transformation/bean_feature/ChildTypeTransformation.java +2 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading
Language Integration/examples/ase2017/ejbWithStatemachine.transformation/src/main/java/org/codeling/lang/ejbWithStatemachine/transformation/component_feature/ChildTransformation.java +2 −4 Original line number Diff line number Diff line Loading @@ -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; } } Loading