Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Wouters2014-04-04 14:09:54 +0000
committerLaurent Wouters2014-04-04 14:09:54 +0000
commit5ab711c2d458cc9fd11df5cd0e35e4befc361bd3 (patch)
tree66c29d3f074466623f951317711997bde563310e
parentfa42748c176220f31a5f71847435e8d327098326 (diff)
downloadorg.eclipse.papyrus-5ab711c2d458cc9fd11df5cd0e35e4befc361bd3.tar.gz
org.eclipse.papyrus-5ab711c2d458cc9fd11df5cd0e35e4befc361bd3.tar.xz
org.eclipse.papyrus-5ab711c2d458cc9fd11df5cd0e35e4befc361bd3.zip
[clean] Retiring org.eclipse.papyrus.infra.queries.corelast/org.eclipse.papyrus.infra.queries.core
Signed-off-by: Laurent Wouters <laurent.wouters@cea.fr>
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/.classpath7
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/.project28
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.core.resources.prefs4
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/META-INF/MANIFEST.MF21
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/about.html28
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/build.properties7
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/plugin.properties16
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecore23
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecorediag173
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/Activator.java69
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterNotfoundException.java70
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterRegistry.java163
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToBooleanConverter.java49
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToIntegerConverter.java48
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToBooleanConverter.java37
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToIntegerConverter.java36
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToStringConverter.java37
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQueryNotFoundException.java40
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQuerySetNotFoundException.java40
-rw-r--r--deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/QueryUtil.java420
21 files changed, 0 insertions, 1324 deletions
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/.classpath b/deprecated/org.eclipse.papyrus.infra.queries.core/.classpath
deleted file mode 100644
index 2d1a4302f04..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/.project b/deprecated/org.eclipse.papyrus.infra.queries.core/.project
deleted file mode 100644
index 35970c3736b..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.infra.queries.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.core.resources.prefs b/deprecated/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index a960e953d11..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Wed Oct 06 13:30:31 CEST 2010
-eclipse.preferences.version=1
-encoding//resources/ToolConfiguration.ecore=UTF-8
-encoding//resources/ToolConfiguration.ecorediag=UTF-8
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.jdt.core.prefs b/deprecated/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 3b447f78043..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Thu Sep 30 07:35:59 CEST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.infra.queries.core/META-INF/MANIFEST.MF
deleted file mode 100644
index d9cee11dc74..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.queries.core,
- org.eclipse.papyrus.infra.queries.core.converter,
- org.eclipse.papyrus.infra.queries.core.modisco
-Require-Bundle: org.eclipse.ui;bundle-version="3.7.0",
- org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
- org.eclipse.core.databinding;bundle-version="1.3.100",
- org.eclipse.papyrus.infra.queries.core.configuration;bundle-version="1.0.0",
- org.eclipse.uml2.uml;bundle-version="4.0.0"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.0.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-Activator: org.eclipse.papyrus.infra.queries.core.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.infra.queries.core;singleton:
- =true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/about.html b/deprecated/org.eclipse.papyrus.infra.queries.core/about.html
deleted file mode 100644
index 82d49bf5f81..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/build.properties b/deprecated/org.eclipse.papyrus.infra.queries.core/build.properties
deleted file mode 100644
index bfc183478ca..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-#Mon Sep 12 09:29:38 CEST 2011
-bin.includes=META-INF/,.,about.html,plugin.properties,resources/
-output..=bin/
-src.includes = about.html
-source..=src/
-bin..=bin/
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/plugin.properties b/deprecated/org.eclipse.papyrus.infra.queries.core/plugin.properties
deleted file mode 100644
index fe4e8ecaa6a..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-#################################################################################
-# Copyright (c) 2010 CEA LIST.
-# 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:
-# Remi Schnekenburger remi.schnekenburger@cea.fr - Initial API and implementation
-##################################################################################
-pluginName=Papyrus Core Queries Plugin (Incubation)
-providerName=Eclipse Modeling Project
-
-
-
-
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecore b/deprecated/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecore
deleted file mode 100644
index 9d21ce6e9db..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecore
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage 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" name="toolconfiguration"
- nsURI="http://toolconfiguration/1.0" nsPrefix="toolconfiguration">
- <eClassifiers xsi:type="ecore:EClass" name="ToolConfigurationSet">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="Name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="configuration" upperBound="-1"
- eType="#//ToolConfiguration" containment="true"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ToolConfiguration">
- <eStructuralFeatures xsi:type="ecore:EReference" name="preValidation" upperBound="-1"
- eType="#//ValidationQuery" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ValidationQuery" abstract="true"/>
- <eClassifiers xsi:type="ecore:EClass" name="ModiscoQuery" eSuperTypes="#//ValidationQuery">
- <eStructuralFeatures xsi:type="ecore:EReference" name="query" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.emf.facet.infra.query/model/query.ecore#//ModelQuery"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="parameterValue" upperBound="-1"
- eType="ecore:EClass platform:/plugin/org.eclipse.emf.facet.infra.query/model/query.ecore#//runtime/ModelQueryParameterValue"
- containment="true"/>
- </eClassifiers>
-</ecore:EPackage>
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecorediag b/deprecated/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecorediag
deleted file mode 100644
index 88be98ad0bd..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecorediag
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram 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:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_ILDrgNE9Ed-U3ZF7RVMhSQ" type="EcoreTools" name="ToolConfiguration" measurementUnit="Pixel">
- <children xmi:type="notation:Node" xmi:id="_J0aO8NE9Ed-U3ZF7RVMhSQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_J0aO89E9Ed-U3ZF7RVMhSQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_J0aO9NE9Ed-U3ZF7RVMhSQ" type="5001">
- <children xmi:type="notation:Node" xmi:id="_LfssENE9Ed-U3ZF7RVMhSQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="ToolConfiguration.ecore#//ToolConfigurationSet/Name"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_LfssEdE9Ed-U3ZF7RVMhSQ"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_J0aO9dE9Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_J0aO9tE9Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_J0aO99E9Ed-U3ZF7RVMhSQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_J0aO-NE9Ed-U3ZF7RVMhSQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_J0aO-dE9Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_J0aO-tE9Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_J0aO-9E9Ed-U3ZF7RVMhSQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_J0aO8dE9Ed-U3ZF7RVMhSQ" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="ToolConfiguration.ecore#//ToolConfigurationSet"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_J0aO8tE9Ed-U3ZF7RVMhSQ" x="25" y="75"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_PyUX0NE9Ed-U3ZF7RVMhSQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_PyeI0NE9Ed-U3ZF7RVMhSQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_PyeI0dE9Ed-U3ZF7RVMhSQ" type="5001">
- <children xmi:type="notation:Node" xmi:id="_Un8NgNE-Ed-U3ZF7RVMhSQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="ToolConfiguration.ecore#//ToolConfiguration/name"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_Un8NgdE-Ed-U3ZF7RVMhSQ"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_PyeI0tE9Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_PyeI09E9Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_PyeI1NE9Ed-U3ZF7RVMhSQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_PyeI1dE9Ed-U3ZF7RVMhSQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_PyeI1tE9Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_PyeI19E9Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_PyeI2NE9Ed-U3ZF7RVMhSQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_PyUX0dE9Ed-U3ZF7RVMhSQ" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="ToolConfiguration.ecore#//ToolConfiguration"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PyUX0tE9Ed-U3ZF7RVMhSQ" x="230" y="75"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_ZWv7cNE9Ed-U3ZF7RVMhSQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_ZWv7c9E9Ed-U3ZF7RVMhSQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_ZWv7dNE9Ed-U3ZF7RVMhSQ" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_ZWv7ddE9Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_ZWv7dtE9Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_ZWv7d9E9Ed-U3ZF7RVMhSQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_ZWv7eNE9Ed-U3ZF7RVMhSQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_ZWv7edE9Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_ZWv7etE9Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_ZWv7e9E9Ed-U3ZF7RVMhSQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_ZWv7cdE9Ed-U3ZF7RVMhSQ" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="ToolConfiguration.ecore#//ValidationQuery"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ZWv7ctE9Ed-U3ZF7RVMhSQ" x="450" y="80"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_olbFENE9Ed-U3ZF7RVMhSQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_olbFE9E9Ed-U3ZF7RVMhSQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_olbFFNE9Ed-U3ZF7RVMhSQ" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_olbFFdE9Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_olbFFtE9Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_olbFF9E9Ed-U3ZF7RVMhSQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_olbFGNE9Ed-U3ZF7RVMhSQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_olbFGdE9Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_olbFGtE9Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_olbFG9E9Ed-U3ZF7RVMhSQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_olbFEdE9Ed-U3ZF7RVMhSQ" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="ToolConfiguration.ecore#//ModiscoQuery"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_olbFEtE9Ed-U3ZF7RVMhSQ" x="420" y="190" width="128" height="103"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_Ie270NE-Ed-U3ZF7RVMhSQ" type="1001">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_IfvsoNE-Ed-U3ZF7RVMhSQ" source="Shortcut">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_IfvsodE-Ed-U3ZF7RVMhSQ" key="modelID" value="EcoreTools"/>
- </eAnnotations>
- <children xmi:type="notation:Node" xmi:id="_IfAFwNE-Ed-U3ZF7RVMhSQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_IfAFwdE-Ed-U3ZF7RVMhSQ" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_IfAFwtE-Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_IfAFw9E-Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_IfAFxNE-Ed-U3ZF7RVMhSQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_IfAFxdE-Ed-U3ZF7RVMhSQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_IfAFxtE-Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_IfAFx9E-Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_IfAFyNE-Ed-U3ZF7RVMhSQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_Ie270dE-Ed-U3ZF7RVMhSQ" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="platform:/plugin/org.eclipse.emf.facet.infra.query/model/query.ecore#//ModelQuery"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Ie270tE-Ed-U3ZF7RVMhSQ" x="30" y="185"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_N9LlsNE-Ed-U3ZF7RVMhSQ" type="1001">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N9xbkNE-Ed-U3ZF7RVMhSQ" source="Shortcut">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_N9xbkdE-Ed-U3ZF7RVMhSQ" key="modelID" value="EcoreTools"/>
- </eAnnotations>
- <children xmi:type="notation:Node" xmi:id="_N9UvoNE-Ed-U3ZF7RVMhSQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_N9UvodE-Ed-U3ZF7RVMhSQ" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_N9UvotE-Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_N9Uvo9E-Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_N9UvpNE-Ed-U3ZF7RVMhSQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_N9UvpdE-Ed-U3ZF7RVMhSQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_N9UvptE-Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_N9Uvp9E-Ed-U3ZF7RVMhSQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_N9UvqNE-Ed-U3ZF7RVMhSQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_N9LlsdE-Ed-U3ZF7RVMhSQ" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="platform:/plugin/org.eclipse.emf.facet.infra.query/model/query.ecore#//runtime/ModelQueryParameterValue"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N9LlstE-Ed-U3ZF7RVMhSQ" x="234" y="435"/>
- </children>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_ILDrgdE9Ed-U3ZF7RVMhSQ"/>
- <element xmi:type="ecore:EPackage" href="ToolConfiguration.ecore#/"/>
- <edges xmi:type="notation:Edge" xmi:id="_R-ZN0NE9Ed-U3ZF7RVMhSQ" type="3002" source="_J0aO8NE9Ed-U3ZF7RVMhSQ" target="_PyUX0NE9Ed-U3ZF7RVMhSQ">
- <children xmi:type="notation:Node" xmi:id="_R-ZN1NE9Ed-U3ZF7RVMhSQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_R-ZN1dE9Ed-U3ZF7RVMhSQ" x="-9" y="-20"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_R-ZN1tE9Ed-U3ZF7RVMhSQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_R-ZN19E9Ed-U3ZF7RVMhSQ" x="10" y="10"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_R-ZN0dE9Ed-U3ZF7RVMhSQ" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_R-ZN0tE9Ed-U3ZF7RVMhSQ" fontColor="4210752" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="ToolConfiguration.ecore#//ToolConfigurationSet/configuration"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_R-ZN09E9Ed-U3ZF7RVMhSQ" points="[32, 2, -186, -17]$[138, -16, -80, -35]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_R_uqkNE9Ed-U3ZF7RVMhSQ" id="(0.8614718614718615,0.5311203319502075)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_aluQANE9Ed-U3ZF7RVMhSQ" type="3002" source="_PyUX0NE9Ed-U3ZF7RVMhSQ" target="_ZWv7cNE9Ed-U3ZF7RVMhSQ">
- <children xmi:type="notation:Node" xmi:id="_aluQBNE9Ed-U3ZF7RVMhSQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_aluQBdE9Ed-U3ZF7RVMhSQ" x="-22" y="-8"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_aluQBtE9Ed-U3ZF7RVMhSQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_aluQB9E9Ed-U3ZF7RVMhSQ" x="10" y="10"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_aluQAdE9Ed-U3ZF7RVMhSQ" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_aluQAtE9Ed-U3ZF7RVMhSQ" fontColor="4210752" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="ToolConfiguration.ecore#//ToolConfiguration/preValidation"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_aluQA9E9Ed-U3ZF7RVMhSQ" points="[20, 20, -64, -62]$[85, 66, 1, -16]"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_al4BANE9Ed-U3ZF7RVMhSQ" id="(0.03571428571428571,0.40476190476190477)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_pp0hUNE9Ed-U3ZF7RVMhSQ" type="3003" source="_olbFENE9Ed-U3ZF7RVMhSQ" target="_ZWv7cNE9Ed-U3ZF7RVMhSQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_pp0hUdE9Ed-U3ZF7RVMhSQ" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_pp0hUtE9Ed-U3ZF7RVMhSQ"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_pp0hU9E9Ed-U3ZF7RVMhSQ" points="[1, -7, -6, 74]$[9, -61, 2, 20]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pp9rQNE9Ed-U3ZF7RVMhSQ" id="(0.6568627450980392,0.19047619047619047)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_IfcxsNE-Ed-U3ZF7RVMhSQ" type="3002" source="_olbFENE9Ed-U3ZF7RVMhSQ" target="_Ie270NE-Ed-U3ZF7RVMhSQ">
- <children xmi:type="notation:Node" xmi:id="_IfcxtNE-Ed-U3ZF7RVMhSQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_IfcxtdE-Ed-U3ZF7RVMhSQ" x="-10" y="-10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_IfcxttE-Ed-U3ZF7RVMhSQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_Ifcxt9E-Ed-U3ZF7RVMhSQ" x="10" y="10"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_IfcxsdE-Ed-U3ZF7RVMhSQ" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_IfcxstE-Ed-U3ZF7RVMhSQ" fontColor="4210752" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="ToolConfiguration.ecore#//ModiscoQuery/query"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Ifcxs9E-Ed-U3ZF7RVMhSQ" points="[-63, -33, 366, 188]$[-428, -221, 1, 0]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_O6HvENE-Ed-U3ZF7RVMhSQ" type="3002" source="_olbFENE9Ed-U3ZF7RVMhSQ" target="_N9LlsNE-Ed-U3ZF7RVMhSQ">
- <children xmi:type="notation:Node" xmi:id="_O6HvFNE-Ed-U3ZF7RVMhSQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_O6HvFdE-Ed-U3ZF7RVMhSQ" x="-12" y="-32"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_O6HvFtE-Ed-U3ZF7RVMhSQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_O6HvF9E-Ed-U3ZF7RVMhSQ" x="10" y="10"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_O6HvEdE-Ed-U3ZF7RVMhSQ" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_O6HvEtE-Ed-U3ZF7RVMhSQ" fontColor="4210752" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="ToolConfiguration.ecore#//ModiscoQuery/parameterValue"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_O6HvE9E-Ed-U3ZF7RVMhSQ" points="[-10, 20, 95, -195]$[-102, 184, 3, -31]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_O6HvGNE-Ed-U3ZF7RVMhSQ" id="(0.5,0.8058252427184466)"/>
- </edges>
-</notation:Diagram>
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/Activator.java b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/Activator.java
deleted file mode 100644
index 33bc5c2b73d..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/Activator.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- * 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.queries.core;
-
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- /** The plug-in ID */
- public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.queries.core"; //$NON-NLS-1$
-
- /** The shared instance */
- private static Activator plugin;
-
- /** Logging helper */
- public static LogHelper log;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
-
- // register the login helper
- log = new LogHelper(plugin);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- log = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterNotfoundException.java b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterNotfoundException.java
deleted file mode 100644
index ce3c5be4356..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterNotfoundException.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- * 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.queries.core.converter;
-
-import org.eclipse.uml2.uml.ValueSpecification;
-
-
-/**
- * Exception thrown when no converter was found
- */
-public class ConverterNotfoundException extends Exception {
-
- /** serialization id */
- private static final long serialVersionUID = -8863603362830475612L;
-
- /** target parameter type */
- private final Class<?> parameterType;
-
- /** source value instance */
- private final ValueSpecification valueInstance;
-
- /**
- * Creates a new {@link ConverterNotfoundException}.
- *
- * @param parameterType
- * the target type of the value
- * @param valueInstance
- * the value specification defining the entering value and type
- */
- public ConverterNotfoundException(Class<?> parameterType, ValueSpecification valueInstance) {
- this.parameterType = parameterType;
- this.valueInstance = valueInstance;
- }
-
- /**
- * Returns the target parameter type
- *
- * @return the target parameter type
- */
- public Class<?> getParameterType() {
- return parameterType;
- }
-
- /**
- * Returns the value specification defining the entering value and type
- *
- * @return the value specification defining the entering value and type
- */
- public ValueSpecification getValueInstance() {
- return valueInstance;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getMessage() {
- return "Converter not found for target type: " + getParameterType() + " and for initial value: " + getValueInstance();
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterRegistry.java b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterRegistry.java
deleted file mode 100644
index fed4d51e1e6..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterRegistry.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- * 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.queries.core.converter;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.databinding.conversion.IConverter;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.infra.queries.core.Activator;
-import org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue;
-import org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue;
-import org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration;
-import org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue;
-import org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration;
-import org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue;
-import org.eclipse.papyrus.infra.queries.core.configuration.util.ConfigurationSwitch;
-import org.eclipse.papyrus.infra.queries.core.modisco.QueryUtil;
-import org.eclipse.uml2.uml.ValueSpecification;
-
-/**
- * Registry to store converters.
- */
-public class ConverterRegistry {
-
- /** singleton instance */
- private static ConverterRegistry instance;
-
- /** map to store converters, identified by their class */
- private Map<Class<?>, IConverter> converterMaps = new HashMap<Class<?>, IConverter>();
-
- /**
- * Constructor (not visible: singleton pattern)
- */
- private ConverterRegistry() {
- }
-
- /**
- * Returns the single instance of this registry
- *
- * @return the single instance of this registry
- */
- public static synchronized ConverterRegistry getSingleton() {
- if(instance == null) {
- instance = new ConverterRegistry();
- instance.initializeRegistry();
- }
- return instance;
- }
-
- /**
- * Initialize the registry
- */
- protected void initializeRegistry() {
- converterMaps.put(String.class, new ValueSpecificationToStringConverter());
- converterMaps.put(int.class, new ValueSpecificationToIntegerConverter());
- converterMaps.put(boolean.class, new ValueSpecificationToBooleanConverter());
- }
-
- /**
- * Returns the converter for the convenient type, from an {@link Object}
- *
- * @param toType
- * the class into which the element should be transformed
- *
- * @return the converter for the convenient type
- */
- public IConverter getConverter(Class<?> toType) {
- return converterMaps.get(toType);
- }
-
- public Object convert(Class<?> parameterType, ValueSpecification valueInstance) throws ConverterNotfoundException {
- // retrieve the converter
- IConverter converter = getConverter(parameterType);
-
- if(converter != null) {
- return converter.convert(valueInstance);
- } else {
- throw new ConverterNotfoundException(parameterType, valueInstance);
- }
- }
-
- /**
- * Converts a parameter value into a list of values
- *
- * @param context
- * the context of the evaluation of the query
- * @param parameterType
- * the type of the list
- * @param parameterValue
- * the parameter value to transform into a list
- * @return the list of values contained by the parameter value
- */
- public List<?> convertToList(final EObject context, final Class<?> parameterType, final ParameterValue parameterValue) {
- return new ConfigurationSwitch<List<?>>() {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public java.util.List<?> caseConstantParameterValue(ConstantParameterValue constantParameterValue) {
- IConverter converter = getConverter(parameterType);
-
- if(converter != null) {
- return Arrays.asList(converter.convert(constantParameterValue.getValueInstance()));
- } else {
- Activator.log.error("Impossible to find a converter for type: " + parameterType, null);
- return Collections.emptyList();
- }
- };
-
- /**
- * {@inheritDoc}
- */
- @Override
- public java.util.List<?> caseQueryExecutionValue(QueryExecutionValue queryExecutionValue) {
- // if query returns a list, returns it, else creates an array of one element
- QueryConfiguration queryConfiguration = queryExecutionValue.getConfiguration();
- if(!(queryConfiguration instanceof ModiscoQueryConfiguration)) {
- throw new RuntimeException("List conversion not implemented for this type of configuration. " + queryConfiguration.eClass().getName());
- }
- Object executionResult = null;
-// try {
-// executionResult = QueryUtil.evaluateBooleanQuery(context, queryConfiguration);
-// } catch (Exception e) {
-// Activator.log.error(e);
-// }
-// int upperBound = ((ModiscoQueryConfiguration)queryConfiguration).getQuery().getUpperBound();
-// if(upperBound == 1) {
-// return Arrays.asList(executionResult);
-// } else {
- return (List<?>)executionResult;
-// }
- };
-
- /**
- * {@inheritDoc}
- */
- @Override
- public java.util.List<?> caseListParameterValue(ListParameterValue listParameterValue) {
- List<Object> values = new ArrayList<Object>();
- for(ParameterValue parameterValue : listParameterValue.getValues()) {
- values.addAll(convertToList(context, parameterType, parameterValue));
- }
- return values;
- };
-
- }.doSwitch(parameterValue);
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToBooleanConverter.java b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToBooleanConverter.java
deleted file mode 100644
index facfdeb5920..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToBooleanConverter.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- * 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.queries.core.converter;
-
-import org.eclipse.core.databinding.conversion.Converter;
-import org.eclipse.core.databinding.conversion.IConverter;
-
-
-/**
- * Converter for Objects to Boolean value
- */
-public class ObjectToBooleanConverter extends Converter implements IConverter {
-
- /**
- * Creates a new ObjectToBooleanConverter
- */
- public ObjectToBooleanConverter() {
- super(Object.class, Boolean.class);
- }
-
- /**
- * {@inheritDoc}
- */
- public Boolean convert(Object fromObject) {
- if(fromObject == null) {
- return null;
- }
-
- if(fromObject instanceof Boolean) {
- return ((Boolean)fromObject);
- }
-
- if(fromObject instanceof String) {
- return Boolean.valueOf((String)fromObject);
- }
-
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToIntegerConverter.java b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToIntegerConverter.java
deleted file mode 100644
index c6a8735690d..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToIntegerConverter.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- * 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.queries.core.converter;
-
-import org.eclipse.core.databinding.conversion.Converter;
-import org.eclipse.core.databinding.conversion.IConverter;
-
-/**
- * Converter from an object to an integer
- */
-public class ObjectToIntegerConverter extends Converter implements IConverter {
-
- /**
- * Default constructor.
- */
- public ObjectToIntegerConverter() {
- super(Object.class, Integer.class);
- }
-
- /**
- * {@inheritDoc}
- */
- public Integer convert(Object fromObject) {
- if(fromObject == null) {
- return null;
- }
-
- if(fromObject instanceof Integer) {
- return (Integer)fromObject;
- }
-
- if(fromObject instanceof String) {
- return Integer.parseInt((String)fromObject);
- }
-
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToBooleanConverter.java b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToBooleanConverter.java
deleted file mode 100644
index fe244a435bb..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToBooleanConverter.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- * 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.queries.core.converter;
-
-import org.eclipse.core.databinding.conversion.Converter;
-import org.eclipse.core.databinding.conversion.IConverter;
-import org.eclipse.uml2.uml.ValueSpecification;
-
-/**
- * Converter from a {@link ValueSpecification} to a {@link Boolean} value
- */
-public class ValueSpecificationToBooleanConverter extends Converter implements IConverter {
-
- /**
- * Creates a new ValueSpecificationToBooleanConverter.
- */
- public ValueSpecificationToBooleanConverter() {
- super(ValueSpecification.class, boolean.class);
- }
-
- /**
- * {@inheritDoc}
- */
- public Object convert(Object fromObject) {
- return ((ValueSpecification)fromObject).booleanValue();
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToIntegerConverter.java b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToIntegerConverter.java
deleted file mode 100644
index b7393eace12..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToIntegerConverter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- * 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.queries.core.converter;
-
-import org.eclipse.core.databinding.conversion.Converter;
-import org.eclipse.core.databinding.conversion.IConverter;
-import org.eclipse.uml2.uml.ValueSpecification;
-
-/**
- * Converter from a {@link ValueSpecification} to an {@link Integer}.
- */
-public class ValueSpecificationToIntegerConverter extends Converter implements IConverter {
-
- /**
- * Creates a new {@link ValueSpecificationToIntegerConverter}.
- */
- public ValueSpecificationToIntegerConverter() {
- super(ValueSpecification.class, int.class);
- }
-
- /**
- * {@inheritDoc}
- */
- public Object convert(Object fromObject) {
- return ((ValueSpecification)fromObject).integerValue();
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToStringConverter.java b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToStringConverter.java
deleted file mode 100644
index b2987996f4f..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToStringConverter.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- * 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.queries.core.converter;
-
-import org.eclipse.core.databinding.conversion.Converter;
-import org.eclipse.core.databinding.conversion.IConverter;
-import org.eclipse.uml2.uml.ValueSpecification;
-
-/**
- * Converter from a {@link ValueSpecification} to an {@link String}.
- */
-public class ValueSpecificationToStringConverter extends Converter implements IConverter {
-
- /**
- * Creates a new {@link ValueSpecificationToStringConverter}.
- */
- public ValueSpecificationToStringConverter() {
- super(ValueSpecification.class, String.class);
- }
-
- /**
- * {@inheritDoc}
- */
- public Object convert(Object fromObject) {
- return ((ValueSpecification)fromObject).stringValue();
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQueryNotFoundException.java b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQueryNotFoundException.java
deleted file mode 100644
index b6b5a445a07..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQueryNotFoundException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- * 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.queries.core.modisco;
-
-/**
- * Exception thrown when the query set can not be found
- */
-public class ModelQueryNotFoundException extends RuntimeException {
-
- /** serial version UID */
- private static final long serialVersionUID = 7224687861468142052L;
-
- /** name of the model query to find */
- private final String modelQueryName;
-
- /**
- * Creates a new {@link ModelQueryNotFoundException}.
- * @param modelQueryName the name of the query to find
- */
- public ModelQueryNotFoundException(String modelQueryName) {
- this.modelQueryName = modelQueryName;
- }
-
- /**
- * Returns the name of the model query to find
- * @return the name of the model query to find
- */
- public String getModelQueryName() {
- return modelQueryName;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQuerySetNotFoundException.java b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQuerySetNotFoundException.java
deleted file mode 100644
index efe014c6678..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQuerySetNotFoundException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- * 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.queries.core.modisco;
-
-/**
- * Exception thrown when the query set can not be found
- */
-public class ModelQuerySetNotFoundException extends RuntimeException {
-
- /** serial version UID */
- private static final long serialVersionUID = -3189129139020152378L;
-
- /** name of the model query set to find */
- private final String modelQuerySetName;
-
- /**
- * Creates a new {@link ModelQuerySetNotFoundException}.
- * @param modelQuerySetName the name of the model query set not found
- */
- public ModelQuerySetNotFoundException(String modelQuerySetName) {
- this.modelQuerySetName = modelQuerySetName;
- }
-
- /**
- * Returns the name of the model query set to find
- * @return the name of the model query set to find
- */
- public String getModelQuerySetName() {
- return modelQuerySetName;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/QueryUtil.java b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/QueryUtil.java
deleted file mode 100644
index f87a4810a9a..00000000000
--- a/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/QueryUtil.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- * 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.queries.core.modisco;
-
-
-/**
- * Utility class for modisco queries
- */
-public class QueryUtil {
-
- /** default value in case the query is not valid */
- protected static final boolean defaultReturnValue = false;
-
- /**
- * Constructor.
- * Note: can not be instanciated, as it provides only static methods.
- */
- protected QueryUtil() {
- }
-
-// /**
-// * Evaluates a modisco query, that should only return a boolean value.
-// *
-// * @param query
-// * the query to check and evaluate
-// * @param context
-// * the eobject on which the query is evaluated
-// * @param parameters
-// * a map containing the name of parameters and their values
-// * @return <code>true</code> if the context fills the condition given by the query
-// * @throws Exception
-// * exception thrown when the query could not be correctly evaluated
-// */
-// public static final boolean evaluateBooleanQuery(final ModelQuery query, EObject context, Map<String, Object> parameters) throws Exception {
-// // construct the structure parameterValues if the query is valid
-// IStatus queryStatus = isValidQuery(query);
-// if(!queryStatus.isOK()) {
-// throw new Exception(queryStatus.getMessage());
-// }
-//
-// // if no parameters, evaluate
-// List<ModelQueryParameter> queryParameters = query.getParameters();
-// List<ModelQueryParameterValue> parameterValues = new ArrayList<ModelQueryParameterValue>();
-// if(queryParameters == null || queryParameters.isEmpty()) {
-// return evaluateBooleanQuery(query, context, parameterValues);
-// }
-//
-// // check the parameters given and the set of required parameters
-// IStatus parameterCheck = isValidParameterSet(query, parameters);
-// if(IStatus.CANCEL == parameterCheck.getSeverity() || IStatus.ERROR == parameterCheck.getSeverity()) {
-// Activator.log.error(parameterCheck.getMessage(), null);
-// throw new Exception(parameterCheck.getMessage());
-// } else if(IStatus.WARNING == parameterCheck.getSeverity()) {
-// Activator.log.warn(parameterCheck.getMessage());
-// } else if(IStatus.INFO == parameterCheck.getSeverity()) {
-// Activator.log.info(parameterCheck.getMessage());
-// }
-//
-// // construct parameter structure for Modisco solver
-// for(ModelQueryParameter parameter : queryParameters) {
-// String parametername = parameter.getName();
-// Object value = parameters.get(parametername);
-// ModelQueryParameterValue parameterValue = ParameterValueList.createParameterValue(value, parameter);
-//
-// // should try to bind elements here..
-// parameterValues.add(parameterValue);
-// }
-//
-// // execute the query
-// return evaluateBooleanQuery(query, context, parameterValues);
-// }
-//
-// /**
-// * Evaluates a query.
-// *
-// * @param context
-// * the eobject on which the query is evaluated
-// * @param queryConfiguration
-// * the query configuration, containing all values for the parameters of the query
-// * @return the result of the execution of the query
-// * @throws Exception
-// * exception thrown when the query could not be correctly evaluated
-// */
-// public static final Object evaluateQuery(EObject context, QueryConfiguration queryConfiguration) throws Exception {
-// if(queryConfiguration instanceof ModiscoQueryConfiguration) {
-// return evaluateQuery(context, (ModiscoQueryConfiguration)queryConfiguration);
-// }
-// throw new Exception("Unhandled kind of query");
-// }
-//
-// /**
-// * Evaluates a query, that should only return a boolean value.
-// *
-// * @param context
-// * the eobject on which the query is evaluated
-// * @param queryConfiguration
-// * the query configuration, containing all values for the parameters of the query
-// * @return <code>true</code> if the context fills the condition given by the query
-// * @throws Exception
-// * exception thrown when the query could not be correctly evaluated
-// */
-// public static final boolean evaluateBooleanQuery(EObject context, QueryConfiguration queryConfiguration) throws Exception {
-// if(queryConfiguration instanceof ModiscoQueryConfiguration) {
-// return evaluateBooleanQuery(context, (ModiscoQueryConfiguration)queryConfiguration);
-// }
-// throw new Exception("Unhandled kind of query");
-// }
-//
-// /**
-// * Evaluates a modisco query, that should only return a boolean value.
-// *
-// * @param context
-// * the eobject on which the query is evaluated
-// * @param queryConfiguration
-// * the query configuration, containing all values for the parameters of the query
-// * @return <code>true</code> if the context fills the condition given by the query
-// * @throws Exception
-// * exception thrown when the query could not be correctly evaluated
-// */
-// public static final boolean evaluateBooleanQuery(EObject context, ModiscoQueryConfiguration queryConfiguration) throws Exception {
-// Object result = evaluateQuery(context, queryConfiguration);
-// if(result instanceof Boolean) {
-// return (Boolean)result;
-// }
-// Activator.log.error("Not a boolean result: " + result, null);
-// return defaultReturnValue;
-// }
-//
-// /**
-// * Evaluates a modisco query, that should only return a boolean value.
-// *
-// * @param context
-// * the eobject on which the query is evaluated
-// * @param queryConfiguration
-// * the query configuration, containing all values for the parameters of the query
-// * @return <code>true</code> if the context fills the condition given by the query
-// * @throws Exception
-// * exception thrown when the query could not be correctly evaluated
-// */
-// public static final Object evaluateQuery(EObject context, ModiscoQueryConfiguration queryConfiguration) throws Exception {
-// // retrieve query (problem of bundle loader if not used correctly)
-// ModelQuery query = queryConfiguration.getQuery();
-// String modelQuerySetName = query.getModelQuerySet().getName();
-// String modelQueryName = query.getName();
-//
-// ModelQuery finalModelQuery = retrieveModelQuery(modelQueryName, modelQuerySetName);
-//
-// // construct the structure parameterValues if the query is valid
-// IStatus queryValidation = isValidQuery(finalModelQuery);
-// if(!queryValidation.isOK()) {
-// throw new Exception(queryValidation.getMessage(), queryValidation.getException());
-// }
-//
-// // create the set of parameter values
-// List<ModelQueryParameterValue> parameterValues = createParameterValuesListFromConfiguration(context, queryConfiguration);
-//
-// // execute the query
-// return evaluateQuery(finalModelQuery, context, parameterValues);
-// }
-//
-// /**
-// * Creates the {@link ModelQueryParameterValue} list from a configuration
-// *
-// * @param queryConfiguration
-// * the configuration to check
-// * @return the list of parameter values
-// */
-// private static List<ModelQueryParameterValue> createParameterValuesListFromConfiguration(EObject context, ModiscoQueryConfiguration queryConfiguration) {
-// List<ModelQueryParameterValue> parameterValues = new ArrayList<ModelQueryParameterValue>();
-//
-// List<ModelQueryParameter> parameters = queryConfiguration.getQuery().getParameters();
-// for(ModelQueryParameter parameter : parameters) {
-// Object value = retrieveParameterValue(context, parameter, queryConfiguration);
-// // resolve the value for the parameters
-// ModelQueryParameterValue parameterValue = ParameterValueList.createParameterValue(value, parameter);
-// parameterValues.add(parameterValue);
-// }
-// return parameterValues;
-// }
-//
-// /**
-// * Retrieves the value of a parameter.
-// *
-// * @param parameter
-// * the parameter for which the value is computed
-// * @return the parameter value associated to the parameter
-// */
-// private static Object retrieveParameterValue(final EObject context, final ModelQueryParameter parameter, ModiscoQueryConfiguration configuration) {
-// for(final ParameterValue parameterValue : configuration.getParameterValues()) {
-// if(parameter.equals(parameterValue.getParameter())) {
-// // This is the right parameter. Compute the value, depending on the type of the parameters
-// return new ConfigurationSwitch<Object>() {
-//
-// /**
-// * {@inheritDoc}
-// */
-// @Override
-// public Object caseListParameterValue(ListParameterValue listParameterValue) {
-// ArrayList<Object> values = new ArrayList<Object>();
-// Class<?> parameterType = parameter.getType().getInstanceClass();
-// for(ParameterValue parameterValue : listParameterValue.getValues()) {
-// values.addAll(ConverterRegistry.getSingleton().convertToList(context, parameterType, parameterValue));
-// }
-// return values;
-// };
-//
-// /**
-// * {@inheritDoc}
-// */
-// @Override
-// public Object caseConstantParameterValue(ConstantParameterValue constantParameterValue) {
-// Class<?> parameterType = parameter.getType().getInstanceClass();
-// try {
-// Object convertedValue = ConverterRegistry.getSingleton().convert(parameterType, constantParameterValue.getValueInstance());
-// return convertedValue;
-// } catch (ConverterNotfoundException e) {
-// Activator.log.error(e);
-// }
-// return null;
-// };
-//
-//
-// /**
-// * {@inheritDoc}
-// */
-// @Override
-// public Object caseQueryExecutionValue(QueryExecutionValue queryExecutionValue) {
-// // retrieves the associated configuration and launch it.
-// QueryConfiguration configuration = queryExecutionValue.getConfiguration();
-// try {
-// return QueryUtil.evaluateQuery(context, configuration);
-// } catch (Exception e) {
-// Activator.log.error(e);
-// }
-// return null;
-//
-// };
-// }.doSwitch(parameterValue);
-// }
-// }
-// return null;
-//
-// }
-//
-// /**
-// * Evaluates a modisco query.
-// *
-// * @param query
-// * the query to evaluate
-// * @param context
-// * the context element against which the query is evaluated
-// * @param parameterValues
-// * the list of parameters for the query
-// * @return the result of the query evaluation
-// * @throws Exception
-// * exception thrown in case of problem during evaluation of the query
-// */
-// public static final Object evaluateQuery(final ModelQuery query, EObject context, List<ModelQueryParameterValue> parameterValues) throws Exception {
-// // checks that the query is valid
-// if(isValidQuery(query).isOK()) {
-// AbstractModelQuery myModelQuery;
-// myModelQuery = ModelQuerySetCatalog.getSingleton().getModelQueryImpl(query);
-// //the model query set evaluation
-// ModelQueryResult result = myModelQuery.evaluate(context, parameterValues);
-// if(result.getException() != null) {
-// throw new Exception();
-// }
-// return result.getValue();
-// }
-// throw new Exception("Query was not a valid query: " + query, null);
-// }
-//
-// /**
-// * Evaluates a modisco query, that should only return a boolean value.
-// *
-// * @param query
-// * the query to check and evaluate
-// * @param context
-// * the eobject on which the query is evaluated
-// * @param parameterValues
-// * the list of parameter values for the evaluation
-// * @return <code>true</code> if the context fills the condition given by the query
-// * @throws Exception
-// * exception thrown when the query can not be correctly evaluated
-// */
-// public static final boolean evaluateBooleanQuery(final ModelQuery query, EObject context, List<ModelQueryParameterValue> parameterValues) throws Exception {
-// Object result = evaluateQuery(query, context, parameterValues);
-// if(result instanceof Boolean) {
-// // try to cast into a boolean
-// return (Boolean)result;
-// }
-// Activator.log.error("Query did not return a boolean: " + result, null);
-// return defaultReturnValue;
-// }
-//
-// /**
-// * Retrieves a model query, given its name and its query set.
-// *
-// * @param queryName
-// * the name of the query
-// * @param querySetName
-// * the name of the query set
-// * @return the found model query or <code>null</code>.
-// * @throws ModelQueryNotFoundException
-// * exception thrown when the the query set was found but not the model query was not found.
-// * @throws ModelQuerySetNotFoundException
-// * exception thrown when the the query set was not found.
-// */
-// public static final ModelQuery retrieveModelQuery(String queryName, String querySetName) throws ModelQueryNotFoundException, ModelQuerySetNotFoundException {
-// ModelQuerySet querySet = ModelQuerySetCatalog.getSingleton().getModelQuerySet(querySetName);
-// if(querySet == null) {
-// throw new ModelQuerySetNotFoundException(querySetName);
-// }
-//
-// ModelQuery query = querySet.getQuery(queryName);
-// if(query == null) {
-// throw new ModelQueryNotFoundException(queryName);
-// }
-//
-// return query;
-// }
-//
-// /**
-// * Checks if the query is valid, i.e. not <code>null</code>, returning a boolean value, etc.
-// *
-// * @param query
-// * the query to test
-// * @return <code>true</code> if the query is valid
-// */
-// public static final IStatus isValidQuery(ModelQuery query) {
-// if(query == null) {
-// return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Query should not be null.");
-// }
-// return Status.OK_STATUS;
-// }
-//
-// /**
-// * Checks if the query is valid, i.e. not <code>null</code>, returning a boolean value, etc.
-// * @param query the query to test
-// * @return <code>true</code> if the query is valid
-// */
-// public static final IStatus isValidBooleanQuery(ModelQuery query) {
-// IStatus status = isValidQuery(query);
-// if(status.isOK()) {
-// // check the instance type is compatible with boolean
-// EClassifier returnType = query.getReturnType();
-// if(returnType == null) {
-// return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Query " + query.getName() + " does not have a return value, whereas it should have a boolean return status");
-// } else {
-// Class<?> instanceClass = returnType.getInstanceClass();
-// if(!boolean.class.isAssignableFrom(instanceClass)) {
-// return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Query " + query.getName() + " should return a value that can be cast into Boolean value. Currently: " + returnType.getInstanceClass());
-// }
-// // check return size of the query... should be 0..1 or 1..1 (even 0..1 could be difficult to handle, but we let this possible)
-// if(query.getUpperBound() > 1 || query.getUpperBound() < 0) {
-// return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Query " + query.getName() + " should return only one value. Currently: " + query.getUpperBound());
-// }
-// }
-// }
-// return status;
-// }
-//
-// /**
-// * Check if the set of given parameters is compatible with the query
-// * @param query the query against which the set of parameters is tested
-// * @param parameters the map of parameter names and their value
-// * @return the status corresponding to the validation
-// */
-// public static final IStatus isValidParameterSet(ModelQuery query, Map<String, Object> parameters) {
-// // check size, which should be equal.
-// int querySize = query.getParameters().size();
-// int parameterSize = parameters.keySet().size();
-//
-// if(querySize != parameterSize) {
-// return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "The given parameters set do not have the same size (" + parameterSize + ") than the query parameter set (" + querySize + ")");
-// }
-//
-// List<IStatus> status = new ArrayList<IStatus>();
-//
-// // size is ok, checking names, type, multiplicity
-// for(String parameterName : parameters.keySet()) {
-// // retrieve the equivalent parameter in the query
-// ModelQueryParameter queryParameter = retrieveParameterByName(query, parameterName);
-// if(queryParameter == null) {
-// status.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Impossible to find the parameter " + parameterName + " in the query parameters list for query: " + query.getName()));
-// }
-// }
-// if(status.size() > 0) {
-// return new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, status.toArray(new IStatus[status.size()]), "", null);
-// }
-// return Status.OK_STATUS;
-// }
-//
-// /**
-// * Retrieves a parameter, given the query to look into and the name of the parameter
-// *
-// * @param query
-// * the query where the parameter is stored
-// * @param parameterName
-// * the name of the parameter
-// * @return the parameter
-// */
-// private final static ModelQueryParameter retrieveParameterByName(ModelQuery query, String parameterName) {
-// for(ModelQueryParameter queryParameter : query.getParameters()) {
-// if(parameterName.equals(queryParameter.getName())) {
-// return queryParameter;
-// }
-// }
-// return null;
-// }
-}

Back to the top