Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core')
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/FacetUtils.java38
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IDerivedTypedElementManager.java81
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IEFacetManager.java3
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetAction.java5
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetActions.java8
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetCommandFactory.java32
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetCommandFactoryFactory.java8
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetManager.java75
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetManagerFactory.java4
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetManagerListener.java5
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetSetCatalogManagerFactory.java10
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/exception/DerivedTypedElementException.java3
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/exception/FacetManagerException.java4
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/exception/QueryExecutionException.java2
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/Activator.java4
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/CastUtils.java12
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/DerivedTypedElementManager.java1083
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/DerivedTypedElementUtils.java14
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/EFacetManager.java4
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/EmfUtils.java14
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetActionImpl.java12
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetActions2Impl.java12
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetActionsImpl.java7
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetCatalogManagerFactory.java6
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetCommandFactoryFactory.java4
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetCommandFactoryImpl.java52
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetManager.java31
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetManagerContext.java43
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/ResolverManager.java2
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/catalog/EFacetCatalogManager.java4
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/DerivedTypedElementTypeCheckingException.java4
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonApplicableFacetException.java1
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonConformingEObjectException.java5
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/SaveStructuralFeatureInstanceModelException.java41
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exported/IResolver.java10
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exported/IResolverManager.java4
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/DerivedTypedElementImplementationFactoryRegistry.java2
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryEvaluatorFactoryRegistry.java4
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryImplementationFactoryRegistry.java32
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryUtils.java5
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryUtilsImpl.java6
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/serialization/ILinkToExtendedEObjectReferenceAdapterFactory.java3
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/serialization/SerializationManager.java32
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IDerivedTypedElementCollectionImplementation.java28
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IDerivedTypedElementImplementation.java11
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryCollectionImplementation.java27
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryEvaluator.java33
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryEvaluatorFactory.java4
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryImplementation.java17
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryImplementationFactory.java9
50 files changed, 874 insertions, 986 deletions
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/FacetUtils.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/FacetUtils.java
index e6054d19699..c226bcf83f2 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/FacetUtils.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/FacetUtils.java
@@ -73,7 +73,7 @@ public final class FacetUtils {
/**
* Find a Facet in a FacetSet
- *
+ *
* @param facetSet
* the FacetSet
* @param facetName
@@ -136,7 +136,7 @@ public final class FacetUtils {
/**
* Find a FacetSet with the given name among the given list of FacetSets. If several FacetSets have the same name,
* then return the first one.
- *
+ *
* @param facetSets
* where to look for
* @param name
@@ -155,7 +155,7 @@ public final class FacetUtils {
/**
* Find all FacetSets with the given name among the given list of FacetSets.
- *
+ *
* @param facetSets
* where to look for
* @param name
@@ -174,7 +174,7 @@ public final class FacetUtils {
}
/**
- *
+ *
* @param facetSet
* a facetSet
* @return a set with all the EPackage extended by the facetSet and its
@@ -199,13 +199,12 @@ public final class FacetUtils {
}
return extendedEPackages;
}
-
+
/**
* Find all the FacetSets with the given path among the given list of root
- * FacetSets. For example: <code>getFacetSetsByPath("a", "b", "c")</code>
- * returns a FacetSet named "c", contained in a FacetSet named "b",
+ * FacetSets. For example: <code>getFacetSetsByPath("a", "b", "c")</code> returns a FacetSet named "c", contained in a FacetSet named "b",
* contained in a registered FacetSet named "a".
- *
+ *
* @param path
* a list of FacetSet names, starting from the root registered
* FacetSets, and leading to the wanted FacetSet(s)
@@ -248,7 +247,7 @@ public final class FacetUtils {
/**
* Find a Facet with the given name among the given list of Facets.
- *
+ *
* @param facets
* where to look
* @param name
@@ -285,7 +284,7 @@ public final class FacetUtils {
/**
* This methods returns all the known (registered) eTypedElements.
- *
+ *
* @param resourceSet
* the eTypedElement search will be done in/using this resourceSet
* @return all the known (registered) eTypedElements
@@ -385,8 +384,7 @@ public final class FacetUtils {
final EPackage ePackage = extendedMetaclass.getEPackage();
if (ePackage != null) {
if (result != null && !ePackage.equals(result)) {
- throw new IllegalStateException(
- "The Facets in a FacetSet must all extend EClasses from the same EPackage"); //$NON-NLS-1$
+ throw new IllegalStateException("The Facets in a FacetSet must all extend EClasses from the same EPackage"); //$NON-NLS-1$
}
result = ePackage;
}
@@ -490,7 +488,7 @@ public final class FacetUtils {
}
/**
- *
+ *
* @param facetOperation
* @return
* @since 0.2
@@ -505,7 +503,7 @@ public final class FacetUtils {
}
/**
- *
+ *
* @param facet
* @return
* @since 0.2
@@ -524,13 +522,13 @@ public final class FacetUtils {
/**
* Find the top level feature in the override chain
- *
+ *
* @param feature
* @return The top level feature in the override chain or the feature
* parameter itself if no override
* @throws FacetManagerException
* @since 0.2
- *
+ *
*/
// Copied from
// org.eclipse.papyrus.emf.facet.efacet.core.internal.FacetManagerContext
@@ -599,7 +597,7 @@ public final class FacetUtils {
/**
* Return the main facetSet.
- *
+ *
* @param eObject
* the element in the model selected.
* @return the main facetSet.
@@ -620,7 +618,7 @@ public final class FacetUtils {
/**
* Return all the operations of the model.
- *
+ *
* @param parent
* the first FacetSet of the model.
* @return the list of operations.
@@ -643,7 +641,7 @@ public final class FacetUtils {
/**
* Return all the facets of the model.
- *
+ *
* @param parent
* the first FacetSet of the model.
* @return the list of facets.
@@ -663,7 +661,7 @@ public final class FacetUtils {
/**
* Return all the facets of the model.
- *
+ *
* @param parent
* the first FacetSet of the model.
* @return the list of facets.
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IDerivedTypedElementManager.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IDerivedTypedElementManager.java
index b0c23996d51..dfbaefe063c 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IDerivedTypedElementManager.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IDerivedTypedElementManager.java
@@ -34,7 +34,7 @@ import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.runtime.ETyp
/**
* Used to evaluate derived typed elements through their queries.
- *
+ *
* @since 0.2
*/
public interface IDerivedTypedElementManager {
@@ -43,29 +43,24 @@ public interface IDerivedTypedElementManager {
/**
* Evaluates a derived typed element on a model element.
* <p>
- * <b>Note:</b> this method does not return a typed result, and it does not
- * check the result type. Use
- * {@link IDerivedTypedElementManager#evaluateSingleValued(DerivedTypedElement, EObject, List, Class)
- * evaluateSingleValued} or
- * {@link IDerivedTypedElementManager#evaluateMultiValued(DerivedTypedElement, EObject, List, Class)
+ * <b>Note:</b> this method does not return a typed result, and it does not check the result type. Use {@link IDerivedTypedElementManager#evaluateSingleValued(DerivedTypedElement, EObject, List, Class)
+ * evaluateSingleValued} or {@link IDerivedTypedElementManager#evaluateMultiValued(DerivedTypedElement, EObject, List, Class)
* evaluateMultiValued} instead if you want a typed and type-checked result.
- *
+ *
* @param derivedTE
* the derived typed element to evaluate
* @param source
* the model element on which the derived typed element must be
* evaluated
* @param parameterValues
- * the arguments of the derived typed element (in the case of a
- * {@link FacetOperation}; can be <code>null</code> if there are
+ * the arguments of the derived typed element (in the case of a {@link FacetOperation}; can be <code>null</code> if there are
* no parameters)
* @return the derived typed element result: a single Object in the case of
* a single-valued derived typed element, or a List in the case of a
* multi-valued derived typed element.
* @throws DerivedTypedElementException
* <ul>
- * <li>in case of error in the derived typed element</li> <li>in
- * case of error when evaluating the derived typed element</li>
+ * <li>in case of error in the derived typed element</li> <li>in case of error when evaluating the derived typed element</li>
* </ul>
*/
Object evaluate(DerivedTypedElement derivedTE, EObject source,
@@ -73,18 +68,15 @@ public interface IDerivedTypedElementManager {
throws DerivedTypedElementException;
/**
- * Evaluates a query on a model element. Calling this method is discouraged. You should evaluate a
- * {@link DerivedTypedElement}s (which contains a query) instead of trying to evaluate a {@link Query} directly.
- * Since the source type, return type and multiplicity of a query are carried by the {@link DerivedTypedElement}
- * that normally contains it, this method doesn't check the source type, return type or multiplicity.
- *
+ * Evaluates a query on a model element. Calling this method is discouraged. You should evaluate a {@link DerivedTypedElement}s (which contains a query) instead of trying to evaluate a {@link Query} directly.
+ * Since the source type, return type and multiplicity of a query are carried by the {@link DerivedTypedElement} that normally contains it, this method doesn't check the source type, return type or multiplicity.
+ *
* @param query
* the query to evaluate
* @param source
* the model element on which the query must be evaluated
* @param parameterValues
- * the arguments of the query (in the case of a query for a {@link FacetOperation}; can be
- * <code>null</code> if there are no parameters)
+ * the arguments of the query (in the case of a query for a {@link FacetOperation}; can be <code>null</code> if there are no parameters)
* @return the query result: may be a single Object or a List.
* @throws DerivedTypedElementException
* if the evaluation failed
@@ -94,15 +86,14 @@ public interface IDerivedTypedElementManager {
/**
* Evaluates a single valued derived typed element on a model element.
- *
+ *
* @param derivedTE
* the derived typed element to evaluate
* @param source
* the model element on which the derived typed element is
* evaluated
* @param parameterValues
- * the arguments of the derived typed element (in the case of a
- * {@link FacetOperation}; can be <code>null</code> if there are
+ * the arguments of the derived typed element (in the case of a {@link FacetOperation}; can be <code>null</code> if there are
* no parameters)
* @param resultType
* the type that the returned value must have
@@ -110,11 +101,9 @@ public interface IDerivedTypedElementManager {
* @throws DerivedTypedElementException
* <ul>
* <li>in case of error in the derived typed element</li>
- * <li>in case of error when evaluating the derived typed
- * element</li>
+ * <li>in case of error when evaluating the derived typed element</li>
* <li>
- * if the effective return type does not match the expected type
- * </li>
+ * if the effective return type does not match the expected type</li>
* </ul>
*/
<T> T evaluateSingleValued(DerivedTypedElement derivedTE, EObject source,
@@ -123,15 +112,14 @@ public interface IDerivedTypedElementManager {
/**
* Evaluates a multi-valued derived typed element on a model element.
- *
+ *
* @param derivedTypedElement
* the derived typed element to evaluate
* @param source
* the model element on which the derived typed element must be
* evaluated
* @param parameterValues
- * the arguments of the derived typed element (in the case of a
- * {@link FacetOperation}; can be <code>null</code> if there are
+ * the arguments of the derived typed element (in the case of a {@link FacetOperation}; can be <code>null</code> if there are
* no parameters)
* @param resultType
* the type that the returned value must have
@@ -139,10 +127,8 @@ public interface IDerivedTypedElementManager {
* @throws DerivedTypedElementException
* <ul>
* <li>in case of error in the derived typed element</li>
- * <li>in case of error when evaluating the derived typed
- * element</li>
- * <li>if the effective return type does not match the expected
- * type</li>
+ * <li>in case of error when evaluating the derived typed element</li>
+ * <li>if the effective return type does not match the expected type</li>
* </ul>
*/
<T> List<T> evaluateMultiValued(DerivedTypedElement derivedTE,
@@ -153,44 +139,29 @@ public interface IDerivedTypedElementManager {
/**
* Evaluates a derived typed element on a list of model elements in a single
* call.
- *
+ *
* @param derivedTE
* the derived typed element to evaluate
* @param sources
* the model elements on which the derived typed element must be
* evaluated
* @param parameterValues
- * the arguments of the derived typed element (in the case of a
- * {@link FacetOperation}; can be <code>null</code> if there are
+ * the arguments of the derived typed element (in the case of a {@link FacetOperation}; can be <code>null</code> if there are
* no parameters)
* @param resultType
* the expected type of the returned list:
* <ul>
- * <li> {@link DerivedTypedElementEObjectResult} if the
- * {@link DerivedTypedElement} is a single-valued
- * {@link EReference} or {@link EOperation} that returns EObjects
- * <li>{@link DerivedTypedElementEObjectListResult} if the
- * {@link DerivedTypedElement} is a multi-valued
- * {@link EReference} or {@link EOperation} that returns EObjects
- * <li>{@link DerivedTypedElementPrimitiveTypeResult} if the
- * {@link DerivedTypedElement} is a single-valued
- * {@link EAttribute} or {@link EOperation} that returns a
- * primitive type value
- * <li>{@link DerivedTypedElementPrimitiveTypeListResult} if the
- * {@link DerivedTypedElement} is a multi-valued
- * {@link EAttribute} or {@link EOperation} that returns a list
- * of primitive type values
+ * <li> {@link DerivedTypedElementEObjectResult} if the {@link DerivedTypedElement} is a single-valued {@link EReference} or {@link EOperation} that returns EObjects
+ * <li>{@link DerivedTypedElementEObjectListResult} if the {@link DerivedTypedElement} is a multi-valued {@link EReference} or {@link EOperation} that returns EObjects
+ * <li>{@link DerivedTypedElementPrimitiveTypeResult} if the {@link DerivedTypedElement} is a single-valued {@link EAttribute} or {@link EOperation} that returns a primitive type value
+ * <li>{@link DerivedTypedElementPrimitiveTypeListResult} if the {@link DerivedTypedElement} is a multi-valued {@link EAttribute} or {@link EOperation} that returns a list of primitive type values
* </ul>
* @return one derived typed element result for each source element that was
* evaluated
* @throws DerivedTypedElementException
* <ul>
- * <li>in case of error in the derived typed element.
- * <b>Note</b>: an error that happens when evaluating the
- * derived typed element on any of the given sources is not
- * thrown but stored in the corresponding element result.</li>
- * <li>if the effective return type does not match the expected
- * type</li>
+ * <li>in case of error in the derived typed element. <b>Note</b>: an error that happens when evaluating the derived typed element on any of the given sources is not thrown but stored in the corresponding element result.</li>
+ * <li>if the effective return type does not match the expected type</li>
* </ul>
*/
<T extends ETypedElementResult> List<T> batchEvaluate(
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IEFacetManager.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IEFacetManager.java
index a519466e0a6..b44565ea7f3 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IEFacetManager.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IEFacetManager.java
@@ -68,8 +68,7 @@ public interface IEFacetManager {
throws QueryException;
/**
- * Evaluate the query on a set of models and model elements described by the
- * <code>queryContext</code> parameter.
+ * Evaluate the query on a set of models and model elements described by the <code>queryContext</code> parameter.
*
* The query is evaluated on each contextually referred model element and on each element of a
* contextually referred model.
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetAction.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetAction.java
index fbe4ce44732..ae5d8f16d41 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetAction.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetAction.java
@@ -28,9 +28,8 @@ import org.eclipse.papyrus.emf.facet.efacet.core.internal.incubatingapi.IFacetAc
import org.eclipse.papyrus.emf.facet.util.emf.core.exception.InvalidFacetSetException;
/**
- * This interface contains methods declaration to deal with {@link Facet} and
- * {@link FacetSet}.
- *
+ * This interface contains methods declaration to deal with {@link Facet} and {@link FacetSet}.
+ *
* @since 0.1
* @noimplement
* @noextend
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetActions.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetActions.java
index f8b6b71cda9..0471fd04423 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetActions.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetActions.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2012 Mia-Software.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Alban Ménager (Soft-Maint) - Bug 387470 - [EFacet][Custom] Editors
*/
@@ -20,7 +20,7 @@ import org.eclipse.papyrus.emf.facet.util.emf.core.exception.InvalidFacetSetExce
/**
* This interface contains methods to create {@link FacetSet}s.
- *
+ *
* @since 0.3
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
@@ -32,7 +32,7 @@ public interface IFacetActions {
/**
* Add the given facetSet to the given facetSet model file, which will be
* created
- *
+ *
* @param facetSet
* the facetSet to be created. Cannot be <code>null</code>
* @param file
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetCommandFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetCommandFactory.java
index b845ef0608d..d655fe78c98 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetCommandFactory.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetCommandFactory.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2012 Mia-Software.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Alban Ménager (Soft-Maint) - Bug 387470 - [EFacet][Custom] Editors
* Grégoire Dupé (Mia-Software) - Bug 387470 - [EFacet][Custom] Editors
@@ -27,7 +27,7 @@ import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.Q
/**
* This interface provide a command factory. A command modify the editingDomain.
- *
+ *
* @since 0.3
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
@@ -37,7 +37,7 @@ public interface IFacetCommandFactory {
/**
* Create the command to add a FacetSet (facetSet) to an existing FacetSet
* (parent).
- *
+ *
* @param parent
* the parent of the facetSet to add.
* @param facetSet
@@ -49,7 +49,7 @@ public interface IFacetCommandFactory {
/**
* Create the command to add a Facet (facet) to an existing FacetSet
* (parent).
- *
+ *
* @param parent
* the parent of the facet to add.
* @param facet
@@ -61,7 +61,7 @@ public interface IFacetCommandFactory {
/**
* Create the command to add an Attribute (facetAttrbute) to an existing
* Facet (parent).
- *
+ *
* @param parent
* the parent of the attribute to add.
* @param facetAttrbute
@@ -79,7 +79,7 @@ public interface IFacetCommandFactory {
/**
* Create the command to add a Reference (facetReference) to an existing
* Facet (parent).
- *
+ *
* @param parent
* the parent of the reference to add.
* @param facetReference
@@ -92,7 +92,7 @@ public interface IFacetCommandFactory {
/**
* Create the command to add an Operation (FacetOperation) to an existing
* Facet (parent).
- *
+ *
* @param parent
* the parent of the operation to add.
* @param facetOperation
@@ -105,7 +105,7 @@ public interface IFacetCommandFactory {
/**
* Create the command to add a Parameter (operationParameter) to an existing
* Operation (parent).
- *
+ *
* @param parent
* the parent of the operation to add.
* @param facetOperation
@@ -117,7 +117,7 @@ public interface IFacetCommandFactory {
/**
* Create the command to change the owner of an element.
- *
+ *
* @param element
* @param newOwner
* @return
@@ -126,7 +126,7 @@ public interface IFacetCommandFactory {
/**
* Create the command to change the attributes of a FacetSet.
- *
+ *
* @param initialElement
* @param newElement
* @param newElement
@@ -137,7 +137,7 @@ public interface IFacetCommandFactory {
/**
* Create the command to change the attributes of a Facet.
- *
+ *
* @param initialElement
* @param newElement
* @return
@@ -148,7 +148,7 @@ public interface IFacetCommandFactory {
/**
* Create the command to change the attributes of a FacetAttribute.
- *
+ *
* @param initialElement
* @param newElement
* @return
@@ -159,7 +159,7 @@ public interface IFacetCommandFactory {
/**
* Create the command to change the attributes of a FacetReference.
- *
+ *
* @param initialElement
* @param newElement
* @return
@@ -170,7 +170,7 @@ public interface IFacetCommandFactory {
/**
* Create the command to change the attributes of a FacetOperation.
- *
+ *
* @param initialElement
* @param newElement
* @return
@@ -181,7 +181,7 @@ public interface IFacetCommandFactory {
/**
* Create the command to change the attributes of a FacetAttribute.
- *
+ *
* @param initialElement
* @param newElement
* @return
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetCommandFactoryFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetCommandFactoryFactory.java
index adfd3c4f441..11092a0f212 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetCommandFactoryFactory.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetCommandFactoryFactory.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2012 Mia-Software.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Grégoire Dupé (Mia-Software) - Bug 387470 - [EFacet][Custom] Editors
*/
@@ -18,8 +18,8 @@ import org.eclipse.papyrus.emf.facet.efacet.core.internal.FacetCommandFactoryFac
* @since 0.3
*/
public interface IFacetCommandFactoryFactory {
-
+
IFacetCommandFactoryFactory DEFAULT = new FacetCommandFactoryFactory();
-
+
IFacetCommandFactory createCommandFactory(EditingDomain editingDomain);
}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetManager.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetManager.java
index 2f5110414d6..5852f655db0 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetManager.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetManager.java
@@ -42,10 +42,8 @@ import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.runtime.ETyp
* This interface allows clients to use the EMF Facet API to get and set the values of virtually
* added {@link EReference}s and {@link EAttribute}s, and invoke {@link EOperation}s.
* <p>
- * Derived {@link FacetAttribute}s and {@link FacetReference}s are computed by queries, whereas
- * non-derived {@link FacetAttribute}s and {@link EAttribute}s and {@link EReference}s and
- * {@link FacetReference}s are stored in the serialization {@link Resource} specified in the
- * {@link IFacetManagerFactory} that created this {@link IFacetManager}.
+ * Derived {@link FacetAttribute}s and {@link FacetReference}s are computed by queries, whereas non-derived {@link FacetAttribute}s and {@link EAttribute}s and {@link EReference}s and {@link FacetReference}s are stored in the serialization {@link Resource}
+ * specified in the {@link IFacetManagerFactory} that created this {@link IFacetManager}.
*
* @since 0.2
* @noextend This interface is not intended to be extended by clients.
@@ -73,9 +71,8 @@ public interface IFacetManager {
throws FacetManagerException;
/**
- * Set the value of the given {@link EStructuralFeature} on the given
- * {@link EObject} to the given {@link Object} value.
- *
+ * Set the value of the given {@link EStructuralFeature} on the given {@link EObject} to the given {@link Object} value.
+ *
* @param eObject
* the model element whose feature must be set
* @param structuralFeature
@@ -85,13 +82,10 @@ public interface IFacetManager {
* @param editingDomain
* @throws FacetManagerException
* <ul>
- * <li>if the eObject doesn't conform to the Facet of the given
- * attribute (in the case of a FacetAttribute)</li>
- * <li>if the Facet of the given attribute is not applicable to
- * the given eObject (in the case of a FacetAttribute)</li>
+ * <li>if the eObject doesn't conform to the Facet of the given attribute (in the case of a FacetAttribute)</li>
+ * <li>if the Facet of the given attribute is not applicable to the given eObject (in the case of a FacetAttribute)</li>
* <li>
- * if there is an error evaluating the Facet's conformance typed
- * element</li>
+ * if there is an error evaluating the Facet's conformance typed element</li>
* </ul>
*/
void set(EObject eObject, EStructuralFeature structuralFeature,
@@ -101,7 +95,7 @@ public interface IFacetManager {
/**
* Evaluate the given {@link EOperation} of the given {@link EObject}. The
* returned value has to be of the given expectedType {@link Class}
- *
+ *
* @param eObject
* the model element on which the operation is evaluated
* @param operation
@@ -118,19 +112,12 @@ public interface IFacetManager {
* @throws FacetManagerException
* <ul>
* <li>if the effective type does not match the expected type</li>
- * <li>in case of an error in the query that returns the value
- * (can only happen in the case of a FacetOperation)</li>
- * <li>in case of an error when delegating to the Ecore
- * reflexive API (if the given EOperation is not a
- * FacetOperation)</li>
- * <li>if the eObject doesn't conform to the Facet of the given
- * operation (in the case of a FacetOperation)</li>
- * <li>if the Facet of the given operation is not applicable to
- * the given eObject (in the case of a FacetOperation)</li>
- * <li>if there is an error evaluating the Facet's conformance
- * typed element</li>
- * <li>if the given actual parameters don't match the
- * EOperation's formal parameters</li>
+ * <li>in case of an error in the query that returns the value (can only happen in the case of a FacetOperation)</li>
+ * <li>in case of an error when delegating to the Ecore reflexive API (if the given EOperation is not a FacetOperation)</li>
+ * <li>if the eObject doesn't conform to the Facet of the given operation (in the case of a FacetOperation)</li>
+ * <li>if the Facet of the given operation is not applicable to the given eObject (in the case of a FacetOperation)</li>
+ * <li>if there is an error evaluating the Facet's conformance typed element</li>
+ * <li>if the given actual parameters don't match the EOperation's formal parameters</li>
* </ul>
*/
<T> T invoke(EObject eObject, EOperation operation,
@@ -140,7 +127,7 @@ public interface IFacetManager {
/**
* Invoke the given {@link EOperation} on each element of the given
* collection of {@link EObject}s.
- *
+ *
* @param eObjects
* the model elements on which the operation is evaluated
* @param operation
@@ -149,27 +136,23 @@ public interface IFacetManager {
* the values of the parameters of the EOperation that is
* evaluated: they must match both in size, types and
* multiplicity
- * @return the list of results, one for each model element of the given
- * <code>eObjects</code>
+ * @return the list of results, one for each model element of the given <code>eObjects</code>
* @throws FacetManagerException
* <ul>
- * <li>in case of an error when delegating to the Ecore
- * reflexive API (if the given EOperation is not a
- * FacetOperation)</li>
+ * <li>in case of an error when delegating to the Ecore reflexive API (if the given EOperation is not a FacetOperation)</li>
* <li>
- * in case of an error in the derived typed element that returns
- * the value</li>
+ * in case of an error in the derived typed element that returns the value</li>
* </ul>
*/
List<ETypedElementResult> batchInvoke(Collection<EObject> eObjects,
EOperation operation, Object... arguments)
throws FacetManagerException;
-
+
/**
* This method returns the list of loaded facet sets.
- *
+ *
* @return a modifiable list of all FacetSets that
- * constitute the working context of the FacetManager
+ * constitute the working context of the FacetManager
*/
List<FacetSet> getManagedFacetSets();
@@ -181,14 +164,14 @@ public interface IFacetManager {
<T> List<T> getOrInvokeMultiValued(EObject eObject, ETypedElement feature,
Class<T> aClass) throws FacetManagerException;
-
+
<T> List<ETypedElementResult> batchGetOrInvoke(Collection<EObject> sources,
ETypedElement query, Class<T> aClass) throws FacetManagerException;
-
+
/**
* Get virtual references from an EObject. References must be defined in a
* FacetSet
- *
+ *
* @param eObject
* Model element
* @return All not duplicated virtual references
@@ -200,7 +183,7 @@ public interface IFacetManager {
/**
* Get virtual attributes from an EObject. References must be defined in a
* FacetSet
- *
+ *
* @param eObject
* Model element
* @return All not duplicated virtual attributes
@@ -212,7 +195,7 @@ public interface IFacetManager {
/**
* Get virtual references and attributes from an EObject. References must be
* defined in a FacetSet
- *
+ *
* @param eObject
* Model element
* @return All not duplicated virtual references and attributes
@@ -221,11 +204,11 @@ public interface IFacetManager {
*/
Set<EStructuralFeature> getStructuralFeature(EObject eObject)
throws FacetManagerException;
-
+
/**
* Adds a listener to this manager that will be notified when this manager's
* state changes.
- *
+ *
* @param listener
* The listener to be added
* @since 0.4
@@ -234,7 +217,7 @@ public interface IFacetManager {
/**
* Removes a listener from this manager.
- *
+ *
* @param listener
* The listener to be removed
* @since 0.4
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetManagerFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetManagerFactory.java
index 55c3bc9c7a5..30e3bf8050d 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetManagerFactory.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetManagerFactory.java
@@ -42,10 +42,10 @@ public interface IFacetManagerFactory {
/**
* Create an {@link IFacetManager}.
- *
+ *
* @param resourceSet
* the resourceSet which will be used to manage the facet models.
- *
+ *
*/
IFacetManager getOrCreateFacetManager(ResourceSet resourceSet);
}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetManagerListener.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetManagerListener.java
index b3e9f5c631e..d3da1619351 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetManagerListener.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetManagerListener.java
@@ -11,9 +11,8 @@
package org.eclipse.papyrus.emf.facet.efacet.core;
/**
- * This interface allows clients to manage listeners added on the
- * {@link IFacetManager}
- *
+ * This interface allows clients to manage listeners added on the {@link IFacetManager}
+ *
* @since 0.4
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetSetCatalogManagerFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetSetCatalogManagerFactory.java
index f74ae438d5c..eee5e3f11eb 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetSetCatalogManagerFactory.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/IFacetSetCatalogManagerFactory.java
@@ -1,14 +1,14 @@
/**
* Copyright (c) 2012 Mia-Software.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Gregoire Dupe (Mia-Software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet
- * Gregoire Dupe (Mia-Software) - Bug 373078 - API Cleaning
+ * Gregoire Dupe (Mia-Software) - Bug 373078 - API Cleaning
*/
package org.eclipse.papyrus.emf.facet.efacet.core;
@@ -19,8 +19,8 @@ import org.eclipse.papyrus.emf.facet.efacet.core.internal.FacetCatalogManagerFac
* @since 0.2
*/
public interface IFacetSetCatalogManagerFactory {
-
+
IFacetSetCatalogManagerFactory DEFAULT = new FacetCatalogManagerFactory();
-
+
IFacetSetCatalogManager getOrCreateFacetSetCatalogManager(ResourceSet resourceSet);
}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/exception/DerivedTypedElementException.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/exception/DerivedTypedElementException.java
index dcbc98e144d..171512a004a 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/exception/DerivedTypedElementException.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/exception/DerivedTypedElementException.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Gregoire Dupe (Mia-Software) - initial API and implementation
* Nicolas Bros (Mia-Software) - Bug 362191 - [Restructuring] Query mechanism for eFacet2
@@ -16,6 +16,7 @@ import org.eclipse.papyrus.emf.facet.efacet.core.internal.exception.DerivedTyped
/**
* This exception is raised when something is wrong with a query, and there is not a more specific
* sub-class to describe the error (e.g. {@link DerivedTypedElementEvaluationException} )
+ *
* @since 0.2
*/
public class DerivedTypedElementException extends Exception {
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/exception/FacetManagerException.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/exception/FacetManagerException.java
index f3c8556e64b..5d509a548e2 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/exception/FacetManagerException.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/exception/FacetManagerException.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2012 Mia-Software.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Gregoire Dupe (Mia-Software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet framework
*/
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/exception/QueryExecutionException.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/exception/QueryExecutionException.java
index ae58194f65a..7c18d819d63 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/exception/QueryExecutionException.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/exception/QueryExecutionException.java
@@ -15,7 +15,7 @@ import org.eclipse.papyrus.emf.facet.efacet.core.internal.exception.DerivedTyped
/**
* This exception occurs when something goes wrong during the execution of a
* query.
- *
+ *
* @deprecated replaced by {@link DerivedTypedElementEvaluationException} cf.
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=374678
*/
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/Activator.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/Activator.java
index 28887c6e111..86f703da092 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/Activator.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/Activator.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2011 Mia-Software.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Nicolas Guyomar (Mia-Software) - Bug 333553 - The user has not to deal with two files to create a facet
*/
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/CastUtils.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/CastUtils.java
index c4c1993064a..8fe0abd16fd 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/CastUtils.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/CastUtils.java
@@ -20,9 +20,9 @@ import java.util.List;
import org.eclipse.papyrus.emf.facet.efacet.core.internal.exception.UnmatchingExpectedTypeException;
public final class CastUtils {
-
+
private CastUtils() {
- //Must no be used.
+ // Must no be used.
}
/**
@@ -33,15 +33,13 @@ public final class CastUtils {
* @param expectedType
* the expected type of the list elements
* @param checkType
- * whether to check the type of each element in the given list; should be
- * <code>true</code> if the list comes from outside the framework, and
- * <code>false</code> if the list is managed by the framework (and so already
+ * whether to check the type of each element in the given list; should be <code>true</code> if the list comes from outside the framework, and <code>false</code> if the list is managed by the framework (and so already
* checked)
* @return the cast list
* @throws UnmatchingExpectedTypeException
*/
@SuppressWarnings("unchecked")
- //@SuppressWarnings("unchecked") The cast is checked by the both if statement.
+ // @SuppressWarnings("unchecked") The cast is checked by the both if statement.
public static <T> List<T> castToExpectedListType(final Object value, final Class<T> expectedType, final boolean checkType)
throws UnmatchingExpectedTypeException {
List<T> newList = new LinkedList<T>();
@@ -58,7 +56,7 @@ public final class CastUtils {
}
@SuppressWarnings("unchecked")
- //@SuppressWarnings("unchecked") This method is used to isolate unsafe cast.
+ // @SuppressWarnings("unchecked") This method is used to isolate unsafe cast.
public static <T> T castToExpectedType(final Object value, final Class<T> expectedType)
throws UnmatchingExpectedTypeException {
try {
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/DerivedTypedElementManager.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/DerivedTypedElementManager.java
index 6c25a18383e..fa6fc7deae9 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/DerivedTypedElementManager.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/DerivedTypedElementManager.java
@@ -89,8 +89,7 @@ public class DerivedTypedElementManager implements IDerivedTypedElementManager {
// expectedResultType == null means match everything
// And a null value for queryResult matches any type
if (expectedType != null && queryResult != null && !expectedType.isInstance(queryResult)) {
- Exception e1 = new UnmatchingExpectedTypeException(
- "The derived typed element did not evaluate to the expected type", expectedType, queryResult); //$NON-NLS-1$
+ Exception e1 = new UnmatchingExpectedTypeException("The derived typed element did not evaluate to the expected type", expectedType, queryResult); //$NON-NLS-1$
throw new DerivedTypedElementException(e1);
}
// just checked
@@ -119,8 +118,7 @@ public class DerivedTypedElementManager implements IDerivedTypedElementManager {
// expectedType == null means match everything
// And a null queryResultElement for queryResult matches any type
if (expectedType != null && queryResultElement != null && !expectedType.isInstance(queryResultElement)) {
- Exception e1 = new UnmatchingExpectedTypeException(
- "The derived typed element did not evaluate to the expected type"); //$NON-NLS-1$
+ Exception e1 = new UnmatchingExpectedTypeException("The derived typed element did not evaluate to the expected type"); //$NON-NLS-1$
throw new DerivedTypedElementException(e1);
}
}
@@ -142,8 +140,7 @@ public class DerivedTypedElementManager implements IDerivedTypedElementManager {
try {
evaluator = QueryImplementationFactoryRegistry.INSTANCE.getEvaluatorFor(query, this);
} catch (DerivedTypedElementException exc) {
- final String message = String.format(
- "%s will try to use a deprected implementation", //$NON-NLS-1$
+ final String message = String.format("%s will try to use a deprected implementation", //$NON-NLS-1$
this.getClass().getName());
Logger.logError(exc, message, Activator.getDefault());
evaluator2 = DerivedTypedElementImplementationFactoryRegistry.INSTANCE.getEvaluatorFor(query, this);
@@ -178,7 +175,7 @@ public class DerivedTypedElementManager implements IDerivedTypedElementManager {
isPrimitive(QueryUtils.getReturnType(query)));
return result;
}
-
+
private static Object evaluateAndCheck(final Query query, final EObject source, final List<ParameterValue> parameterValues,
final IQueryImplementation evaluator, final IFacetManager facetManager)
throws DerivedTypedElementException {
@@ -200,12 +197,12 @@ public class DerivedTypedElementManager implements IDerivedTypedElementManager {
if (query == null) {
throw new IllegalArgumentException("query cannot be null"); //$NON-NLS-1$
}
-
+
EClassifier sourceType = QueryUtils.getSourceType(query);
if (sourceType == null && source != null) {
throw new DerivedTypedElementException("the query's sourceType is null and the source is not null"); //$NON-NLS-1$
}
-
+
// a null value for eObject matches any type
if (sourceType != null && source != null && !sourceType.isInstance(source)) {
StringBuffer message = new StringBuffer();
@@ -237,546 +234,546 @@ public class DerivedTypedElementManager implements IDerivedTypedElementManager {
// }
// }
// }
-
-
- // batch evaluation disabled : Bug 365429 - DerivedTypedElementManager : re-implement batch evaluation
+
+
+ // batch evaluation disabled : Bug 365429 - DerivedTypedElementManager : re-implement batch evaluation
public <T extends ETypedElementResult> List<T> batchEvaluate(final DerivedTypedElement derivedTypedElement,
final Collection<? extends EObject> sources, final List<ParameterValue> parameterValues, final Class<T> expectedType, final IFacetManager facetManager)
throws DerivedTypedElementException {
-
+
throw new UnsupportedOperationException("not implemented yet"); //$NON-NLS-1$
-// if (derivedTypedElement == null) {
-// throw new IllegalArgumentException("The given derived typed element must not be null"); //$NON-NLS-1$
-// }
-//
-// List<T> abstractResultList;
-//
-// Query query = derivedTypedElement.getQuery();
-// if (query == null) {
-// throw new DerivedTypedElementException("The given derived typed element doesn't contain a query"); //$NON-NLS-1$
-// }
-// EClassifier eType = derivedTypedElement.getEType();
-// if (eType == null) {
-// throw new DerivedTypedElementException("The given derived typed element has a null type"); //$NON-NLS-1$
-// }
-// IDerivedTypedElementImplementation evaluator = DerivedTypedElementImplementationFactoryRegistry.INSTANCE.getEvaluatorFor(query);
-// if (evaluator == null) {
-// throw new DerivedTypedElementEvaluationException("No evaluator was found for a query of type " + query.getClass().getName()); //$NON-NLS-1$
-// }
-//
-// final boolean primitiveType = isPrimitive(eType);
-//
-// // if the evaluator implements multiple evaluation itself, then use it
-// if (evaluator instanceof IDerivedTypedElementCollectionImplementation) {
-// IDerivedTypedElementCollectionImplementation collectionEvaluator = (IDerivedTypedElementCollectionImplementation) evaluator;
-// if (derivedTypedElement.isMany()) {
-// if (primitiveType) {
-// if (expectedType != DerivedTypedElementPrimitiveTypeListResult.class) {
-// throw new UnmatchingExpectedTypeException("The derivedTypedElement is multi-valued, and its type is primitive, " + //$NON-NLS-1$
-// "so expectedType must be " + DerivedTypedElementPrimitiveTypeListResult.class.getSimpleName()); //$NON-NLS-1$
-// }
-// List<DerivedTypedElementPrimitiveTypeListResult<?>> listResultList = batchEvaluateMultiValuedPrimitiveDerivedTypedElementWithCollectionEvaluator(
-// derivedTypedElement, sources, parameterValues, collectionEvaluator);
-// // we just checked the type parameter T through expectedType
-// @SuppressWarnings("unchecked")
-// List<T> castList = (List<T>) listResultList;
-// abstractResultList = castList;
-// } else {
-// if (expectedType != DerivedTypedElementEObjectListResult.class) {
-// throw new UnmatchingExpectedTypeException("The derivedTypedElement is multi-valued, and it returns model elements, " + //$NON-NLS-1$
-// "so expectedType must be " + DerivedTypedElementEObjectListResult.class.getSimpleName()); //$NON-NLS-1$
-// }
-// List<DerivedTypedElementEObjectListResult<?>> listResultList = batchEvaluateMultiValuedEObjectDerivedTypedElementWithCollectionEvaluator(
-// derivedTypedElement, sources, parameterValues, collectionEvaluator);
-// // we just checked the type parameter T through expectedType
-// @SuppressWarnings("unchecked")
-// List<T> castList = (List<T>) listResultList;
-// abstractResultList = castList;
-// }
-// } else {
-// if (primitiveType) {
-// if (expectedType != DerivedTypedElementPrimitiveTypeResult.class) {
-// throw new UnmatchingExpectedTypeException("The derivedTypedElement is single-valued, and its type is primitive, " + //$NON-NLS-1$
-// "so expectedType must be " + DerivedTypedElementPrimitiveTypeResult.class.getSimpleName()); //$NON-NLS-1$
-// }
-// List<DerivedTypedElementPrimitiveTypeResult<?>> resultList = batchEvaluateSingleValuedPrimitiveDerivedTypedElementWithCollectionEvaluator(
-// derivedTypedElement, sources, parameterValues, collectionEvaluator);
-// // we just checked the type parameter T through expectedType
-// @SuppressWarnings("unchecked")
-// List<T> castList = (List<T>) resultList;
-// abstractResultList = castList;
-// } else {
-// if (expectedType != DerivedTypedElementEObjectResult.class) {
-// throw new UnmatchingExpectedTypeException("The derivedTypedElement is single-valued, and it returns a model element, " + //$NON-NLS-1$
-// "so expectedType must be " + DerivedTypedElementEObjectResult.class.getSimpleName()); //$NON-NLS-1$
-// }
-// List<DerivedTypedElementEObjectResult<?>> resultList = batchEvaluateSingleValuedEObjectDerivedTypedElementWithCollectionEvaluator(
-// derivedTypedElement, sources, parameterValues, collectionEvaluator);
-// // we just checked the type parameter T through expectedType
-// @SuppressWarnings("unchecked")
-// List<T> castList = (List<T>) resultList;
-// abstractResultList = castList;
-// }
-// }
-//
-// } else {
-// // otherwise, do multiple evaluation by calling the evaluator's
-// // single evaluation multiple times
-//
-// if (derivedTypedElement.isMany()) {
-// if (primitiveType) {
-// if (expectedType != DerivedTypedElementPrimitiveTypeListResult.class) {
-// throw new UnmatchingExpectedTypeException("The derivedTypedElement is multi-valued, and its type is primitive, " + //$NON-NLS-1$
-// "so expectedType must be " + DerivedTypedElementPrimitiveTypeListResult.class.getSimpleName()); //$NON-NLS-1$
-// }
-// List<DerivedTypedElementPrimitiveTypeListResult<?>> listResultList = batchEvaluateMultiValuedPrimitiveDerivedTypedElementWithSimpleEvaluator(
-// derivedTypedElement, sources, parameterValues, evaluator);
-// @SuppressWarnings("unchecked")
-// List<T> castList = (List<T>) listResultList;
-// abstractResultList = castList;
-// } else {
-// if (expectedType != DerivedTypedElementEObjectListResult.class) {
-// throw new UnmatchingExpectedTypeException("The derivedTypedElement is multi-valued, and it returns model elements, " + //$NON-NLS-1$
-// "so expectedType must be " + DerivedTypedElementEObjectListResult.class.getSimpleName()); //$NON-NLS-1$
-// }
-// List<DerivedTypedElementEObjectListResult<?>> listResultList = batchEvaluateMultiValuedEObjectDerivedTypedElementWithSimpleEvaluator(
-// derivedTypedElement, sources, parameterValues, evaluator);
-// @SuppressWarnings("unchecked")
-// List<T> castList = (List<T>) listResultList;
-// abstractResultList = castList;
-// }
-// } else {
-// if (primitiveType) {
-// if (expectedType != DerivedTypedElementPrimitiveTypeResult.class) {
-// throw new UnmatchingExpectedTypeException("The derivedTypedElement is single-valued, and its type is primitive, " + //$NON-NLS-1$
-// "so expectedType must be " + DerivedTypedElementPrimitiveTypeResult.class.getSimpleName()); //$NON-NLS-1$
-// }
-// List<DerivedTypedElementPrimitiveTypeResult<?>> resultList = batchEvaluateSingleValuedPrimitiveDerivedTypedElementWithSimpleCollectionEvaluator(
-// derivedTypedElement, sources, parameterValues, evaluator);
-// @SuppressWarnings("unchecked")
-// List<T> castList = (List<T>) resultList;
-// abstractResultList = castList;
-// } else {
-// if (expectedType != DerivedTypedElementEObjectResult.class) {
-// throw new UnmatchingExpectedTypeException("The derivedTypedElement is single-valued, and it returns a model element, " + //$NON-NLS-1$
-// "so expectedType must be " + DerivedTypedElementEObjectResult.class.getSimpleName()); //$NON-NLS-1$
-// }
-// List<DerivedTypedElementEObjectResult<?>> resultList = batchEvaluateSingleValuedEObjectDerivedTypedElementWithSimpleCollectionEvaluator(
-// derivedTypedElement, sources, parameterValues, null);
-// @SuppressWarnings("unchecked")
-// List<T> castList = (List<T>) resultList;
-// abstractResultList = castList;
-// }
-// }
-// }
-// return abstractResultList;
+ // if (derivedTypedElement == null) {
+ // throw new IllegalArgumentException("The given derived typed element must not be null"); //$NON-NLS-1$
+ // }
+ //
+ // List<T> abstractResultList;
+ //
+ // Query query = derivedTypedElement.getQuery();
+ // if (query == null) {
+ // throw new DerivedTypedElementException("The given derived typed element doesn't contain a query"); //$NON-NLS-1$
+ // }
+ // EClassifier eType = derivedTypedElement.getEType();
+ // if (eType == null) {
+ // throw new DerivedTypedElementException("The given derived typed element has a null type"); //$NON-NLS-1$
+ // }
+ // IDerivedTypedElementImplementation evaluator = DerivedTypedElementImplementationFactoryRegistry.INSTANCE.getEvaluatorFor(query);
+ // if (evaluator == null) {
+ // throw new DerivedTypedElementEvaluationException("No evaluator was found for a query of type " + query.getClass().getName()); //$NON-NLS-1$
+ // }
+ //
+ // final boolean primitiveType = isPrimitive(eType);
+ //
+ // // if the evaluator implements multiple evaluation itself, then use it
+ // if (evaluator instanceof IDerivedTypedElementCollectionImplementation) {
+ // IDerivedTypedElementCollectionImplementation collectionEvaluator = (IDerivedTypedElementCollectionImplementation) evaluator;
+ // if (derivedTypedElement.isMany()) {
+ // if (primitiveType) {
+ // if (expectedType != DerivedTypedElementPrimitiveTypeListResult.class) {
+ // throw new UnmatchingExpectedTypeException("The derivedTypedElement is multi-valued, and its type is primitive, " + //$NON-NLS-1$
+ // "so expectedType must be " + DerivedTypedElementPrimitiveTypeListResult.class.getSimpleName()); //$NON-NLS-1$
+ // }
+ // List<DerivedTypedElementPrimitiveTypeListResult<?>> listResultList = batchEvaluateMultiValuedPrimitiveDerivedTypedElementWithCollectionEvaluator(
+ // derivedTypedElement, sources, parameterValues, collectionEvaluator);
+ // // we just checked the type parameter T through expectedType
+ // @SuppressWarnings("unchecked")
+ // List<T> castList = (List<T>) listResultList;
+ // abstractResultList = castList;
+ // } else {
+ // if (expectedType != DerivedTypedElementEObjectListResult.class) {
+ // throw new UnmatchingExpectedTypeException("The derivedTypedElement is multi-valued, and it returns model elements, " + //$NON-NLS-1$
+ // "so expectedType must be " + DerivedTypedElementEObjectListResult.class.getSimpleName()); //$NON-NLS-1$
+ // }
+ // List<DerivedTypedElementEObjectListResult<?>> listResultList = batchEvaluateMultiValuedEObjectDerivedTypedElementWithCollectionEvaluator(
+ // derivedTypedElement, sources, parameterValues, collectionEvaluator);
+ // // we just checked the type parameter T through expectedType
+ // @SuppressWarnings("unchecked")
+ // List<T> castList = (List<T>) listResultList;
+ // abstractResultList = castList;
+ // }
+ // } else {
+ // if (primitiveType) {
+ // if (expectedType != DerivedTypedElementPrimitiveTypeResult.class) {
+ // throw new UnmatchingExpectedTypeException("The derivedTypedElement is single-valued, and its type is primitive, " + //$NON-NLS-1$
+ // "so expectedType must be " + DerivedTypedElementPrimitiveTypeResult.class.getSimpleName()); //$NON-NLS-1$
+ // }
+ // List<DerivedTypedElementPrimitiveTypeResult<?>> resultList = batchEvaluateSingleValuedPrimitiveDerivedTypedElementWithCollectionEvaluator(
+ // derivedTypedElement, sources, parameterValues, collectionEvaluator);
+ // // we just checked the type parameter T through expectedType
+ // @SuppressWarnings("unchecked")
+ // List<T> castList = (List<T>) resultList;
+ // abstractResultList = castList;
+ // } else {
+ // if (expectedType != DerivedTypedElementEObjectResult.class) {
+ // throw new UnmatchingExpectedTypeException("The derivedTypedElement is single-valued, and it returns a model element, " + //$NON-NLS-1$
+ // "so expectedType must be " + DerivedTypedElementEObjectResult.class.getSimpleName()); //$NON-NLS-1$
+ // }
+ // List<DerivedTypedElementEObjectResult<?>> resultList = batchEvaluateSingleValuedEObjectDerivedTypedElementWithCollectionEvaluator(
+ // derivedTypedElement, sources, parameterValues, collectionEvaluator);
+ // // we just checked the type parameter T through expectedType
+ // @SuppressWarnings("unchecked")
+ // List<T> castList = (List<T>) resultList;
+ // abstractResultList = castList;
+ // }
+ // }
+ //
+ // } else {
+ // // otherwise, do multiple evaluation by calling the evaluator's
+ // // single evaluation multiple times
+ //
+ // if (derivedTypedElement.isMany()) {
+ // if (primitiveType) {
+ // if (expectedType != DerivedTypedElementPrimitiveTypeListResult.class) {
+ // throw new UnmatchingExpectedTypeException("The derivedTypedElement is multi-valued, and its type is primitive, " + //$NON-NLS-1$
+ // "so expectedType must be " + DerivedTypedElementPrimitiveTypeListResult.class.getSimpleName()); //$NON-NLS-1$
+ // }
+ // List<DerivedTypedElementPrimitiveTypeListResult<?>> listResultList = batchEvaluateMultiValuedPrimitiveDerivedTypedElementWithSimpleEvaluator(
+ // derivedTypedElement, sources, parameterValues, evaluator);
+ // @SuppressWarnings("unchecked")
+ // List<T> castList = (List<T>) listResultList;
+ // abstractResultList = castList;
+ // } else {
+ // if (expectedType != DerivedTypedElementEObjectListResult.class) {
+ // throw new UnmatchingExpectedTypeException("The derivedTypedElement is multi-valued, and it returns model elements, " + //$NON-NLS-1$
+ // "so expectedType must be " + DerivedTypedElementEObjectListResult.class.getSimpleName()); //$NON-NLS-1$
+ // }
+ // List<DerivedTypedElementEObjectListResult<?>> listResultList = batchEvaluateMultiValuedEObjectDerivedTypedElementWithSimpleEvaluator(
+ // derivedTypedElement, sources, parameterValues, evaluator);
+ // @SuppressWarnings("unchecked")
+ // List<T> castList = (List<T>) listResultList;
+ // abstractResultList = castList;
+ // }
+ // } else {
+ // if (primitiveType) {
+ // if (expectedType != DerivedTypedElementPrimitiveTypeResult.class) {
+ // throw new UnmatchingExpectedTypeException("The derivedTypedElement is single-valued, and its type is primitive, " + //$NON-NLS-1$
+ // "so expectedType must be " + DerivedTypedElementPrimitiveTypeResult.class.getSimpleName()); //$NON-NLS-1$
+ // }
+ // List<DerivedTypedElementPrimitiveTypeResult<?>> resultList = batchEvaluateSingleValuedPrimitiveDerivedTypedElementWithSimpleCollectionEvaluator(
+ // derivedTypedElement, sources, parameterValues, evaluator);
+ // @SuppressWarnings("unchecked")
+ // List<T> castList = (List<T>) resultList;
+ // abstractResultList = castList;
+ // } else {
+ // if (expectedType != DerivedTypedElementEObjectResult.class) {
+ // throw new UnmatchingExpectedTypeException("The derivedTypedElement is single-valued, and it returns a model element, " + //$NON-NLS-1$
+ // "so expectedType must be " + DerivedTypedElementEObjectResult.class.getSimpleName()); //$NON-NLS-1$
+ // }
+ // List<DerivedTypedElementEObjectResult<?>> resultList = batchEvaluateSingleValuedEObjectDerivedTypedElementWithSimpleCollectionEvaluator(
+ // derivedTypedElement, sources, parameterValues, null);
+ // @SuppressWarnings("unchecked")
+ // List<T> castList = (List<T>) resultList;
+ // abstractResultList = castList;
+ // }
+ // }
+ // }
+ // return abstractResultList;
}
-// private static List<DerivedTypedElementPrimitiveTypeListResult<?>> batchEvaluateMultiValuedPrimitiveDerivedTypedElementWithCollectionEvaluator(
-// final DerivedTypedElement derivedTypedElement, final Collection<EObject> sources, final List<ParameterValue> parameterValues,
-// final IDerivedTypedElementCollectionImplementation collectionEvaluator)
-// throws DerivedTypedElementException {
-//
-// List<? extends AbstractDerivedTypedElementResult> listResultList = collectionEvaluator
-// .getValues(derivedTypedElement, sources, parameterValues);
-//
-// // check the return type from the evaluator in order to be able to cast safely
-// for (int index = 0; index < listResultList.size(); index++) {
-// AbstractDerivedTypedElementResult elementResult = listResultList.get(index);
-// if (elementResult instanceof DerivedTypedElementPrimitiveTypeListResult<?>) {
-// DerivedTypedElementPrimitiveTypeListResult<?> derivedTypedElementPrimitiveTypeListResult = (DerivedTypedElementPrimitiveTypeListResult<?>) elementResult;
-// checkResult(derivedTypedElement.getQuery(), derivedTypedElementPrimitiveTypeListResult.getResultList(),
-// collectionEvaluator.getCheckResultType());
-// } else {
-// throw new DerivedTypedElementEvaluationException(ErrorHandlingUtils.buildWrongTypeMessage(
-// "Wrong element type at index " + index + " in the result from the evaluator: " + collectionEvaluator.getClass().getName(), //$NON-NLS-1$//$NON-NLS-2$
-// DerivedTypedElementPrimitiveTypeListResult.class, elementResult));
-// }
-// }
-//
-// // just checked
-// @SuppressWarnings("unchecked")
-// List<DerivedTypedElementPrimitiveTypeListResult<?>> result = (List<DerivedTypedElementPrimitiveTypeListResult<?>>) listResultList;
-// return result;
-// }
-//
-// private static List<DerivedTypedElementEObjectListResult<?>> batchEvaluateMultiValuedEObjectDerivedTypedElementWithCollectionEvaluator(
-// final DerivedTypedElement derivedTypedElement, final Collection<EObject> sources, final List<ParameterValue> parameterValues,
-// final IDerivedTypedElementCollectionImplementation collectionEvaluator)
-// throws DerivedTypedElementException {
-// List<? extends AbstractDerivedTypedElementResult> listResultList = collectionEvaluator
-// .getValues(derivedTypedElement, sources, parameterValues);
-//
-// // check the return type from the evaluator in order to be able to cast safely
-// for (int index = 0; index < listResultList.size(); index++) {
-// AbstractDerivedTypedElementResult elementResult = listResultList.get(index);
-// if (elementResult instanceof DerivedTypedElementEObjectListResult<?>) {
-// DerivedTypedElementEObjectListResult<?> derivedTypedElementEObjectListResult = (DerivedTypedElementEObjectListResult<?>) elementResult;
-// checkResult(derivedTypedElement.getQuery(), derivedTypedElementEObjectListResult.getResultList(),
-// collectionEvaluator.getCheckResultType());
-// } else {
-// throw new DerivedTypedElementEvaluationException(ErrorHandlingUtils.buildWrongTypeMessage(
-// "Wrong element type at index " + index + " in the result from the evaluator: " + collectionEvaluator.getClass().getName(), //$NON-NLS-1$//$NON-NLS-2$
-// DerivedTypedElementEObjectListResult.class, elementResult));
-// }
-// }
-//
-// // just checked
-// @SuppressWarnings("unchecked")
-// List<DerivedTypedElementEObjectListResult<?>> result = (List<DerivedTypedElementEObjectListResult<?>>) listResultList;
-// return result;
-// }
-//
-// private static List<DerivedTypedElementPrimitiveTypeResult<?>> batchEvaluateSingleValuedPrimitiveDerivedTypedElementWithCollectionEvaluator(
-// final DerivedTypedElement derivedTypedElement, final Collection<EObject> sources, final List<ParameterValue> parameterValues,
-// final IDerivedTypedElementCollectionImplementation collectionEvaluator)
-// throws DerivedTypedElementException {
-// // TODO Auto-generated method stub
-// return null;
-// }
-//
-// private static List<DerivedTypedElementEObjectResult<?>> batchEvaluateSingleValuedEObjectDerivedTypedElementWithCollectionEvaluator(
-// final DerivedTypedElement derivedTypedElement, final Collection<EObject> sources, final List<ParameterValue> parameterValues,
-// final IDerivedTypedElementCollectionImplementation collectionEvaluator) throws DerivedTypedElementException {
-// // TODO Auto-generated method stub
-// return null;
-// }
-//
-// private static List<DerivedTypedElementPrimitiveTypeListResult<?>> batchEvaluateMultiValuedPrimitiveDerivedTypedElementWithSimpleEvaluator(
-// final DerivedTypedElement derivedTypedElement, final Collection<EObject> sources, final List<ParameterValue> parameterValues,
-// final IDerivedTypedElementImplementation evaluator) {
-//
-// Query query = derivedTypedElement.getQuery();
-//
-// List<DerivedTypedElementPrimitiveTypeListResult<?>> listResultList = new ArrayList<DerivedTypedElementPrimitiveTypeListResult<?>>();
-// for (EObject eObject : sources) {
-// DerivedTypedElementPrimitiveTypeListResult<Object> primitiveTypeListResult = EFacetFactory.eINSTANCE
-// .createDerivedTypedElementPrimitiveTypeListResult();
-//
-// Throwable error = null;
-// try {
-// primitiveTypeListResult.setSource(eObject);
-// primitiveTypeListResult.setDerivedTypedElement(derivedTypedElement);
-// setParameterValues(primitiveTypeListResult.getParameterValues(), parameterValues);
-// checkSourceType(query.getSourceType(), query, eObject);
-// } catch (Throwable e) {
-// error = e;
-// }
-// if (error != null) {
-// primitiveTypeListResult.setException(error);
-// } else {
-// try {
-// Object evaluationResult = evaluator.getValue(derivedTypedElement, eObject, parameterValues);
-// checkResult(query, evaluationResult, evaluator.getCheckResultType());
-// // checked by checkResult
-// Collection<?> evaluationResultCollection = (Collection<?>) evaluationResult;
-// for (Object object : evaluationResultCollection) {
-// primitiveTypeListResult.getResultList().add(object);
-// }
-// } catch (Throwable e) {
-// primitiveTypeListResult.setException(e);
-// }
-// }
-// listResultList.add(primitiveTypeListResult);
-//
-// }
-// return listResultList;
-// }
-//
-// private static List<DerivedTypedElementEObjectListResult<?>> batchEvaluateMultiValuedEObjectDerivedTypedElementWithSimpleEvaluator(
-// final DerivedTypedElement derivedTypedElement, final Collection<EObject> sources, final List<ParameterValue> parameterValues,
-// final IDerivedTypedElementImplementation evaluator) {
-// Query query = derivedTypedElement.getQuery();
-//
-// List<DerivedTypedElementEObjectListResult<?>> listResultList = new ArrayList<DerivedTypedElementEObjectListResult<?>>();
-// for (EObject eObject : sources) {
-// DerivedTypedElementEObjectListResult<EObject> eObjectListResult = EFacetFactory.eINSTANCE
-// .createDerivedTypedElementEObjectListResult();
-//
-// Throwable error = null;
-// try {
-// eObjectListResult.setSource(eObject);
-// eObjectListResult.setDerivedTypedElement(derivedTypedElement);
-// setParameterValues(eObjectListResult.getParameterValues(), parameterValues);
-// checkSourceType(query.getSourceType(), query, eObject);
-// } catch (Throwable e) {
-// error = e;
-// }
-// if (error != null) {
-// eObjectListResult.setException(error);
-// } else {
-// try {
-// Object evaluationResult = evaluator.getValue(derivedTypedElement, eObject, parameterValues);
-// checkResult(query, evaluationResult, evaluator.getCheckResultType(), false);
-// // checked by checkResult
-// @SuppressWarnings("unchecked")
-// Collection<? extends EObject> evaluationResultCollection = (Collection<? extends EObject>) evaluationResult;
-// for (EObject e : evaluationResultCollection) {
-// eObjectListResult.getResultList().add(e);
-// }
-// } catch (Throwable e) {
-// eObjectListResult.setException(e);
-// }
-// }
-// listResultList.add(eObjectListResult);
-//
-// }
-// return listResultList;
-// }
-//
-// private static List<DerivedTypedElementPrimitiveTypeResult<?>> batchEvaluateSingleValuedPrimitiveDerivedTypedElementWithSimpleCollectionEvaluator(
-// final DerivedTypedElement derivedTypedElement, final Collection<EObject> sources, final List<ParameterValue> parameterValues,
-// final IDerivedTypedElementImplementation evaluator)
-// throws DerivedTypedElementException {
-// // TODO Auto-generated method stub
-// return null;
-// }
-//
-// private static List<DerivedTypedElementEObjectResult<?>> batchEvaluateSingleValuedEObjectDerivedTypedElementWithSimpleCollectionEvaluator(
-// final DerivedTypedElement derivedTypedElement, final Collection<EObject> sources, final List<ParameterValue> parameterValues,
-// final IDerivedTypedElementImplementation evaluator)
-// throws DerivedTypedElementException {
-// // TODO Auto-generated method stub
-// return null;
-// }
+ // private static List<DerivedTypedElementPrimitiveTypeListResult<?>> batchEvaluateMultiValuedPrimitiveDerivedTypedElementWithCollectionEvaluator(
+ // final DerivedTypedElement derivedTypedElement, final Collection<EObject> sources, final List<ParameterValue> parameterValues,
+ // final IDerivedTypedElementCollectionImplementation collectionEvaluator)
+ // throws DerivedTypedElementException {
+ //
+ // List<? extends AbstractDerivedTypedElementResult> listResultList = collectionEvaluator
+ // .getValues(derivedTypedElement, sources, parameterValues);
+ //
+ // // check the return type from the evaluator in order to be able to cast safely
+ // for (int index = 0; index < listResultList.size(); index++) {
+ // AbstractDerivedTypedElementResult elementResult = listResultList.get(index);
+ // if (elementResult instanceof DerivedTypedElementPrimitiveTypeListResult<?>) {
+ // DerivedTypedElementPrimitiveTypeListResult<?> derivedTypedElementPrimitiveTypeListResult = (DerivedTypedElementPrimitiveTypeListResult<?>) elementResult;
+ // checkResult(derivedTypedElement.getQuery(), derivedTypedElementPrimitiveTypeListResult.getResultList(),
+ // collectionEvaluator.getCheckResultType());
+ // } else {
+ // throw new DerivedTypedElementEvaluationException(ErrorHandlingUtils.buildWrongTypeMessage(
+ // "Wrong element type at index " + index + " in the result from the evaluator: " + collectionEvaluator.getClass().getName(), //$NON-NLS-1$//$NON-NLS-2$
+ // DerivedTypedElementPrimitiveTypeListResult.class, elementResult));
+ // }
+ // }
+ //
+ // // just checked
+ // @SuppressWarnings("unchecked")
+ // List<DerivedTypedElementPrimitiveTypeListResult<?>> result = (List<DerivedTypedElementPrimitiveTypeListResult<?>>) listResultList;
+ // return result;
+ // }
+ //
+ // private static List<DerivedTypedElementEObjectListResult<?>> batchEvaluateMultiValuedEObjectDerivedTypedElementWithCollectionEvaluator(
+ // final DerivedTypedElement derivedTypedElement, final Collection<EObject> sources, final List<ParameterValue> parameterValues,
+ // final IDerivedTypedElementCollectionImplementation collectionEvaluator)
+ // throws DerivedTypedElementException {
+ // List<? extends AbstractDerivedTypedElementResult> listResultList = collectionEvaluator
+ // .getValues(derivedTypedElement, sources, parameterValues);
+ //
+ // // check the return type from the evaluator in order to be able to cast safely
+ // for (int index = 0; index < listResultList.size(); index++) {
+ // AbstractDerivedTypedElementResult elementResult = listResultList.get(index);
+ // if (elementResult instanceof DerivedTypedElementEObjectListResult<?>) {
+ // DerivedTypedElementEObjectListResult<?> derivedTypedElementEObjectListResult = (DerivedTypedElementEObjectListResult<?>) elementResult;
+ // checkResult(derivedTypedElement.getQuery(), derivedTypedElementEObjectListResult.getResultList(),
+ // collectionEvaluator.getCheckResultType());
+ // } else {
+ // throw new DerivedTypedElementEvaluationException(ErrorHandlingUtils.buildWrongTypeMessage(
+ // "Wrong element type at index " + index + " in the result from the evaluator: " + collectionEvaluator.getClass().getName(), //$NON-NLS-1$//$NON-NLS-2$
+ // DerivedTypedElementEObjectListResult.class, elementResult));
+ // }
+ // }
+ //
+ // // just checked
+ // @SuppressWarnings("unchecked")
+ // List<DerivedTypedElementEObjectListResult<?>> result = (List<DerivedTypedElementEObjectListResult<?>>) listResultList;
+ // return result;
+ // }
+ //
+ // private static List<DerivedTypedElementPrimitiveTypeResult<?>> batchEvaluateSingleValuedPrimitiveDerivedTypedElementWithCollectionEvaluator(
+ // final DerivedTypedElement derivedTypedElement, final Collection<EObject> sources, final List<ParameterValue> parameterValues,
+ // final IDerivedTypedElementCollectionImplementation collectionEvaluator)
+ // throws DerivedTypedElementException {
+ // // TODO Auto-generated method stub
+ // return null;
+ // }
+ //
+ // private static List<DerivedTypedElementEObjectResult<?>> batchEvaluateSingleValuedEObjectDerivedTypedElementWithCollectionEvaluator(
+ // final DerivedTypedElement derivedTypedElement, final Collection<EObject> sources, final List<ParameterValue> parameterValues,
+ // final IDerivedTypedElementCollectionImplementation collectionEvaluator) throws DerivedTypedElementException {
+ // // TODO Auto-generated method stub
+ // return null;
+ // }
+ //
+ // private static List<DerivedTypedElementPrimitiveTypeListResult<?>> batchEvaluateMultiValuedPrimitiveDerivedTypedElementWithSimpleEvaluator(
+ // final DerivedTypedElement derivedTypedElement, final Collection<EObject> sources, final List<ParameterValue> parameterValues,
+ // final IDerivedTypedElementImplementation evaluator) {
+ //
+ // Query query = derivedTypedElement.getQuery();
+ //
+ // List<DerivedTypedElementPrimitiveTypeListResult<?>> listResultList = new ArrayList<DerivedTypedElementPrimitiveTypeListResult<?>>();
+ // for (EObject eObject : sources) {
+ // DerivedTypedElementPrimitiveTypeListResult<Object> primitiveTypeListResult = EFacetFactory.eINSTANCE
+ // .createDerivedTypedElementPrimitiveTypeListResult();
+ //
+ // Throwable error = null;
+ // try {
+ // primitiveTypeListResult.setSource(eObject);
+ // primitiveTypeListResult.setDerivedTypedElement(derivedTypedElement);
+ // setParameterValues(primitiveTypeListResult.getParameterValues(), parameterValues);
+ // checkSourceType(query.getSourceType(), query, eObject);
+ // } catch (Throwable e) {
+ // error = e;
+ // }
+ // if (error != null) {
+ // primitiveTypeListResult.setException(error);
+ // } else {
+ // try {
+ // Object evaluationResult = evaluator.getValue(derivedTypedElement, eObject, parameterValues);
+ // checkResult(query, evaluationResult, evaluator.getCheckResultType());
+ // // checked by checkResult
+ // Collection<?> evaluationResultCollection = (Collection<?>) evaluationResult;
+ // for (Object object : evaluationResultCollection) {
+ // primitiveTypeListResult.getResultList().add(object);
+ // }
+ // } catch (Throwable e) {
+ // primitiveTypeListResult.setException(e);
+ // }
+ // }
+ // listResultList.add(primitiveTypeListResult);
+ //
+ // }
+ // return listResultList;
+ // }
+ //
+ // private static List<DerivedTypedElementEObjectListResult<?>> batchEvaluateMultiValuedEObjectDerivedTypedElementWithSimpleEvaluator(
+ // final DerivedTypedElement derivedTypedElement, final Collection<EObject> sources, final List<ParameterValue> parameterValues,
+ // final IDerivedTypedElementImplementation evaluator) {
+ // Query query = derivedTypedElement.getQuery();
+ //
+ // List<DerivedTypedElementEObjectListResult<?>> listResultList = new ArrayList<DerivedTypedElementEObjectListResult<?>>();
+ // for (EObject eObject : sources) {
+ // DerivedTypedElementEObjectListResult<EObject> eObjectListResult = EFacetFactory.eINSTANCE
+ // .createDerivedTypedElementEObjectListResult();
+ //
+ // Throwable error = null;
+ // try {
+ // eObjectListResult.setSource(eObject);
+ // eObjectListResult.setDerivedTypedElement(derivedTypedElement);
+ // setParameterValues(eObjectListResult.getParameterValues(), parameterValues);
+ // checkSourceType(query.getSourceType(), query, eObject);
+ // } catch (Throwable e) {
+ // error = e;
+ // }
+ // if (error != null) {
+ // eObjectListResult.setException(error);
+ // } else {
+ // try {
+ // Object evaluationResult = evaluator.getValue(derivedTypedElement, eObject, parameterValues);
+ // checkResult(query, evaluationResult, evaluator.getCheckResultType(), false);
+ // // checked by checkResult
+ // @SuppressWarnings("unchecked")
+ // Collection<? extends EObject> evaluationResultCollection = (Collection<? extends EObject>) evaluationResult;
+ // for (EObject e : evaluationResultCollection) {
+ // eObjectListResult.getResultList().add(e);
+ // }
+ // } catch (Throwable e) {
+ // eObjectListResult.setException(e);
+ // }
+ // }
+ // listResultList.add(eObjectListResult);
+ //
+ // }
+ // return listResultList;
+ // }
+ //
+ // private static List<DerivedTypedElementPrimitiveTypeResult<?>> batchEvaluateSingleValuedPrimitiveDerivedTypedElementWithSimpleCollectionEvaluator(
+ // final DerivedTypedElement derivedTypedElement, final Collection<EObject> sources, final List<ParameterValue> parameterValues,
+ // final IDerivedTypedElementImplementation evaluator)
+ // throws DerivedTypedElementException {
+ // // TODO Auto-generated method stub
+ // return null;
+ // }
+ //
+ // private static List<DerivedTypedElementEObjectResult<?>> batchEvaluateSingleValuedEObjectDerivedTypedElementWithSimpleCollectionEvaluator(
+ // final DerivedTypedElement derivedTypedElement, final Collection<EObject> sources, final List<ParameterValue> parameterValues,
+ // final IDerivedTypedElementImplementation evaluator)
+ // throws DerivedTypedElementException {
+ // // TODO Auto-generated method stub
+ // return null;
+ // }
-// public <T> List<DerivedTypedElementListResult<T>> evaluateMultiValued(final DerivedTypedElement derivedTypedElement,
-// final Collection<? extends EObject> sources, final List<ParameterValue> parameterValues,
-// final Class<T> expectedType)
-// throws DerivedTypedElementException, UnmatchingExpectedTypeException {
-// if (!derivedTypedElement.isMany()) {
-// throw new IllegalArgumentException("This method doesn't accept a single-valued derived typed element."); //$NON-NLS-1$
-// }
-//
-// Query query = derivedTypedElement.getQuery();
-// if (query == null) {
-// throw new DerivedTypedElementException("The given derived typed element doesn't contain a query"); //$NON-NLS-1$
-// }
-// IDerivedTypedElementImplementation evaluator =
-// DerivedTypedElementImplementationFactoryRegistry.INSTANCE.getEvaluatorFor(query);
-//
-// List<?> queryResult = batchEvaluateAndCheck(derivedTypedElement, sources, parameterValues,
-// evaluator);
-// // Java doesn't support co- or contra-variance on generics,
-// // so we can't return the right type
-// @SuppressWarnings("unchecked")
-// List<DerivedTypedElementListResult<T>> multiResultList =
-// (List<DerivedTypedElementListResult<T>>) queryResult;
-//
-// // check each result element in each result list
-// if (expectedType != null) {
-// int sourceIndex = 0;
-// for (DerivedTypedElementListResult<?> derivedTypedElementResult : multiResultList) {
-// EList<?> resultList = derivedTypedElementResult.getResultList();
-// int index = 0;
-// for (Object resultElement : resultList) {
-// // a null value for resultElement matches any type
-// if (resultElement != null && !expectedType.isInstance(resultElement)) {
-// throw new UnmatchingExpectedTypeException(
-// "The element at index " + index + " in the list that resulted from the evaluation of the multi-valued " //$NON-NLS-1$ //$NON-NLS-2$
-// + "derived typed element does not match the expected type " //$NON-NLS-1$
-// + "for the source element at index " + sourceIndex, expectedType, resultElement); //$NON-NLS-1$
-// }
-// index++;
-// }
-// sourceIndex++;
-// }
-// }
-// return multiResultList;
-// }
-//
-// private static List<?> batchEvaluateAndCheck(final DerivedTypedElement derivedTypedElement,
-// final Collection<EObject> eObjects,
-// final List<ParameterValue> parameterValues, final IDerivedTypedElementImplementation
-// evaluator)
-// throws DerivedTypedElementException {
-// List<?> result;
-//
-// Query query = derivedTypedElement.getQuery();
-// if (query == null) {
-// throw new IllegalArgumentException("the query cannot be null"); //$NON-NLS-1$
-// }
-//
-// EClassifier sourceType = query.getSourceType();
-//
-// final boolean primitiveType = derivedTypedElement instanceof EAttribute;
-//
-// if (derivedTypedElement.isMany()) {
-// if (evaluator instanceof IDerivedTypedElementCollectionImplementation) {
-// IDerivedTypedElementCollectionImplementation collectionEvaluator =
-// (IDerivedTypedElementCollectionImplementation) evaluator;
-// // List<? extends AbstractDerivedTypedElementResult> listResultList =
-// // collectionEvaluator
-// // .getValues(derivedTypedElement, eObjects, parameterValues);
-// // int index = 0;
-// // for (AbstractDerivedTypedElementResult listResult : listResultList) {
-// // EList<?> resultList;
-// // if (primitiveType && listResult instanceof
-// // DerivedTypedElementPrimitiveTypeListResult<?>) {
-// // DerivedTypedElementPrimitiveTypeListResult<?> primitiveListResult =
-// // (DerivedTypedElementPrimitiveTypeListResult<?>) listResult;
-// // resultList = primitiveListResult.getResultList();
-// // } else if (!primitiveType && listResult instanceof
-// // DerivedTypedElementEObjectListResult<?>) {
-// // DerivedTypedElementEObjectListResult<?> eObjectListResult =
-// // (DerivedTypedElementEObjectListResult<?>) listResult;
-// // resultList = eObjectListResult.getResultList();
-// // } else {
-// // throw new DerivedTypedElementEvaluationException(
-// // "Wrong element type at index " + index + " in the result from the evaluator " + collectionEvaluator.getClass().getName()); //$NON-NLS-1$//$NON-NLS-2$
-// // }
-// // checkResult(query, resultList, evaluator.getCheckResultType());
-// // index++;
-// // }
-// // result = listResultList;
-// } else {
-//
-// // List<AbstractDerivedTypedElementResult> listResultList = new
-// // ArrayList<AbstractDerivedTypedElementResult>();
-// // for (EObject eObject : eObjects) {
-// // AbstractDerivedTypedElementResult listResult;
-// // List<?> resultList;
-// // if (primitiveType) {
-// // DerivedTypedElementPrimitiveTypeListResult<?> primitiveTypeListResult =
-// // EFacetFactory.eINSTANCE
-// // .createDerivedTypedElementPrimitiveTypeListResult();
-// // listResult = primitiveTypeListResult;
-// // resultList = primitiveTypeListResult.getResultList();
-// // } else {
-// // DerivedTypedElementEObjectListResult<?> eObjectTypeListResult =
-// // EFacetFactory.eINSTANCE
-// // .createDerivedTypedElementEObjectListResult();
-// // listResult = eObjectTypeListResult;
-// // resultList = eObjectTypeListResult.getResultList();
-// // }
-// //
-// // Throwable error = null;
-// // try {
-// // listResult.setSource(eObject);
-// // listResult.setDerivedTypedElement(derivedTypedElement);
-// // setParameterValues(listResult.getParameterValues(), parameterValues);
-// // checkSourceType(sourceType, query, eObject);
-// // } catch (Throwable e) {
-// // error = e;
-// // }
-// // if (error != null) {
-// // listResult.setException(error);
-// // } else {
-// // try {
-// // Object evaluationResult = evaluator.getValue(derivedTypedElement, eObject,
-// // parameterValues);
-// // checkResult(query, evaluationResult, evaluator.getCheckResultType());
-// // // checked by checkResult
-// // Collection<?> evaluationResultCollection = (Collection<?>) evaluationResult;
-// // for (Object object : evaluationResultCollection) {
-// // resultList.add(object);
-// // }
-// // } catch (Throwable e) {
-// // listResult.setException(e);
-// // }
-// // }
-// // listResultList.add(listResult);
-// //
-// // }
-// // result = listResultList;
-//
-// }
-// } else {
-// // if the evaluator implements multiple evaluation itself, then use it
-// if (evaluator instanceof IDerivedTypedElementCollectionImplementation) {
-// IDerivedTypedElementCollectionImplementation collectionEvaluator =
-// (IDerivedTypedElementCollectionImplementation) evaluator;
-// List<? extends AbstractDerivedTypedElementResult> singleResultList = collectionEvaluator
-// .getValues(derivedTypedElement, eObjects, parameterValues);
-// int index = 0;
-// for (AbstractDerivedTypedElementResult singleResult : singleResultList) {
-// Object resultElement;
-// if (primitiveType && singleResult instanceof DerivedTypedElementPrimitiveTypeResult<?>) {
-// DerivedTypedElementPrimitiveTypeResult<?> primitiveResult =
-// (DerivedTypedElementPrimitiveTypeResult<?>) singleResult;
-// resultElement = primitiveResult.getResult();
-// } else if (!primitiveType && singleResult instanceof DerivedTypedElementEObjectResult<?>) {
-// DerivedTypedElementEObjectResult<?> eObjectResult = (DerivedTypedElementEObjectResult<?>)
-// singleResult;
-// resultElement = eObjectResult.getResult();
-// } else {
-// throw new DerivedTypedElementEvaluationException(
-// "Wrong element type at index " + index + " in the result from the evaluator " + collectionEvaluator.getClass().getName()); //$NON-NLS-1$//$NON-NLS-2$
-// }
-// checkResult(query, result, evaluator.getCheckResultType());
-// index++;
-// }
-// } else {
-// // otherwise, do multiple evaluation by calling the evaluator's
-// // single evaluation multiple times
-// List<DerivedTypedElementResult<?>> resultList = new
-// ArrayList<DerivedTypedElementResult<?>>();
-// for (EObject eObject : eObjects) {
-// DerivedTypedElementResult<Object> singleResult =
-// EFacetFactory.eINSTANCE.createDerivedTypedElementResult();
-// Throwable error = null;
-// try {
-// singleResult.setSource(eObject);
-// singleResult.setDerivedTypedElement(derivedTypedElement);
-// setParameterValues(singleResult.getParameterValues(), parameterValues);
-// checkSourceType(sourceType, query, eObject);
-// } catch (Throwable e) {
-// error = e;
-// }
-// if (error != null) {
-// singleResult.setException(error);
-// } else {
-// try {
-// Object evaluationResult = evaluator.getValue(derivedTypedElement, eObject, parameterValues);
-// checkResult(query, evaluationResult, evaluator.getCheckResultType());
-// singleResult.setResult(evaluationResult);
-// } catch (Throwable e) {
-// singleResult.setException(e);
-// }
-// }
-// resultList.add(singleResult);
-// }
-// result = resultList;
-// }
-// }
-//
-// return result;
-// }
+ // public <T> List<DerivedTypedElementListResult<T>> evaluateMultiValued(final DerivedTypedElement derivedTypedElement,
+ // final Collection<? extends EObject> sources, final List<ParameterValue> parameterValues,
+ // final Class<T> expectedType)
+ // throws DerivedTypedElementException, UnmatchingExpectedTypeException {
+ // if (!derivedTypedElement.isMany()) {
+ // throw new IllegalArgumentException("This method doesn't accept a single-valued derived typed element."); //$NON-NLS-1$
+ // }
+ //
+ // Query query = derivedTypedElement.getQuery();
+ // if (query == null) {
+ // throw new DerivedTypedElementException("The given derived typed element doesn't contain a query"); //$NON-NLS-1$
+ // }
+ // IDerivedTypedElementImplementation evaluator =
+ // DerivedTypedElementImplementationFactoryRegistry.INSTANCE.getEvaluatorFor(query);
+ //
+ // List<?> queryResult = batchEvaluateAndCheck(derivedTypedElement, sources, parameterValues,
+ // evaluator);
+ // // Java doesn't support co- or contra-variance on generics,
+ // // so we can't return the right type
+ // @SuppressWarnings("unchecked")
+ // List<DerivedTypedElementListResult<T>> multiResultList =
+ // (List<DerivedTypedElementListResult<T>>) queryResult;
+ //
+ // // check each result element in each result list
+ // if (expectedType != null) {
+ // int sourceIndex = 0;
+ // for (DerivedTypedElementListResult<?> derivedTypedElementResult : multiResultList) {
+ // EList<?> resultList = derivedTypedElementResult.getResultList();
+ // int index = 0;
+ // for (Object resultElement : resultList) {
+ // // a null value for resultElement matches any type
+ // if (resultElement != null && !expectedType.isInstance(resultElement)) {
+ // throw new UnmatchingExpectedTypeException(
+ // "The element at index " + index + " in the list that resulted from the evaluation of the multi-valued " //$NON-NLS-1$ //$NON-NLS-2$
+ // + "derived typed element does not match the expected type " //$NON-NLS-1$
+ // + "for the source element at index " + sourceIndex, expectedType, resultElement); //$NON-NLS-1$
+ // }
+ // index++;
+ // }
+ // sourceIndex++;
+ // }
+ // }
+ // return multiResultList;
+ // }
+ //
+ // private static List<?> batchEvaluateAndCheck(final DerivedTypedElement derivedTypedElement,
+ // final Collection<EObject> eObjects,
+ // final List<ParameterValue> parameterValues, final IDerivedTypedElementImplementation
+ // evaluator)
+ // throws DerivedTypedElementException {
+ // List<?> result;
+ //
+ // Query query = derivedTypedElement.getQuery();
+ // if (query == null) {
+ // throw new IllegalArgumentException("the query cannot be null"); //$NON-NLS-1$
+ // }
+ //
+ // EClassifier sourceType = query.getSourceType();
+ //
+ // final boolean primitiveType = derivedTypedElement instanceof EAttribute;
+ //
+ // if (derivedTypedElement.isMany()) {
+ // if (evaluator instanceof IDerivedTypedElementCollectionImplementation) {
+ // IDerivedTypedElementCollectionImplementation collectionEvaluator =
+ // (IDerivedTypedElementCollectionImplementation) evaluator;
+ // // List<? extends AbstractDerivedTypedElementResult> listResultList =
+ // // collectionEvaluator
+ // // .getValues(derivedTypedElement, eObjects, parameterValues);
+ // // int index = 0;
+ // // for (AbstractDerivedTypedElementResult listResult : listResultList) {
+ // // EList<?> resultList;
+ // // if (primitiveType && listResult instanceof
+ // // DerivedTypedElementPrimitiveTypeListResult<?>) {
+ // // DerivedTypedElementPrimitiveTypeListResult<?> primitiveListResult =
+ // // (DerivedTypedElementPrimitiveTypeListResult<?>) listResult;
+ // // resultList = primitiveListResult.getResultList();
+ // // } else if (!primitiveType && listResult instanceof
+ // // DerivedTypedElementEObjectListResult<?>) {
+ // // DerivedTypedElementEObjectListResult<?> eObjectListResult =
+ // // (DerivedTypedElementEObjectListResult<?>) listResult;
+ // // resultList = eObjectListResult.getResultList();
+ // // } else {
+ // // throw new DerivedTypedElementEvaluationException(
+ // // "Wrong element type at index " + index + " in the result from the evaluator " + collectionEvaluator.getClass().getName()); //$NON-NLS-1$//$NON-NLS-2$
+ // // }
+ // // checkResult(query, resultList, evaluator.getCheckResultType());
+ // // index++;
+ // // }
+ // // result = listResultList;
+ // } else {
+ //
+ // // List<AbstractDerivedTypedElementResult> listResultList = new
+ // // ArrayList<AbstractDerivedTypedElementResult>();
+ // // for (EObject eObject : eObjects) {
+ // // AbstractDerivedTypedElementResult listResult;
+ // // List<?> resultList;
+ // // if (primitiveType) {
+ // // DerivedTypedElementPrimitiveTypeListResult<?> primitiveTypeListResult =
+ // // EFacetFactory.eINSTANCE
+ // // .createDerivedTypedElementPrimitiveTypeListResult();
+ // // listResult = primitiveTypeListResult;
+ // // resultList = primitiveTypeListResult.getResultList();
+ // // } else {
+ // // DerivedTypedElementEObjectListResult<?> eObjectTypeListResult =
+ // // EFacetFactory.eINSTANCE
+ // // .createDerivedTypedElementEObjectListResult();
+ // // listResult = eObjectTypeListResult;
+ // // resultList = eObjectTypeListResult.getResultList();
+ // // }
+ // //
+ // // Throwable error = null;
+ // // try {
+ // // listResult.setSource(eObject);
+ // // listResult.setDerivedTypedElement(derivedTypedElement);
+ // // setParameterValues(listResult.getParameterValues(), parameterValues);
+ // // checkSourceType(sourceType, query, eObject);
+ // // } catch (Throwable e) {
+ // // error = e;
+ // // }
+ // // if (error != null) {
+ // // listResult.setException(error);
+ // // } else {
+ // // try {
+ // // Object evaluationResult = evaluator.getValue(derivedTypedElement, eObject,
+ // // parameterValues);
+ // // checkResult(query, evaluationResult, evaluator.getCheckResultType());
+ // // // checked by checkResult
+ // // Collection<?> evaluationResultCollection = (Collection<?>) evaluationResult;
+ // // for (Object object : evaluationResultCollection) {
+ // // resultList.add(object);
+ // // }
+ // // } catch (Throwable e) {
+ // // listResult.setException(e);
+ // // }
+ // // }
+ // // listResultList.add(listResult);
+ // //
+ // // }
+ // // result = listResultList;
+ //
+ // }
+ // } else {
+ // // if the evaluator implements multiple evaluation itself, then use it
+ // if (evaluator instanceof IDerivedTypedElementCollectionImplementation) {
+ // IDerivedTypedElementCollectionImplementation collectionEvaluator =
+ // (IDerivedTypedElementCollectionImplementation) evaluator;
+ // List<? extends AbstractDerivedTypedElementResult> singleResultList = collectionEvaluator
+ // .getValues(derivedTypedElement, eObjects, parameterValues);
+ // int index = 0;
+ // for (AbstractDerivedTypedElementResult singleResult : singleResultList) {
+ // Object resultElement;
+ // if (primitiveType && singleResult instanceof DerivedTypedElementPrimitiveTypeResult<?>) {
+ // DerivedTypedElementPrimitiveTypeResult<?> primitiveResult =
+ // (DerivedTypedElementPrimitiveTypeResult<?>) singleResult;
+ // resultElement = primitiveResult.getResult();
+ // } else if (!primitiveType && singleResult instanceof DerivedTypedElementEObjectResult<?>) {
+ // DerivedTypedElementEObjectResult<?> eObjectResult = (DerivedTypedElementEObjectResult<?>)
+ // singleResult;
+ // resultElement = eObjectResult.getResult();
+ // } else {
+ // throw new DerivedTypedElementEvaluationException(
+ // "Wrong element type at index " + index + " in the result from the evaluator " + collectionEvaluator.getClass().getName()); //$NON-NLS-1$//$NON-NLS-2$
+ // }
+ // checkResult(query, result, evaluator.getCheckResultType());
+ // index++;
+ // }
+ // } else {
+ // // otherwise, do multiple evaluation by calling the evaluator's
+ // // single evaluation multiple times
+ // List<DerivedTypedElementResult<?>> resultList = new
+ // ArrayList<DerivedTypedElementResult<?>>();
+ // for (EObject eObject : eObjects) {
+ // DerivedTypedElementResult<Object> singleResult =
+ // EFacetFactory.eINSTANCE.createDerivedTypedElementResult();
+ // Throwable error = null;
+ // try {
+ // singleResult.setSource(eObject);
+ // singleResult.setDerivedTypedElement(derivedTypedElement);
+ // setParameterValues(singleResult.getParameterValues(), parameterValues);
+ // checkSourceType(sourceType, query, eObject);
+ // } catch (Throwable e) {
+ // error = e;
+ // }
+ // if (error != null) {
+ // singleResult.setException(error);
+ // } else {
+ // try {
+ // Object evaluationResult = evaluator.getValue(derivedTypedElement, eObject, parameterValues);
+ // checkResult(query, evaluationResult, evaluator.getCheckResultType());
+ // singleResult.setResult(evaluationResult);
+ // } catch (Throwable e) {
+ // singleResult.setException(e);
+ // }
+ // }
+ // resultList.add(singleResult);
+ // }
+ // result = resultList;
+ // }
+ // }
+ //
+ // return result;
+ // }
-// private static void checkSourceType(final EClassifier sourceType, final Query query, final EObject eObject)
-// throws DerivedTypedElementException {
-// if (sourceType != null) {
-// // a null value for eObject matches any type
-// if (eObject != null && !sourceType.isInstance(eObject)) {
-// StringBuffer message = new StringBuffer();
-// message.append("Wrong source type (for " + QueryUtils.getQueryDescription(query) + "): '"); //$NON-NLS-1$ //$NON-NLS-2$
-// message.append(eObject.eClass().getName());
-// message.append("' found; expected '"); //$NON-NLS-1$
-// message.append(sourceType.getName());
-// message.append("'."); //$NON-NLS-1$
-// throw new DerivedTypedElementTypeCheckingException(message.toString());
-// }
-// } else {
-// if (eObject != null) {
-// throw new DerivedTypedElementException("the query's sourceType is null and the source is not null"); //$NON-NLS-1$
-// }
-// }
-// }
-//
-// private static void setParameterValues(final EList<ParameterValue> target, final List<ParameterValue> parameterValues) {
-// if (parameterValues != null) {
-// for (ParameterValue parameterValue : parameterValues) {
-// if (parameterValue == null) {
-// throw new IllegalArgumentException("null parameter value"); //$NON-NLS-1$
-// }
-// // containment link -> we need to copy since we can have the same
-// // parameter for several results
-// target.add(EcoreUtil.copy(parameterValue));
-// }
-// }
-// }
+ // private static void checkSourceType(final EClassifier sourceType, final Query query, final EObject eObject)
+ // throws DerivedTypedElementException {
+ // if (sourceType != null) {
+ // // a null value for eObject matches any type
+ // if (eObject != null && !sourceType.isInstance(eObject)) {
+ // StringBuffer message = new StringBuffer();
+ // message.append("Wrong source type (for " + QueryUtils.getQueryDescription(query) + "): '"); //$NON-NLS-1$ //$NON-NLS-2$
+ // message.append(eObject.eClass().getName());
+ // message.append("' found; expected '"); //$NON-NLS-1$
+ // message.append(sourceType.getName());
+ // message.append("'."); //$NON-NLS-1$
+ // throw new DerivedTypedElementTypeCheckingException(message.toString());
+ // }
+ // } else {
+ // if (eObject != null) {
+ // throw new DerivedTypedElementException("the query's sourceType is null and the source is not null"); //$NON-NLS-1$
+ // }
+ // }
+ // }
+ //
+ // private static void setParameterValues(final EList<ParameterValue> target, final List<ParameterValue> parameterValues) {
+ // if (parameterValues != null) {
+ // for (ParameterValue parameterValue : parameterValues) {
+ // if (parameterValue == null) {
+ // throw new IllegalArgumentException("null parameter value"); //$NON-NLS-1$
+ // }
+ // // containment link -> we need to copy since we can have the same
+ // // parameter for several results
+ // target.add(EcoreUtil.copy(parameterValue));
+ // }
+ // }
+ // }
private static final void checkResult(final Query query, final Object result,
final boolean checkResultType, final boolean primitive) throws DerivedTypedElementTypeCheckingException {
@@ -852,10 +849,10 @@ public class DerivedTypedElementManager implements IDerivedTypedElementManager {
}
return primitiveType;
}
-
+
/**
* Transform the element in parameter in list (if necessary).
- *
+ *
* @param element
* the element to transform
* @return a list.
@@ -864,8 +861,8 @@ public class DerivedTypedElementManager implements IDerivedTypedElementManager {
List<Object> newList = new LinkedList<Object>();
if (element instanceof List) {
@SuppressWarnings("unchecked")
- //@SuppressWarnings("unchecked") the cast is safe because were
- //casting a List to a List<Object>
+ // @SuppressWarnings("unchecked") the cast is safe because were
+ // casting a List to a List<Object>
final List<Object> tmpList = (List<Object>) element;
newList = tmpList;
} else {
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/DerivedTypedElementUtils.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/DerivedTypedElementUtils.java
index bad210129f4..33cd52f0842 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/DerivedTypedElementUtils.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/DerivedTypedElementUtils.java
@@ -30,28 +30,28 @@ import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.FacetOperati
import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.ParameterValue;
public final class DerivedTypedElementUtils {
-
+
private DerivedTypedElementUtils() {
// Must not be used
}
-
+
private static <T> List<ParameterValue> createAndCheckOperationParameterValues(final EOperation operation,
final Object... arguments) throws UnmatchingExpectedTypeException {
final EList<EParameter> operationParameters = operation.getEParameters();
- //Begin precondition checking
+ // Begin precondition checking
if (arguments.length > 0
&& operationParameters.size() != arguments.length) {
throw new IllegalArgumentException("Facet operation '" + operation.getName() + //$NON-NLS-1$
"' expects " + operationParameters.size() + " parameters. Got " + arguments.length); //$NON-NLS-1$ //$NON-NLS-2$
}
- //End precondition checking
+ // End precondition checking
final List<ParameterValue> parameterValues = new ArrayList<ParameterValue>();
for (int i = 0; i < arguments.length; i++) {
final Object argument = arguments[i];
final EParameter eParameter = operationParameters.get(i);
- //Begin precondition checking
+ // Begin precondition checking
EmfUtils.checkAssignment(argument, eParameter);
- //End precondition checking
+ // End precondition checking
final ParameterValue parameterValue = EFacetFactory.eINSTANCE.createParameterValue();
parameterValue.setParameter(eParameter);
parameterValue.setValue(argument);
@@ -59,7 +59,7 @@ public final class DerivedTypedElementUtils {
}
return parameterValues;
}
-
+
public static Object evaluate(final EObject eObject, final EOperation operation, final IFacetManager facetManager, final Object... arguments) throws UnmatchingExpectedTypeException,
DerivedTypedElementException {
Object result;
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/EFacetManager.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/EFacetManager.java
index eeb02efa7e9..4b8a1fae0dd 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/EFacetManager.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/EFacetManager.java
@@ -93,10 +93,10 @@ public final class EFacetManager implements IEFacetManager {
/**
* Evaluate the query on a set of models and model elements described by the context parameter.
- *
+ *
* The query is evaluated on each contextually referred model element and on each element of a
* contextually referred model.
- *
+ *
* @param queryContext
* The query evaluation context described by a QueryContext instance.
* @param parameterValues
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/EmfUtils.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/EmfUtils.java
index 4d65d483722..21936ec5d5c 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/EmfUtils.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/EmfUtils.java
@@ -28,19 +28,19 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.papyrus.emf.facet.efacet.core.internal.exception.UnmatchingExpectedTypeException;
public final class EmfUtils {
-
+
private EmfUtils() {
- //Must not be used
+ // Must not be used
}
public static void checkAssignment(final Object value, final ETypedElement eTypedElement)
throws UnmatchingExpectedTypeException {
final String typedElementName = getTypeElementDescription(eTypedElement);
- //Begin checking precondition
+ // Begin checking precondition
if (eTypedElement.getEType() == null) {
throw new IllegalArgumentException(typedElementName + " has a null type"); //$NON-NLS-1$
}
- //End checking precondition
+ // End checking precondition
if (value == null && (eTypedElement.getLowerBound() > 0)) {
throw new IllegalArgumentException(
"The assigned value cannot be null for " + typedElementName + " because multiplicity is " + eTypedElement.getLowerBound() + ".." + eTypedElement.getUpperBound()); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
@@ -59,12 +59,12 @@ public final class EmfUtils {
final List<?> argumentList = (List<?>) value;
try {
CastUtils.checkTypeOfAllListElements(argumentList, eTypedElement.getEType().getInstanceClass());
- //FIXME What happens if we use a not generated meta-model ?
+ // FIXME What happens if we use a not generated meta-model ?
} catch (UnmatchingExpectedTypeException e) {
throw new UnmatchingExpectedTypeException(
- "Type mismatch for an element of the list value " + typedElementName , e); //$NON-NLS-1$
+ "Type mismatch for an element of the list value " + typedElementName, e); //$NON-NLS-1$
}
- }
+ }
}
}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetActionImpl.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetActionImpl.java
index edcfa79174b..a1612133b9a 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetActionImpl.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetActionImpl.java
@@ -79,8 +79,7 @@ public class FacetActionImpl implements IFacetAction {
throw new IllegalArgumentException("The given FacetAttribute cannot be null"); //$NON-NLS-1$
}
if (facetAttribute.eResource() != null || facetAttribute.eContainer() != null) {
- throw new IllegalArgumentException(
- "The given FacetAttribute cannot be contained by a resource"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The given FacetAttribute cannot be contained by a resource"); //$NON-NLS-1$
}
if (editingDomain == null) {
throw new IllegalArgumentException("The given EditingDomain cannot be null"); //$NON-NLS-1$
@@ -100,8 +99,7 @@ public class FacetActionImpl implements IFacetAction {
throw new IllegalArgumentException("The given FacetReference cannot be null"); //$NON-NLS-1$
}
if (facetReference.eResource() != null || facetReference.eContainer() != null) {
- throw new IllegalArgumentException(
- "The given FacetReference cannot be contained by a resource"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The given FacetReference cannot be contained by a resource"); //$NON-NLS-1$
}
if (editingDomain == null) {
throw new IllegalArgumentException("The given EditingDomain cannot be null."); //$NON-NLS-1$
@@ -121,8 +119,7 @@ public class FacetActionImpl implements IFacetAction {
throw new IllegalArgumentException("The given FacetOperation cannot be null"); //$NON-NLS-1$
}
if (facetOperation.eResource() != null || facetOperation.eContainer() != null) {
- throw new IllegalArgumentException(
- "The given FacetOperation cannot be contained by a resource"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The given FacetOperation cannot be contained by a resource"); //$NON-NLS-1$
}
if (facet == null) {
throw new IllegalArgumentException("The given Facet cannot be null"); //$NON-NLS-1$
@@ -155,8 +152,7 @@ public class FacetActionImpl implements IFacetAction {
throw new IllegalArgumentException("The given EParameter cannot be null"); //$NON-NLS-1$
}
if (parameter.eResource() != null || parameter.eContainer() != null) {
- throw new IllegalArgumentException(
- "The given EParameter cannot be contained by a resource"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The given EParameter cannot be contained by a resource"); //$NON-NLS-1$
}
if (editingDomain == null) {
throw new IllegalArgumentException("The given EditingDomain cannot be null"); //$NON-NLS-1$
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetActions2Impl.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetActions2Impl.java
index ba62d51185e..deacdd79318 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetActions2Impl.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetActions2Impl.java
@@ -122,8 +122,7 @@ public class FacetActions2Impl implements IFacetActions2 {
throw new IllegalArgumentException("The given FacetAttribute cannot be null"); //$NON-NLS-1$
}
if (facetAttribute.eResource() != null || facetAttribute.eContainer() != null) {
- throw new IllegalArgumentException(
- "The given FacetAttribute cannot be contained by a resource"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The given FacetAttribute cannot be contained by a resource"); //$NON-NLS-1$
}
if (editingDomain == null) {
throw new IllegalArgumentException("The given EditingDomain cannot be null"); //$NON-NLS-1$
@@ -148,8 +147,7 @@ public class FacetActions2Impl implements IFacetActions2 {
throw new IllegalArgumentException("The given FacetReference cannot be null"); //$NON-NLS-1$
}
if (facetReference.eResource() != null || facetReference.eContainer() != null) {
- throw new IllegalArgumentException(
- "The given FacetReference cannot be contained by a resource"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The given FacetReference cannot be contained by a resource"); //$NON-NLS-1$
}
if (editingDomain == null) {
throw new IllegalArgumentException("The given EditingDomain cannot be null."); //$NON-NLS-1$
@@ -174,8 +172,7 @@ public class FacetActions2Impl implements IFacetActions2 {
throw new IllegalArgumentException("The given FacetOperation cannot be null"); //$NON-NLS-1$
}
if (facetOperation.eResource() != null || facetOperation.eContainer() != null) {
- throw new IllegalArgumentException(
- "The given FacetOperation cannot be contained by a resource"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The given FacetOperation cannot be contained by a resource"); //$NON-NLS-1$
}
if (facet == null) {
throw new IllegalArgumentException("The given Facet cannot be null"); //$NON-NLS-1$
@@ -200,8 +197,7 @@ public class FacetActions2Impl implements IFacetActions2 {
throw new IllegalArgumentException("The given EParameter cannot be null"); //$NON-NLS-1$
}
if (parameter.eResource() != null || parameter.eContainer() != null) {
- throw new IllegalArgumentException(
- "The given EParameter cannot be contained by a resource"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The given EParameter cannot be contained by a resource"); //$NON-NLS-1$
}
if (editingDomain == null) {
throw new IllegalArgumentException("The given EditingDomain cannot be null"); //$NON-NLS-1$
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetActionsImpl.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetActionsImpl.java
index 950ad3b648a..5a466d94403 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetActionsImpl.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetActionsImpl.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2012 Mia-Software.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Alban Ménager (Soft-Maint) - Bug 387470 - [EFacet][Custom] Editors
*/
@@ -35,8 +35,7 @@ public class FacetActionsImpl implements IFacetActions {
public void saveFacetSet(final FacetSet facetSet, final IFile file)
throws IOException, InvalidFacetSetException {
if (facetSet == null) {
- throw new IllegalArgumentException(
- "The given FacetSet cannot be null"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The given FacetSet cannot be null"); //$NON-NLS-1$
}
if (file == null) {
throw new IllegalArgumentException("The given IFile cannot be null"); //$NON-NLS-1$
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetCatalogManagerFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetCatalogManagerFactory.java
index fec38521a2a..a6c235b6178 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetCatalogManagerFactory.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetCatalogManagerFactory.java
@@ -1,14 +1,14 @@
/**
* Copyright (c) 2012 Mia-Software.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Gregoire Dupe (Mia-Software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet
- * Gregoire Dupe (Mia-Software) - Bug 373078 - API Cleaning
+ * Gregoire Dupe (Mia-Software) - Bug 373078 - API Cleaning
*/
package org.eclipse.papyrus.emf.facet.efacet.core.internal;
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetCommandFactoryFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetCommandFactoryFactory.java
index 6397c1a49c2..f335cad9c1b 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetCommandFactoryFactory.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetCommandFactoryFactory.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2012 Mia-Software.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Grégoire Dupé (Mia-Software) - Bug 387470 - [EFacet][Custom] Editors
*/
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetCommandFactoryImpl.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetCommandFactoryImpl.java
index bcd0ecdaab7..600ee43372f 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetCommandFactoryImpl.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetCommandFactoryImpl.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2012 Mia-Software.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Alban Ménager (Soft-Maint) - Bug 387470 - [EFacet][Custom] Editors
* Grégoire Dupé (Mia-Software) - Bug 387470 - [EFacet][Custom] Editors
@@ -64,7 +64,7 @@ public class FacetCommandFactoryImpl implements IFacetCommandFactory {
/**
* Create an {@link AddCommand} to add the element to the owner.
- *
+ *
* @param owner
* the owner.
* @param element
@@ -78,8 +78,7 @@ public class FacetCommandFactoryImpl implements IFacetCommandFactory {
}
if (element == null) {
- throw new IllegalArgumentException(
- "The given element cannot be null"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The given element cannot be null"); //$NON-NLS-1$
}
return AddCommand.create(this.editingDomain, owner,
@@ -88,7 +87,7 @@ public class FacetCommandFactoryImpl implements IFacetCommandFactory {
/**
* Create an {@link SetCommand} to add the element to the owner.
- *
+ *
* @param initialObject
* the owner.
* @param newObject
@@ -103,13 +102,11 @@ public class FacetCommandFactoryImpl implements IFacetCommandFactory {
}
if (feature == null) {
- throw new IllegalArgumentException(
- "The given feature cannot be null"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The given feature cannot be null"); //$NON-NLS-1$
}
if (newValue == null) {
- throw new IllegalArgumentException(
- "The given newValue cannot be null"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The given newValue cannot be null"); //$NON-NLS-1$
}
return SetCommand.create(this.editingDomain, initialObject, feature,
@@ -118,7 +115,7 @@ public class FacetCommandFactoryImpl implements IFacetCommandFactory {
/**
* Return the {@link EStructuralFeature} for a given element.
- *
+ *
* @param element
* the element.
* @return the eStructuralFeature for the element.
@@ -157,8 +154,7 @@ public class FacetCommandFactoryImpl implements IFacetCommandFactory {
final boolean change, final boolean derived,
final boolean transientt) {
if (feature == null) {
- throw new IllegalArgumentException(
- "The parameter facetOperation must not be null"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The parameter facetOperation must not be null"); //$NON-NLS-1$
}
final List<Command> commands = new ArrayList<Command>();
if (feature.eContainer() != container) {
@@ -202,8 +198,7 @@ public class FacetCommandFactoryImpl implements IFacetCommandFactory {
}
commands.add(createEditDerivedTypeElementCommand(feature,
name, lowerBound, upperBound, type, ordered, unique, query));
- return EmfCommandUtils.createResult(commands,
- "edit facet structural feature"); //$NON-NLS-1$
+ return EmfCommandUtils.createResult(commands, "edit facet structural feature"); //$NON-NLS-1$
}
public Command createAddOperationInFacetCommand(final Facet parent,
@@ -224,12 +219,10 @@ public class FacetCommandFactoryImpl implements IFacetCommandFactory {
public Command createChangeOwnerCommand(final Object element,
final Object newOwner) {
if (element == null) {
- throw new IllegalArgumentException(
- "The given element cannot be null"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The given element cannot be null"); //$NON-NLS-1$
}
if (newOwner == null) {
- throw new IllegalArgumentException(
- "The given element cannot be null"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The given element cannot be null"); //$NON-NLS-1$
}
return createAddCommand(newOwner, element);
}
@@ -237,8 +230,7 @@ public class FacetCommandFactoryImpl implements IFacetCommandFactory {
public Command createEditFacetSetCommand(final FacetSet editedFacetSet,
final FacetSet container, final String name) {
if (editedFacetSet == null) {
- throw new IllegalArgumentException(
- "The parameter 'editedFacetSet' must not be null"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The parameter 'editedFacetSet' must not be null"); //$NON-NLS-1$
}
final List<Command> commands = new ArrayList<Command>();
commands.add(createEditENamedElementcommand(editedFacetSet, name));
@@ -291,8 +283,7 @@ public class FacetCommandFactoryImpl implements IFacetCommandFactory {
private Command createEditENamedElementcommand(
final ENamedElement namedElement, final String name) {
if (namedElement == null) {
- throw new IllegalArgumentException(
- "The parameter 'editedFacetSet' must not be null"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The parameter 'editedFacetSet' must not be null"); //$NON-NLS-1$
}
final List<Command> commands = new ArrayList<Command>();
if (namedElement.getName() != name) {
@@ -351,8 +342,7 @@ public class FacetCommandFactoryImpl implements IFacetCommandFactory {
final EClassifier type, final boolean ordered,
final boolean unique, final Query query) {
if (facetOperation == null) {
- throw new IllegalArgumentException(
- "The parameter facetOperation must not be null"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The parameter facetOperation must not be null"); //$NON-NLS-1$
}
final List<Command> commands = new ArrayList<Command>();
if (facetOperation.eContainer() != container) {
@@ -372,8 +362,7 @@ public class FacetCommandFactoryImpl implements IFacetCommandFactory {
final int lowerBound, final int upperBound, final EClassifier type,
final boolean ordered, final boolean unique, final Query query) {
if (dte == null) {
- throw new IllegalArgumentException(
- "The parameter facetOperation must not be null"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The parameter facetOperation must not be null"); //$NON-NLS-1$
}
final List<Command> commands = new ArrayList<Command>();
commands.add(createEditETypedElementCommand(dte, name, lowerBound,
@@ -384,8 +373,7 @@ public class FacetCommandFactoryImpl implements IFacetCommandFactory {
query);
commands.add(command);
}
- return EmfCommandUtils.createResult(commands,
- "Edit derived typed element"); //$NON-NLS-1$
+ return EmfCommandUtils.createResult(commands, "Edit derived typed element"); //$NON-NLS-1$
}
private Command createEditETypedElementCommand(
@@ -436,14 +424,12 @@ public class FacetCommandFactoryImpl implements IFacetCommandFactory {
final String name, final int lowerBound, final int upperBound,
final EClassifier type, final boolean ordered, final boolean unique) {
if (parameter == null) {
- throw new IllegalArgumentException(
- "The parameter parameter must not be null"); //$NON-NLS-1$
+ throw new IllegalArgumentException("The parameter parameter must not be null"); //$NON-NLS-1$
}
final List<Command> commands = new ArrayList<Command>();
commands.add(createEditETypedElementCommand(parameter, name,
lowerBound, upperBound, type, ordered, unique));
- return EmfCommandUtils.createResult(commands,
- "Edit operation parameter"); //$NON-NLS-1$
+ return EmfCommandUtils.createResult(commands, "Edit operation parameter"); //$NON-NLS-1$
}
private void setEStructuralFeatureAttributes(
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetManager.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetManager.java
index 60bf7dc7d39..01fcaea72aa 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetManager.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetManager.java
@@ -98,7 +98,7 @@ public class FacetManager implements IFacetManager, Adapter {
/**
* Returns whether the given model element conforms to the given Facet
- *
+ *
* @param eObject
* the model element
* @param facet
@@ -169,12 +169,10 @@ public class FacetManager implements IFacetManager, Adapter {
final ETypedElement typeElement) throws FacetManagerException {
// Begin precondition checking
if (typeElement.isMany()) {
- throw new FacetManagerException(
- "The Facet's conformance typed element must not be multi-valued"); //$NON-NLS-1$
+ throw new FacetManagerException("The Facet's conformance typed element must not be multi-valued"); //$NON-NLS-1$
}
if (typeElement.getEType() != FacetManager.EBOOLEAN && typeElement.getEType() != FacetManager.EBOOLEAN_OBJECT) {
- throw new FacetManagerException(
- "The Facet conformance typed element evaluated to a wrong type."); //$NON-NLS-1$
+ throw new FacetManagerException("The Facet conformance typed element evaluated to a wrong type."); //$NON-NLS-1$
}
// End precondition checking
Boolean result; // conformance typedElement Value
@@ -198,8 +196,7 @@ public class FacetManager implements IFacetManager, Adapter {
throw new FacetManagerException(e);
}
if (result == null) {
- throw new FacetManagerException(
- "The Facet conformance typed element evaluated to null"); //$NON-NLS-1$
+ throw new FacetManagerException("The Facet conformance typed element evaluated to null"); //$NON-NLS-1$
}
return result;
}
@@ -253,11 +250,11 @@ public class FacetManager implements IFacetManager, Adapter {
final Class<T> expectedType, final boolean basicGet)
throws FacetManagerException {
try {
- Object value;
+ Object value;
if (structuralFeature.eContainer() instanceof Facet) {
-
+
EStructuralFeature baseFeature = structuralFeature;
-
+
if (!basicGet) {
baseFeature = this.context.resolveOverrides(structuralFeature, eObject);
final Facet facet = (Facet) baseFeature.eContainer();
@@ -328,7 +325,7 @@ public class FacetManager implements IFacetManager, Adapter {
Object result;
if (operation.eContainer() instanceof Facet) {
final Facet facet = (Facet) operation.eContainer();
-
+
if (!basicInvoke) {
checkConformance(eObject, facet);
}
@@ -389,12 +386,12 @@ public class FacetManager implements IFacetManager, Adapter {
throws FacetManagerException {
return getEStructuralFeatures(eObject, EAttribute.class);
}
-
+
public Set<EStructuralFeature> getStructuralFeature(final EObject eObject)
throws FacetManagerException {
return getEStructuralFeatures(eObject, EStructuralFeature.class);
}
-
+
public <T extends ETypedElement> Set<T> getEStructuralFeatures(
final EObject eObject, final Class<T> classs)
throws FacetManagerException {
@@ -404,7 +401,7 @@ public class FacetManager implements IFacetManager, Adapter {
}
return result;
}
-
+
private <T extends ETypedElement> Collection<T> getETypedElements(
final EObject eObject, final FacetSet facetSet,
final Class<T> classs) throws FacetManagerException {
@@ -458,7 +455,7 @@ public class FacetManager implements IFacetManager, Adapter {
throws FacetManagerException {
return getEStructuralFeatures(eObject, EStructuralFeature.class);
}
-
+
@Deprecated
public void addFacets(final EList<Facet> facets) {
for (Facet facetToLoad : facets) {
@@ -489,7 +486,7 @@ public class FacetManager implements IFacetManager, Adapter {
}
return result;
}
-
+
public <T> T getOrInvoke(final EObject eObject,
final ETypedElement eTypedElement, final Class<T> classs)
throws FacetManagerException {
@@ -561,7 +558,7 @@ public class FacetManager implements IFacetManager, Adapter {
public void addBackManagedFacetSet(final FacetSet facetSet) {
this.context.addBackManagedFacetSet(facetSet);
}
-
+
public void addFrontManagedFacetSet(final FacetSet facetSet) {
this.context.addFrontManagedFacetSet(facetSet);
}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetManagerContext.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetManagerContext.java
index 4f347d8cbfb..6eab828d34c 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetManagerContext.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/FacetManagerContext.java
@@ -53,12 +53,12 @@ import org.eclipse.papyrus.emf.facet.util.emf.core.ModelUtils;
/**
* @author oremaud
- *
+ *
* FacetManager Context
- *
+ *
* Defines which FacetSets will be taken into account, and in which
* order ('front' FacetSets have higher precedence)
- *
+ *
* Responsible of overrides resolution for Facets and Customs
*/
class FacetManagerContext implements List<FacetSet> {
@@ -75,7 +75,7 @@ class FacetManagerContext implements List<FacetSet> {
* This field is used to avoid to have to many error messages in the log.
*/
private final Set<ETypedElement> failingFeatures = new HashSet<ETypedElement>();
-
+
private final Set<IFacetManagerListener> listeners = new HashSet<IFacetManagerListener>();
public FacetManagerContext(final FacetManager manager) {
@@ -83,13 +83,13 @@ class FacetManagerContext implements List<FacetSet> {
}
/**
- *
+ *
* @param baseFeature
* @param eObject
* @return
* @throws FacetConformanceEvaluationException
* @throws UnmatchingExpectedTypeException
- * @throws FacetManagerException
+ * @throws FacetManagerException
*/
public <T extends ETypedElement> T resolveOverrides(final T baseFeature,
final EObject eObject) throws FacetManagerException {
@@ -112,12 +112,12 @@ class FacetManagerContext implements List<FacetSet> {
}
/**
- *
+ *
* @param baseFeature
* @param eObject
* @return
* @throws FacetConformanceEvaluationException
- * @throws FacetManagerException
+ * @throws FacetManagerException
*/
public <T extends DerivedTypedElement> T resolveOverrides(
final T baseFeature, final EObject eObject)
@@ -180,7 +180,7 @@ class FacetManagerContext implements List<FacetSet> {
* is the feature that : - is the most specific (in terms of Facet
* inheritance) : the lowest in the inheritance tree (per branch) - is
* encountered first. The order is given by the FacetManager context.
- *
+ *
* @param candidates
* The list of candidates features. Can be empty.
* @return
@@ -206,11 +206,11 @@ class FacetManagerContext implements List<FacetSet> {
/**
* Find matching candidates.
- *
+ *
* @param eObject
* @param baseFeature
* @return A list of candidates, in the right order for conflict resolution
- * @throws FacetManagerException
+ * @throws FacetManagerException
*/
private <T extends DerivedTypedElement> List<T> getOverrideCandidateFeatures(
final EObject eObject, final T baseFeature)
@@ -223,7 +223,7 @@ class FacetManagerContext implements List<FacetSet> {
final List<FacetSet> allFacetSets = new ArrayList<FacetSet>(managedFSets);
// add aggregated FacetSets
for (FacetSet facetSet : managedFSets) {
- //FIXME Should handle recursive containment.
+ // FIXME Should handle recursive containment.
for (FacetSet subFacetSet : facetSet.getFacetSets()) {
final FacetSet resolvedFacetSet = IResolverManager.DEFAULT
.resolve(subFacetSet, FacetSet.class);
@@ -233,15 +233,13 @@ class FacetManagerContext implements List<FacetSet> {
for (FacetSet facetSet : allFacetSets) {
final Resource resource = facetSet.eResource();
if (resource == null) {
- final String message = String.format(
- "The facetSet %s (%s) is not stored in a resource.", //$NON-NLS-1$
+ final String message = String.format("The facetSet %s (%s) is not stored in a resource.", //$NON-NLS-1$
facetSet.getName(), facetSet.getNsURI());
Logger.logWarning(message, Activator.getDefault());
} else {
final ResourceSet facetSetRS = resource.getResourceSet();
if (!facetSetRS.equals(baserFeatureRS)) {
- Logger.logWarning(
- "The facet manager is dealing with more than one resource set.", //$NON-NLS-1$
+ Logger.logWarning("The facet manager is dealing with more than one resource set.", //$NON-NLS-1$
Activator.getDefault());
}
}
@@ -273,7 +271,7 @@ class FacetManagerContext implements List<FacetSet> {
/**
* Test whether a feature is overridden by another (directly or not)
- *
+ *
* @param targetParent
* @param child
* @return true if child is directly or indirectly overridden by parent,
@@ -300,13 +298,13 @@ class FacetManagerContext implements List<FacetSet> {
/**
* Find DerivedTypedElement features that matches the 'signature'
- *
+ *
* @param eObject
* EObject used to test conformance
* @param facet
* @param signatureFeature
* reference feature that serves as 'signature'
- * @throws FacetManagerException
+ * @throws FacetManagerException
*/
private <T extends DerivedTypedElement> T getMatchingFeature(
final EObject eObject, final Facet facet, final T signatureFeature)
@@ -372,10 +370,9 @@ class FacetManagerContext implements List<FacetSet> {
final Resource topResource = topFeature.eResource();
final Resource signatureResource = signatureFeature.eResource();
if (topResource == null || signatureResource == null || topFeature.eResource().getResourceSet() != signatureFeature.eResource().getResourceSet()) {
- Logger.logWarning(
- "topOverrideFeature.eResource().getResourceSet() != signatureFeature.eResource().getResourceSet()", //$NON-NLS-1$
+ Logger.logWarning("topOverrideFeature.eResource().getResourceSet() != signatureFeature.eResource().getResourceSet()", //$NON-NLS-1$
Activator.getDefault());
- }
+ }
}
}
return result;
@@ -545,7 +542,7 @@ class FacetManagerContext implements List<FacetSet> {
public void removeListener(final IFacetManagerListener listener) {
this.listeners.remove(listener);
}
-
+
private void notifyListeners() {
for (IFacetManagerListener listener : this.listeners) {
listener.facetManagerChanged();
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/ResolverManager.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/ResolverManager.java
index 043d72c8b06..092e48efa7a 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/ResolverManager.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/ResolverManager.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Gregoire Dupe (Mia-Software) - Bug 375087 - [Table] ITableWidget.addColumn(List<ETypedElement>, List<FacetSet>)
* Gregoire Dupe (Mia-Software) - Bug 372626 - Aggregates
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/catalog/EFacetCatalogManager.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/catalog/EFacetCatalogManager.java
index 32a319302ee..6faf2fb1239 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/catalog/EFacetCatalogManager.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/catalog/EFacetCatalogManager.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2011 Mia-Software.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Gregoire Dupe (Mia-Software) - Bug 333553 - The user has not to deal with two files to create a facet
* Nicolas Guyomar (Mia-Software) - Bug 333553 - The user has not to deal with two files to create a facet
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/DerivedTypedElementTypeCheckingException.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/DerivedTypedElementTypeCheckingException.java
index b839275866c..610caa6cb28 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/DerivedTypedElementTypeCheckingException.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/DerivedTypedElementTypeCheckingException.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Gregoire Dupe (Mia-Software) - initial API and implementation
* Nicolas Bros (Mia-Software) - Bug 362191 - [Restructuring] Query mechanism for eFacet2
@@ -16,7 +16,7 @@ import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementEx
/**
* This exception occurs when the type of the result of evaluating a derived typed element is not
* the one that was expected
- *
+ *
* @since 0.2
*/
public class DerivedTypedElementTypeCheckingException extends DerivedTypedElementException {
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonApplicableFacetException.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonApplicableFacetException.java
index 1e3ede63a5e..7eb5ef35b20 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonApplicableFacetException.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonApplicableFacetException.java
@@ -13,6 +13,7 @@ package org.eclipse.papyrus.emf.facet.efacet.core.internal.exception;
/**
* This exception is raised when an object cannot be extended by a facet because the class of the object does not correspond
* to the extended metaclass of the facet.
+ *
* @since 0.2
*/
public class NonApplicableFacetException extends Exception {
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonConformingEObjectException.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonConformingEObjectException.java
index b4d91b3c36f..691604809ba 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonConformingEObjectException.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/NonConformingEObjectException.java
@@ -11,11 +11,12 @@
package org.eclipse.papyrus.emf.facet.efacet.core.internal.exception;
/**
- * This exception is raised when an object cannot be extended by a facet because it is filtered by the conformance query
+ * This exception is raised when an object cannot be extended by a facet because it is filtered by the conformance query
* of this facet.
+ *
* @since 0.2
*/
public class NonConformingEObjectException extends Exception {
-
+
private static final long serialVersionUID = -7778081627619345385L;
}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/SaveStructuralFeatureInstanceModelException.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/SaveStructuralFeatureInstanceModelException.java
index 90c952ffd59..42ebebd1a45 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/SaveStructuralFeatureInstanceModelException.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exception/SaveStructuralFeatureInstanceModelException.java
@@ -1,40 +1,41 @@
/**
* Copyright (c) 2011 Mia-Software.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
- * Emmanuelle Rouillé (Mia-Software) - Bug 352618 - To be able to use non derived facet structural features and save them values.
+ * Emmanuelle Rouillé (Mia-Software) - Bug 352618 - To be able to use non derived facet structural features and save them values.
*/
package org.eclipse.papyrus.emf.facet.efacet.core.internal.exception;
import org.eclipse.papyrus.emf.facet.efacet.core.exception.FacetManagerException;
/**
- * This exception is raised when an IOException is caught when trying to save a structural feature instance model
+ * This exception is raised when an IOException is caught when trying to save a structural feature instance model
+ *
* @since 0.2
*/
public class SaveStructuralFeatureInstanceModelException extends
FacetManagerException {
-
+
private static final long serialVersionUID = 7024009106572531846L;
- /**
- * Creates a new instance of UnmatchingExpectedTypeException
- * with {@link Throwable} the exception at the origin of this exception
- */
- public SaveStructuralFeatureInstanceModelException(final Throwable cause) {
- super(cause);
- }
-
- /**
- * Creates a new instance of UnmatchingExpectedTypeException
- * with {@link Throwable} the exception at the origin of this exception
- */
- public SaveStructuralFeatureInstanceModelException(final String message) {
- super(message);
- }
+ /**
+ * Creates a new instance of UnmatchingExpectedTypeException
+ * with {@link Throwable} the exception at the origin of this exception
+ */
+ public SaveStructuralFeatureInstanceModelException(final Throwable cause) {
+ super(cause);
+ }
+
+ /**
+ * Creates a new instance of UnmatchingExpectedTypeException
+ * with {@link Throwable} the exception at the origin of this exception
+ */
+ public SaveStructuralFeatureInstanceModelException(final String message) {
+ super(message);
+ }
}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exported/IResolver.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exported/IResolver.java
index db0a254c4e8..601a96b7b89 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exported/IResolver.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exported/IResolver.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Gregoire Dupe (Mia-Software) - Bug 375087 - [Table] ITableWidget.addColumn(List<ETypedElement>, List<FacetSet>)
* Gregoire Dupe (Mia-Software) - Bug 372626 - Aggregates
@@ -22,7 +22,7 @@ public interface IResolver {
/**
* Return true is the parameter object can be handle by the implementation
* of this interface.
- *
+ *
* @param object
* @return
*/
@@ -31,7 +31,7 @@ public interface IResolver {
/**
* If the parameter 'object' is a proxy, this method returns the
* corresponding a resolved object.
- *
+ *
* @param object
* a proxy
* @param aClass
@@ -42,7 +42,7 @@ public interface IResolver {
/**
* This method returns the objects that have to be automatically selected
* when the parameter 'selectedObject' is selected.
- *
+ *
* @param selectedObject
* @param aClass
* the expected list elements type.
@@ -52,7 +52,7 @@ public interface IResolver {
/**
* This method returns the root of the objects that have to be automatically
* selected when the parameter 'selectedObject' is selected.
- *
+ *
* @param selectedObject
* @param aClass
* the expected list elements type.
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exported/IResolverManager.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exported/IResolverManager.java
index b1403720120..5d67576a5ca 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exported/IResolverManager.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/exported/IResolverManager.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Gregoire Dupe (Mia-Software) - Bug 375087 - [Table] ITableWidget.addColumn(List<ETypedElement>, List<FacetSet>)
* Gregoire Dupe (Mia-Software) - Bug 372626 - Aggregates
@@ -22,7 +22,7 @@ public interface IResolverManager {
<T> T resolve(Object object, Class<T> aClass);
<T> List<T> selectionPropagation(Object selectedObject, Class<T> aClass);
-
+
<T> T selectionRoot(Object selectedObject, Class<T> aClass);
}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/DerivedTypedElementImplementationFactoryRegistry.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/DerivedTypedElementImplementationFactoryRegistry.java
index 7e845740325..3253d53ee1c 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/DerivedTypedElementImplementationFactoryRegistry.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/DerivedTypedElementImplementationFactoryRegistry.java
@@ -75,7 +75,7 @@ public class DerivedTypedElementImplementationFactoryRegistry {
*
* @param query
* the type of query for which an {@link IDerivedTypedElementImplementation} is searched
- * @param derivedTEManager
+ * @param derivedTEManager
* @return the {@link IDerivedTypedElementImplementation}
* @throws DerivedTypedElementException
* if no factory implementation was registered for the type of the given query
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryEvaluatorFactoryRegistry.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryEvaluatorFactoryRegistry.java
index f409eeb1bcd..29ef7f1b926 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryEvaluatorFactoryRegistry.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryEvaluatorFactoryRegistry.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2011 Mia-Software.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Nicolas Guyomar (Mia-Software) - Bug 333553 - The user has not to deal with two files to create a facet
* Nicolas Guyomar (Mia-Software) - Bug 349566 - Need some new query utils method for query creation
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryImplementationFactoryRegistry.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryImplementationFactoryRegistry.java
index 29fb70de1e0..28f96285aa5 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryImplementationFactoryRegistry.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryImplementationFactoryRegistry.java
@@ -51,17 +51,17 @@ public class QueryImplementationFactoryRegistry {
private void initRegisteredEntries() {
final IExtensionRegistry registry = Platform.getExtensionRegistry();
final IExtensionPoint extPoint = registry.getExtensionPoint(QueryImplementationFactoryRegistry.EXT_ID);
- if(extPoint != null) {
- for(final IExtension ext : extPoint.getExtensions()) {
- for(final IConfigurationElement configElt : ext.getConfigurationElements()) {
+ if (extPoint != null) {
+ for (final IExtension ext : extPoint.getExtensions()) {
+ for (final IConfigurationElement configElt : ext.getConfigurationElements()) {
try {
final Object impl = configElt.createExecutableExtension(QueryImplementationFactoryRegistry.CLASS);
- if(impl instanceof IQueryImplementationFactory) {
- final IQueryImplementationFactory factory = (IQueryImplementationFactory)impl;
+ if (impl instanceof IQueryImplementationFactory) {
+ final IQueryImplementationFactory factory = (IQueryImplementationFactory) impl;
this.factories.add(factory);
} else {
Logger.logError("Invalid extension in " + ext.getNamespaceIdentifier() + "." + //$NON-NLS-1$ //$NON-NLS-2$
- ". The factory must be an instance of " + IQueryImplementationFactory.class.getName(), Activator.getDefault()); //$NON-NLS-1$
+ ". The factory must be an instance of " + IQueryImplementationFactory.class.getName(), Activator.getDefault()); //$NON-NLS-1$
}
} catch (final CoreException e) {
Logger.logError(e, Activator.getDefault());
@@ -75,33 +75,33 @@ public class QueryImplementationFactoryRegistry {
* Returns the query evaluator that handles the given type of query
*
* @param query
- * the type of query for which an {@link IQueryImplementation} is searched
+ * the type of query for which an {@link IQueryImplementation} is searched
* @return the {@link IQueryImplementation}
* @throws DerivedTypedElementException
- * if no factory implementation was registered for the type of the given query
+ * if no factory implementation was registered for the type of the given query
*/
public IQueryImplementation getEvaluatorFor(final Query query, final IDerivedTypedElementManager manager) throws DerivedTypedElementException {
- if(query == null) {
+ if (query == null) {
throw new IllegalArgumentException("query cannot be null"); //$NON-NLS-1$
}
- if(!cache.containsKey(query)) {
+ if (!cache.containsKey(query)) {
IQueryImplementation queryImpl = null;
boolean factoryFound = false;
- for(final IQueryImplementationFactory queryImplFactory : this.factories) {
+ for (final IQueryImplementationFactory queryImplFactory : this.factories) {
factoryFound = queryImplFactory.getManagedQueryType() == query.eClass();
- if(factoryFound) {
+ if (factoryFound) {
final Resource queryResource = query.eResource();
Bundle bundle = null;
- if(queryResource != null) {
+ if (queryResource != null) {
bundle = ICatalogSetManagerFactory.DEFAULT.createICatalogSetManager(query.eResource().getResourceSet()).getBundleByResource(queryResource);
}
queryImpl = queryImplFactory.create(query, bundle, manager);
break;
}
}
- if(!factoryFound) {
+ if (!factoryFound) {
final StringBuffer buffer = new StringBuffer();
buffer.append("No factory implementation found for "); //$NON-NLS-1$
buffer.append(QueryUtils.getQueryDescription(query));
@@ -109,8 +109,8 @@ public class QueryImplementationFactoryRegistry {
buffer.append(QueryImplementationFactoryRegistry.EXT_ID);
buffer.append(" extension point."); //$NON-NLS-1$ // NOPMD: cannot merge with extracted constant string
buffer.append("\nAvailable Query types are: "); //$NON-NLS-1$
- for(int i = 0; i < this.factories.size(); i++) {
- if(i > 0) {
+ for (int i = 0; i < this.factories.size(); i++) {
+ if (i > 0) {
buffer.append(", "); //$NON-NLS-1$
}
final IQueryImplementationFactory factory = this.factories.get(i);
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryUtils.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryUtils.java
index 95b5b4ed42a..4a456e9a887 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryUtils.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryUtils.java
@@ -100,11 +100,10 @@ public final class QueryUtils {
container = container.eContainer();
}
if (result == null) {
- throw new IllegalStateException(
- "Query must always be contained by a DerivedTypedElement"); //$NON-NLS-1$
+ throw new IllegalStateException("Query must always be contained by a DerivedTypedElement"); //$NON-NLS-1$
}
return (DerivedTypedElement) container;
-
+
}
// Moved from
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryUtilsImpl.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryUtilsImpl.java
index 7725d3c1054..9906d342b76 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryUtilsImpl.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/query/QueryUtilsImpl.java
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2011 Mia-Software.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Gregoire Dupe (Mia-Software) - Bug 333553 - The user has not to deal with two files to create a facet
* Nicolas Bros (Mia-Software) - Bug 361617 - Deprecation of APIs for the old Facet metamodels
@@ -38,7 +38,7 @@ public class QueryUtilsImpl implements IQueryUtils {
querySetCatalogs.add((QuerySetCatalog) catalog);
}
}
-
+
QuerySet searchedQuerySet = null;
for (QuerySetCatalog querySetCatalog : querySetCatalogs) {
List<QuerySet> querySets = querySetCatalog.getInstalledQuerySets();
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/serialization/ILinkToExtendedEObjectReferenceAdapterFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/serialization/ILinkToExtendedEObjectReferenceAdapterFactory.java
index ce4036edc43..fd8979a4563 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/serialization/ILinkToExtendedEObjectReferenceAdapterFactory.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/serialization/ILinkToExtendedEObjectReferenceAdapterFactory.java
@@ -27,8 +27,7 @@ public interface ILinkToExtendedEObjectReferenceAdapterFactory extends AdapterFa
public static ILinkToExtendedEObjectReferenceAdapterFactory INSTANCE = new LinkToExtendedEObjectReferenceAdapterFactory();
/**
- * This method returns <code>true</code> if this factory is a factory for the given type
- * {@link Object}, or <code>false</code> otherwise
+ * This method returns <code>true</code> if this factory is a factory for the given type {@link Object}, or <code>false</code> otherwise
*/
public boolean isFactoryForType(final Object type);
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/serialization/SerializationManager.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/serialization/SerializationManager.java
index c4f2f23e575..0875b0a50a0 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/serialization/SerializationManager.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/internal/serialization/SerializationManager.java
@@ -73,8 +73,7 @@ public class SerializationManager {
}
/**
- * This method returns the {@link ExtendedEObjectReference} associated with the given
- * {@link EObject} if it exists or <code>null</code> if it does not exist.
+ * This method returns the {@link ExtendedEObjectReference} associated with the given {@link EObject} if it exists or <code>null</code> if it does not exist.
*/
private static ExtendedEObjectReference getExtendedEObjectReference(final EObject eObject) {
ExtendedEObjectReference result = null;
@@ -162,8 +161,7 @@ public class SerializationManager {
result = (SingleValuedReferenceInstance) referenceInstance;
break;
}
- throw new IllegalStateException(
- "a single valued non-containment reference should be associated to an instance of SingleValuedReferenceInstance"); //$NON-NLS-1$
+ throw new IllegalStateException("a single valued non-containment reference should be associated to an instance of SingleValuedReferenceInstance"); //$NON-NLS-1$
}
}
return result;
@@ -180,8 +178,7 @@ public class SerializationManager {
result = (SingleValuedContainmentReferenceInstance) referenceInstance;
break;
}
- throw new IllegalStateException(
- "a single valued containment reference should be associated to an instance of SingleValuedContainmentReferenceInstance"); //$NON-NLS-1$
+ throw new IllegalStateException("a single valued containment reference should be associated to an instance of SingleValuedContainmentReferenceInstance"); //$NON-NLS-1$
}
}
return result;
@@ -197,8 +194,7 @@ public class SerializationManager {
result = (MultiValuedReferenceInstance) referenceInstance;
break;
}
- throw new IllegalStateException(
- "a multi valued non-containment reference should be associated to an instance of MultiValuedReferenceInstance"); //$NON-NLS-1$
+ throw new IllegalStateException("a multi valued non-containment reference should be associated to an instance of MultiValuedReferenceInstance"); //$NON-NLS-1$
}
}
return result;
@@ -214,8 +210,7 @@ public class SerializationManager {
result = (MultiValuedContainmentReferenceInstance) referenceInstance;
break;
}
- throw new IllegalStateException(
- "a multi valued containment reference should be associated to an instance of MultiValuedContainmentReferenceInstance"); //$NON-NLS-1$
+ throw new IllegalStateException("a multi valued containment reference should be associated to an instance of MultiValuedContainmentReferenceInstance"); //$NON-NLS-1$
}
}
return result;
@@ -313,11 +308,10 @@ public class SerializationManager {
public void setReference(final EObject eObject, final EReference reference, final Object newValue) {
final ExtendedEObjectReference extendedEObjectReference = this.getOrCreateExtendedEObjectReference(eObject);
if (reference.isMany()) {
- throw new UnsupportedOperationException(
- "The given FacetReference is multi-valued : add elements to the list returned by getMultiValuedReference() instead"); //$NON-NLS-1$
+ throw new UnsupportedOperationException("The given FacetReference is multi-valued : add elements to the list returned by getMultiValuedReference() instead"); //$NON-NLS-1$
}
if (!(newValue instanceof EObject)) {
- throw new IllegalArgumentException("newValue should be an EObject because eStructuralFeature is an EReference"); //$NON-NLS-1$
+ throw new IllegalArgumentException("newValue should be an EObject because eStructuralFeature is an EReference"); //$NON-NLS-1$
}
final EObject newEObjectValue = (EObject) newValue;
if (reference.isContainment()) {
@@ -339,7 +333,7 @@ public class SerializationManager {
}
}
-
+
/**
* This method creates a ReferenceInstance in the given {@link ExtendedEObjectReference} with
* the reference {@link EStructuralFeature} and the value {@link Object}.
@@ -372,16 +366,16 @@ public class SerializationManager {
SerializationManager.getMultiValuedContainmentReferenceInstance(extendedEObjectReference, eReference);
if (referenceInstance == null) {
referenceInstance = SerializationManager.createMultiValuedContainmentReferenceInstance(eReference, null, extendedEObjectReference);
- result = referenceInstance.getOwnedElements();
+ result = referenceInstance.getOwnedElements();
} else {
- result = referenceInstance.getOwnedElements();
+ result = referenceInstance.getOwnedElements();
}
} else {
MultiValuedReferenceInstance referenceInstance =
SerializationManager.getMultiValuedReferenceInstance(extendedEObjectReference, eReference);
if (referenceInstance == null) {
referenceInstance = SerializationManager.createMultiValuedReferenceInstance(eReference, null, extendedEObjectReference);
- result = referenceInstance.getReferencedElements();
+ result = referenceInstance.getReferencedElements();
} else {
result = referenceInstance.getReferencedElements();
}
@@ -391,7 +385,7 @@ public class SerializationManager {
}
return result;
}
-
+
private static Object getSingleValuedStructuralFeature(final EObject eObject, final EStructuralFeature structuralFeature) {
Object result = null;
final ExtendedEObjectReference extendedEObjectReference = SerializationManager.getExtendedEObjectReference(eObject);
@@ -419,7 +413,7 @@ public class SerializationManager {
}
return result;
}
-
+
public Object getNotDerivedValue(final EObject eObject, final EStructuralFeature structuralFeature) {
Object result;
if (structuralFeature.isMany()) {
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IDerivedTypedElementCollectionImplementation.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IDerivedTypedElementCollectionImplementation.java
index 24883e2847c..36d155537c0 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IDerivedTypedElementCollectionImplementation.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IDerivedTypedElementCollectionImplementation.java
@@ -27,9 +27,7 @@ import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.runtime.ETyp
* This interface can be implemented by EMF Facet derived typed element implementations that want to
* handle multiple evaluation themselves, presumably to improve the performance of the evaluation.
* <p>
- * If only {@link IDerivedTypedElementImplementation} is implemented, then the framework will
- * perform multiple-evaluation by calling the single evaluation multiple times, which may be slow in
- * the case of high-latency implementations.
+ * If only {@link IDerivedTypedElementImplementation} is implemented, then the framework will perform multiple-evaluation by calling the single evaluation multiple times, which may be slow in the case of high-latency implementations.
*
* @since 0.2
* @deprecated replaced by {@link IQueryCollectionImplementation}. https://bugs.eclipse.org/bugs/show_bug.cgi?id=377057.
@@ -41,10 +39,9 @@ public interface IDerivedTypedElementCollectionImplementation extends IDerivedTy
* This method must be implemented by each sub-class to evaluate the query of a derived typed element on a
* collection of elements. The query should be evaluated on each of the elements in the given collection.
* <p>
- * This method should throw a {@link DerivedTypedElementException} only if the {@link DerivedTypedElement} is
- * incorrect. But it must not throw an exception if the evaluation of one element fails. Instead, it must set the
- * exception on the corresponding result ({@link AbstractDerivedTypedElementResult#setException(Throwable)}).
- *
+ * This method should throw a {@link DerivedTypedElementException} only if the {@link DerivedTypedElement} is incorrect. But it must not throw an exception if the evaluation of one element fails. Instead, it must set the exception on the corresponding
+ * result ({@link AbstractDerivedTypedElementResult#setException(Throwable)}).
+ *
* @param derivedTypedElement
* The derived typed element for which to get the values
* @param sources
@@ -53,13 +50,9 @@ public interface IDerivedTypedElementCollectionImplementation extends IDerivedTy
* The parameter values for the derived typed element (in the case of a {@link FacetOperation}); can be <code>null</code>
* @return the result :
* <ul>
- * <li> a list of {@link DerivedTypedElementPrimitiveTypeResult} if the derived typed element is
- * single-valued and returns a primitive type <li> a list of
- * {@link DerivedTypedElementPrimitiveTypeListResult} if the derived typed element is multi-valued and
- * returns a primitive type <li> a list of {@link DerivedTypedElementEObjectResult} if the derived typed
- * element is single-valued and returns a model element <li> a list of
- * {@link DerivedTypedElementEObjectListResult} if the derived typed element is multi-valued and returns
- * model elements
+ * <li> a list of {@link DerivedTypedElementPrimitiveTypeResult} if the derived typed element is single-valued and returns a primitive type <li> a list of {@link DerivedTypedElementPrimitiveTypeListResult} if the derived typed element is
+ * multi-valued and returns a primitive type <li> a list of {@link DerivedTypedElementEObjectResult} if the derived typed element is single-valued and returns a model element <li> a list of {@link DerivedTypedElementEObjectListResult} if the
+ * derived typed element is multi-valued and returns model elements
* </ul>
* @throws DerivedTypedElementException
* if the given derivedTypedElement is incorrect
@@ -70,16 +63,15 @@ public interface IDerivedTypedElementCollectionImplementation extends IDerivedTy
/**
* This method must be implemented by each sub-class to set the values of a collection of elements. The derived
* typed element's query should be used to set the value of each of the elements in the given collection.
- *
+ *
* @param query
* The query to evaluate
* @param source
* The model elements on which the query is evaluated
* @param arguments
- * The parameter values for the derived typed element (in the case of a {@link FacetOperation}); can be
- * <code>null</code>
+ * The parameter values for the derived typed element (in the case of a {@link FacetOperation}); can be <code>null</code>
* @param newValues
- * the new values for the sources; the size of this list must match the size of the list of sources
+ * the new values for the sources; the size of this list must match the size of the list of sources
* @throws DerivedTypedElementException
* if the given derivedTypedElement is incorrect
* @throws DerivedTypedElementEvaluationException
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IDerivedTypedElementImplementation.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IDerivedTypedElementImplementation.java
index 8821678e0ac..da4325697f7 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IDerivedTypedElementImplementation.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IDerivedTypedElementImplementation.java
@@ -26,9 +26,7 @@ import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.ParameterVal
/**
* Interface implemented by all EMF Facet derived typed element evaluators.
* <p>
- * A derived typed element evaluator may choose to implement
- * {@link IDerivedTypedElementCollectionImplementation} instead if it wants to improve the
- * performance of evaluation on collections of elements.
+ * A derived typed element evaluator may choose to implement {@link IDerivedTypedElementCollectionImplementation} instead if it wants to improve the performance of evaluation on collections of elements.
*
* @since 0.2
* @deprecated replaced by {@link IQueryImplementation}. https://bugs.eclipse.org/bugs/show_bug.cgi?id=377058.
@@ -39,7 +37,7 @@ public interface IDerivedTypedElementImplementation {
/**
* This method must be implemented by each sub class to evaluate a derived
* typed element
- *
+ *
* @param derivedTypedElement
* The derived typed element to evaluate
* @param source
@@ -62,7 +60,7 @@ public interface IDerivedTypedElementImplementation {
/**
* This method must be implemented by each sub class to set the value of a
* derived typed element
- *
+ *
* @param derivedTypedElement
* The derived typed element to set
* @param source
@@ -83,8 +81,7 @@ public interface IDerivedTypedElementImplementation {
/**
* Return whether to check the type of the derived typed element result after its evaluation
* <p>
- * Normally, this is <code>true</code>, but the derived typed element evaluator can choose to
- * skip the check, for example if the return type of the query can't be loaded.
+ * Normally, this is <code>true</code>, but the derived typed element evaluator can choose to skip the check, for example if the return type of the query can't be loaded.
*
* @return whether to check the type of the derived typed element result after its evaluation
*/
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryCollectionImplementation.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryCollectionImplementation.java
index e4d56b32976..da7c7003766 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryCollectionImplementation.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryCollectionImplementation.java
@@ -30,9 +30,8 @@ import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.runtime.ETyp
* This interface can be implemented by EMF Facet query implementations that want to handle multiple evaluation
* themselves, presumably to improve the performance of the evaluation.
* <p>
- * If only {@link IQueryImplementation} is implemented, then the framework will perform multiple-evaluation by calling
- * the single evaluation multiple times, which may be slow in the case of high-latency implementations.
- *
+ * If only {@link IQueryImplementation} is implemented, then the framework will perform multiple-evaluation by calling the single evaluation multiple times, which may be slow in the case of high-latency implementations.
+ *
* @since 0.2
*/
public interface IQueryCollectionImplementation extends IQueryImplementation {
@@ -41,10 +40,9 @@ public interface IQueryCollectionImplementation extends IQueryImplementation {
* This method must be implemented by each sub-class to evaluate a query on a collection of elements. The query
* should be evaluated on each of the elements in the given collection.
* <p>
- * This method should throw a {@link DerivedTypedElementException} only if the eTypedElement is an incorrect
- * {@link DerivedTypedElement}. But it must not throw an exception if the evaluation of one element fails. Instead,
- * it must set the exception on the corresponding result ({@link ETypedElementResult#setException(Throwable)}).
- *
+ * This method should throw a {@link DerivedTypedElementException} only if the eTypedElement is an incorrect {@link DerivedTypedElement}. But it must not throw an exception if the evaluation of one element fails. Instead, it must set the exception on the
+ * corresponding result ({@link ETypedElementResult#setException(Throwable)}).
+ *
* @param query
* The query to evaluate
* @param eTypedElement
@@ -52,15 +50,11 @@ public interface IQueryCollectionImplementation extends IQueryImplementation {
* @param sources
* The model elements on which the feature or operation is evaluated using the query
* @param arguments
- * The parameter values for the eTypedElement (in the case of a {@link FacetOperation}); can be
- * <code>null</code>
+ * The parameter values for the eTypedElement (in the case of a {@link FacetOperation}); can be <code>null</code>
* @return the result :
* <ul>
- * <li> a list of {@link ETypedElementPrimitiveTypeResult} if the eTypedElement is single-valued and returns
- * a primitive type <li> a list of {@link ETypedElementPrimitiveTypeListResult} if the eTypedElement is
- * multi-valued and returns a primitive type <li> a list of {@link ETypedElementEObjectResult} if the
- * eTypedElement is single-valued and returns a model element <li> a list of
- * {@link ETypedElementEObjectListResult} if the eTypedElement is multi-valued and returns model elements
+ * <li> a list of {@link ETypedElementPrimitiveTypeResult} if the eTypedElement is single-valued and returns a primitive type <li> a list of {@link ETypedElementPrimitiveTypeListResult} if the eTypedElement is multi-valued and returns a primitive
+ * type <li> a list of {@link ETypedElementEObjectResult} if the eTypedElement is single-valued and returns a model element <li> a list of {@link ETypedElementEObjectListResult} if the eTypedElement is multi-valued and returns model elements
* </ul>
* @throws DerivedTypedElementException
* if the given derivedTypedElement is incorrect
@@ -72,7 +66,7 @@ public interface IQueryCollectionImplementation extends IQueryImplementation {
/**
* This method must be implemented by each sub-class to set the values of a collection of elements. The query should
* be used to set the value of each of the elements in the given collection.
- *
+ *
* @param query
* The query to evaluate
* @param feature
@@ -80,8 +74,7 @@ public interface IQueryCollectionImplementation extends IQueryImplementation {
* @param sources
* The model elements on which the query is evaluated
* @param arguments
- * The parameter values for the derived typed element (in the case of a {@link FacetOperation}); can be
- * <code>null</code>
+ * The parameter values for the derived typed element (in the case of a {@link FacetOperation}); can be <code>null</code>
* @param newValues
* the new values for the sources; the size of this list must match the size of the list of sources
* @throws DerivedTypedElementException
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryEvaluator.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryEvaluator.java
index eac50a9fee8..3824fbb69ff 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryEvaluator.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryEvaluator.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Gregoire Dupe (Mia-Software) - initial API and implementation
* Nicolas Bros (Mia-Software) - Bug 361617 - Deprecation of APIs for the old Facet metamodels
@@ -23,7 +23,7 @@ import org.eclipse.papyrus.emf.facet.efacet.core.exception.QueryExecutionExcepti
/**
* This interface is the EMF Facet QueryEvaluator for query evaluation
- *
+ *
* @deprecated use {@link IQueryImplementation} with the new eFacet2 metamodel (https://bugs.eclipse.org/bugs/show_bug.cgi?id=381227)
*/
@Deprecated
@@ -31,11 +31,11 @@ public interface IQueryEvaluator {
/**
* This method must be implemented by each sub class to evaluate a query
- *
+ *
* @param query
* The query to evaluate
* @param context
- * The model element on which the query is evaluated
+ * The model element on which the query is evaluated
* @param parameterValues
* The query parameter values, can be <code>null</code>
* @return A list of {@link QueryResult}s (one per evaluation)
@@ -46,19 +46,18 @@ public interface IQueryEvaluator {
/**
* Return whether to check the query result after its evaluation
- *
+ *
* @return whether to check the query result after its evaluation
*/
public abstract boolean getCheckResultType();
-
+
/**
* Called when starting the evaluation of a query on one or several context
- * elements (when
- * {@link AbstractQueryEvaluator#evaluate(ModelQueryContext, List)} is
+ * elements (when {@link AbstractQueryEvaluator#evaluate(ModelQueryContext, List)} is
* called).
* <p>
* A subclass will receive in order:<br>
- *
+ *
* <pre>
* startEvaluate()
* basicEvaluate(context1, parameters)
@@ -67,16 +66,16 @@ public interface IQueryEvaluator {
* basicEvaluate(contextn, parameters)
* endEvaluate()
* </pre>
- *
+ *
* </p>
- *
+ *
* When evaluating a query on several context elements, basicEvaluate is
* called repeatedly with each context element. For some implementations
* that make use of a system with which you must establish a connection (e.g.
* a database) for each call, this is costly.
- *
+ *
* The methods startEvaluate and endEvaluate satisfy this requirement
- *
+ *
* @see {@link AbstractQueryEvaluator#endEvaluate()}
*/
public void startEvaluate();
@@ -86,7 +85,7 @@ public interface IQueryEvaluator {
* elements.
* <p>
* A subclass will receive in order:<br>
- *
+ *
* <pre>
* startEvaluate()
* basicEvaluate(context1, parameters)
@@ -95,15 +94,15 @@ public interface IQueryEvaluator {
* basicEvaluate(contextn, parameters)
* endEvaluate()
* </pre>
- *
+ *
* </p>
* When evaluating a query on several context elements, basicEvaluate is
* called repeatedly with each context element. For some implementations
* that make use of a system with which you must establish a connection
* (e.g. a database) for each call, this is costly.
- *
+ *
* The methods startEvaluate and endEvaluate satisfy this requirement
- *
+ *
* @see {@link AbstractQueryEvaluator#startEvaluate()}
*/
public void endEvaluate();
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryEvaluatorFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryEvaluatorFactory.java
index 979445e4e7e..9ff4d494d2d 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryEvaluatorFactory.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryEvaluatorFactory.java
@@ -21,7 +21,7 @@ import org.osgi.framework.Bundle;
/**
* This factory allows the user to create a {@link IQueryEvaluator} conforming to the EMF Facet
* framework.
- *
+ *
* @deprecated use {@link IQueryImplementationFactory} with the new eFacet2 metamodel (https://bugs.eclipse.org/bugs/show_bug.cgi?id=381229)
*/
@Deprecated
@@ -35,7 +35,7 @@ public interface IQueryEvaluatorFactory {
/**
* Return the type of query this evaluator can evaluate.
- *
+ *
* @return the type of query this evaluator can evaluate.
*/
public EClass getManagedQueryType();
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryImplementation.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryImplementation.java
index ffa1245af82..e85eb2eabdc 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryImplementation.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryImplementation.java
@@ -23,16 +23,15 @@ import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.Q
/**
* Interface implemented by all EMF Facet query evaluators.
* <p>
- * A query evaluator may choose to implement {@link IQueryCollectionImplementation} instead if it wants to improve the
- * performance of evaluation on collections of elements.
- *
+ * A query evaluator may choose to implement {@link IQueryCollectionImplementation} instead if it wants to improve the performance of evaluation on collections of elements.
+ *
* @since 0.2
*/
public interface IQueryImplementation {
/**
* This method must be implemented by each sub class to evaluate a query
- *
+ *
* @param query
* The query to evaluate
* @param feature
@@ -40,8 +39,7 @@ public interface IQueryImplementation {
* @param source
* The model element on which the query is evaluated
* @param parameterValues
- * The derived typed element's query parameter values (in the case of a {@link FacetOperation}); can be
- * <code>null</code>
+ * The derived typed element's query parameter values (in the case of a {@link FacetOperation}); can be <code>null</code>
* @return the result, which can be either a single object or a collection of values depending on the multiplicity
* of the given derived typed element
* @throws DerivedTypedElementException
@@ -54,7 +52,7 @@ public interface IQueryImplementation {
/**
* This method must be implemented by each sub class that allows to set the value of a derivedTypedElement using a
* query
- *
+ *
* @param query
* The query that sets the value
* @param feature
@@ -75,9 +73,8 @@ public interface IQueryImplementation {
/**
* Return whether to check the type of the query result after its evaluation
* <p>
- * Normally, this is <code>true</code>, but the query evaluator can choose to skip the check, for example if the
- * return type of the query can't be loaded.
- *
+ * Normally, this is <code>true</code>, but the query evaluator can choose to skip the check, for example if the return type of the query can't be loaded.
+ *
* @return whether to check the type of the query result after its evaluation
*/
boolean isCheckResultType();
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryImplementationFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryImplementationFactory.java
index fe823954360..c7e655c4854 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryImplementationFactory.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core/src/org/eclipse/papyrus/emf/facet/efacet/core/query/IQueryImplementationFactory.java
@@ -19,26 +19,25 @@ import org.osgi.framework.Bundle;
/**
* This factory allows clients to create a {@link IQueryImplementation} for queries corresponding to this type of
* factory.
- *
+ *
* @since 0.2
*/
public interface IQueryImplementationFactory {
/**
* Create a query implementation for the given query.
- *
+ *
* @param query
* the query to create an implementation for
* @param queryBundle
- * the bundle in which the query is defined. May be <code>null</code> if the query is not defined in a
- * {@link Bundle}.
+ * the bundle in which the query is defined. May be <code>null</code> if the query is not defined in a {@link Bundle}.
*/
IQueryImplementation create(Query query, Bundle queryBundle, IDerivedTypedElementManager manager)
throws DerivedTypedElementException;
/**
* Return the type of query handled by this implementation.
- *
+ *
* @return the type of query this implementation handles.
*/
EClass getManagedQueryType();

Back to the top