Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/recipes/plugins/uml')
-rw-r--r--tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/META-INF/MANIFEST.MF30
-rw-r--r--tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/build.properties3
-rw-r--r--tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/plugin.xml3
-rw-r--r--tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/resource/umlModelExplorerRecipe.querySet8
-rw-r--r--tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/src/org/eclipse/papyrus/uml/modelexplorer/recipetest/GetAllDependencies.java27
5 files changed, 57 insertions, 14 deletions
diff --git a/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/META-INF/MANIFEST.MF b/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/META-INF/MANIFEST.MF
index 4e9fd414c23..4c58f34c2cb 100644
--- a/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/META-INF/MANIFEST.MF
+++ b/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/META-INF/MANIFEST.MF
@@ -1,13 +1,17 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.papyrus.uml.modelexplorer.recipetest;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.modelexplorer.recipetest.Activator
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.emf.facet.infra.common.core,
- org.eclipse.emf.facet.infra.query.core
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .,bin
-Bundle-Vendor: %pluginProvider
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.core.runtime,org.eclipse.emf.facet.infra.c
+ ommon.core,org.eclipse.emf.facet.infra.query.core,org.eclipse.papyrus
+ .icons.uml;bundle-version="0.8.0",org.eclipse.uml2.uml;bundle-version
+ ="3.1.100"
+Bundle-Vendor: %pluginProvider
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .,bin
+Bundle-Version: 0.0.1.qualifier
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.uml.modelexplorer.recipetest.Act
+ ivator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.uml.modelexplorer.recipetest;
+ singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/build.properties b/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/build.properties
index e5e07daf5bb..b39511bd23f 100644
--- a/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/build.properties
+++ b/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/build.properties
@@ -4,5 +4,6 @@ bin.includes = META-INF/,\
resource/packageInGreen.uiCustom,\
plugin.xml,\
resource/packageableElementItemLinkNotVisible.uiCustom,\
- resource/packagedElementsItemLinksWithIcon.uiCustom
+ resource/packagedElementsItemLinksWithIcon.uiCustom,\
+ resource/umlModelExplorerRecipe.querySet
source.. = src/
diff --git a/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/plugin.xml b/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/plugin.xml
index 95156aada46..51049711ee9 100644
--- a/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/plugin.xml
+++ b/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/plugin.xml
@@ -11,4 +11,7 @@
<extension point="org.eclipse.emf.facet.infra.browser.custom.core.registration">
<browserCustomization file="resource/packagedElementsItemLinksWithIcon.uiCustom"/>
</extension>
+ <extension point="org.eclipse.emf.facet.infra.query.registration">
+ <modelqueryset file="resource/umlModelExplorerRecipe.querySet"/>
+ </extension>
</plugin>
diff --git a/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/resource/umlModelExplorerRecipe.querySet b/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/resource/umlModelExplorerRecipe.querySet
new file mode 100644
index 00000000000..33acb96acd8
--- /dev/null
+++ b/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/resource/umlModelExplorerRecipe.querySet
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ASCII"?>
+<query:ModelQuerySet xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" name="umlModelExplorerRecipe" description="Set of Request to test request">
+ <associatedMetamodels href="http://www.eclipse.org/uml2/3.0.0/UML#/"/>
+ <queries xsi:type="query:JavaModelQuery" name="getAllDependencies" description="getAllDependencies" upperBound="-1" implementationClassName="org.eclipse.papyrus.uml.modelexplorer.recipetest.GetAllDependencies">
+ <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/3.0.0/UML#//Dependency"/>
+ <scope href="http://www.eclipse.org/uml2/3.0.0/UML#//Package"/>
+ </queries>
+</query:ModelQuerySet>
diff --git a/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/src/org/eclipse/papyrus/uml/modelexplorer/recipetest/GetAllDependencies.java b/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/src/org/eclipse/papyrus/uml/modelexplorer/recipetest/GetAllDependencies.java
new file mode 100644
index 00000000000..8ca52b1f56b
--- /dev/null
+++ b/tests/recipes/plugins/uml/org.eclipse.papyrus.uml.modelexplorer.recipetest/src/org/eclipse/papyrus/uml/modelexplorer/recipetest/GetAllDependencies.java
@@ -0,0 +1,27 @@
+package org.eclipse.papyrus.uml.modelexplorer.recipetest;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
+import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery;
+import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
+
+/** getAllDependencies */
+public class GetAllDependencies implements IJavaModelQuery<Package, Collection<Dependency>> {
+ public Collection<Dependency> evaluate(final Package context, final ParameterValueList parameterValues)
+ throws ModelQueryExecutionException {
+ ArrayList<Dependency> result= new ArrayList<Dependency>();
+ Iterator<PackageableElement> iter= context.getPackagedElements().iterator();
+ while(iter.hasNext()){
+ PackageableElement currentElement= iter.next();
+ if( currentElement instanceof Dependency){
+ result.add((Dependency)currentElement);
+ }
+ }
+ return result;
+ }
+}

Back to the top