Commit 8ce29d31 authored by Müller, Marco's avatar Müller, Marco
Browse files

#177 Enhanecs Case Study quality

* Completes the attributes for beans
* speeds up the case study by making getSelectedModules return a static list instead of retreiving it from the tgg file
* IDRegistry does not throw IllegalArgumentExceptions for expected error any more
* minor refactorings
parent 1f0bcded
Loading
Loading
Loading
Loading
+4 −2
Changes for Core/core/src/main/java/org/codeling/lang/base/amt/henshintgg/HenshinTGGTransformation.java: 4 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -100,9 +100,11 @@ public class HenshinTGGTransformation extends ModelTransformation {

			try {
				String id = idRegistry.getIDFromIntermediateLanguageElement(initialObject);
				if (id == null)
					continue; // This was a new element in the ADL. Therefore we did not find any id. Ignore
				idRegistry.updateComponentModelElement(id, targetObject);
			} catch (IllegalArgumentException e) {
				// This was a new element in the ADL. Therefore we did not find any id. Ignore
			} catch (final Throwable t) {
				log.warning(String.format("Could not update component model element '%s'", initialObject.toString()), t);
			}
		}
	}
+3 −7
Changes for Core/core/src/main/java/org/codeling/lang/base/amt/henshintgg/RecoverPriorModelElements.java: 3 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -82,14 +82,14 @@ class PriorIlToNewIlCopier extends Copier {
			// The reference might be not set.
			return;

		try {
		if (ref.isMany()) {
			@SuppressWarnings("unchecked")
				final
				Collection<EObject> originalTargetList = (Collection<EObject>) originalTarget;
			final Collection<EObject> originalTargetList = (Collection<EObject>) originalTarget;
			final Collection<EObject> cloneTargetList = new LinkedList<EObject>();
			for (final EObject originalTargetElement : originalTargetList) {
				final String targetId = priorIdRegistry.getIDFromIntermediateLanguageElement(originalTargetElement);
				if (targetId == null)
					continue; // this happens, when a prior il object has been deleted. Ignore.
				final EObject cloneTarget = idRegistry.getIntermediateLanguageModelElement(targetId, ilModelRoots);
				cloneTargetList.add(cloneTarget);
			}
@@ -99,9 +99,5 @@ class PriorIlToNewIlCopier extends Copier {
			final EObject cloneTarget = idRegistry.getIntermediateLanguageModelElement(targetId, ilModelRoots);
			clone.eSet(ref, cloneTarget);
		}
		} catch (final IllegalArgumentException e) {
			// this happens, when a prior il object has been deleted. Ignore.
			e.printStackTrace();
		}
	}
}
 No newline at end of file
+16 −3
Changes for Language Integration/JEE/org.codeling.lang.jee.metamodel/META-INF/MANIFEST.MF: 16 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ Bundle-SymbolicName: org.codeling.lang.jee.metamodel;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.jdt.core,
 org.eclipse.core.commands,
@@ -36,6 +37,18 @@ Require-Bundle: org.eclipse.jdt.core,
 mechanisms;bundle-version="1.0.0",
 org.eclipse.uml2.uml;bundle-version="5.3.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.codeling.lang.jee7.mm.JEE7,
 org.codeling.lang.jee7.mm.JEE7.impl,
 org.codeling.lang.jee7.mm.JEE7.util
Export-Package: org.codeling.lang.jee7.mm.JEE7;
  uses:="org.eclipse.emf.ecore,
   org.eclipse.emf.common.util",
 org.codeling.lang.jee7.mm.JEE7.impl;
  uses:="org.eclipse.emf.ecore,
   org.codeling.lang.jee7.mm.JEE7,
   org.eclipse.emf.ecore.impl,
   org.eclipse.emf.common.util,
   org.eclipse.emf.common.notify",
 org.codeling.lang.jee7.mm.JEE7.util;
  uses:="org.eclipse.emf.ecore,
   org.codeling.lang.jee7.mm.JEE7,
   org.eclipse.emf.common.notify,
   org.eclipse.emf.common.notify.impl,
   org.eclipse.emf.ecore.util"
+17 −4
Changes for Language Integration/JEE/org.codeling.lang.jee.metamodel/metamodel/jee7.ecore: 17 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -10,17 +10,30 @@
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="SessionBean" eSuperTypes="#//Bean">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="isStateless" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
        defaultValueLiteral="true"/>
        defaultValueLiteral="false"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="isStateful" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="isSingleton" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="CDIBean" eSuperTypes="#//Bean">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="isRequestScoped" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
        defaultValueLiteral="true"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="isTransactionScoped" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
        defaultValueLiteral="false"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="isSessionScoped" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
        defaultValueLiteral="false"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="isApplicationScoped" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
        defaultValueLiteral="false"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="isConversationScoped" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
        defaultValueLiteral="false"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="FacesBean" eSuperTypes="#//Bean">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="isRequestScoped" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
        defaultValueLiteral="false"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="isSessionScoped" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
        defaultValueLiteral="false"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="isApplicationScoped" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
        defaultValueLiteral="false"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="isViewScoped" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
        defaultValueLiteral="false"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="FacesBean" eSuperTypes="#//Bean"/>
  <eClassifiers xsi:type="ecore:EClass" name="Architecture">
    <eStructuralFeatures xsi:type="ecore:EReference" name="beans" upperBound="-1"
        eType="#//Bean" containment="true"/>
+208 −130

File changed.

Preview size limit exceeded, changes collapsed.

Loading