From 196389c8292cc0d9c28435b2e1e42287e87342df Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Fri, 14 Mar 2014 18:26:30 +0100 Subject: [Releng] Move the Viewpoints documentation to the plugins/doc folder --- .../.classpath | 6 + .../.project | 28 +++ .../.settings/org.eclipse.core.resources.prefs | 3 + .../.settings/org.eclipse.jdt.core.prefs | 7 + .../META-INF/MANIFEST.MF | 10 + .../about.html | 28 +++ .../build.properties | 6 + .../plugin.properties | 16 ++ .../plugin.xml | 12 ++ .../resources/captures/config_sample.png | Bin 0 -> 12893 bytes .../resources/captures/menu_filtered.png | Bin 0 -> 8668 bytes .../resources/captures/menu_normal.png | Bin 0 -> 28682 bytes .../resources/captures/preferences.png | Bin 0 -> 13523 bytes .../resources/captures/properties.png | Bin 0 -> 19650 bytes .../resources/viewpoints-toc.xml | 28 +++ .../resources/viewpoints.html | 34 +++ .../resources/viewpoints.mediawiki | 240 +++++++++++++++++++++ .../.classpath | 6 - .../.project | 28 --- .../.settings/org.eclipse.core.resources.prefs | 3 - .../.settings/org.eclipse.jdt.core.prefs | 7 - .../META-INF/MANIFEST.MF | 10 - .../about.html | 28 --- .../build.properties | 6 - .../plugin.properties | 16 -- .../plugin.xml | 12 -- .../resources/captures/config_sample.png | Bin 12893 -> 0 bytes .../resources/captures/menu_filtered.png | Bin 8668 -> 0 bytes .../resources/captures/menu_normal.png | Bin 28682 -> 0 bytes .../resources/captures/preferences.png | Bin 13523 -> 0 bytes .../resources/captures/properties.png | Bin 19650 -> 0 bytes .../resources/viewpoints-toc.xml | 28 --- .../resources/viewpoints.html | 34 --- .../resources/viewpoints.mediawiki | 240 --------------------- 34 files changed, 418 insertions(+), 418 deletions(-) create mode 100644 plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/.classpath create mode 100644 plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/.project create mode 100644 plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.core.resources.prefs create mode 100644 plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.jdt.core.prefs create mode 100644 plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/META-INF/MANIFEST.MF create mode 100644 plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/about.html create mode 100644 plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/build.properties create mode 100644 plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/plugin.properties create mode 100644 plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/plugin.xml create mode 100644 plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/config_sample.png create mode 100644 plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_filtered.png create mode 100644 plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_normal.png create mode 100644 plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/preferences.png create mode 100644 plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/properties.png create mode 100644 plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints-toc.xml create mode 100644 plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.html create mode 100644 plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.mediawiki delete mode 100755 plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.classpath delete mode 100755 plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.project delete mode 100755 plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.core.resources.prefs delete mode 100755 plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.jdt.core.prefs delete mode 100755 plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/META-INF/MANIFEST.MF delete mode 100755 plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/about.html delete mode 100755 plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/build.properties delete mode 100755 plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/plugin.properties delete mode 100755 plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/plugin.xml delete mode 100755 plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/config_sample.png delete mode 100755 plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_filtered.png delete mode 100755 plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_normal.png delete mode 100755 plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/preferences.png delete mode 100755 plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/properties.png delete mode 100755 plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints-toc.xml delete mode 100755 plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.html delete mode 100755 plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.mediawiki (limited to 'plugins') diff --git a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/.classpath b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/.classpath new file mode 100644 index 00000000000..f6e5811e42c --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/.project b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/.project new file mode 100644 index 00000000000..149c81a950e --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/.project @@ -0,0 +1,28 @@ + + + org.eclipse.papyrus.infra.viewpoints.doc + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.core.resources.prefs b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000000..bcaa1b4d07e --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding//resources/viewpoints-toc.xml=utf-8 +encoding//resources/viewpoints.html=utf-8 diff --git a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.jdt.core.prefs b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..44217f8c068 --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +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/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/META-INF/MANIFEST.MF b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..a49de7681be --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/META-INF/MANIFEST.MF @@ -0,0 +1,10 @@ +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.help +Bundle-Vendor: %providerName +Bundle-Version: 1.0.0.qualifier +Bundle-Name: %pluginName +Bundle-ManifestVersion: 2 +Bundle-SymbolicName: org.eclipse.papyrus.infra.viewpoints.doc;singleto + n:=true +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-Localization: plugin diff --git a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/about.html b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/about.html new file mode 100644 index 00000000000..dd02e0be168 --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

About This Content

+ +

December 2, 2009

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") 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 http://www.eclipse.org.

+ + + \ No newline at end of file diff --git a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/build.properties b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/build.properties new file mode 100644 index 00000000000..655978a2bc6 --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/build.properties @@ -0,0 +1,6 @@ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + about.html,\ + plugin.properties,\ + resources/ diff --git a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/plugin.properties b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/plugin.properties new file mode 100644 index 00000000000..1ffd68f5ccb --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/plugin.properties @@ -0,0 +1,16 @@ +########################################################################################## +# Copyright (c) 2013 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: +# Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Initial API and implementation +# +######################################################################################## + +pluginName = Papyrus Viewpoints Documentation (Incubation) +providerName = Eclipse Modeling Project diff --git a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/plugin.xml b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/plugin.xml new file mode 100644 index 00000000000..2fba0cfd74f --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/plugin.xml @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/config_sample.png b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/config_sample.png new file mode 100644 index 00000000000..bb9214c7737 Binary files /dev/null and b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/config_sample.png differ diff --git a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_filtered.png b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_filtered.png new file mode 100644 index 00000000000..b0ff70d7be2 Binary files /dev/null and b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_filtered.png differ diff --git a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_normal.png b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_normal.png new file mode 100644 index 00000000000..6a2ab29f149 Binary files /dev/null and b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_normal.png differ diff --git a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/preferences.png b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/preferences.png new file mode 100644 index 00000000000..a37393eb942 Binary files /dev/null and b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/preferences.png differ diff --git a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/properties.png b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/properties.png new file mode 100644 index 00000000000..1912f7f2f9e Binary files /dev/null and b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/properties.png differ diff --git a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints-toc.xml b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints-toc.xml new file mode 100644 index 00000000000..ae66f735f36 --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints-toc.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.html b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.html new file mode 100644 index 00000000000..dacce45f8f6 --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.html @@ -0,0 +1,34 @@ +

Viewpoints in Papyrus

Introduction

Viewpoints in Papyrus enables the specialization of the user experiences by constraining what can be seen and interacted with in models through views. +The most obvious ways to look at and interact with a model is through diagrams; and viewpoints enables the specification of constraints upon them as well as their specialization. +Papyrus also define additional views, including textual ones.

Impacts of Viewpoints in the Papyrus Interface

The enforcement of a particular viewpoint will have noticeable consequences on the user interface of Papyrus, i.e. what a user will be able to see and do. +Viewpoints also have impacts on the edition experience of the model themselves.

Contextual Menus

The definition a viewpoints specify which views and diagrams can be applied to specified model elements. +A consequence is that the Papyrus tool bar as well as the contextual menus are aware of the currently enforced viewpoint and only make available actions that are in conformance with the viewpoint. +For example, in the two captures hereafter the content of the same menu for the creation of a new diagram depends on the enforced viewpoint.

Toolbar Elements

The toolbar elements for the creation of new diagrams are also adapted in the same way as the contextual menus to reflect the currently enforced viewpoint. +The elements that appeat in the contextual menus should also appear in the toolbar.

Diagram Properties

Papyrus views and diagrams have a set of properties related to the management of viewpoints. +They are visible in the Properties view of the diagrams.

In the image above the selected diagram have two properties related to the management of viewpoints:

Changing the Applied Viewpoint

The Papyrus viewpoints can be configured in a preference panel accessible along the other Papyrus preferences under the name Viewpoints Configuration. +The panel looks like the following:

Configuration Kinds

The first preference element is the selection of the kind of configuration to apply to the user's environment. +In the above capture, the radio buttons are used to determine which kind of configuration to use. +Papyrus comes with two built-in configurations. +It is nevertheless possible to define new configurations and viewpoints, and select them in this position.

Built-in Configurations

The built-in configurations are provided for convenience and have the following properties:

Extension Point-Defined Configuration

It is possible to deploy custom viewpoints configuration through an Eclipse plugin and its contribution to an extension point. +The identifier of the extension point to use is org.eclipse.papyrus.infra.viewpoints.policy.custom and is defined in the org.eclipse.papyrus.infra.viewpoints.policy plugin. +Each extension can contribute a viewpoints configuration and give it a priority (0 is lowest). +The setting of the contributed configuration is achieved by giving the path to the configuration file. +The path can be relative to the contributing plugin's root, or be an absolute URI in the form of platform:/plugin/<pluginID>/<path>. +If no contribution is made and this option is selected, the builtin configuration named Any number of diagrams per model element will be used as a fallback.

Custom Configuration

To select a custom configuration, choose the Custom option. +This will activate the corresponding preferences fields:

Stakeholder and Viewpoint Selection

Once a configuration is selected, the use can select one of the viewpoint defined within it. +This is achieved through the two dropdown boxes:

Defining New Viewpoints

Papyrus supports the definition of new viewpoints that can subsequently used by selecting them in the Papyrus Viewpoints preferences panel. +A configuration file is simply an Ecore model that can be edited with the provided Viewpoints configuration editor in Papyrus.

Available Concepts

This subsection summarizes the different concepts that are leveraged for the definition of viewpoints in Papyrus. +It is important to note that these concepts rely on and extend the ISO 42010 standard for viewpoints.

Building a Configuration

The first step is to create the configuration file. +Papyrus comes with a wizard for this purpose:

Configuration element

Once the configuration file is created, it should be automatically opened with the Papyrus viewpoints configuration editor. +The top element is the configuration. +It has two properties:

Stakeholders and Viewpoints

It is then possible to add new Viewpoints and Stakeholders to the configuration by the conxtual menu New Child on the configuration element. +A stakeholder has two properties, name' and viewpoints. The viewpoints properties must be filled with references to the appropriate viewpoints for the stakeholder. +A viewpoint also has two properties, name and parent. The parent property is used to specify that a viewpoint inherits from another one.

Diagram element

Once a viewpoint has been created, it is possible to add to it diagrams using the New Child contextual menu. +A diagram will define a specialized view on a model, based on the implementation in Papyrus. +For this purpose, the diagram elements have the following properties:

The list of recognized implementation IDs is as follow:

Implementation IDDescription
PapyrusUMLActivityDiagramUML Activity Diagram
PapyrusUMLClassDiagramUML Class Diagram
PapyrusUMLCommunicationDiagramUML Communication Diagram
PapyrusUMLComponentDiagramUML Component Diagram
CompositeStructureUML Composite Diagram
PapyrusUMLDeploymentDiagramUML Deployment Diagram
PapyrusUMLProfileDiagramUML Profile Diagram
PapyrusUMLSequenceDiagramUML Sequence Diagram
PapyrusUMLStateMachineDiagramUML State Machine Diagram
PapyrusUMLTimingDiagramUML Timing Diagram
UseCaseUML Use Case Diagram
PapyrusUMLInteractionOverviewDiagramUML Interaction Overview Diagram
BlockDefinitionSysML Block Definition Diagram
InternalBlockSysML Internal Block Diagram
ParametricSysML Parametric Diagram
RequirementDiagramSysML Requirements Diagram

Once a diagram has been created it is possible to constraint it using rules. +There are four kinds of rules:

Each rule has a permit property that specify whether the rule authorizes or forbids the action it represents. +Otherwise, the properties of the rules are as follow:

As an example, it is possible to define a diagram of the inner classes of classes as follow:

In this example, the sole model rule defines that this kind of diagram can only be applied on Class. +The owning rules define that the diagrams can be owned only by Class and Package elements. +Then two child rules are used to define that it is only possible to add new Classifier and Comment elements thorugh this diagram. +The first child rule specifies that the Classifier elements should be added to the model with the nestedClassifier property of the root Class element. +In the same way, the second one specifies that the Comment elements should be added to the model with the ownedComment property of the root Class element.

Viewpoint Enforcement Principles

When enforcing a viewpoint, the following principles are used when authorizing, or denying user actions:

\ No newline at end of file diff --git a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.mediawiki b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.mediawiki new file mode 100644 index 00000000000..ed0d4705d75 --- /dev/null +++ b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.mediawiki @@ -0,0 +1,240 @@ + + +=Viewpoints in Papyrus= + +==Introduction== +Viewpoints in Papyrus enables the specialization of the user experiences by constraining what can be seen and interacted with in models through views. +The most obvious ways to look at and interact with a model is through diagrams; and viewpoints enables the specification of constraints upon them as well as their specialization. +Papyrus also define additional views, including textual ones. + + + + +==Impacts of Viewpoints in the Papyrus Interface== +The enforcement of a particular viewpoint will have noticeable consequences on the user interface of Papyrus, i.e. what a user will be able to see and do. +Viewpoints also have impacts on the edition experience of the model themselves. + +===Contextual Menus=== +The definition a viewpoints specify which views and diagrams can be applied to specified model elements. +A consequence is that the Papyrus tool bar as well as the contextual menus are aware of the currently enforced viewpoint and only make available actions that are in conformance with the viewpoint. +For example, in the two captures hereafter the content of the same menu for the creation of a new diagram depends on the enforced viewpoint. +{| +| [[image:captures/menu_normal.png]] +| [[image:captures/menu_filtered.png]] +|} + +===Toolbar Elements=== +The toolbar elements for the creation of new diagrams are also adapted in the same way as the contextual menus to reflect the currently enforced viewpoint. +The elements that appeat in the contextual menus should also appear in the toolbar. + +===Diagram Properties=== +Papyrus views and diagrams have a set of properties related to the management of viewpoints. +They are visible in the '''Properties''' view of the diagrams. + +[[image:captures/properties.png]] + +In the image above the selected diagram have two properties related to the management of viewpoints: +* '''View Type''': This property shows the diagram's type as defined in the viewpoints' configuration. In the example above, it is a ''UML Activity Diagram'', part of the ''Default Papyrus Viewpoint'' configuration. +* '''Owner''': This property shows the current owner of the diagram, i.e. the model element which the diagram is attached to. In the example above, the diagram is within the ''Diagrams'' package, meaning this package owns the diagram. +* '''Root element''': This property shows the model element that is visualized through the diagram. In the example above, the top element visualized in the selected diagram is the UML activity named ''Activity1''. It is possible to retarget a diagram, i.e. change its root element. The user will be prompted to select a model element that fits the constraints that apply for this type of diagram. + + + + +==Changing the Applied Viewpoint== +The Papyrus viewpoints can be configured in a preference panel accessible along the other Papyrus preferences under the name '''Viewpoints Configuration'''. +The panel looks like the following: + +[[image:captures/preferences.png]] + +===Configuration Kinds=== +The first preference element is the selection of the kind of configuration to apply to the user's environment. +In the above capture, the radio buttons are used to determine which kind of configuration to use. +Papyrus comes with two built-in configurations. +It is nevertheless possible to define new configurations and viewpoints, and select them in this position. + +====Built-in Configurations==== +The built-in configurations are provided for convenience and have the following properties: +* ''Any number of diagrams per model element'' is a configuration with a viewpoint that allow any kind of view and diagram and does not restrain the number of diagrams that can be created for each model element. +* ''At most one diagram per model element'' is a configuration with a viewpoint that allow any kind of view and diagram but limit the number of diagrams that can be created for each model element at one. + +====Extension Point-Defined Configuration==== +It is possible to deploy custom viewpoints configuration through an Eclipse plugin and its contribution to an extension point. +The identifier of the extension point to use is ''org.eclipse.papyrus.infra.viewpoints.policy.custom'' and is defined in the ''org.eclipse.papyrus.infra.viewpoints.policy'' plugin. +Each extension can contribute a viewpoints configuration and give it a priority (0 is lowest). +The setting of the contributed configuration is achieved by giving the path to the configuration file. +The path can be relative to the contributing plugin's root, or be an absolute URI in the form of ''platform:/plugin//''. +If no contribution is made and this option is selected, the builtin configuration named ''Any number of diagrams per model element'' will be used as a fallback. + +====Custom Configuration==== +To select a custom configuration, choose the ''Custom'' option. +This will activate the corresponding preferences fields: +* ''Access scheme'' lets the user select how the custom configuration should be looked for. The possible options are: +** ''Absolute path'' means that the configuration will be looked for on the host's file system. +** ''Workspace file'' means that the configuration file will be looked for as a resource in the workspace. +** ''Embedded in a plugin'' means that the configuration file will be looked for as a resource in a loaded Eclipse plugin. + +* ''Path'' lets the user select the configuration file based on the selected scheme: +** Using the scheme ''Absolute path'' the file is selected using a simple file selection dialog. +** Using the scheme ''Workspace file'' the file is selected using a workspace resource selection dialog. +** Using the scheme ''Embedded in a plugin'' the file is selected using a plugin content selection dialog. + +===Stakeholder and Viewpoint Selection=== +Once a configuration is selected, the use can select one of the viewpoint defined within it. +This is achieved through the two dropdown boxes: +* ''Stakeholder'' is used to select the user's archetype +* ''Viewpoint'' is used to select the viewpoint + + + + +==Defining New Viewpoints== +Papyrus supports the definition of new viewpoints that can subsequently used by selecting them in the Papyrus Viewpoints preferences panel. +A configuration file is simply an Ecore model that can be edited with the provided Viewpoints configuration editor in Papyrus. + +===Available Concepts=== +This subsection summarizes the different concepts that are leveraged for the definition of viewpoints in Papyrus. +It is important to note that these concepts rely on and extend the ISO 42010 standard for viewpoints. + +* A ''configuration'' is a specification of a set of ''viewpoints'' and ''stakeholders''. A ''configuration'' is typically stored in a .configuration file and has to be selected in the preference window (Window/Preferences/Papyrus/Viewpoints Configuration). +* The concept of ''stakeholder'' (see ISO 42010) in Papyrus represents a user archetype that pertains in the construction and/or review of a model. A ''stakeholder'' is associated to a set of ''viewpoints'' defining how he/she can see a model. +* The concept of ''viewpoint'' (see ISO 42010) in Papyrus represents a set of constrains about what can be seen in a model. A Papyrus ''viewpoint'' mainly defines what are the accessible ''diagrams'' and the particular constraints to be applied on each of them. +* A Papyrus ''diagram'' is a specialized view on a model in the form of a visual language. It is supported by an implementation artifact, i.e. the actual code that implements the diagram. Moreover, it can be constrained using ''rules''. +* A ''model rule'' specifies if a model element can be represented through a ''diagram'', i.e. whether it can be selected as the root element of a ''diagram''. +* An ''owning rule'' specifies whether a model element is allowed to own a ''diagram''. +* ''Child rules'' specify whether a given model element can be added to the model through a ''diagram''. +* ''Palette rules'' specify the palette elements that are visible for a ''diagram''. + +===Building a Configuration=== +The first step is to create the configuration file. +Papyrus comes with a wizard for this purpose: +* In the contextual menu of a project, or in the Eclipse '''File'' menu, select '''New''', '''Other ...'''. +* The wizard is called '''Viewpoints configuration''' and is located in the '''Papyrus''' category. + +====Configuration element==== +Once the configuration file is created, it should be automatically opened with the Papyrus viewpoints configuration editor. +The top element is the ''configuration''. +It has two properties: +* ''Default Stakeholder'', which should be used to select the default stakeholder for this configuration (once one has been created). +* ''Metamodel'', which should be used to select the metamodel on which the viewpoint will apply. The property field proposes a list of the loaded metamodels identified by their URI. Usually, the UML metamodel (http://www.eclipse.org/uml2/4.0.0/UML/) should be used. + +====Stakeholders and Viewpoints==== +It is then possible to add new ''Viewpoints'' and ''Stakeholders'' to the configuration by the conxtual menu '''New Child''' on the configuration element. +A ''stakeholder'' has two properties, ''name''' and ''viewpoints''. The ''viewpoints'' properties must be filled with references to the appropriate viewpoints for the ''stakeholder''. +A ''viewpoint'' also has two properties, ''name'' and ''parent''. The ''parent'' property is used to specify that a ''viewpoint'' inherits from another one. + +====Diagram element==== +Once a viewpoint has been created, it is possible to add to it ''diagrams'' using the '''New Child''' contextual menu. +A ''diagram'' will define a specialized view on a model, based on the implementation in Papyrus. +For this purpose, the ''diagram'' elements have the following properties: +* ''name'', which specifies a descriptor for the diagram +* ''parent'', which enables the declaration of an inheritance relationship with another diagram +* ''implementation ID'', which is the unique identifier of the software component in papyrus that will effectively implements the diagram +* ''profiles'', which is the set of profiles that need to be applied for this diagram. The profiles can be selected through their metamodel identified by their URI. This implies that the profiles must be loaded at this point. + +The list of recognized implementation IDs is as follow: +{| border="solid 1px grey" +! Implementation ID +! Description +|- +| '''PapyrusUMLActivityDiagram''' +| UML Activity Diagram +|- +| '''PapyrusUMLClassDiagram''' +| UML Class Diagram +|- +| '''PapyrusUMLCommunicationDiagram''' +| UML Communication Diagram +|- +| '''PapyrusUMLComponentDiagram''' +| UML Component Diagram +|- +| '''CompositeStructure''' +| UML Composite Diagram +|- +| '''PapyrusUMLDeploymentDiagram''' +| UML Deployment Diagram +|- +| '''PapyrusUMLProfileDiagram''' +| UML Profile Diagram +|- +| '''PapyrusUMLSequenceDiagram''' +| UML Sequence Diagram +|- +| '''PapyrusUMLStateMachineDiagram''' +| UML State Machine Diagram +|- +| '''PapyrusUMLTimingDiagram''' +| UML Timing Diagram +|- +| '''UseCase''' +| UML Use Case Diagram +|- +| '''PapyrusUMLInteractionOverviewDiagram''' +| UML Interaction Overview Diagram +|- +| '''BlockDefinition''' +| SysML Block Definition Diagram +|- +| '''InternalBlock''' +| SysML Internal Block Diagram +|- +| '''Parametric''' +| SysML Parametric Diagram +|- +| '''RequirementDiagram''' +| SysML Requirements Diagram +|} + +Once a diagram has been created it is possible to constraint it using rules. +There are four kinds of rules: +* ''Model rules'' constrain the type of the (root) model elements that can be visualized through this view. +* ''Owning rules'' constrain the type of the model elements that can own the diagram itself. +* ''Child rules'' constrain the type of the model elements that can be dropped within this diagram. +* ''Palette rules'' constrain the display of the diagram's palette elements. +Each rule has a ''permit'' property that specify whether the rule authorizes or forbids the action it represents. +Otherwise, the properties of the rules are as follow: +* ''Model rules'' +** ''element'' represents the type of the model elements to apply the rule on. +** ''multiplicity'' represents the maximum number of this kind of diagram that can be created for the referenced model element. -1 represents an unbounded number. +** ''stereotypes'' represents the set of stereotypes that must be applied in the model element for the rule to match. The stereotypes can be picked from the classifiers of the ''profiles'' defined in the parent diagram. +* ''Owning rules'' +** ''element'' represents the type of the model elements to apply the rule on. +** ''multiplicity'' represents the maximum number of this kind of diagram that can be created for the referenced model element. -1 represents an unbounded number. +** ''stereotypes'' represents the set of stereotypes that must be applied in the model element for the rule to match. The stereotypes can be picked from the classifiers of the ''profiles'' defined in the parent diagram. +* ''Child rules'' +** ''element'' represents the type of the model elements begin dropped. +** ''stereotypes'' represents the set of stereotypes that must be applied in the model element for the rule to match. The stereotypes can be picked from the classifiers of the ''profiles'' defined in the parent diagram. +** ''origin'' represents the type of the model elements that are the target of the drop. It is usually one of the type defined in the ''model rules''. +** Additionally, ''child rules'' can be completed with children called ''path elements'' using the '''New Child''' contextual menu. ''Path elements'' defines a path of properties that must be used from the ''origin'' to insert the new ''element'' in the model. +* ''Palette rules'' +** ''element'' represents a pattern to match for the identifier of a palette element. + +As an example, it is possible to define a diagram of the inner classes of classes as follow: + +[[image:captures/config_sample.png]] + +In this example, the sole ''model rule'' defines that this kind of diagram can only be applied on '''Class'''. +The ''owning rules'' define that the diagrams can be owned only by '''Class''' and '''Package''' elements. +Then two ''child rules'' are used to define that it is only possible to add new '''Classifier''' and '''Comment''' elements thorugh this diagram. +The first ''child rule'' specifies that the '''Classifier''' elements should be added to the model with the '''nestedClassifier''' property of the root '''Class''' element. +In the same way, the second one specifies that the '''Comment''' elements should be added to the model with the '''ownedComment''' property of the root '''Class''' element. + + + + +====Viewpoint Enforcement Principles==== +When enforcing a viewpoint, the following principles are used when authorizing, or denying user actions: +* If the selected viewpoint does not enable to decide for the action at hand (no mathcing diagram), the parent viewpoints are recursively considered. +* If a diagram is matched, but the defined rules do not enable to decide for the action at hand, then the parent diagrams are recursively considered. +* The rules are considered in the order of their definition in the viewpoints configuration editor. +* The first rule to match the condition (e.g. type of the considered model element) is used to decide upon the user action. Subsequent rules are not considered. Parent diagrams/viewpoints are also not considered. \ No newline at end of file diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.classpath b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.classpath deleted file mode 100755 index f6e5811e42c..00000000000 --- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.project b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.project deleted file mode 100755 index 149c81a950e..00000000000 --- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.papyrus.infra.viewpoints.doc - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.core.resources.prefs b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.core.resources.prefs deleted file mode 100755 index bcaa1b4d07e..00000000000 --- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding//resources/viewpoints-toc.xml=utf-8 -encoding//resources/viewpoints.html=utf-8 diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.jdt.core.prefs deleted file mode 100755 index 44217f8c068..00000000000 --- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -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/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/META-INF/MANIFEST.MF b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/META-INF/MANIFEST.MF deleted file mode 100755 index a49de7681be..00000000000 --- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/META-INF/MANIFEST.MF +++ /dev/null @@ -1,10 +0,0 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.help -Bundle-Vendor: %providerName -Bundle-Version: 1.0.0.qualifier -Bundle-Name: %pluginName -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: org.eclipse.papyrus.infra.viewpoints.doc;singleto - n:=true -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-Localization: plugin diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/about.html b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/about.html deleted file mode 100755 index dd02e0be168..00000000000 --- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/about.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - -About - - -

About This Content

- -

December 2, 2009

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") 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 http://www.eclipse.org.

- - - \ No newline at end of file diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/build.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/build.properties deleted file mode 100755 index 655978a2bc6..00000000000 --- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - about.html,\ - plugin.properties,\ - resources/ diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/plugin.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/plugin.properties deleted file mode 100755 index 1ffd68f5ccb..00000000000 --- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/plugin.properties +++ /dev/null @@ -1,16 +0,0 @@ -########################################################################################## -# Copyright (c) 2013 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: -# Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Initial API and implementation -# -######################################################################################## - -pluginName = Papyrus Viewpoints Documentation (Incubation) -providerName = Eclipse Modeling Project diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/plugin.xml b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/plugin.xml deleted file mode 100755 index 2fba0cfd74f..00000000000 --- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/plugin.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/config_sample.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/config_sample.png deleted file mode 100755 index bb9214c7737..00000000000 Binary files a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/config_sample.png and /dev/null differ diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_filtered.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_filtered.png deleted file mode 100755 index b0ff70d7be2..00000000000 Binary files a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_filtered.png and /dev/null differ diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_normal.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_normal.png deleted file mode 100755 index 6a2ab29f149..00000000000 Binary files a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_normal.png and /dev/null differ diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/preferences.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/preferences.png deleted file mode 100755 index a37393eb942..00000000000 Binary files a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/preferences.png and /dev/null differ diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/properties.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/properties.png deleted file mode 100755 index 1912f7f2f9e..00000000000 Binary files a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/properties.png and /dev/null differ diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints-toc.xml b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints-toc.xml deleted file mode 100755 index ae66f735f36..00000000000 --- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints-toc.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.html b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.html deleted file mode 100755 index dacce45f8f6..00000000000 --- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.html +++ /dev/null @@ -1,34 +0,0 @@ -

Viewpoints in Papyrus

Introduction

Viewpoints in Papyrus enables the specialization of the user experiences by constraining what can be seen and interacted with in models through views. -The most obvious ways to look at and interact with a model is through diagrams; and viewpoints enables the specification of constraints upon them as well as their specialization. -Papyrus also define additional views, including textual ones.

Impacts of Viewpoints in the Papyrus Interface

The enforcement of a particular viewpoint will have noticeable consequences on the user interface of Papyrus, i.e. what a user will be able to see and do. -Viewpoints also have impacts on the edition experience of the model themselves.

Contextual Menus

The definition a viewpoints specify which views and diagrams can be applied to specified model elements. -A consequence is that the Papyrus tool bar as well as the contextual menus are aware of the currently enforced viewpoint and only make available actions that are in conformance with the viewpoint. -For example, in the two captures hereafter the content of the same menu for the creation of a new diagram depends on the enforced viewpoint.

Toolbar Elements

The toolbar elements for the creation of new diagrams are also adapted in the same way as the contextual menus to reflect the currently enforced viewpoint. -The elements that appeat in the contextual menus should also appear in the toolbar.

Diagram Properties

Papyrus views and diagrams have a set of properties related to the management of viewpoints. -They are visible in the Properties view of the diagrams.

In the image above the selected diagram have two properties related to the management of viewpoints:

Changing the Applied Viewpoint

The Papyrus viewpoints can be configured in a preference panel accessible along the other Papyrus preferences under the name Viewpoints Configuration. -The panel looks like the following:

Configuration Kinds

The first preference element is the selection of the kind of configuration to apply to the user's environment. -In the above capture, the radio buttons are used to determine which kind of configuration to use. -Papyrus comes with two built-in configurations. -It is nevertheless possible to define new configurations and viewpoints, and select them in this position.

Built-in Configurations

The built-in configurations are provided for convenience and have the following properties:

Extension Point-Defined Configuration

It is possible to deploy custom viewpoints configuration through an Eclipse plugin and its contribution to an extension point. -The identifier of the extension point to use is org.eclipse.papyrus.infra.viewpoints.policy.custom and is defined in the org.eclipse.papyrus.infra.viewpoints.policy plugin. -Each extension can contribute a viewpoints configuration and give it a priority (0 is lowest). -The setting of the contributed configuration is achieved by giving the path to the configuration file. -The path can be relative to the contributing plugin's root, or be an absolute URI in the form of platform:/plugin/<pluginID>/<path>. -If no contribution is made and this option is selected, the builtin configuration named Any number of diagrams per model element will be used as a fallback.

Custom Configuration

To select a custom configuration, choose the Custom option. -This will activate the corresponding preferences fields:

Stakeholder and Viewpoint Selection

Once a configuration is selected, the use can select one of the viewpoint defined within it. -This is achieved through the two dropdown boxes:

Defining New Viewpoints

Papyrus supports the definition of new viewpoints that can subsequently used by selecting them in the Papyrus Viewpoints preferences panel. -A configuration file is simply an Ecore model that can be edited with the provided Viewpoints configuration editor in Papyrus.

Available Concepts

This subsection summarizes the different concepts that are leveraged for the definition of viewpoints in Papyrus. -It is important to note that these concepts rely on and extend the ISO 42010 standard for viewpoints.

Building a Configuration

The first step is to create the configuration file. -Papyrus comes with a wizard for this purpose:

Configuration element

Once the configuration file is created, it should be automatically opened with the Papyrus viewpoints configuration editor. -The top element is the configuration. -It has two properties:

Stakeholders and Viewpoints

It is then possible to add new Viewpoints and Stakeholders to the configuration by the conxtual menu New Child on the configuration element. -A stakeholder has two properties, name' and viewpoints. The viewpoints properties must be filled with references to the appropriate viewpoints for the stakeholder. -A viewpoint also has two properties, name and parent. The parent property is used to specify that a viewpoint inherits from another one.

Diagram element

Once a viewpoint has been created, it is possible to add to it diagrams using the New Child contextual menu. -A diagram will define a specialized view on a model, based on the implementation in Papyrus. -For this purpose, the diagram elements have the following properties:

The list of recognized implementation IDs is as follow:

Implementation IDDescription
PapyrusUMLActivityDiagramUML Activity Diagram
PapyrusUMLClassDiagramUML Class Diagram
PapyrusUMLCommunicationDiagramUML Communication Diagram
PapyrusUMLComponentDiagramUML Component Diagram
CompositeStructureUML Composite Diagram
PapyrusUMLDeploymentDiagramUML Deployment Diagram
PapyrusUMLProfileDiagramUML Profile Diagram
PapyrusUMLSequenceDiagramUML Sequence Diagram
PapyrusUMLStateMachineDiagramUML State Machine Diagram
PapyrusUMLTimingDiagramUML Timing Diagram
UseCaseUML Use Case Diagram
PapyrusUMLInteractionOverviewDiagramUML Interaction Overview Diagram
BlockDefinitionSysML Block Definition Diagram
InternalBlockSysML Internal Block Diagram
ParametricSysML Parametric Diagram
RequirementDiagramSysML Requirements Diagram

Once a diagram has been created it is possible to constraint it using rules. -There are four kinds of rules:

Each rule has a permit property that specify whether the rule authorizes or forbids the action it represents. -Otherwise, the properties of the rules are as follow:

As an example, it is possible to define a diagram of the inner classes of classes as follow:

In this example, the sole model rule defines that this kind of diagram can only be applied on Class. -The owning rules define that the diagrams can be owned only by Class and Package elements. -Then two child rules are used to define that it is only possible to add new Classifier and Comment elements thorugh this diagram. -The first child rule specifies that the Classifier elements should be added to the model with the nestedClassifier property of the root Class element. -In the same way, the second one specifies that the Comment elements should be added to the model with the ownedComment property of the root Class element.

Viewpoint Enforcement Principles

When enforcing a viewpoint, the following principles are used when authorizing, or denying user actions:

\ No newline at end of file diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.mediawiki b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.mediawiki deleted file mode 100755 index ed0d4705d75..00000000000 --- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.mediawiki +++ /dev/null @@ -1,240 +0,0 @@ - - -=Viewpoints in Papyrus= - -==Introduction== -Viewpoints in Papyrus enables the specialization of the user experiences by constraining what can be seen and interacted with in models through views. -The most obvious ways to look at and interact with a model is through diagrams; and viewpoints enables the specification of constraints upon them as well as their specialization. -Papyrus also define additional views, including textual ones. - - - - -==Impacts of Viewpoints in the Papyrus Interface== -The enforcement of a particular viewpoint will have noticeable consequences on the user interface of Papyrus, i.e. what a user will be able to see and do. -Viewpoints also have impacts on the edition experience of the model themselves. - -===Contextual Menus=== -The definition a viewpoints specify which views and diagrams can be applied to specified model elements. -A consequence is that the Papyrus tool bar as well as the contextual menus are aware of the currently enforced viewpoint and only make available actions that are in conformance with the viewpoint. -For example, in the two captures hereafter the content of the same menu for the creation of a new diagram depends on the enforced viewpoint. -{| -| [[image:captures/menu_normal.png]] -| [[image:captures/menu_filtered.png]] -|} - -===Toolbar Elements=== -The toolbar elements for the creation of new diagrams are also adapted in the same way as the contextual menus to reflect the currently enforced viewpoint. -The elements that appeat in the contextual menus should also appear in the toolbar. - -===Diagram Properties=== -Papyrus views and diagrams have a set of properties related to the management of viewpoints. -They are visible in the '''Properties''' view of the diagrams. - -[[image:captures/properties.png]] - -In the image above the selected diagram have two properties related to the management of viewpoints: -* '''View Type''': This property shows the diagram's type as defined in the viewpoints' configuration. In the example above, it is a ''UML Activity Diagram'', part of the ''Default Papyrus Viewpoint'' configuration. -* '''Owner''': This property shows the current owner of the diagram, i.e. the model element which the diagram is attached to. In the example above, the diagram is within the ''Diagrams'' package, meaning this package owns the diagram. -* '''Root element''': This property shows the model element that is visualized through the diagram. In the example above, the top element visualized in the selected diagram is the UML activity named ''Activity1''. It is possible to retarget a diagram, i.e. change its root element. The user will be prompted to select a model element that fits the constraints that apply for this type of diagram. - - - - -==Changing the Applied Viewpoint== -The Papyrus viewpoints can be configured in a preference panel accessible along the other Papyrus preferences under the name '''Viewpoints Configuration'''. -The panel looks like the following: - -[[image:captures/preferences.png]] - -===Configuration Kinds=== -The first preference element is the selection of the kind of configuration to apply to the user's environment. -In the above capture, the radio buttons are used to determine which kind of configuration to use. -Papyrus comes with two built-in configurations. -It is nevertheless possible to define new configurations and viewpoints, and select them in this position. - -====Built-in Configurations==== -The built-in configurations are provided for convenience and have the following properties: -* ''Any number of diagrams per model element'' is a configuration with a viewpoint that allow any kind of view and diagram and does not restrain the number of diagrams that can be created for each model element. -* ''At most one diagram per model element'' is a configuration with a viewpoint that allow any kind of view and diagram but limit the number of diagrams that can be created for each model element at one. - -====Extension Point-Defined Configuration==== -It is possible to deploy custom viewpoints configuration through an Eclipse plugin and its contribution to an extension point. -The identifier of the extension point to use is ''org.eclipse.papyrus.infra.viewpoints.policy.custom'' and is defined in the ''org.eclipse.papyrus.infra.viewpoints.policy'' plugin. -Each extension can contribute a viewpoints configuration and give it a priority (0 is lowest). -The setting of the contributed configuration is achieved by giving the path to the configuration file. -The path can be relative to the contributing plugin's root, or be an absolute URI in the form of ''platform:/plugin//''. -If no contribution is made and this option is selected, the builtin configuration named ''Any number of diagrams per model element'' will be used as a fallback. - -====Custom Configuration==== -To select a custom configuration, choose the ''Custom'' option. -This will activate the corresponding preferences fields: -* ''Access scheme'' lets the user select how the custom configuration should be looked for. The possible options are: -** ''Absolute path'' means that the configuration will be looked for on the host's file system. -** ''Workspace file'' means that the configuration file will be looked for as a resource in the workspace. -** ''Embedded in a plugin'' means that the configuration file will be looked for as a resource in a loaded Eclipse plugin. - -* ''Path'' lets the user select the configuration file based on the selected scheme: -** Using the scheme ''Absolute path'' the file is selected using a simple file selection dialog. -** Using the scheme ''Workspace file'' the file is selected using a workspace resource selection dialog. -** Using the scheme ''Embedded in a plugin'' the file is selected using a plugin content selection dialog. - -===Stakeholder and Viewpoint Selection=== -Once a configuration is selected, the use can select one of the viewpoint defined within it. -This is achieved through the two dropdown boxes: -* ''Stakeholder'' is used to select the user's archetype -* ''Viewpoint'' is used to select the viewpoint - - - - -==Defining New Viewpoints== -Papyrus supports the definition of new viewpoints that can subsequently used by selecting them in the Papyrus Viewpoints preferences panel. -A configuration file is simply an Ecore model that can be edited with the provided Viewpoints configuration editor in Papyrus. - -===Available Concepts=== -This subsection summarizes the different concepts that are leveraged for the definition of viewpoints in Papyrus. -It is important to note that these concepts rely on and extend the ISO 42010 standard for viewpoints. - -* A ''configuration'' is a specification of a set of ''viewpoints'' and ''stakeholders''. A ''configuration'' is typically stored in a .configuration file and has to be selected in the preference window (Window/Preferences/Papyrus/Viewpoints Configuration). -* The concept of ''stakeholder'' (see ISO 42010) in Papyrus represents a user archetype that pertains in the construction and/or review of a model. A ''stakeholder'' is associated to a set of ''viewpoints'' defining how he/she can see a model. -* The concept of ''viewpoint'' (see ISO 42010) in Papyrus represents a set of constrains about what can be seen in a model. A Papyrus ''viewpoint'' mainly defines what are the accessible ''diagrams'' and the particular constraints to be applied on each of them. -* A Papyrus ''diagram'' is a specialized view on a model in the form of a visual language. It is supported by an implementation artifact, i.e. the actual code that implements the diagram. Moreover, it can be constrained using ''rules''. -* A ''model rule'' specifies if a model element can be represented through a ''diagram'', i.e. whether it can be selected as the root element of a ''diagram''. -* An ''owning rule'' specifies whether a model element is allowed to own a ''diagram''. -* ''Child rules'' specify whether a given model element can be added to the model through a ''diagram''. -* ''Palette rules'' specify the palette elements that are visible for a ''diagram''. - -===Building a Configuration=== -The first step is to create the configuration file. -Papyrus comes with a wizard for this purpose: -* In the contextual menu of a project, or in the Eclipse '''File'' menu, select '''New''', '''Other ...'''. -* The wizard is called '''Viewpoints configuration''' and is located in the '''Papyrus''' category. - -====Configuration element==== -Once the configuration file is created, it should be automatically opened with the Papyrus viewpoints configuration editor. -The top element is the ''configuration''. -It has two properties: -* ''Default Stakeholder'', which should be used to select the default stakeholder for this configuration (once one has been created). -* ''Metamodel'', which should be used to select the metamodel on which the viewpoint will apply. The property field proposes a list of the loaded metamodels identified by their URI. Usually, the UML metamodel (http://www.eclipse.org/uml2/4.0.0/UML/) should be used. - -====Stakeholders and Viewpoints==== -It is then possible to add new ''Viewpoints'' and ''Stakeholders'' to the configuration by the conxtual menu '''New Child''' on the configuration element. -A ''stakeholder'' has two properties, ''name''' and ''viewpoints''. The ''viewpoints'' properties must be filled with references to the appropriate viewpoints for the ''stakeholder''. -A ''viewpoint'' also has two properties, ''name'' and ''parent''. The ''parent'' property is used to specify that a ''viewpoint'' inherits from another one. - -====Diagram element==== -Once a viewpoint has been created, it is possible to add to it ''diagrams'' using the '''New Child''' contextual menu. -A ''diagram'' will define a specialized view on a model, based on the implementation in Papyrus. -For this purpose, the ''diagram'' elements have the following properties: -* ''name'', which specifies a descriptor for the diagram -* ''parent'', which enables the declaration of an inheritance relationship with another diagram -* ''implementation ID'', which is the unique identifier of the software component in papyrus that will effectively implements the diagram -* ''profiles'', which is the set of profiles that need to be applied for this diagram. The profiles can be selected through their metamodel identified by their URI. This implies that the profiles must be loaded at this point. - -The list of recognized implementation IDs is as follow: -{| border="solid 1px grey" -! Implementation ID -! Description -|- -| '''PapyrusUMLActivityDiagram''' -| UML Activity Diagram -|- -| '''PapyrusUMLClassDiagram''' -| UML Class Diagram -|- -| '''PapyrusUMLCommunicationDiagram''' -| UML Communication Diagram -|- -| '''PapyrusUMLComponentDiagram''' -| UML Component Diagram -|- -| '''CompositeStructure''' -| UML Composite Diagram -|- -| '''PapyrusUMLDeploymentDiagram''' -| UML Deployment Diagram -|- -| '''PapyrusUMLProfileDiagram''' -| UML Profile Diagram -|- -| '''PapyrusUMLSequenceDiagram''' -| UML Sequence Diagram -|- -| '''PapyrusUMLStateMachineDiagram''' -| UML State Machine Diagram -|- -| '''PapyrusUMLTimingDiagram''' -| UML Timing Diagram -|- -| '''UseCase''' -| UML Use Case Diagram -|- -| '''PapyrusUMLInteractionOverviewDiagram''' -| UML Interaction Overview Diagram -|- -| '''BlockDefinition''' -| SysML Block Definition Diagram -|- -| '''InternalBlock''' -| SysML Internal Block Diagram -|- -| '''Parametric''' -| SysML Parametric Diagram -|- -| '''RequirementDiagram''' -| SysML Requirements Diagram -|} - -Once a diagram has been created it is possible to constraint it using rules. -There are four kinds of rules: -* ''Model rules'' constrain the type of the (root) model elements that can be visualized through this view. -* ''Owning rules'' constrain the type of the model elements that can own the diagram itself. -* ''Child rules'' constrain the type of the model elements that can be dropped within this diagram. -* ''Palette rules'' constrain the display of the diagram's palette elements. -Each rule has a ''permit'' property that specify whether the rule authorizes or forbids the action it represents. -Otherwise, the properties of the rules are as follow: -* ''Model rules'' -** ''element'' represents the type of the model elements to apply the rule on. -** ''multiplicity'' represents the maximum number of this kind of diagram that can be created for the referenced model element. -1 represents an unbounded number. -** ''stereotypes'' represents the set of stereotypes that must be applied in the model element for the rule to match. The stereotypes can be picked from the classifiers of the ''profiles'' defined in the parent diagram. -* ''Owning rules'' -** ''element'' represents the type of the model elements to apply the rule on. -** ''multiplicity'' represents the maximum number of this kind of diagram that can be created for the referenced model element. -1 represents an unbounded number. -** ''stereotypes'' represents the set of stereotypes that must be applied in the model element for the rule to match. The stereotypes can be picked from the classifiers of the ''profiles'' defined in the parent diagram. -* ''Child rules'' -** ''element'' represents the type of the model elements begin dropped. -** ''stereotypes'' represents the set of stereotypes that must be applied in the model element for the rule to match. The stereotypes can be picked from the classifiers of the ''profiles'' defined in the parent diagram. -** ''origin'' represents the type of the model elements that are the target of the drop. It is usually one of the type defined in the ''model rules''. -** Additionally, ''child rules'' can be completed with children called ''path elements'' using the '''New Child''' contextual menu. ''Path elements'' defines a path of properties that must be used from the ''origin'' to insert the new ''element'' in the model. -* ''Palette rules'' -** ''element'' represents a pattern to match for the identifier of a palette element. - -As an example, it is possible to define a diagram of the inner classes of classes as follow: - -[[image:captures/config_sample.png]] - -In this example, the sole ''model rule'' defines that this kind of diagram can only be applied on '''Class'''. -The ''owning rules'' define that the diagrams can be owned only by '''Class''' and '''Package''' elements. -Then two ''child rules'' are used to define that it is only possible to add new '''Classifier''' and '''Comment''' elements thorugh this diagram. -The first ''child rule'' specifies that the '''Classifier''' elements should be added to the model with the '''nestedClassifier''' property of the root '''Class''' element. -In the same way, the second one specifies that the '''Comment''' elements should be added to the model with the '''ownedComment''' property of the root '''Class''' element. - - - - -====Viewpoint Enforcement Principles==== -When enforcing a viewpoint, the following principles are used when authorizing, or denying user actions: -* If the selected viewpoint does not enable to decide for the action at hand (no mathcing diagram), the parent viewpoints are recursively considered. -* If a diagram is matched, but the defined rules do not enable to decide for the action at hand, then the parent diagrams are recursively considered. -* The rules are considered in the order of their definition in the viewpoints configuration editor. -* The first rule to match the condition (e.g. type of the considered model element) is used to decide upon the user action. Subsequent rules are not considered. Parent diagrams/viewpoints are also not considered. \ No newline at end of file -- cgit v1.2.3 From 4e72c1a2ccf1063454a65ee60bd4f0d4c18db875 Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Fri, 14 Mar 2014 18:34:16 +0100 Subject: [Releng] Move the *.core.queries.* plugins to the deprecated folder --- .../.classpath | 7 + .../.project | 28 ++ .../META-INF/MANIFEST.MF | 23 + .../about.html | 28 ++ .../build.properties | 8 + ...nstantParameterValue_valueInstance_Duration.gif | Bin 0 -> 223 bytes ...rameterValue_valueInstance_DurationInterval.gif | Bin 0 -> 223 bytes ...tantParameterValue_valueInstance_Expression.gif | Bin 0 -> 223 bytes ...tParameterValue_valueInstance_InstanceValue.gif | Bin 0 -> 223 bytes ...nstantParameterValue_valueInstance_Interval.gif | Bin 0 -> 223 bytes ...ParameterValue_valueInstance_LiteralBoolean.gif | Bin 0 -> 223 bytes ...ParameterValue_valueInstance_LiteralInteger.gif | Bin 0 -> 223 bytes ...antParameterValue_valueInstance_LiteralNull.gif | Bin 0 -> 223 bytes ...tParameterValue_valueInstance_LiteralString.gif | Bin 0 -> 223 bytes ...Value_valueInstance_LiteralUnlimitedNatural.gif | Bin 0 -> 223 bytes ...rameterValue_valueInstance_OpaqueExpression.gif | Bin 0 -> 223 bytes ...rameterValue_valueInstance_StringExpression.gif | Bin 0 -> 223 bytes ...ParameterValue_valueInstance_TimeExpression.gif | Bin 0 -> 223 bytes ...ntParameterValue_valueInstance_TimeInterval.gif | Bin 0 -> 223 bytes ...tion_parameterValues_ConstantParameterValue.gif | Bin 0 -> 223 bytes ...guration_parameterValues_ListParameterValue.gif | Bin 0 -> 223 bytes ...onfiguration_parameterValues_ParameterValue.gif | Bin 0 -> 223 bytes ...uration_parameterValues_QueryExecutionValue.gif | Bin 0 -> 223 bytes ...CreateParameterValue_valueInstance_Duration.gif | Bin 0 -> 223 bytes ...rameterValue_valueInstance_DurationInterval.gif | Bin 0 -> 223 bytes ...eateParameterValue_valueInstance_Expression.gif | Bin 0 -> 223 bytes ...eParameterValue_valueInstance_InstanceValue.gif | Bin 0 -> 223 bytes ...CreateParameterValue_valueInstance_Interval.gif | Bin 0 -> 223 bytes ...ParameterValue_valueInstance_LiteralBoolean.gif | Bin 0 -> 223 bytes ...ParameterValue_valueInstance_LiteralInteger.gif | Bin 0 -> 223 bytes ...ateParameterValue_valueInstance_LiteralNull.gif | Bin 0 -> 223 bytes ...eParameterValue_valueInstance_LiteralString.gif | Bin 0 -> 223 bytes ...Value_valueInstance_LiteralUnlimitedNatural.gif | Bin 0 -> 223 bytes ...rameterValue_valueInstance_OpaqueExpression.gif | Bin 0 -> 223 bytes ...rameterValue_valueInstance_StringExpression.gif | Bin 0 -> 223 bytes ...ParameterValue_valueInstance_TimeExpression.gif | Bin 0 -> 223 bytes ...teParameterValue_valueInstance_TimeInterval.gif | Bin 0 -> 223 bytes .../icons/full/obj16/ConstantParameterValue.gif | Bin 0 -> 129 bytes .../icons/full/obj16/ListParameterValue.gif | Bin 0 -> 129 bytes .../icons/full/obj16/ModiscoQueryConfiguration.gif | Bin 0 -> 129 bytes .../icons/full/obj16/ParameterValue.gif | Bin 0 -> 129 bytes .../icons/full/obj16/QueryExecutionValue.gif | Bin 0 -> 129 bytes .../plugin.properties | 42 ++ .../plugin.xml | 25 + .../provider/ConfigurationEditPlugin.java | 97 ++++ .../ConfigurationItemProviderAdapterFactory.java | 275 ++++++++++ .../ConstantParameterValueItemProvider.java | 223 +++++++++ .../provider/ListParameterValueItemProvider.java | 135 +++++ .../ModiscoQueryConfigurationItemProvider.java | 194 ++++++++ .../provider/ParameterValueItemProvider.java | 138 +++++ .../provider/QueryConfigurationItemProvider.java | 150 ++++++ .../provider/QueryExecutionValueItemProvider.java | 135 +++++ .../.classpath | 7 + .../.project | 28 ++ .../.settings/org.eclipse.core.resources.prefs | 4 + .../.settings/org.eclipse.jdt.core.prefs | 8 + .../META-INF/MANIFEST.MF | 22 + .../about.html | 28 ++ .../build.properties | 8 + .../model/Configuration.ecore | 29 ++ .../model/Configuration.ecorediag | 328 ++++++++++++ .../model/Configuration.genmodel | 41 ++ .../plugin.properties | 12 + .../plugin.xml | 26 + .../core/configuration/ConfigurationFactory.java | 73 +++ .../core/configuration/ConfigurationPackage.java | 553 +++++++++++++++++++++ .../core/configuration/ConstantParameterValue.java | 54 ++ .../core/configuration/ListParameterValue.java | 44 ++ .../configuration/ModiscoQueryConfiguration.java | 72 +++ .../queries/core/configuration/ParameterValue.java | 55 ++ .../core/configuration/QueryConfiguration.java | 54 ++ .../core/configuration/QueryExecutionValue.java | 53 ++ .../impl/ConfigurationFactoryImpl.java | 134 +++++ .../impl/ConfigurationPackageImpl.java | 371 ++++++++++++++ .../impl/ConstantParameterValueImpl.java | 176 +++++++ .../configuration/impl/ListParameterValueImpl.java | 133 +++++ .../impl/ModiscoQueryConfigurationImpl.java | 213 ++++++++ .../configuration/impl/ParameterValueImpl.java | 158 ++++++ .../configuration/impl/QueryConfigurationImpl.java | 164 ++++++ .../impl/QueryExecutionValueImpl.java | 157 ++++++ .../core/configuration/plugin/Activator.java | 90 ++++ .../util/ConfigurationAdapterFactory.java | 217 ++++++++ .../util/ConfigurationResourceFactoryImpl.java | 53 ++ .../util/ConfigurationResourceImpl.java | 31 ++ .../configuration/util/ConfigurationSwitch.java | 227 +++++++++ .../util/ConfigurationXMLProcessor.java | 51 ++ .../.classpath | 7 + .../.project | 28 ++ .../.settings/org.eclipse.core.resources.prefs | 4 + .../.settings/org.eclipse.jdt.core.prefs | 8 + .../META-INF/MANIFEST.MF | 21 + .../about.html | 28 ++ .../build.properties | 7 + .../plugin.properties | 16 + .../resources/ToolConfiguration.ecore | 23 + .../resources/ToolConfiguration.ecorediag | 173 +++++++ .../papyrus/infra/queries/core/Activator.java | 69 +++ .../core/converter/ConverterNotfoundException.java | 70 +++ .../queries/core/converter/ConverterRegistry.java | 163 ++++++ .../core/converter/ObjectToBooleanConverter.java | 49 ++ .../core/converter/ObjectToIntegerConverter.java | 48 ++ .../ValueSpecificationToBooleanConverter.java | 37 ++ .../ValueSpecificationToIntegerConverter.java | 36 ++ .../ValueSpecificationToStringConverter.java | 37 ++ .../core/modisco/ModelQueryNotFoundException.java | 40 ++ .../modisco/ModelQuerySetNotFoundException.java | 40 ++ .../infra/queries/core/modisco/QueryUtil.java | 420 ++++++++++++++++ .../.classpath | 7 - .../.project | 28 -- .../META-INF/MANIFEST.MF | 23 - .../about.html | 28 -- .../build.properties | 8 - ...nstantParameterValue_valueInstance_Duration.gif | Bin 223 -> 0 bytes ...rameterValue_valueInstance_DurationInterval.gif | Bin 223 -> 0 bytes ...tantParameterValue_valueInstance_Expression.gif | Bin 223 -> 0 bytes ...tParameterValue_valueInstance_InstanceValue.gif | Bin 223 -> 0 bytes ...nstantParameterValue_valueInstance_Interval.gif | Bin 223 -> 0 bytes ...ParameterValue_valueInstance_LiteralBoolean.gif | Bin 223 -> 0 bytes ...ParameterValue_valueInstance_LiteralInteger.gif | Bin 223 -> 0 bytes ...antParameterValue_valueInstance_LiteralNull.gif | Bin 223 -> 0 bytes ...tParameterValue_valueInstance_LiteralString.gif | Bin 223 -> 0 bytes ...Value_valueInstance_LiteralUnlimitedNatural.gif | Bin 223 -> 0 bytes ...rameterValue_valueInstance_OpaqueExpression.gif | Bin 223 -> 0 bytes ...rameterValue_valueInstance_StringExpression.gif | Bin 223 -> 0 bytes ...ParameterValue_valueInstance_TimeExpression.gif | Bin 223 -> 0 bytes ...ntParameterValue_valueInstance_TimeInterval.gif | Bin 223 -> 0 bytes ...tion_parameterValues_ConstantParameterValue.gif | Bin 223 -> 0 bytes ...guration_parameterValues_ListParameterValue.gif | Bin 223 -> 0 bytes ...onfiguration_parameterValues_ParameterValue.gif | Bin 223 -> 0 bytes ...uration_parameterValues_QueryExecutionValue.gif | Bin 223 -> 0 bytes ...CreateParameterValue_valueInstance_Duration.gif | Bin 223 -> 0 bytes ...rameterValue_valueInstance_DurationInterval.gif | Bin 223 -> 0 bytes ...eateParameterValue_valueInstance_Expression.gif | Bin 223 -> 0 bytes ...eParameterValue_valueInstance_InstanceValue.gif | Bin 223 -> 0 bytes ...CreateParameterValue_valueInstance_Interval.gif | Bin 223 -> 0 bytes ...ParameterValue_valueInstance_LiteralBoolean.gif | Bin 223 -> 0 bytes ...ParameterValue_valueInstance_LiteralInteger.gif | Bin 223 -> 0 bytes ...ateParameterValue_valueInstance_LiteralNull.gif | Bin 223 -> 0 bytes ...eParameterValue_valueInstance_LiteralString.gif | Bin 223 -> 0 bytes ...Value_valueInstance_LiteralUnlimitedNatural.gif | Bin 223 -> 0 bytes ...rameterValue_valueInstance_OpaqueExpression.gif | Bin 223 -> 0 bytes ...rameterValue_valueInstance_StringExpression.gif | Bin 223 -> 0 bytes ...ParameterValue_valueInstance_TimeExpression.gif | Bin 223 -> 0 bytes ...teParameterValue_valueInstance_TimeInterval.gif | Bin 223 -> 0 bytes .../icons/full/obj16/ConstantParameterValue.gif | Bin 129 -> 0 bytes .../icons/full/obj16/ListParameterValue.gif | Bin 129 -> 0 bytes .../icons/full/obj16/ModiscoQueryConfiguration.gif | Bin 129 -> 0 bytes .../icons/full/obj16/ParameterValue.gif | Bin 129 -> 0 bytes .../icons/full/obj16/QueryExecutionValue.gif | Bin 129 -> 0 bytes .../plugin.properties | 42 -- .../plugin.xml | 25 - .../provider/ConfigurationEditPlugin.java | 97 ---- .../ConfigurationItemProviderAdapterFactory.java | 275 ---------- .../ConstantParameterValueItemProvider.java | 223 --------- .../provider/ListParameterValueItemProvider.java | 135 ----- .../ModiscoQueryConfigurationItemProvider.java | 194 -------- .../provider/ParameterValueItemProvider.java | 138 ----- .../provider/QueryConfigurationItemProvider.java | 150 ------ .../provider/QueryExecutionValueItemProvider.java | 135 ----- .../.classpath | 7 - .../.project | 28 -- .../.settings/org.eclipse.core.resources.prefs | 4 - .../.settings/org.eclipse.jdt.core.prefs | 8 - .../META-INF/MANIFEST.MF | 22 - .../about.html | 28 -- .../build.properties | 8 - .../model/Configuration.ecore | 29 -- .../model/Configuration.ecorediag | 328 ------------ .../model/Configuration.genmodel | 41 -- .../plugin.properties | 12 - .../plugin.xml | 26 - .../core/configuration/ConfigurationFactory.java | 73 --- .../core/configuration/ConfigurationPackage.java | 553 --------------------- .../core/configuration/ConstantParameterValue.java | 54 -- .../core/configuration/ListParameterValue.java | 44 -- .../configuration/ModiscoQueryConfiguration.java | 72 --- .../queries/core/configuration/ParameterValue.java | 55 -- .../core/configuration/QueryConfiguration.java | 54 -- .../core/configuration/QueryExecutionValue.java | 53 -- .../impl/ConfigurationFactoryImpl.java | 134 ----- .../impl/ConfigurationPackageImpl.java | 371 -------------- .../impl/ConstantParameterValueImpl.java | 176 ------- .../configuration/impl/ListParameterValueImpl.java | 133 ----- .../impl/ModiscoQueryConfigurationImpl.java | 213 -------- .../configuration/impl/ParameterValueImpl.java | 158 ------ .../configuration/impl/QueryConfigurationImpl.java | 164 ------ .../impl/QueryExecutionValueImpl.java | 157 ------ .../core/configuration/plugin/Activator.java | 90 ---- .../util/ConfigurationAdapterFactory.java | 217 -------- .../util/ConfigurationResourceFactoryImpl.java | 53 -- .../util/ConfigurationResourceImpl.java | 31 -- .../configuration/util/ConfigurationSwitch.java | 227 --------- .../util/ConfigurationXMLProcessor.java | 51 -- .../.classpath | 7 - .../.project | 28 -- .../.settings/org.eclipse.core.resources.prefs | 4 - .../.settings/org.eclipse.jdt.core.prefs | 8 - .../META-INF/MANIFEST.MF | 21 - .../about.html | 28 -- .../build.properties | 7 - .../plugin.properties | 16 - .../resources/ToolConfiguration.ecore | 23 - .../resources/ToolConfiguration.ecorediag | 173 ------- .../papyrus/infra/queries/core/Activator.java | 69 --- .../core/converter/ConverterNotfoundException.java | 70 --- .../queries/core/converter/ConverterRegistry.java | 163 ------ .../core/converter/ObjectToBooleanConverter.java | 49 -- .../core/converter/ObjectToIntegerConverter.java | 48 -- .../ValueSpecificationToBooleanConverter.java | 37 -- .../ValueSpecificationToIntegerConverter.java | 36 -- .../ValueSpecificationToStringConverter.java | 37 -- .../core/modisco/ModelQueryNotFoundException.java | 40 -- .../modisco/ModelQuerySetNotFoundException.java | 40 -- .../infra/queries/core/modisco/QueryUtil.java | 420 ---------------- 214 files changed, 6506 insertions(+), 6506 deletions(-) create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/.classpath create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/.project create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/META-INF/MANIFEST.MF create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/about.html create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/build.properties create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Duration.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_DurationInterval.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Expression.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_InstanceValue.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Interval.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralBoolean.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralInteger.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralNull.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralString.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralUnlimitedNatural.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_OpaqueExpression.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_StringExpression.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_TimeExpression.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_TimeInterval.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ConstantParameterValue.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ListParameterValue.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ParameterValue.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_QueryExecutionValue.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Duration.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_DurationInterval.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Expression.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_InstanceValue.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Interval.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralBoolean.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralInteger.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralNull.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralString.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralUnlimitedNatural.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_OpaqueExpression.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_StringExpression.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_TimeExpression.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_TimeInterval.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ConstantParameterValue.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ListParameterValue.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ModiscoQueryConfiguration.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ParameterValue.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/QueryExecutionValue.gif create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/plugin.properties create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/plugin.xml create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConfigurationEditPlugin.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConfigurationItemProviderAdapterFactory.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConstantParameterValueItemProvider.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ListParameterValueItemProvider.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ModiscoQueryConfigurationItemProvider.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ParameterValueItemProvider.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/QueryConfigurationItemProvider.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/QueryExecutionValueItemProvider.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/.classpath create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/.project create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/.settings/org.eclipse.core.resources.prefs create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/.settings/org.eclipse.jdt.core.prefs create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/META-INF/MANIFEST.MF create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/about.html create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/build.properties create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecore create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecorediag create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.genmodel create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/plugin.properties create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/plugin.xml create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConfigurationFactory.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConfigurationPackage.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConstantParameterValue.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ListParameterValue.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ModiscoQueryConfiguration.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ParameterValue.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/QueryConfiguration.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/QueryExecutionValue.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConfigurationFactoryImpl.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConfigurationPackageImpl.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConstantParameterValueImpl.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ListParameterValueImpl.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ModiscoQueryConfigurationImpl.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ParameterValueImpl.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/QueryConfigurationImpl.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/QueryExecutionValueImpl.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/plugin/Activator.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationAdapterFactory.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationResourceFactoryImpl.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationResourceImpl.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationSwitch.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationXMLProcessor.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/.classpath create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/.project create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.core.resources.prefs create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.jdt.core.prefs create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/META-INF/MANIFEST.MF create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/about.html create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/build.properties create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/plugin.properties create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecore create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecorediag create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/Activator.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterNotfoundException.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterRegistry.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToBooleanConverter.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToIntegerConverter.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToBooleanConverter.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToIntegerConverter.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToStringConverter.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQueryNotFoundException.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQuerySetNotFoundException.java create mode 100644 deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/QueryUtil.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/.classpath delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/.project delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/META-INF/MANIFEST.MF delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/about.html delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/build.properties delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Duration.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_DurationInterval.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Expression.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_InstanceValue.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Interval.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralBoolean.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralInteger.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralNull.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralString.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralUnlimitedNatural.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_OpaqueExpression.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_StringExpression.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_TimeExpression.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_TimeInterval.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ConstantParameterValue.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ListParameterValue.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ParameterValue.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_QueryExecutionValue.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Duration.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_DurationInterval.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Expression.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_InstanceValue.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Interval.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralBoolean.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralInteger.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralNull.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralString.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralUnlimitedNatural.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_OpaqueExpression.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_StringExpression.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_TimeExpression.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_TimeInterval.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ConstantParameterValue.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ListParameterValue.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ModiscoQueryConfiguration.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ParameterValue.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/QueryExecutionValue.gif delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/plugin.properties delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/plugin.xml delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConfigurationEditPlugin.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConfigurationItemProviderAdapterFactory.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConstantParameterValueItemProvider.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ListParameterValueItemProvider.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ModiscoQueryConfigurationItemProvider.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ParameterValueItemProvider.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/QueryConfigurationItemProvider.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/QueryExecutionValueItemProvider.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/.classpath delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/.project delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/.settings/org.eclipse.core.resources.prefs delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/.settings/org.eclipse.jdt.core.prefs delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/META-INF/MANIFEST.MF delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/about.html delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/build.properties delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecore delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecorediag delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.genmodel delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/plugin.properties delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/plugin.xml delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConfigurationFactory.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConfigurationPackage.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConstantParameterValue.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ListParameterValue.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ModiscoQueryConfiguration.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ParameterValue.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/QueryConfiguration.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/QueryExecutionValue.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConfigurationFactoryImpl.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConfigurationPackageImpl.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConstantParameterValueImpl.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ListParameterValueImpl.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ModiscoQueryConfigurationImpl.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ParameterValueImpl.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/QueryConfigurationImpl.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/QueryExecutionValueImpl.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/plugin/Activator.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationAdapterFactory.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationResourceFactoryImpl.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationResourceImpl.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationSwitch.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationXMLProcessor.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/.classpath delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/.project delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.core.resources.prefs delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.jdt.core.prefs delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/META-INF/MANIFEST.MF delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/about.html delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/build.properties delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/plugin.properties delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecore delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecorediag delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/Activator.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterNotfoundException.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterRegistry.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToBooleanConverter.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToIntegerConverter.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToBooleanConverter.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToIntegerConverter.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToStringConverter.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQueryNotFoundException.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQuerySetNotFoundException.java delete mode 100644 plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/QueryUtil.java (limited to 'plugins') diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/.classpath b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/.classpath new file mode 100644 index 00000000000..cedf0d0d0b5 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/.project b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/.project new file mode 100644 index 00000000000..d784407f2ea --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/.project @@ -0,0 +1,28 @@ + + + org.eclipse.papyrus.infra.queries.core.configuration.edit + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..13e26e08855 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/META-INF/MANIFEST.MF @@ -0,0 +1,23 @@ +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.papyrus.infra.queries.core.configuration;bundle-version="1.0.0", + org.eclipse.emf.edit;visibility:=reexport, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.emf.ecore.edit;visibility:=reexport, + org.eclipse.uml2.uml, + org.eclipse.uml2.uml.edit +Export-Package: org.eclipse.papyrus.infra.queries.core.configuration.p + rovider +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-ClassPath: . +Bundle-Version: 1.0.0.qualifier +Bundle-Localization: plugin +Bundle-Name: %pluginName +Bundle-Activator: org.eclipse.papyrus.infra.queries.core.configuration + .provider.ConfigurationEditPlugin$Implementation +Bundle-ManifestVersion: 2 +Bundle-SymbolicName: org.eclipse.papyrus.infra.queries.core.configurat + ion.edit;singleton:=true +Bundle-RequiredExecutionEnvironment: J2SE-1.5 + diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/about.html b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/about.html new file mode 100644 index 00000000000..82d49bf5f81 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

About This Content

+ +

June 5, 2007

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") 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 http://www.eclipse.org.

+ + + diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/build.properties b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/build.properties new file mode 100644 index 00000000000..f465f5d7485 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/build.properties @@ -0,0 +1,8 @@ +# +#Mon Sep 12 09:29:39 CEST 2011 +output..=bin/ +bin.includes=.,icons/,META-INF/,plugin.xml,plugin.properties,about.html +jars.compile.order=. +src.includes = about.html +source..=src-gen/ +bin..=bin/ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Duration.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Duration.gif new file mode 100644 index 00000000000..7839cb59536 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Duration.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_DurationInterval.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_DurationInterval.gif new file mode 100644 index 00000000000..bbdaa350889 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_DurationInterval.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Expression.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Expression.gif new file mode 100644 index 00000000000..b94380bd871 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Expression.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_InstanceValue.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_InstanceValue.gif new file mode 100644 index 00000000000..1bca29e3795 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_InstanceValue.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Interval.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Interval.gif new file mode 100644 index 00000000000..7d35c8972d1 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Interval.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralBoolean.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralBoolean.gif new file mode 100644 index 00000000000..7f2d45eb492 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralBoolean.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralInteger.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralInteger.gif new file mode 100644 index 00000000000..58e344bde6e Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralInteger.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralNull.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralNull.gif new file mode 100644 index 00000000000..e3cf235bb60 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralNull.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralString.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralString.gif new file mode 100644 index 00000000000..ebe3a4888bb Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralString.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralUnlimitedNatural.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralUnlimitedNatural.gif new file mode 100644 index 00000000000..dfe51cfa69b Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralUnlimitedNatural.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_OpaqueExpression.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_OpaqueExpression.gif new file mode 100644 index 00000000000..b94380bd871 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_OpaqueExpression.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_StringExpression.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_StringExpression.gif new file mode 100644 index 00000000000..7d35c8972d1 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_StringExpression.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_TimeExpression.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_TimeExpression.gif new file mode 100644 index 00000000000..24c57a05b7e Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_TimeExpression.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_TimeInterval.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_TimeInterval.gif new file mode 100644 index 00000000000..a674b69c271 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_TimeInterval.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ConstantParameterValue.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ConstantParameterValue.gif new file mode 100644 index 00000000000..f213cc393ad Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ConstantParameterValue.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ListParameterValue.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ListParameterValue.gif new file mode 100644 index 00000000000..888a2c1bacc Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ListParameterValue.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ParameterValue.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ParameterValue.gif new file mode 100644 index 00000000000..79a0a45b269 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ParameterValue.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_QueryExecutionValue.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_QueryExecutionValue.gif new file mode 100644 index 00000000000..523057cd5d9 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_QueryExecutionValue.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Duration.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Duration.gif new file mode 100644 index 00000000000..7f7c51a1f20 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Duration.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_DurationInterval.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_DurationInterval.gif new file mode 100644 index 00000000000..2769bc64647 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_DurationInterval.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Expression.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Expression.gif new file mode 100644 index 00000000000..de6af47e2ec Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Expression.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_InstanceValue.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_InstanceValue.gif new file mode 100644 index 00000000000..cc2ef529556 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_InstanceValue.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Interval.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Interval.gif new file mode 100644 index 00000000000..0c1ee4c917e Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Interval.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralBoolean.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralBoolean.gif new file mode 100644 index 00000000000..a382f74844b Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralBoolean.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralInteger.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralInteger.gif new file mode 100644 index 00000000000..b72b5e57a83 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralInteger.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralNull.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralNull.gif new file mode 100644 index 00000000000..b32e049d4a4 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralNull.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralString.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralString.gif new file mode 100644 index 00000000000..a89d0ec24fe Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralString.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralUnlimitedNatural.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralUnlimitedNatural.gif new file mode 100644 index 00000000000..52baab8f56e Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralUnlimitedNatural.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_OpaqueExpression.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_OpaqueExpression.gif new file mode 100644 index 00000000000..de6af47e2ec Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_OpaqueExpression.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_StringExpression.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_StringExpression.gif new file mode 100644 index 00000000000..0c1ee4c917e Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_StringExpression.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_TimeExpression.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_TimeExpression.gif new file mode 100644 index 00000000000..e8233067cc9 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_TimeExpression.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_TimeInterval.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_TimeInterval.gif new file mode 100644 index 00000000000..bc7b7f9c860 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_TimeInterval.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ConstantParameterValue.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ConstantParameterValue.gif new file mode 100644 index 00000000000..134551bff7e Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ConstantParameterValue.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ListParameterValue.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ListParameterValue.gif new file mode 100644 index 00000000000..4365960a04b Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ListParameterValue.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ModiscoQueryConfiguration.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ModiscoQueryConfiguration.gif new file mode 100644 index 00000000000..134551bff7e Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ModiscoQueryConfiguration.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ParameterValue.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ParameterValue.gif new file mode 100644 index 00000000000..2b692560297 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ParameterValue.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/QueryExecutionValue.gif b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/QueryExecutionValue.gif new file mode 100644 index 00000000000..ed874747401 Binary files /dev/null and b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/QueryExecutionValue.gif differ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/plugin.properties b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/plugin.properties new file mode 100644 index 00000000000..69cc28400be --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/plugin.properties @@ -0,0 +1,42 @@ +################################################################################ +# Copyright (c) 2008 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 +################################################################################ +pluginName=Configuration Edit Support (Incubation) +providerName=Eclipse Modeling Project + +_UI_CreateChild_text = {0} +_UI_CreateChild_text2 = {1} {0} +_UI_CreateChild_text3 = {1} +_UI_CreateChild_tooltip = Create New {0} Under {1} Feature +_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. +_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. + +_UI_PropertyDescriptor_description = The {0} of the {1} + +_UI_QueryConfiguration_type = Query Configuration +_UI_ModiscoQueryConfiguration_type = Modisco Query Configuration +_UI_ParameterValue_type = Parameter Value +_UI_Unknown_type = Object + +_UI_Unknown_datatype= Value + +_UI_ModiscoQueryConfiguration_query_feature = Query +_UI_ModiscoQueryConfiguration_parameterValues_feature = Parameter Values +_UI_ParameterValue_parameter_feature = Parameter +_UI_ParameterValue_valueInstance_feature = Value Instance +_UI_Unknown_feature = Unspecified + +_UI_QueryExecutionValue_type = Query Execution Value +_UI_ConstantParameterValue_type = Constant Parameter Value +_UI_QueryExecutionValue_configuration_feature = Configuration +_UI_ConstantParameterValue_valueInstance_feature = Value Instance +_UI_QueryConfiguration_name_feature = Name +_UI_ListParameterValue_type = List Parameter Value +_UI_ListParameterValue_values_feature = Values diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/plugin.xml b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/plugin.xml new file mode 100644 index 00000000000..4296ad2fa25 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/plugin.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConfigurationEditPlugin.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConfigurationEditPlugin.java new file mode 100644 index 00000000000..f8205917100 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConfigurationEditPlugin.java @@ -0,0 +1,97 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.provider; + +import org.eclipse.emf.common.EMFPlugin; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.provider.EcoreEditPlugin; +import org.eclipse.uml2.uml.edit.UMLEditPlugin; + +/** + * This is the central singleton for the Configuration edit plugin. + * + * + * @generated + */ +public final class ConfigurationEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final ConfigurationEditPlugin INSTANCE = new ConfigurationEditPlugin(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public ConfigurationEditPlugin() { + super + (new ResourceLocator [] { + EcoreEditPlugin.INSTANCE, + // QueryEditPlugin.INSTANCE, + UMLEditPlugin.INSTANCE, + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConfigurationItemProviderAdapterFactory.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConfigurationItemProviderAdapterFactory.java new file mode 100644 index 00000000000..7615aff1dcc --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConfigurationItemProviderAdapterFactory.java @@ -0,0 +1,275 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.provider; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.papyrus.infra.queries.core.configuration.util.ConfigurationAdapterFactory; + +/** + * This is the factory that is used to provide the interfaces needed to support Viewers. + * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. + * The adapters also support Eclipse property sheets. + * Note that most of the adapters are shared among multiple instances. + * + * + * @generated + */ +public class ConfigurationItemProviderAdapterFactory extends ConfigurationAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this adapter factory. + * + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. + * + * + * @generated + */ + protected Collection supportedTypes = new ArrayList(); + + /** + * This constructs an instance. + * + * + * @generated + */ + public ConfigurationItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration} instances. + * + * + * @generated + */ + protected ModiscoQueryConfigurationItemProvider modiscoQueryConfigurationItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration}. + * + * + * @generated + */ + @Override + public Adapter createModiscoQueryConfigurationAdapter() { + if (modiscoQueryConfigurationItemProvider == null) { + modiscoQueryConfigurationItemProvider = new ModiscoQueryConfigurationItemProvider(this); + } + + return modiscoQueryConfigurationItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue} instances. + * + * + * @generated + */ + protected QueryExecutionValueItemProvider queryExecutionValueItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue}. + * + * + * @generated + */ + @Override + public Adapter createQueryExecutionValueAdapter() { + if (queryExecutionValueItemProvider == null) { + queryExecutionValueItemProvider = new QueryExecutionValueItemProvider(this); + } + + return queryExecutionValueItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue} instances. + * + * + * @generated + */ + protected ConstantParameterValueItemProvider constantParameterValueItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue}. + * + * + * @generated + */ + @Override + public Adapter createConstantParameterValueAdapter() { + if (constantParameterValueItemProvider == null) { + constantParameterValueItemProvider = new ConstantParameterValueItemProvider(this); + } + + return constantParameterValueItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue} instances. + * + * + * @generated + */ + protected ListParameterValueItemProvider listParameterValueItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue}. + * + * + * @generated + */ + @Override + public Adapter createListParameterValueAdapter() { + if (listParameterValueItemProvider == null) { + listParameterValueItemProvider = new ListParameterValueItemProvider(this); + } + + return listParameterValueItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. + * + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. + * + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the adapter. + * + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. + * + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. + * + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. + * + * + * @generated + */ + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. + * + * + * @generated + */ + public void dispose() { + if (modiscoQueryConfigurationItemProvider != null) modiscoQueryConfigurationItemProvider.dispose(); + if (queryExecutionValueItemProvider != null) queryExecutionValueItemProvider.dispose(); + if (constantParameterValueItemProvider != null) constantParameterValueItemProvider.dispose(); + if (listParameterValueItemProvider != null) listParameterValueItemProvider.dispose(); + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConstantParameterValueItemProvider.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConstantParameterValueItemProvider.java new file mode 100644 index 00000000000..de2560858ea --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConstantParameterValueItemProvider.java @@ -0,0 +1,223 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; +import org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue; + +import org.eclipse.uml2.uml.UMLFactory; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue} object. + * + * + * @generated + */ +public class ConstantParameterValueItemProvider + extends ParameterValueItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ConstantParameterValueItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns ConstantParameterValue.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ConstantParameterValue")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_ConstantParameterValue_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ConstantParameterValue.class)) { + case ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, + UMLFactory.eINSTANCE.createOpaqueExpression())); + + newChildDescriptors.add + (createChildParameter + (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, + UMLFactory.eINSTANCE.createExpression())); + + newChildDescriptors.add + (createChildParameter + (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, + UMLFactory.eINSTANCE.createStringExpression())); + + newChildDescriptors.add + (createChildParameter + (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, + UMLFactory.eINSTANCE.createLiteralInteger())); + + newChildDescriptors.add + (createChildParameter + (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, + UMLFactory.eINSTANCE.createLiteralString())); + + newChildDescriptors.add + (createChildParameter + (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, + UMLFactory.eINSTANCE.createLiteralBoolean())); + + newChildDescriptors.add + (createChildParameter + (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, + UMLFactory.eINSTANCE.createLiteralNull())); + + newChildDescriptors.add + (createChildParameter + (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, + UMLFactory.eINSTANCE.createInstanceValue())); + + newChildDescriptors.add + (createChildParameter + (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, + UMLFactory.eINSTANCE.createLiteralUnlimitedNatural())); + + newChildDescriptors.add + (createChildParameter + (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, + UMLFactory.eINSTANCE.createTimeExpression())); + + newChildDescriptors.add + (createChildParameter + (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, + UMLFactory.eINSTANCE.createDuration())); + + newChildDescriptors.add + (createChildParameter + (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, + UMLFactory.eINSTANCE.createInterval())); + + newChildDescriptors.add + (createChildParameter + (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, + UMLFactory.eINSTANCE.createDurationInterval())); + + newChildDescriptors.add + (createChildParameter + (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, + UMLFactory.eINSTANCE.createTimeInterval())); + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ListParameterValueItemProvider.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ListParameterValueItemProvider.java new file mode 100644 index 00000000000..b476a6f00c5 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ListParameterValueItemProvider.java @@ -0,0 +1,135 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue} object. + * + * + * @generated + */ +public class ListParameterValueItemProvider + extends ParameterValueItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ListParameterValueItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addValuesPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Values feature. + * + * + * @generated + */ + protected void addValuesPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ListParameterValue_values_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ListParameterValue_values_feature", "_UI_ListParameterValue_type"), + ConfigurationPackage.Literals.LIST_PARAMETER_VALUE__VALUES, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns ListParameterValue.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ListParameterValue")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_ListParameterValue_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ModiscoQueryConfigurationItemProvider.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ModiscoQueryConfigurationItemProvider.java new file mode 100644 index 00000000000..c0ec3dbd806 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ModiscoQueryConfigurationItemProvider.java @@ -0,0 +1,194 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationFactory; +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; +import org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration} object. + * + * + * @generated + */ +public class ModiscoQueryConfigurationItemProvider + extends QueryConfigurationItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ModiscoQueryConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addQueryPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Query feature. + * + * + * @generated + */ + protected void addQueryPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ModiscoQueryConfiguration_query_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ModiscoQueryConfiguration_query_feature", "_UI_ModiscoQueryConfiguration_type"), + ConfigurationPackage.Literals.MODISCO_QUERY_CONFIGURATION__QUERY, + true, + false, + true, + null, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ConfigurationPackage.Literals.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns ModiscoQueryConfiguration.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ModiscoQueryConfiguration")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ModiscoQueryConfiguration)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ModiscoQueryConfiguration_type") : + getString("_UI_ModiscoQueryConfiguration_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ModiscoQueryConfiguration.class)) { + case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ConfigurationPackage.Literals.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES, + ConfigurationFactory.eINSTANCE.createQueryExecutionValue())); + + newChildDescriptors.add + (createChildParameter + (ConfigurationPackage.Literals.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES, + ConfigurationFactory.eINSTANCE.createConstantParameterValue())); + + newChildDescriptors.add + (createChildParameter + (ConfigurationPackage.Literals.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES, + ConfigurationFactory.eINSTANCE.createListParameterValue())); + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ParameterValueItemProvider.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ParameterValueItemProvider.java new file mode 100644 index 00000000000..a88d5c2f912 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ParameterValueItemProvider.java @@ -0,0 +1,138 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; + +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue} object. + * + * + * @generated + */ +public class ParameterValueItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ParameterValueItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addParameterPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Parameter feature. + * + * + * @generated + */ + protected void addParameterPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ParameterValue_parameter_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ParameterValue_parameter_feature", "_UI_ParameterValue_type"), + ConfigurationPackage.Literals.PARAMETER_VALUE__PARAMETER, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_ParameterValue_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ConfigurationEditPlugin.INSTANCE; + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/QueryConfigurationItemProvider.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/QueryConfigurationItemProvider.java new file mode 100644 index 00000000000..964c9c87be8 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/QueryConfigurationItemProvider.java @@ -0,0 +1,150 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; +import org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration} object. + * + * + * @generated + */ +public class QueryConfigurationItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public QueryConfigurationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addNamePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Name feature. + * + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_QueryConfiguration_name_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_QueryConfiguration_name_feature", "_UI_QueryConfiguration_type"), + ConfigurationPackage.Literals.QUERY_CONFIGURATION__NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((QueryConfiguration)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_QueryConfiguration_type") : + getString("_UI_QueryConfiguration_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(QueryConfiguration.class)) { + case ConfigurationPackage.QUERY_CONFIGURATION__NAME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ConfigurationEditPlugin.INSTANCE; + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/QueryExecutionValueItemProvider.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/QueryExecutionValueItemProvider.java new file mode 100644 index 00000000000..2b3050ce093 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/QueryExecutionValueItemProvider.java @@ -0,0 +1,135 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue} object. + * + * + * @generated + */ +public class QueryExecutionValueItemProvider + extends ParameterValueItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public QueryExecutionValueItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addConfigurationPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Configuration feature. + * + * + * @generated + */ + protected void addConfigurationPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_QueryExecutionValue_configuration_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_QueryExecutionValue_configuration_feature", "_UI_QueryExecutionValue_type"), + ConfigurationPackage.Literals.QUERY_EXECUTION_VALUE__CONFIGURATION, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns QueryExecutionValue.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/QueryExecutionValue")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_QueryExecutionValue_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/.classpath b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/.classpath new file mode 100644 index 00000000000..cedf0d0d0b5 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/.project b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/.project new file mode 100644 index 00000000000..19b48341fa2 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/.project @@ -0,0 +1,28 @@ + + + org.eclipse.papyrus.infra.queries.core.configuration + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/.settings/org.eclipse.core.resources.prefs b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000000..7cceaebc432 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,4 @@ +#Thu Oct 07 19:29:54 CEST 2010 +eclipse.preferences.version=1 +encoding//model/Configuration.ecore=UTF-8 +encoding//model/Configuration.ecorediag=UTF-8 diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/.settings/org.eclipse.jdt.core.prefs b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..2010cb0a8ba --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +#Wed Oct 06 16:11:35 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.configuration/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..af3264a0829 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/META-INF/MANIFEST.MF @@ -0,0 +1,22 @@ +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.emf.ecore.xmi;visibility:=reexport, + org.eclipse.uml2.uml +Export-Package: org.eclipse.papyrus.infra.queries.core.configuration, + org.eclipse.papyrus.infra.queries.core.configuration.impl, + org.eclipse.papyrus.infra.queries.core.configuration.plugin, + org.eclipse.papyrus.infra.queries.core.configuration.util +Bundle-Vendor: %providerName +Bundle-ActivationPolicy: lazy +Bundle-ClassPath: . +Bundle-Version: 1.0.0.qualifier +Bundle-Localization: plugin +Bundle-Name: %pluginName +Bundle-Activator: org.eclipse.papyrus.infra.queries.core.configuration + .plugin.Activator$Implementation +Bundle-ManifestVersion: 2 +Bundle-SymbolicName: org.eclipse.papyrus.infra.queries.core.configurat + ion;singleton:=true +Bundle-RequiredExecutionEnvironment: J2SE-1.5 + diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/about.html b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/about.html new file mode 100644 index 00000000000..82d49bf5f81 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

About This Content

+ +

June 5, 2007

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") 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 http://www.eclipse.org.

+ + + diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/build.properties b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/build.properties new file mode 100644 index 00000000000..e05d6efaf6a --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/build.properties @@ -0,0 +1,8 @@ +# +#Mon Sep 12 09:29:39 CEST 2011 +output..=bin/ +bin.includes=.,model/,META-INF/,plugin.xml,plugin.properties,about.html +jars.compile.order=. +src.includes = about.html +source..=src-gen/ +bin..=bin/ diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecore b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecore new file mode 100644 index 00000000000..5e4046fa300 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecore @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecorediag b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecorediag new file mode 100644 index 00000000000..7b7dc6485ef --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecorediag @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.genmodel b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.genmodel new file mode 100644 index 00000000000..e1ab6b1384f --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.genmodel @@ -0,0 +1,41 @@ + + + Configuration.ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/plugin.properties b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/plugin.properties new file mode 100644 index 00000000000..27eac336a7e --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/plugin.properties @@ -0,0 +1,12 @@ +################################################################################ +# Copyright (c) 2008 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 +################################################################################ +pluginName=Configuration Model for queries (Incubation) +providerName=Eclipse Modeling Project diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/plugin.xml b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/plugin.xml new file mode 100644 index 00000000000..52cff66df0a --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/plugin.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConfigurationFactory.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConfigurationFactory.java new file mode 100644 index 00000000000..a41797e0838 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConfigurationFactory.java @@ -0,0 +1,73 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage + * @generated + */ +public interface ConfigurationFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ConfigurationFactory eINSTANCE = org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationFactoryImpl.init(); + + /** + * Returns a new object of class 'Modisco Query Configuration'. + * + * + * @return a new object of class 'Modisco Query Configuration'. + * @generated + */ + ModiscoQueryConfiguration createModiscoQueryConfiguration(); + + /** + * Returns a new object of class 'Query Execution Value'. + * + * + * @return a new object of class 'Query Execution Value'. + * @generated + */ + QueryExecutionValue createQueryExecutionValue(); + + /** + * Returns a new object of class 'Constant Parameter Value'. + * + * + * @return a new object of class 'Constant Parameter Value'. + * @generated + */ + ConstantParameterValue createConstantParameterValue(); + + /** + * Returns a new object of class 'List Parameter Value'. + * + * + * @return a new object of class 'List Parameter Value'. + * @generated + */ + ListParameterValue createListParameterValue(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ConfigurationPackage getConfigurationPackage(); + +} //ConfigurationFactory diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConfigurationPackage.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConfigurationPackage.java new file mode 100644 index 00000000000..5560e67ef85 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConfigurationPackage.java @@ -0,0 +1,553 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationFactory + * @model kind="package" + * @generated + */ +public interface ConfigurationPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "configuration"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/papyrus/core/queries/0.7"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "configuration"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ConfigurationPackage eINSTANCE = org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryConfigurationImpl Query Configuration}' class. + * + * + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryConfigurationImpl + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getQueryConfiguration() + * @generated + */ + int QUERY_CONFIGURATION = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int QUERY_CONFIGURATION__NAME = 0; + + /** + * The number of structural features of the 'Query Configuration' class. + * + * + * @generated + * @ordered + */ + int QUERY_CONFIGURATION_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ModiscoQueryConfigurationImpl Modisco Query Configuration}' class. + * + * + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ModiscoQueryConfigurationImpl + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getModiscoQueryConfiguration() + * @generated + */ + int MODISCO_QUERY_CONFIGURATION = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int MODISCO_QUERY_CONFIGURATION__NAME = QUERY_CONFIGURATION__NAME; + + /** + * The feature id for the 'Query' reference. + * + * + * @generated + * @ordered + */ + int MODISCO_QUERY_CONFIGURATION__QUERY = QUERY_CONFIGURATION_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Parameter Values' containment reference list. + * + * + * @generated + * @ordered + */ + int MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES = QUERY_CONFIGURATION_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Modisco Query Configuration' class. + * + * + * @generated + * @ordered + */ + int MODISCO_QUERY_CONFIGURATION_FEATURE_COUNT = QUERY_CONFIGURATION_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ParameterValueImpl Parameter Value}' class. + * + * + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ParameterValueImpl + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getParameterValue() + * @generated + */ + int PARAMETER_VALUE = 2; + + /** + * The feature id for the 'Parameter' reference. + * + * + * @generated + * @ordered + */ + int PARAMETER_VALUE__PARAMETER = 0; + + /** + * The number of structural features of the 'Parameter Value' class. + * + * + * @generated + * @ordered + */ + int PARAMETER_VALUE_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryExecutionValueImpl Query Execution Value}' class. + * + * + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryExecutionValueImpl + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getQueryExecutionValue() + * @generated + */ + int QUERY_EXECUTION_VALUE = 3; + + /** + * The feature id for the 'Parameter' reference. + * + * + * @generated + * @ordered + */ + int QUERY_EXECUTION_VALUE__PARAMETER = PARAMETER_VALUE__PARAMETER; + + /** + * The feature id for the 'Configuration' reference. + * + * + * @generated + * @ordered + */ + int QUERY_EXECUTION_VALUE__CONFIGURATION = PARAMETER_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Query Execution Value' class. + * + * + * @generated + * @ordered + */ + int QUERY_EXECUTION_VALUE_FEATURE_COUNT = PARAMETER_VALUE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ConstantParameterValueImpl Constant Parameter Value}' class. + * + * + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConstantParameterValueImpl + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getConstantParameterValue() + * @generated + */ + int CONSTANT_PARAMETER_VALUE = 4; + + /** + * The feature id for the 'Parameter' reference. + * + * + * @generated + * @ordered + */ + int CONSTANT_PARAMETER_VALUE__PARAMETER = PARAMETER_VALUE__PARAMETER; + + /** + * The feature id for the 'Value Instance' containment reference. + * + * + * @generated + * @ordered + */ + int CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE = PARAMETER_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Constant Parameter Value' class. + * + * + * @generated + * @ordered + */ + int CONSTANT_PARAMETER_VALUE_FEATURE_COUNT = PARAMETER_VALUE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ListParameterValueImpl List Parameter Value}' class. + * + * + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ListParameterValueImpl + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getListParameterValue() + * @generated + */ + int LIST_PARAMETER_VALUE = 5; + + /** + * The feature id for the 'Parameter' reference. + * + * + * @generated + * @ordered + */ + int LIST_PARAMETER_VALUE__PARAMETER = PARAMETER_VALUE__PARAMETER; + + /** + * The feature id for the 'Values' reference list. + * + * + * @generated + * @ordered + */ + int LIST_PARAMETER_VALUE__VALUES = PARAMETER_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'List Parameter Value' class. + * + * + * @generated + * @ordered + */ + int LIST_PARAMETER_VALUE_FEATURE_COUNT = PARAMETER_VALUE_FEATURE_COUNT + 1; + + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration Query Configuration}'. + * + * + * @return the meta object for class 'Query Configuration'. + * @see org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration + * @generated + */ + EClass getQueryConfiguration(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration#getName() + * @see #getQueryConfiguration() + * @generated + */ + EAttribute getQueryConfiguration_Name(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration Modisco Query Configuration}'. + * + * + * @return the meta object for class 'Modisco Query Configuration'. + * @see org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration + * @generated + */ + EClass getModiscoQueryConfiguration(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration#getQuery Query}'. + * + * + * @return the meta object for the reference 'Query'. + * @see org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration#getQuery() + * @see #getModiscoQueryConfiguration() + * @generated + */ + EReference getModiscoQueryConfiguration_Query(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration#getParameterValues Parameter Values}'. + * + * + * @return the meta object for the containment reference list 'Parameter Values'. + * @see org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration#getParameterValues() + * @see #getModiscoQueryConfiguration() + * @generated + */ + EReference getModiscoQueryConfiguration_ParameterValues(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue Parameter Value}'. + * + * + * @return the meta object for class 'Parameter Value'. + * @see org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue + * @generated + */ + EClass getParameterValue(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue#getParameter Parameter}'. + * + * + * @return the meta object for the reference 'Parameter'. + * @see org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue#getParameter() + * @see #getParameterValue() + * @generated + */ + EReference getParameterValue_Parameter(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue Query Execution Value}'. + * + * + * @return the meta object for class 'Query Execution Value'. + * @see org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue + * @generated + */ + EClass getQueryExecutionValue(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue#getConfiguration Configuration}'. + * + * + * @return the meta object for the reference 'Configuration'. + * @see org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue#getConfiguration() + * @see #getQueryExecutionValue() + * @generated + */ + EReference getQueryExecutionValue_Configuration(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue Constant Parameter Value}'. + * + * + * @return the meta object for class 'Constant Parameter Value'. + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue + * @generated + */ + EClass getConstantParameterValue(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue#getValueInstance Value Instance}'. + * + * + * @return the meta object for the containment reference 'Value Instance'. + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue#getValueInstance() + * @see #getConstantParameterValue() + * @generated + */ + EReference getConstantParameterValue_ValueInstance(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue List Parameter Value}'. + * + * + * @return the meta object for class 'List Parameter Value'. + * @see org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue + * @generated + */ + EClass getListParameterValue(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue#getValues Values}'. + * + * + * @return the meta object for the reference list 'Values'. + * @see org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue#getValues() + * @see #getListParameterValue() + * @generated + */ + EReference getListParameterValue_Values(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ConfigurationFactory getConfigurationFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryConfigurationImpl Query Configuration}' class. + * + * + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryConfigurationImpl + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getQueryConfiguration() + * @generated + */ + EClass QUERY_CONFIGURATION = eINSTANCE.getQueryConfiguration(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute QUERY_CONFIGURATION__NAME = eINSTANCE.getQueryConfiguration_Name(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ModiscoQueryConfigurationImpl Modisco Query Configuration}' class. + * + * + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ModiscoQueryConfigurationImpl + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getModiscoQueryConfiguration() + * @generated + */ + EClass MODISCO_QUERY_CONFIGURATION = eINSTANCE.getModiscoQueryConfiguration(); + + /** + * The meta object literal for the 'Query' reference feature. + * + * + * @generated + */ + EReference MODISCO_QUERY_CONFIGURATION__QUERY = eINSTANCE.getModiscoQueryConfiguration_Query(); + + /** + * The meta object literal for the 'Parameter Values' containment reference list feature. + * + * + * @generated + */ + EReference MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES = eINSTANCE.getModiscoQueryConfiguration_ParameterValues(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ParameterValueImpl Parameter Value}' class. + * + * + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ParameterValueImpl + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getParameterValue() + * @generated + */ + EClass PARAMETER_VALUE = eINSTANCE.getParameterValue(); + + /** + * The meta object literal for the 'Parameter' reference feature. + * + * + * @generated + */ + EReference PARAMETER_VALUE__PARAMETER = eINSTANCE.getParameterValue_Parameter(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryExecutionValueImpl Query Execution Value}' class. + * + * + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryExecutionValueImpl + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getQueryExecutionValue() + * @generated + */ + EClass QUERY_EXECUTION_VALUE = eINSTANCE.getQueryExecutionValue(); + + /** + * The meta object literal for the 'Configuration' reference feature. + * + * + * @generated + */ + EReference QUERY_EXECUTION_VALUE__CONFIGURATION = eINSTANCE.getQueryExecutionValue_Configuration(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ConstantParameterValueImpl Constant Parameter Value}' class. + * + * + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConstantParameterValueImpl + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getConstantParameterValue() + * @generated + */ + EClass CONSTANT_PARAMETER_VALUE = eINSTANCE.getConstantParameterValue(); + + /** + * The meta object literal for the 'Value Instance' containment reference feature. + * + * + * @generated + */ + EReference CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE = eINSTANCE.getConstantParameterValue_ValueInstance(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ListParameterValueImpl List Parameter Value}' class. + * + * + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ListParameterValueImpl + * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getListParameterValue() + * @generated + */ + EClass LIST_PARAMETER_VALUE = eINSTANCE.getListParameterValue(); + + /** + * The meta object literal for the 'Values' reference list feature. + * + * + * @generated + */ + EReference LIST_PARAMETER_VALUE__VALUES = eINSTANCE.getListParameterValue_Values(); + + } + +} //ConfigurationPackage diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConstantParameterValue.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConstantParameterValue.java new file mode 100644 index 00000000000..c7a98e250b4 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConstantParameterValue.java @@ -0,0 +1,54 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration; + +import org.eclipse.uml2.uml.ValueSpecification; + +/** + * + * A representation of the model object 'Constant Parameter Value'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue#getValueInstance Value Instance}
  • + *
+ *

+ * + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getConstantParameterValue() + * @model + * @generated + */ +public interface ConstantParameterValue extends ParameterValue { + /** + * Returns the value of the 'Value Instance' containment reference. + * + *

+ * If the meaning of the 'Value Instance' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value Instance' containment reference. + * @see #setValueInstance(ValueSpecification) + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getConstantParameterValue_ValueInstance() + * @model containment="true" + * @generated + */ + ValueSpecification getValueInstance(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue#getValueInstance Value Instance}' containment reference. + * + * + * @param value the new value of the 'Value Instance' containment reference. + * @see #getValueInstance() + * @generated + */ + void setValueInstance(ValueSpecification value); + +} // ConstantParameterValue diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ListParameterValue.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ListParameterValue.java new file mode 100644 index 00000000000..a15a622ece5 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ListParameterValue.java @@ -0,0 +1,44 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'List Parameter Value'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue#getValues Values}
  • + *
+ *

+ * + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getListParameterValue() + * @model + * @generated + */ +public interface ListParameterValue extends ParameterValue { + /** + * Returns the value of the 'Values' reference list. + * The list contents are of type {@link org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue}. + * + *

+ * If the meaning of the 'Values' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Values' reference list. + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getListParameterValue_Values() + * @model + * @generated + */ + EList getValues(); + +} // ListParameterValue diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ModiscoQueryConfiguration.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ModiscoQueryConfiguration.java new file mode 100644 index 00000000000..e6316e5443c --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ModiscoQueryConfiguration.java @@ -0,0 +1,72 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.facet.infra.query.ModelQuery; + +/** + * + * A representation of the model object 'Modisco Query Configuration'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration#getQuery Query}
  • + *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration#getParameterValues Parameter Values}
  • + *
+ *

+ * + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getModiscoQueryConfiguration() + * @model + * @generated + */ +public interface ModiscoQueryConfiguration extends QueryConfiguration { + /** + * Returns the value of the 'Query' reference. + * + *

+ * If the meaning of the 'Query' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Query' reference. + * @see #setQuery(ModelQuery) + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getModiscoQueryConfiguration_Query() + * @model required="true" + * @generated + */ + ModelQuery getQuery(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration#getQuery Query}' reference. + * + * + * @param value the new value of the 'Query' reference. + * @see #getQuery() + * @generated + */ + void setQuery(ModelQuery value); + + /** + * Returns the value of the 'Parameter Values' containment reference list. + * The list contents are of type {@link org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue}. + * + *

+ * If the meaning of the 'Parameter Values' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Parameter Values' containment reference list. + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getModiscoQueryConfiguration_ParameterValues() + * @model containment="true" + * @generated + */ + EList getParameterValues(); + +} // ModiscoQueryConfiguration diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ParameterValue.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ParameterValue.java new file mode 100644 index 00000000000..2f82772c2c2 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ParameterValue.java @@ -0,0 +1,55 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.facet.infra.query.ModelQueryParameter; + +/** + * + * A representation of the model object 'Parameter Value'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue#getParameter Parameter}
  • + *
+ *

+ * + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getParameterValue() + * @model abstract="true" + * @generated + */ +public interface ParameterValue extends EObject { + /** + * Returns the value of the 'Parameter' reference. + * + *

+ * If the meaning of the 'Parameter' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Parameter' reference. + * @see #setParameter(ModelQueryParameter) + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getParameterValue_Parameter() + * @model required="true" + * @generated + */ + ModelQueryParameter getParameter(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue#getParameter Parameter}' reference. + * + * + * @param value the new value of the 'Parameter' reference. + * @see #getParameter() + * @generated + */ + void setParameter(ModelQueryParameter value); + +} // ParameterValue diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/QueryConfiguration.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/QueryConfiguration.java new file mode 100644 index 00000000000..a97e1cc6261 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/QueryConfiguration.java @@ -0,0 +1,54 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Query Configuration'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration#getName Name}
  • + *
+ *

+ * + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getQueryConfiguration() + * @model abstract="true" + * @generated + */ +public interface QueryConfiguration extends EObject { + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getQueryConfiguration_Name() + * @model required="true" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // QueryConfiguration diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/QueryExecutionValue.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/QueryExecutionValue.java new file mode 100644 index 00000000000..768f82c46da --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/QueryExecutionValue.java @@ -0,0 +1,53 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration; + + +/** + * + * A representation of the model object 'Query Execution Value'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue#getConfiguration Configuration}
  • + *
+ *

+ * + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getQueryExecutionValue() + * @model + * @generated + */ +public interface QueryExecutionValue extends ParameterValue { + /** + * Returns the value of the 'Configuration' reference. + * + *

+ * If the meaning of the 'Configuration' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Configuration' reference. + * @see #setConfiguration(QueryConfiguration) + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getQueryExecutionValue_Configuration() + * @model required="true" + * @generated + */ + QueryConfiguration getConfiguration(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue#getConfiguration Configuration}' reference. + * + * + * @param value the new value of the 'Configuration' reference. + * @see #getConfiguration() + * @generated + */ + void setConfiguration(QueryConfiguration value); + +} // QueryExecutionValue diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConfigurationFactoryImpl.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConfigurationFactoryImpl.java new file mode 100644 index 00000000000..c08ed885209 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConfigurationFactoryImpl.java @@ -0,0 +1,134 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.emf.ecore.plugin.EcorePlugin; +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationFactory; +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; +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.QueryExecutionValue; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ConfigurationFactoryImpl extends EFactoryImpl implements ConfigurationFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ConfigurationFactory init() { + try { + ConfigurationFactory theConfigurationFactory = (ConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/core/queries/0.7"); + if (theConfigurationFactory != null) { + return theConfigurationFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ConfigurationFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ConfigurationFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION: return createModiscoQueryConfiguration(); + case ConfigurationPackage.QUERY_EXECUTION_VALUE: return createQueryExecutionValue(); + case ConfigurationPackage.CONSTANT_PARAMETER_VALUE: return createConstantParameterValue(); + case ConfigurationPackage.LIST_PARAMETER_VALUE: return createListParameterValue(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public ModiscoQueryConfiguration createModiscoQueryConfiguration() { + ModiscoQueryConfigurationImpl modiscoQueryConfiguration = new ModiscoQueryConfigurationImpl(); + return modiscoQueryConfiguration; + } + + /** + * + * + * @generated + */ + public QueryExecutionValue createQueryExecutionValue() { + QueryExecutionValueImpl queryExecutionValue = new QueryExecutionValueImpl(); + return queryExecutionValue; + } + + /** + * + * + * @generated + */ + public ConstantParameterValue createConstantParameterValue() { + ConstantParameterValueImpl constantParameterValue = new ConstantParameterValueImpl(); + return constantParameterValue; + } + + /** + * + * + * @generated + */ + public ListParameterValue createListParameterValue() { + ListParameterValueImpl listParameterValue = new ListParameterValueImpl(); + return listParameterValue; + } + + /** + * + * + * @generated + */ + public ConfigurationPackage getConfigurationPackage() { + return (ConfigurationPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ConfigurationPackage getPackage() { + return ConfigurationPackage.eINSTANCE; + } + +} //ConfigurationFactoryImpl diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConfigurationPackageImpl.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConfigurationPackageImpl.java new file mode 100644 index 00000000000..93081f21411 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConfigurationPackageImpl.java @@ -0,0 +1,371 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationFactory; +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; +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.uml2.types.TypesPackage; +import org.eclipse.uml2.types.internal.impl.TypesPackageImpl; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ConfigurationPackageImpl extends EPackageImpl implements ConfigurationPackage { + /** + * + * + * @generated + */ + private EClass queryConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass modiscoQueryConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass parameterValueEClass = null; + + /** + * + * + * @generated + */ + private EClass queryExecutionValueEClass = null; + + /** + * + * + * @generated + */ + private EClass constantParameterValueEClass = null; + + /** + * + * + * @generated + */ + private EClass listParameterValueEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#eNS_URI + * @see #init() + * @generated + */ + private ConfigurationPackageImpl() { + super(eNS_URI, ConfigurationFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ConfigurationPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ConfigurationPackage init() { + if (isInited) return (ConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(ConfigurationPackage.eNS_URI); + + // Obtain or create and register package + ConfigurationPackageImpl theConfigurationPackage = (ConfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ConfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ConfigurationPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + //QueryPackage.eINSTANCE.eClass(); + UMLPackage.eINSTANCE.eClass(); + + // Obtain or create and register interdependencies + TypesPackageImpl theTypesPackage = (TypesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI) instanceof TypesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI) : TypesPackage.eINSTANCE); + + // Create package meta-data objects + theConfigurationPackage.createPackageContents(); + theTypesPackage.createPackageContents(); + + // Initialize created meta-data + theConfigurationPackage.initializePackageContents(); + theTypesPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theConfigurationPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ConfigurationPackage.eNS_URI, theConfigurationPackage); + return theConfigurationPackage; + } + + /** + * + * + * @generated + */ + public EClass getQueryConfiguration() { + return queryConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getQueryConfiguration_Name() { + return (EAttribute)queryConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getModiscoQueryConfiguration() { + return modiscoQueryConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EReference getModiscoQueryConfiguration_Query() { + return (EReference)modiscoQueryConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getModiscoQueryConfiguration_ParameterValues() { + return (EReference)modiscoQueryConfigurationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getParameterValue() { + return parameterValueEClass; + } + + /** + * + * + * @generated + */ + public EReference getParameterValue_Parameter() { + return (EReference)parameterValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getQueryExecutionValue() { + return queryExecutionValueEClass; + } + + /** + * + * + * @generated + */ + public EReference getQueryExecutionValue_Configuration() { + return (EReference)queryExecutionValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getConstantParameterValue() { + return constantParameterValueEClass; + } + + /** + * + * + * @generated + */ + public EReference getConstantParameterValue_ValueInstance() { + return (EReference)constantParameterValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getListParameterValue() { + return listParameterValueEClass; + } + + /** + * + * + * @generated + */ + public EReference getListParameterValue_Values() { + return (EReference)listParameterValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public ConfigurationFactory getConfigurationFactory() { + return (ConfigurationFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + queryConfigurationEClass = createEClass(QUERY_CONFIGURATION); + createEAttribute(queryConfigurationEClass, QUERY_CONFIGURATION__NAME); + + modiscoQueryConfigurationEClass = createEClass(MODISCO_QUERY_CONFIGURATION); + createEReference(modiscoQueryConfigurationEClass, MODISCO_QUERY_CONFIGURATION__QUERY); + createEReference(modiscoQueryConfigurationEClass, MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES); + + parameterValueEClass = createEClass(PARAMETER_VALUE); + createEReference(parameterValueEClass, PARAMETER_VALUE__PARAMETER); + + queryExecutionValueEClass = createEClass(QUERY_EXECUTION_VALUE); + createEReference(queryExecutionValueEClass, QUERY_EXECUTION_VALUE__CONFIGURATION); + + constantParameterValueEClass = createEClass(CONSTANT_PARAMETER_VALUE); + createEReference(constantParameterValueEClass, CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE); + + listParameterValueEClass = createEClass(LIST_PARAMETER_VALUE); + createEReference(listParameterValueEClass, LIST_PARAMETER_VALUE__VALUES); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + //QueryPackage theQueryPackage = (QueryPackage)EPackage.Registry.INSTANCE.getEPackage(QueryPackage.eNS_URI); + UMLPackage theUMLPackage = (UMLPackage)EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + modiscoQueryConfigurationEClass.getESuperTypes().add(this.getQueryConfiguration()); + queryExecutionValueEClass.getESuperTypes().add(this.getParameterValue()); + constantParameterValueEClass.getESuperTypes().add(this.getParameterValue()); + listParameterValueEClass.getESuperTypes().add(this.getParameterValue()); + + // Initialize classes and features; add operations and parameters + initEClass(queryConfigurationEClass, QueryConfiguration.class, "QueryConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getQueryConfiguration_Name(), ecorePackage.getEString(), "name", null, 1, 1, QueryConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(modiscoQueryConfigurationEClass, ModiscoQueryConfiguration.class, "ModiscoQueryConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + //initEReference(getModiscoQueryConfiguration_Query(), theQueryPackage.getModelQuery(), null, "query", null, 1, 1, ModiscoQueryConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getModiscoQueryConfiguration_ParameterValues(), this.getParameterValue(), null, "parameterValues", null, 0, -1, ModiscoQueryConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(parameterValueEClass, ParameterValue.class, "ParameterValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + //initEReference(getParameterValue_Parameter(), theQueryPackage.getModelQueryParameter(), null, "parameter", null, 1, 1, ParameterValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(queryExecutionValueEClass, QueryExecutionValue.class, "QueryExecutionValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getQueryExecutionValue_Configuration(), this.getQueryConfiguration(), null, "configuration", null, 1, 1, QueryExecutionValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(constantParameterValueEClass, ConstantParameterValue.class, "ConstantParameterValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getConstantParameterValue_ValueInstance(), theUMLPackage.getValueSpecification(), null, "valueInstance", null, 0, 1, ConstantParameterValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(listParameterValueEClass, ListParameterValue.class, "ListParameterValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getListParameterValue_Values(), this.getParameterValue(), null, "values", null, 0, -1, ListParameterValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //ConfigurationPackageImpl diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConstantParameterValueImpl.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConstantParameterValueImpl.java new file mode 100644 index 00000000000..dde0ce6ecd6 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConstantParameterValueImpl.java @@ -0,0 +1,176 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; +import org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue; +import org.eclipse.uml2.uml.ValueSpecification; + +/** + * + * An implementation of the model object 'Constant Parameter Value'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ConstantParameterValueImpl#getValueInstance Value Instance}
  • + *
+ *

+ * + * @generated + */ +public class ConstantParameterValueImpl extends ParameterValueImpl implements ConstantParameterValue { + /** + * The cached value of the '{@link #getValueInstance() Value Instance}' containment reference. + * + * + * @see #getValueInstance() + * @generated + * @ordered + */ + protected ValueSpecification valueInstance; + + /** + * + * + * @generated + */ + protected ConstantParameterValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE; + } + + /** + * + * + * @generated + */ + public ValueSpecification getValueInstance() { + return valueInstance; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetValueInstance(ValueSpecification newValueInstance, NotificationChain msgs) { + ValueSpecification oldValueInstance = valueInstance; + valueInstance = newValueInstance; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, oldValueInstance, newValueInstance); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setValueInstance(ValueSpecification newValueInstance) { + if (newValueInstance != valueInstance) { + NotificationChain msgs = null; + if (valueInstance != null) + msgs = ((InternalEObject)valueInstance).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, null, msgs); + if (newValueInstance != null) + msgs = ((InternalEObject)newValueInstance).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, null, msgs); + msgs = basicSetValueInstance(newValueInstance, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, newValueInstance, newValueInstance)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE: + return basicSetValueInstance(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE: + return getValueInstance(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE: + setValueInstance((ValueSpecification)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE: + setValueInstance((ValueSpecification)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE: + return valueInstance != null; + } + return super.eIsSet(featureID); + } + +} //ConstantParameterValueImpl diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ListParameterValueImpl.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ListParameterValueImpl.java new file mode 100644 index 00000000000..a99d8db56bc --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ListParameterValueImpl.java @@ -0,0 +1,133 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; +import org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue; +import org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue; + +/** + * + * An implementation of the model object 'List Parameter Value'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ListParameterValueImpl#getValues Values}
  • + *
+ *

+ * + * @generated + */ +public class ListParameterValueImpl extends ParameterValueImpl implements ListParameterValue { + /** + * The cached value of the '{@link #getValues() Values}' reference list. + * + * + * @see #getValues() + * @generated + * @ordered + */ + protected EList values; + + /** + * + * + * @generated + */ + protected ListParameterValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ConfigurationPackage.Literals.LIST_PARAMETER_VALUE; + } + + /** + * + * + * @generated + */ + public EList getValues() { + if (values == null) { + values = new EObjectResolvingEList(ParameterValue.class, this, ConfigurationPackage.LIST_PARAMETER_VALUE__VALUES); + } + return values; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ConfigurationPackage.LIST_PARAMETER_VALUE__VALUES: + return getValues(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ConfigurationPackage.LIST_PARAMETER_VALUE__VALUES: + getValues().clear(); + getValues().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ConfigurationPackage.LIST_PARAMETER_VALUE__VALUES: + getValues().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ConfigurationPackage.LIST_PARAMETER_VALUE__VALUES: + return values != null && !values.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ListParameterValueImpl diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ModiscoQueryConfigurationImpl.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ModiscoQueryConfigurationImpl.java new file mode 100644 index 00000000000..d68c0622dca --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ModiscoQueryConfigurationImpl.java @@ -0,0 +1,213 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.emf.facet.infra.query.ModelQuery; +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; +import org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration; +import org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue; + +/** + * + * An implementation of the model object 'Modisco Query Configuration'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ModiscoQueryConfigurationImpl#getQuery Query}
  • + *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ModiscoQueryConfigurationImpl#getParameterValues Parameter Values}
  • + *
+ *

+ * + * @generated + */ +public class ModiscoQueryConfigurationImpl extends QueryConfigurationImpl implements ModiscoQueryConfiguration { + /** + * The cached value of the '{@link #getQuery() Query}' reference. + * + * + * @see #getQuery() + * @generated + * @ordered + */ + protected ModelQuery query; + + /** + * The cached value of the '{@link #getParameterValues() Parameter Values}' containment reference list. + * + * + * @see #getParameterValues() + * @generated + * @ordered + */ + protected EList parameterValues; + + /** + * + * + * @generated + */ + protected ModiscoQueryConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ConfigurationPackage.Literals.MODISCO_QUERY_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public ModelQuery getQuery() { + if (query != null && query.eIsProxy()) { + InternalEObject oldQuery = (InternalEObject)query; + query = (ModelQuery)eResolveProxy(oldQuery); + if (query != oldQuery) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__QUERY, oldQuery, query)); + } + } + return query; + } + + /** + * + * + * @generated + */ + public ModelQuery basicGetQuery() { + return query; + } + + /** + * + * + * @generated + */ + public void setQuery(ModelQuery newQuery) { + ModelQuery oldQuery = query; + query = newQuery; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__QUERY, oldQuery, query)); + } + + /** + * + * + * @generated + */ + public EList getParameterValues() { + if (parameterValues == null) { + parameterValues = new EObjectContainmentEList(ParameterValue.class, this, ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES); + } + return parameterValues; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES: + return ((InternalEList)getParameterValues()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__QUERY: + if (resolve) return getQuery(); + return basicGetQuery(); + case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES: + return getParameterValues(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__QUERY: + setQuery((ModelQuery)newValue); + return; + case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES: + getParameterValues().clear(); + getParameterValues().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__QUERY: + setQuery((ModelQuery)null); + return; + case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES: + getParameterValues().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__QUERY: + return query != null; + case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES: + return parameterValues != null && !parameterValues.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ModiscoQueryConfigurationImpl diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ParameterValueImpl.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ParameterValueImpl.java new file mode 100644 index 00000000000..6b2f1f9f252 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ParameterValueImpl.java @@ -0,0 +1,158 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.facet.infra.query.ModelQueryParameter; +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; +import org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue; + +/** + * + * An implementation of the model object 'Parameter Value'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ParameterValueImpl#getParameter Parameter}
  • + *
+ *

+ * + * @generated + */ +public abstract class ParameterValueImpl extends EObjectImpl implements ParameterValue { + /** + * The cached value of the '{@link #getParameter() Parameter}' reference. + * + * + * @see #getParameter() + * @generated + * @ordered + */ + protected ModelQueryParameter parameter; + + /** + * + * + * @generated + */ + protected ParameterValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ConfigurationPackage.Literals.PARAMETER_VALUE; + } + + /** + * + * + * @generated + */ + public ModelQueryParameter getParameter() { + if (parameter != null && parameter.eIsProxy()) { + InternalEObject oldParameter = (InternalEObject)parameter; + parameter = (ModelQueryParameter)eResolveProxy(oldParameter); + if (parameter != oldParameter) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.PARAMETER_VALUE__PARAMETER, oldParameter, parameter)); + } + } + return parameter; + } + + /** + * + * + * @generated + */ + public ModelQueryParameter basicGetParameter() { + return parameter; + } + + /** + * + * + * @generated + */ + public void setParameter(ModelQueryParameter newParameter) { + ModelQueryParameter oldParameter = parameter; + parameter = newParameter; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PARAMETER_VALUE__PARAMETER, oldParameter, parameter)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ConfigurationPackage.PARAMETER_VALUE__PARAMETER: + if (resolve) return getParameter(); + return basicGetParameter(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ConfigurationPackage.PARAMETER_VALUE__PARAMETER: + setParameter((ModelQueryParameter)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ConfigurationPackage.PARAMETER_VALUE__PARAMETER: + setParameter((ModelQueryParameter)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ConfigurationPackage.PARAMETER_VALUE__PARAMETER: + return parameter != null; + } + return super.eIsSet(featureID); + } + +} //ParameterValueImpl diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/QueryConfigurationImpl.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/QueryConfigurationImpl.java new file mode 100644 index 00000000000..95bbfb9e23c --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/QueryConfigurationImpl.java @@ -0,0 +1,164 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; +import org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration; + +/** + * + * An implementation of the model object 'Query Configuration'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryConfigurationImpl#getName Name}
  • + *
+ *

+ * + * @generated + */ +public abstract class QueryConfigurationImpl extends EObjectImpl implements QueryConfiguration { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected QueryConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ConfigurationPackage.Literals.QUERY_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.QUERY_CONFIGURATION__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ConfigurationPackage.QUERY_CONFIGURATION__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ConfigurationPackage.QUERY_CONFIGURATION__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ConfigurationPackage.QUERY_CONFIGURATION__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ConfigurationPackage.QUERY_CONFIGURATION__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //QueryConfigurationImpl diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/QueryExecutionValueImpl.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/QueryExecutionValueImpl.java new file mode 100644 index 00000000000..767a4719dc3 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/QueryExecutionValueImpl.java @@ -0,0 +1,157 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; +import org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration; +import org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue; + +/** + * + * An implementation of the model object 'Query Execution Value'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryExecutionValueImpl#getConfiguration Configuration}
  • + *
+ *

+ * + * @generated + */ +public class QueryExecutionValueImpl extends ParameterValueImpl implements QueryExecutionValue { + /** + * The cached value of the '{@link #getConfiguration() Configuration}' reference. + * + * + * @see #getConfiguration() + * @generated + * @ordered + */ + protected QueryConfiguration configuration; + + /** + * + * + * @generated + */ + protected QueryExecutionValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ConfigurationPackage.Literals.QUERY_EXECUTION_VALUE; + } + + /** + * + * + * @generated + */ + public QueryConfiguration getConfiguration() { + if (configuration != null && configuration.eIsProxy()) { + InternalEObject oldConfiguration = (InternalEObject)configuration; + configuration = (QueryConfiguration)eResolveProxy(oldConfiguration); + if (configuration != oldConfiguration) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION, oldConfiguration, configuration)); + } + } + return configuration; + } + + /** + * + * + * @generated + */ + public QueryConfiguration basicGetConfiguration() { + return configuration; + } + + /** + * + * + * @generated + */ + public void setConfiguration(QueryConfiguration newConfiguration) { + QueryConfiguration oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION, oldConfiguration, configuration)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION: + if (resolve) return getConfiguration(); + return basicGetConfiguration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION: + setConfiguration((QueryConfiguration)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION: + setConfiguration((QueryConfiguration)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION: + return configuration != null; + } + return super.eIsSet(featureID); + } + +} //QueryExecutionValueImpl diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/plugin/Activator.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/plugin/Activator.java new file mode 100644 index 00000000000..3f795c4cb92 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/plugin/Activator.java @@ -0,0 +1,90 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.plugin; + +import org.eclipse.emf.common.EMFPlugin; +import org.eclipse.emf.common.util.ResourceLocator; + +/** + * This is the central singleton for the Configuration model plugin. + * + * + * @generated + */ +public final class Activator extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final Activator INSTANCE = new Activator(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public Activator() { + super(new ResourceLocator [] {}); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationAdapterFactory.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationAdapterFactory.java new file mode 100644 index 00000000000..7222535c6d5 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationAdapterFactory.java @@ -0,0 +1,217 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; +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; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage + * @generated + */ +public class ConfigurationAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ConfigurationPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ConfigurationAdapterFactory() { + if (modelPackage == null) { + modelPackage = ConfigurationPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ConfigurationSwitch modelSwitch = + new ConfigurationSwitch() { + @Override + public Adapter caseQueryConfiguration(QueryConfiguration object) { + return createQueryConfigurationAdapter(); + } + @Override + public Adapter caseModiscoQueryConfiguration(ModiscoQueryConfiguration object) { + return createModiscoQueryConfigurationAdapter(); + } + @Override + public Adapter caseParameterValue(ParameterValue object) { + return createParameterValueAdapter(); + } + @Override + public Adapter caseQueryExecutionValue(QueryExecutionValue object) { + return createQueryExecutionValueAdapter(); + } + @Override + public Adapter caseConstantParameterValue(ConstantParameterValue object) { + return createConstantParameterValueAdapter(); + } + @Override + public Adapter caseListParameterValue(ListParameterValue object) { + return createListParameterValueAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration Query Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration + * @generated + */ + public Adapter createQueryConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration Modisco Query Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration + * @generated + */ + public Adapter createModiscoQueryConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue Parameter Value}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue + * @generated + */ + public Adapter createParameterValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue Query Execution Value}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue + * @generated + */ + public Adapter createQueryExecutionValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue Constant Parameter Value}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue + * @generated + */ + public Adapter createConstantParameterValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue List Parameter Value}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue + * @generated + */ + public Adapter createListParameterValueAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ConfigurationAdapterFactory diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationResourceFactoryImpl.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationResourceFactoryImpl.java new file mode 100644 index 00000000000..cf45077cb5e --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationResourceFactoryImpl.java @@ -0,0 +1,53 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.util; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; +import org.eclipse.emf.ecore.xmi.XMLResource; + +/** + * + * The Resource Factory associated with the package. + * + * @see org.eclipse.papyrus.infra.queries.core.configuration.util.ConfigurationResourceImpl + * @generated + */ +public class ConfigurationResourceFactoryImpl extends ResourceFactoryImpl { + /** + * Creates an instance of the resource factory. + * + * + * @generated + */ + public ConfigurationResourceFactoryImpl() { + super(); + } + + /** + * Creates an instance of the resource. + * + * + * @generated + */ + @Override + public Resource createResource(URI uri) { + XMLResource result = new ConfigurationResourceImpl(uri); + result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); + result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); + + result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); + + result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); + result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); + + result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); + return result; + } + +} //ConfigurationResourceFactoryImpl diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationResourceImpl.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationResourceImpl.java new file mode 100644 index 00000000000..6f579e7873e --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationResourceImpl.java @@ -0,0 +1,31 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.util; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; + +/** + * + * The Resource associated with the package. + * + * @see org.eclipse.papyrus.infra.queries.core.configuration.util.ConfigurationResourceFactoryImpl + * @generated + */ +public class ConfigurationResourceImpl extends XMLResourceImpl { + /** + * Creates an instance of the resource. + * + * + * @param uri the URI of the new resource. + * @generated + */ + public ConfigurationResourceImpl(URI uri) { + super(uri); + } + +} //ConfigurationResourceImpl diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationSwitch.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationSwitch.java new file mode 100644 index 00000000000..726b23f70ab --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationSwitch.java @@ -0,0 +1,227 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; +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; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage + * @generated + */ +public class ConfigurationSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ConfigurationPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ConfigurationSwitch() { + if (modelPackage == null) { + modelPackage = ConfigurationPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ConfigurationPackage.QUERY_CONFIGURATION: { + QueryConfiguration queryConfiguration = (QueryConfiguration)theEObject; + T result = caseQueryConfiguration(queryConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION: { + ModiscoQueryConfiguration modiscoQueryConfiguration = (ModiscoQueryConfiguration)theEObject; + T result = caseModiscoQueryConfiguration(modiscoQueryConfiguration); + if (result == null) result = caseQueryConfiguration(modiscoQueryConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ConfigurationPackage.PARAMETER_VALUE: { + ParameterValue parameterValue = (ParameterValue)theEObject; + T result = caseParameterValue(parameterValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ConfigurationPackage.QUERY_EXECUTION_VALUE: { + QueryExecutionValue queryExecutionValue = (QueryExecutionValue)theEObject; + T result = caseQueryExecutionValue(queryExecutionValue); + if (result == null) result = caseParameterValue(queryExecutionValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ConfigurationPackage.CONSTANT_PARAMETER_VALUE: { + ConstantParameterValue constantParameterValue = (ConstantParameterValue)theEObject; + T result = caseConstantParameterValue(constantParameterValue); + if (result == null) result = caseParameterValue(constantParameterValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ConfigurationPackage.LIST_PARAMETER_VALUE: { + ListParameterValue listParameterValue = (ListParameterValue)theEObject; + T result = caseListParameterValue(listParameterValue); + if (result == null) result = caseParameterValue(listParameterValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Query Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Query Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseQueryConfiguration(QueryConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Modisco Query Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Modisco Query Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseModiscoQueryConfiguration(ModiscoQueryConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Parameter Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Parameter Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseParameterValue(ParameterValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Query Execution Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Query Execution Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseQueryExecutionValue(QueryExecutionValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Constant Parameter Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Constant Parameter Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConstantParameterValue(ConstantParameterValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'List Parameter Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'List Parameter Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseListParameterValue(ListParameterValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ConfigurationSwitch diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationXMLProcessor.java b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationXMLProcessor.java new file mode 100644 index 00000000000..e1d7197cc16 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationXMLProcessor.java @@ -0,0 +1,51 @@ +/** + * + * + * + * $Id$ + */ +package org.eclipse.papyrus.infra.queries.core.configuration.util; + +import java.util.Map; + +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.xmi.util.XMLProcessor; +import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; + +/** + * This class contains helper methods to serialize and deserialize XML documents + * + * + * @generated + */ +public class ConfigurationXMLProcessor extends XMLProcessor { + + /** + * Public constructor to instantiate the helper. + * + * + * @generated + */ + public ConfigurationXMLProcessor() { + super((EPackage.Registry.INSTANCE)); + ConfigurationPackage.eINSTANCE.eClass(); + } + + /** + * Register for "*" and "xml" file extensions the ConfigurationResourceFactoryImpl factory. + * + * + * @generated + */ + @Override + protected Map getRegistrations() { + if (registrations == null) { + super.getRegistrations(); + registrations.put(XML_EXTENSION, new ConfigurationResourceFactoryImpl()); + registrations.put(STAR_EXTENSION, new ConfigurationResourceFactoryImpl()); + } + return registrations; + } + +} //ConfigurationXMLProcessor diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/.classpath b/deprecated/org.eclipse.papyrus.infra.queries.core/.classpath new file mode 100644 index 00000000000..2d1a4302f04 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/.project b/deprecated/org.eclipse.papyrus.infra.queries.core/.project new file mode 100644 index 00000000000..35970c3736b --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/.project @@ -0,0 +1,28 @@ + + + org.eclipse.papyrus.infra.queries.core + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + 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 new file mode 100644 index 00000000000..a960e953d11 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,4 @@ +#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 new file mode 100644 index 00000000000..3b447f78043 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +#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 new file mode 100644 index 00000000000..d9cee11dc74 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/META-INF/MANIFEST.MF @@ -0,0 +1,21 @@ +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 new file mode 100644 index 00000000000..82d49bf5f81 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

About This Content

+ +

June 5, 2007

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") 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 http://www.eclipse.org.

+ + + diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/build.properties b/deprecated/org.eclipse.papyrus.infra.queries.core/build.properties new file mode 100644 index 00000000000..bfc183478ca --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/build.properties @@ -0,0 +1,7 @@ +# +#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 new file mode 100644 index 00000000000..fe4e8ecaa6a --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/plugin.properties @@ -0,0 +1,16 @@ +################################################################################# +# 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 new file mode 100644 index 00000000000..9d21ce6e9db --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecore @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecorediag b/deprecated/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecorediag new file mode 100644 index 00000000000..88be98ad0bd --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecorediag @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 00000000000..33bc5c2b73d --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/Activator.java @@ -0,0 +1,69 @@ +/***************************************************************************** + * 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 new file mode 100644 index 00000000000..ce3c5be4356 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterNotfoundException.java @@ -0,0 +1,70 @@ +/***************************************************************************** + * 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 new file mode 100644 index 00000000000..fed4d51e1e6 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterRegistry.java @@ -0,0 +1,163 @@ +/***************************************************************************** + * 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, IConverter> converterMaps = new HashMap, 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>() { + + /** + * {@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 values = new ArrayList(); + 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 new file mode 100644 index 00000000000..facfdeb5920 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToBooleanConverter.java @@ -0,0 +1,49 @@ +/***************************************************************************** + * 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 new file mode 100644 index 00000000000..c6a8735690d --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToIntegerConverter.java @@ -0,0 +1,48 @@ +/***************************************************************************** + * 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 new file mode 100644 index 00000000000..fe244a435bb --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToBooleanConverter.java @@ -0,0 +1,37 @@ +/***************************************************************************** + * 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 new file mode 100644 index 00000000000..b7393eace12 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToIntegerConverter.java @@ -0,0 +1,36 @@ +/***************************************************************************** + * 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 new file mode 100644 index 00000000000..b2987996f4f --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToStringConverter.java @@ -0,0 +1,37 @@ +/***************************************************************************** + * 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 new file mode 100644 index 00000000000..b6b5a445a07 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQueryNotFoundException.java @@ -0,0 +1,40 @@ +/***************************************************************************** + * 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 new file mode 100644 index 00000000000..efe014c6678 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQuerySetNotFoundException.java @@ -0,0 +1,40 @@ +/***************************************************************************** + * 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 new file mode 100644 index 00000000000..f87a4810a9a --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/QueryUtil.java @@ -0,0 +1,420 @@ +/***************************************************************************** + * 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 true 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 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 queryParameters = query.getParameters(); +// List parameterValues = new ArrayList(); +// 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 true 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 true 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 true 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 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 createParameterValuesListFromConfiguration(EObject context, ModiscoQueryConfiguration queryConfiguration) { +// List parameterValues = new ArrayList(); +// +// List 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() { +// +// /** +// * {@inheritDoc} +// */ +// @Override +// public Object caseListParameterValue(ListParameterValue listParameterValue) { +// ArrayList values = new ArrayList(); +// 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 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 true 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 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 null. +// * @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 null, returning a boolean value, etc. +// * +// * @param query +// * the query to test +// * @return true 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 null, returning a boolean value, etc. +// * @param query the query to test +// * @return true 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 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 status = new ArrayList(); +// +// // 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; +// } +} diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/.classpath b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/.classpath deleted file mode 100644 index cedf0d0d0b5..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/.project b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/.project deleted file mode 100644 index d784407f2ea..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.papyrus.infra.queries.core.configuration.edit - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/META-INF/MANIFEST.MF b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/META-INF/MANIFEST.MF deleted file mode 100644 index 13e26e08855..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/META-INF/MANIFEST.MF +++ /dev/null @@ -1,23 +0,0 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.papyrus.infra.queries.core.configuration;bundle-version="1.0.0", - org.eclipse.emf.edit;visibility:=reexport, - org.eclipse.emf.ecore;visibility:=reexport, - org.eclipse.emf.ecore.edit;visibility:=reexport, - org.eclipse.uml2.uml, - org.eclipse.uml2.uml.edit -Export-Package: org.eclipse.papyrus.infra.queries.core.configuration.p - rovider -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy -Bundle-ClassPath: . -Bundle-Version: 1.0.0.qualifier -Bundle-Localization: plugin -Bundle-Name: %pluginName -Bundle-Activator: org.eclipse.papyrus.infra.queries.core.configuration - .provider.ConfigurationEditPlugin$Implementation -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: org.eclipse.papyrus.infra.queries.core.configurat - ion.edit;singleton:=true -Bundle-RequiredExecutionEnvironment: J2SE-1.5 - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/about.html b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/about.html deleted file mode 100644 index 82d49bf5f81..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/about.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - -About - - -

About This Content

- -

June 5, 2007

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") 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 http://www.eclipse.org.

- - - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/build.properties b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/build.properties deleted file mode 100644 index f465f5d7485..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -# -#Mon Sep 12 09:29:39 CEST 2011 -output..=bin/ -bin.includes=.,icons/,META-INF/,plugin.xml,plugin.properties,about.html -jars.compile.order=. -src.includes = about.html -source..=src-gen/ -bin..=bin/ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Duration.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Duration.gif deleted file mode 100644 index 7839cb59536..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Duration.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_DurationInterval.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_DurationInterval.gif deleted file mode 100644 index bbdaa350889..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_DurationInterval.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Expression.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Expression.gif deleted file mode 100644 index b94380bd871..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Expression.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_InstanceValue.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_InstanceValue.gif deleted file mode 100644 index 1bca29e3795..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_InstanceValue.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Interval.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Interval.gif deleted file mode 100644 index 7d35c8972d1..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_Interval.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralBoolean.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralBoolean.gif deleted file mode 100644 index 7f2d45eb492..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralBoolean.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralInteger.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralInteger.gif deleted file mode 100644 index 58e344bde6e..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralInteger.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralNull.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralNull.gif deleted file mode 100644 index e3cf235bb60..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralNull.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralString.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralString.gif deleted file mode 100644 index ebe3a4888bb..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralString.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralUnlimitedNatural.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralUnlimitedNatural.gif deleted file mode 100644 index dfe51cfa69b..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_LiteralUnlimitedNatural.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_OpaqueExpression.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_OpaqueExpression.gif deleted file mode 100644 index b94380bd871..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_OpaqueExpression.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_StringExpression.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_StringExpression.gif deleted file mode 100644 index 7d35c8972d1..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_StringExpression.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_TimeExpression.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_TimeExpression.gif deleted file mode 100644 index 24c57a05b7e..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_TimeExpression.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_TimeInterval.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_TimeInterval.gif deleted file mode 100644 index a674b69c271..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateConstantParameterValue_valueInstance_TimeInterval.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ConstantParameterValue.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ConstantParameterValue.gif deleted file mode 100644 index f213cc393ad..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ConstantParameterValue.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ListParameterValue.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ListParameterValue.gif deleted file mode 100644 index 888a2c1bacc..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ListParameterValue.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ParameterValue.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ParameterValue.gif deleted file mode 100644 index 79a0a45b269..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_ParameterValue.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_QueryExecutionValue.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_QueryExecutionValue.gif deleted file mode 100644 index 523057cd5d9..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateModiscoQueryConfiguration_parameterValues_QueryExecutionValue.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Duration.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Duration.gif deleted file mode 100644 index 7f7c51a1f20..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Duration.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_DurationInterval.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_DurationInterval.gif deleted file mode 100644 index 2769bc64647..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_DurationInterval.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Expression.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Expression.gif deleted file mode 100644 index de6af47e2ec..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Expression.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_InstanceValue.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_InstanceValue.gif deleted file mode 100644 index cc2ef529556..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_InstanceValue.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Interval.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Interval.gif deleted file mode 100644 index 0c1ee4c917e..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_Interval.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralBoolean.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralBoolean.gif deleted file mode 100644 index a382f74844b..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralBoolean.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralInteger.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralInteger.gif deleted file mode 100644 index b72b5e57a83..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralInteger.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralNull.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralNull.gif deleted file mode 100644 index b32e049d4a4..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralNull.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralString.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralString.gif deleted file mode 100644 index a89d0ec24fe..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralString.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralUnlimitedNatural.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralUnlimitedNatural.gif deleted file mode 100644 index 52baab8f56e..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_LiteralUnlimitedNatural.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_OpaqueExpression.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_OpaqueExpression.gif deleted file mode 100644 index de6af47e2ec..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_OpaqueExpression.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_StringExpression.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_StringExpression.gif deleted file mode 100644 index 0c1ee4c917e..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_StringExpression.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_TimeExpression.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_TimeExpression.gif deleted file mode 100644 index e8233067cc9..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_TimeExpression.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_TimeInterval.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_TimeInterval.gif deleted file mode 100644 index bc7b7f9c860..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/ctool16/CreateParameterValue_valueInstance_TimeInterval.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ConstantParameterValue.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ConstantParameterValue.gif deleted file mode 100644 index 134551bff7e..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ConstantParameterValue.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ListParameterValue.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ListParameterValue.gif deleted file mode 100644 index 4365960a04b..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ListParameterValue.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ModiscoQueryConfiguration.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ModiscoQueryConfiguration.gif deleted file mode 100644 index 134551bff7e..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ModiscoQueryConfiguration.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ParameterValue.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ParameterValue.gif deleted file mode 100644 index 2b692560297..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/ParameterValue.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/QueryExecutionValue.gif b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/QueryExecutionValue.gif deleted file mode 100644 index ed874747401..00000000000 Binary files a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/icons/full/obj16/QueryExecutionValue.gif and /dev/null differ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/plugin.properties b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/plugin.properties deleted file mode 100644 index 69cc28400be..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/plugin.properties +++ /dev/null @@ -1,42 +0,0 @@ -################################################################################ -# Copyright (c) 2008 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 -################################################################################ -pluginName=Configuration Edit Support (Incubation) -providerName=Eclipse Modeling Project - -_UI_CreateChild_text = {0} -_UI_CreateChild_text2 = {1} {0} -_UI_CreateChild_text3 = {1} -_UI_CreateChild_tooltip = Create New {0} Under {1} Feature -_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. -_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. - -_UI_PropertyDescriptor_description = The {0} of the {1} - -_UI_QueryConfiguration_type = Query Configuration -_UI_ModiscoQueryConfiguration_type = Modisco Query Configuration -_UI_ParameterValue_type = Parameter Value -_UI_Unknown_type = Object - -_UI_Unknown_datatype= Value - -_UI_ModiscoQueryConfiguration_query_feature = Query -_UI_ModiscoQueryConfiguration_parameterValues_feature = Parameter Values -_UI_ParameterValue_parameter_feature = Parameter -_UI_ParameterValue_valueInstance_feature = Value Instance -_UI_Unknown_feature = Unspecified - -_UI_QueryExecutionValue_type = Query Execution Value -_UI_ConstantParameterValue_type = Constant Parameter Value -_UI_QueryExecutionValue_configuration_feature = Configuration -_UI_ConstantParameterValue_valueInstance_feature = Value Instance -_UI_QueryConfiguration_name_feature = Name -_UI_ListParameterValue_type = List Parameter Value -_UI_ListParameterValue_values_feature = Values diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/plugin.xml b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/plugin.xml deleted file mode 100644 index 4296ad2fa25..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/plugin.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConfigurationEditPlugin.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConfigurationEditPlugin.java deleted file mode 100644 index f8205917100..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConfigurationEditPlugin.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.provider; - -import org.eclipse.emf.common.EMFPlugin; -import org.eclipse.emf.common.util.ResourceLocator; -import org.eclipse.emf.ecore.provider.EcoreEditPlugin; -import org.eclipse.uml2.uml.edit.UMLEditPlugin; - -/** - * This is the central singleton for the Configuration edit plugin. - * - * - * @generated - */ -public final class ConfigurationEditPlugin extends EMFPlugin { - /** - * Keep track of the singleton. - * - * - * @generated - */ - public static final ConfigurationEditPlugin INSTANCE = new ConfigurationEditPlugin(); - - /** - * Keep track of the singleton. - * - * - * @generated - */ - private static Implementation plugin; - - /** - * Create the instance. - * - * - * @generated - */ - public ConfigurationEditPlugin() { - super - (new ResourceLocator [] { - EcoreEditPlugin.INSTANCE, - // QueryEditPlugin.INSTANCE, - UMLEditPlugin.INSTANCE, - }); - } - - /** - * Returns the singleton instance of the Eclipse plugin. - * - * - * @return the singleton instance. - * @generated - */ - @Override - public ResourceLocator getPluginResourceLocator() { - return plugin; - } - - /** - * Returns the singleton instance of the Eclipse plugin. - * - * - * @return the singleton instance. - * @generated - */ - public static Implementation getPlugin() { - return plugin; - } - - /** - * The actual implementation of the Eclipse Plugin. - * - * - * @generated - */ - public static class Implementation extends EclipsePlugin { - /** - * Creates an instance. - * - * - * @generated - */ - public Implementation() { - super(); - - // Remember the static instance. - // - plugin = this; - } - } - -} diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConfigurationItemProviderAdapterFactory.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConfigurationItemProviderAdapterFactory.java deleted file mode 100644 index 7615aff1dcc..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConfigurationItemProviderAdapterFactory.java +++ /dev/null @@ -1,275 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.provider; - -import java.util.ArrayList; -import java.util.Collection; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.Notifier; - -import org.eclipse.emf.edit.provider.ChangeNotifier; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.ComposedAdapterFactory; -import org.eclipse.emf.edit.provider.IChangeNotifier; -import org.eclipse.emf.edit.provider.IDisposable; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.INotifyChangedListener; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; - -import org.eclipse.papyrus.infra.queries.core.configuration.util.ConfigurationAdapterFactory; - -/** - * This is the factory that is used to provide the interfaces needed to support Viewers. - * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. - * The adapters also support Eclipse property sheets. - * Note that most of the adapters are shared among multiple instances. - * - * - * @generated - */ -public class ConfigurationItemProviderAdapterFactory extends ConfigurationAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { - /** - * This keeps track of the root adapter factory that delegates to this adapter factory. - * - * - * @generated - */ - protected ComposedAdapterFactory parentAdapterFactory; - - /** - * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. - * - * - * @generated - */ - protected IChangeNotifier changeNotifier = new ChangeNotifier(); - - /** - * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. - * - * - * @generated - */ - protected Collection supportedTypes = new ArrayList(); - - /** - * This constructs an instance. - * - * - * @generated - */ - public ConfigurationItemProviderAdapterFactory() { - supportedTypes.add(IEditingDomainItemProvider.class); - supportedTypes.add(IStructuredItemContentProvider.class); - supportedTypes.add(ITreeItemContentProvider.class); - supportedTypes.add(IItemLabelProvider.class); - supportedTypes.add(IItemPropertySource.class); - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration} instances. - * - * - * @generated - */ - protected ModiscoQueryConfigurationItemProvider modiscoQueryConfigurationItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration}. - * - * - * @generated - */ - @Override - public Adapter createModiscoQueryConfigurationAdapter() { - if (modiscoQueryConfigurationItemProvider == null) { - modiscoQueryConfigurationItemProvider = new ModiscoQueryConfigurationItemProvider(this); - } - - return modiscoQueryConfigurationItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue} instances. - * - * - * @generated - */ - protected QueryExecutionValueItemProvider queryExecutionValueItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue}. - * - * - * @generated - */ - @Override - public Adapter createQueryExecutionValueAdapter() { - if (queryExecutionValueItemProvider == null) { - queryExecutionValueItemProvider = new QueryExecutionValueItemProvider(this); - } - - return queryExecutionValueItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue} instances. - * - * - * @generated - */ - protected ConstantParameterValueItemProvider constantParameterValueItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue}. - * - * - * @generated - */ - @Override - public Adapter createConstantParameterValueAdapter() { - if (constantParameterValueItemProvider == null) { - constantParameterValueItemProvider = new ConstantParameterValueItemProvider(this); - } - - return constantParameterValueItemProvider; - } - - /** - * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue} instances. - * - * - * @generated - */ - protected ListParameterValueItemProvider listParameterValueItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue}. - * - * - * @generated - */ - @Override - public Adapter createListParameterValueAdapter() { - if (listParameterValueItemProvider == null) { - listParameterValueItemProvider = new ListParameterValueItemProvider(this); - } - - return listParameterValueItemProvider; - } - - /** - * This returns the root adapter factory that contains this factory. - * - * - * @generated - */ - public ComposeableAdapterFactory getRootAdapterFactory() { - return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); - } - - /** - * This sets the composed adapter factory that contains this factory. - * - * - * @generated - */ - public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { - this.parentAdapterFactory = parentAdapterFactory; - } - - /** - * - * - * @generated - */ - @Override - public boolean isFactoryForType(Object type) { - return supportedTypes.contains(type) || super.isFactoryForType(type); - } - - /** - * This implementation substitutes the factory itself as the key for the adapter. - * - * - * @generated - */ - @Override - public Adapter adapt(Notifier notifier, Object type) { - return super.adapt(notifier, this); - } - - /** - * - * - * @generated - */ - @Override - public Object adapt(Object object, Object type) { - if (isFactoryForType(type)) { - Object adapter = super.adapt(object, type); - if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) { - return adapter; - } - } - - return null; - } - - /** - * This adds a listener. - * - * - * @generated - */ - public void addListener(INotifyChangedListener notifyChangedListener) { - changeNotifier.addListener(notifyChangedListener); - } - - /** - * This removes a listener. - * - * - * @generated - */ - public void removeListener(INotifyChangedListener notifyChangedListener) { - changeNotifier.removeListener(notifyChangedListener); - } - - /** - * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. - * - * - * @generated - */ - public void fireNotifyChanged(Notification notification) { - changeNotifier.fireNotifyChanged(notification); - - if (parentAdapterFactory != null) { - parentAdapterFactory.fireNotifyChanged(notification); - } - } - - /** - * This disposes all of the item providers created by this factory. - * - * - * @generated - */ - public void dispose() { - if (modiscoQueryConfigurationItemProvider != null) modiscoQueryConfigurationItemProvider.dispose(); - if (queryExecutionValueItemProvider != null) queryExecutionValueItemProvider.dispose(); - if (constantParameterValueItemProvider != null) constantParameterValueItemProvider.dispose(); - if (listParameterValueItemProvider != null) listParameterValueItemProvider.dispose(); - } - -} diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConstantParameterValueItemProvider.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConstantParameterValueItemProvider.java deleted file mode 100644 index de2560858ea..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ConstantParameterValueItemProvider.java +++ /dev/null @@ -1,223 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EStructuralFeature; - -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ViewerNotification; - -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; -import org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue; - -import org.eclipse.uml2.uml.UMLFactory; - -/** - * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue} object. - * - * - * @generated - */ -public class ConstantParameterValueItemProvider - extends ParameterValueItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public ConstantParameterValueItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - } - return itemPropertyDescriptors; - } - - /** - * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an - * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or - * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. - * - * - * @generated - */ - @Override - public Collection getChildrenFeatures(Object object) { - if (childrenFeatures == null) { - super.getChildrenFeatures(object); - childrenFeatures.add(ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE); - } - return childrenFeatures; - } - - /** - * - * - * @generated - */ - @Override - protected EStructuralFeature getChildFeature(Object object, Object child) { - // Check the type of the specified child object and return the proper feature to use for - // adding (see {@link AddCommand}) it as a child. - - return super.getChildFeature(object, child); - } - - /** - * This returns ConstantParameterValue.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/ConstantParameterValue")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - return getString("_UI_ConstantParameterValue_type"); - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(ConstantParameterValue.class)) { - case ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - - newChildDescriptors.add - (createChildParameter - (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, - UMLFactory.eINSTANCE.createOpaqueExpression())); - - newChildDescriptors.add - (createChildParameter - (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, - UMLFactory.eINSTANCE.createExpression())); - - newChildDescriptors.add - (createChildParameter - (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, - UMLFactory.eINSTANCE.createStringExpression())); - - newChildDescriptors.add - (createChildParameter - (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, - UMLFactory.eINSTANCE.createLiteralInteger())); - - newChildDescriptors.add - (createChildParameter - (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, - UMLFactory.eINSTANCE.createLiteralString())); - - newChildDescriptors.add - (createChildParameter - (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, - UMLFactory.eINSTANCE.createLiteralBoolean())); - - newChildDescriptors.add - (createChildParameter - (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, - UMLFactory.eINSTANCE.createLiteralNull())); - - newChildDescriptors.add - (createChildParameter - (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, - UMLFactory.eINSTANCE.createInstanceValue())); - - newChildDescriptors.add - (createChildParameter - (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, - UMLFactory.eINSTANCE.createLiteralUnlimitedNatural())); - - newChildDescriptors.add - (createChildParameter - (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, - UMLFactory.eINSTANCE.createTimeExpression())); - - newChildDescriptors.add - (createChildParameter - (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, - UMLFactory.eINSTANCE.createDuration())); - - newChildDescriptors.add - (createChildParameter - (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, - UMLFactory.eINSTANCE.createInterval())); - - newChildDescriptors.add - (createChildParameter - (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, - UMLFactory.eINSTANCE.createDurationInterval())); - - newChildDescriptors.add - (createChildParameter - (ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, - UMLFactory.eINSTANCE.createTimeInterval())); - } - -} diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ListParameterValueItemProvider.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ListParameterValueItemProvider.java deleted file mode 100644 index b476a6f00c5..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ListParameterValueItemProvider.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; - -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; - -/** - * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue} object. - * - * - * @generated - */ -public class ListParameterValueItemProvider - extends ParameterValueItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public ListParameterValueItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addValuesPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Values feature. - * - * - * @generated - */ - protected void addValuesPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ListParameterValue_values_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ListParameterValue_values_feature", "_UI_ListParameterValue_type"), - ConfigurationPackage.Literals.LIST_PARAMETER_VALUE__VALUES, - true, - false, - true, - null, - null, - null)); - } - - /** - * This returns ListParameterValue.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/ListParameterValue")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - return getString("_UI_ListParameterValue_type"); - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ModiscoQueryConfigurationItemProvider.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ModiscoQueryConfigurationItemProvider.java deleted file mode 100644 index c0ec3dbd806..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ModiscoQueryConfigurationItemProvider.java +++ /dev/null @@ -1,194 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EStructuralFeature; - -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ViewerNotification; - -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationFactory; -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; -import org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration; - -/** - * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration} object. - * - * - * @generated - */ -public class ModiscoQueryConfigurationItemProvider - extends QueryConfigurationItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public ModiscoQueryConfigurationItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addQueryPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Query feature. - * - * - * @generated - */ - protected void addQueryPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ModiscoQueryConfiguration_query_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ModiscoQueryConfiguration_query_feature", "_UI_ModiscoQueryConfiguration_type"), - ConfigurationPackage.Literals.MODISCO_QUERY_CONFIGURATION__QUERY, - true, - false, - true, - null, - null, - null)); - } - - /** - * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an - * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or - * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. - * - * - * @generated - */ - @Override - public Collection getChildrenFeatures(Object object) { - if (childrenFeatures == null) { - super.getChildrenFeatures(object); - childrenFeatures.add(ConfigurationPackage.Literals.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES); - } - return childrenFeatures; - } - - /** - * - * - * @generated - */ - @Override - protected EStructuralFeature getChildFeature(Object object, Object child) { - // Check the type of the specified child object and return the proper feature to use for - // adding (see {@link AddCommand}) it as a child. - - return super.getChildFeature(object, child); - } - - /** - * This returns ModiscoQueryConfiguration.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/ModiscoQueryConfiguration")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - String label = ((ModiscoQueryConfiguration)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_ModiscoQueryConfiguration_type") : - getString("_UI_ModiscoQueryConfiguration_type") + " " + label; - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(ModiscoQueryConfiguration.class)) { - case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - - newChildDescriptors.add - (createChildParameter - (ConfigurationPackage.Literals.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES, - ConfigurationFactory.eINSTANCE.createQueryExecutionValue())); - - newChildDescriptors.add - (createChildParameter - (ConfigurationPackage.Literals.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES, - ConfigurationFactory.eINSTANCE.createConstantParameterValue())); - - newChildDescriptors.add - (createChildParameter - (ConfigurationPackage.Literals.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES, - ConfigurationFactory.eINSTANCE.createListParameterValue())); - } - -} diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ParameterValueItemProvider.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ParameterValueItemProvider.java deleted file mode 100644 index a88d5c2f912..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/ParameterValueItemProvider.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.common.util.ResourceLocator; - -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; - -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; - -/** - * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue} object. - * - * - * @generated - */ -public class ParameterValueItemProvider - extends ItemProviderAdapter - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public ParameterValueItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addParameterPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Parameter feature. - * - * - * @generated - */ - protected void addParameterPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ParameterValue_parameter_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ParameterValue_parameter_feature", "_UI_ParameterValue_type"), - ConfigurationPackage.Literals.PARAMETER_VALUE__PARAMETER, - true, - false, - true, - null, - null, - null)); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - return getString("_UI_ParameterValue_type"); - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * - * - * @generated - */ - @Override - public ResourceLocator getResourceLocator() { - return ConfigurationEditPlugin.INSTANCE; - } - -} diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/QueryConfigurationItemProvider.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/QueryConfigurationItemProvider.java deleted file mode 100644 index 964c9c87be8..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/QueryConfigurationItemProvider.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.common.util.ResourceLocator; - -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; -import org.eclipse.emf.edit.provider.ViewerNotification; - -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; -import org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration; - -/** - * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration} object. - * - * - * @generated - */ -public class QueryConfigurationItemProvider - extends ItemProviderAdapter - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public QueryConfigurationItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addNamePropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Name feature. - * - * - * @generated - */ - protected void addNamePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_QueryConfiguration_name_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_QueryConfiguration_name_feature", "_UI_QueryConfiguration_type"), - ConfigurationPackage.Literals.QUERY_CONFIGURATION__NAME, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - String label = ((QueryConfiguration)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_QueryConfiguration_type") : - getString("_UI_QueryConfiguration_type") + " " + label; - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(QueryConfiguration.class)) { - case ConfigurationPackage.QUERY_CONFIGURATION__NAME: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * - * - * @generated - */ - @Override - public ResourceLocator getResourceLocator() { - return ConfigurationEditPlugin.INSTANCE; - } - -} diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/QueryExecutionValueItemProvider.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/QueryExecutionValueItemProvider.java deleted file mode 100644 index 2b3050ce093..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration.edit/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/provider/QueryExecutionValueItemProvider.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; - -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; - -/** - * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue} object. - * - * - * @generated - */ -public class QueryExecutionValueItemProvider - extends ParameterValueItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public QueryExecutionValueItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addConfigurationPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Configuration feature. - * - * - * @generated - */ - protected void addConfigurationPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_QueryExecutionValue_configuration_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_QueryExecutionValue_configuration_feature", "_UI_QueryExecutionValue_type"), - ConfigurationPackage.Literals.QUERY_EXECUTION_VALUE__CONFIGURATION, - true, - false, - true, - null, - null, - null)); - } - - /** - * This returns QueryExecutionValue.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/QueryExecutionValue")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - return getString("_UI_QueryExecutionValue_type"); - } - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/.classpath b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/.classpath deleted file mode 100644 index cedf0d0d0b5..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/.project b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/.project deleted file mode 100644 index 19b48341fa2..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.papyrus.infra.queries.core.configuration - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/.settings/org.eclipse.core.resources.prefs b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7cceaebc432..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Thu Oct 07 19:29:54 CEST 2010 -eclipse.preferences.version=1 -encoding//model/Configuration.ecore=UTF-8 -encoding//model/Configuration.ecorediag=UTF-8 diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 2010cb0a8ba..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Wed Oct 06 16:11:35 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/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/META-INF/MANIFEST.MF b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/META-INF/MANIFEST.MF deleted file mode 100644 index af3264a0829..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/META-INF/MANIFEST.MF +++ /dev/null @@ -1,22 +0,0 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.emf.ecore;visibility:=reexport, - org.eclipse.emf.ecore.xmi;visibility:=reexport, - org.eclipse.uml2.uml -Export-Package: org.eclipse.papyrus.infra.queries.core.configuration, - org.eclipse.papyrus.infra.queries.core.configuration.impl, - org.eclipse.papyrus.infra.queries.core.configuration.plugin, - org.eclipse.papyrus.infra.queries.core.configuration.util -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy -Bundle-ClassPath: . -Bundle-Version: 1.0.0.qualifier -Bundle-Localization: plugin -Bundle-Name: %pluginName -Bundle-Activator: org.eclipse.papyrus.infra.queries.core.configuration - .plugin.Activator$Implementation -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: org.eclipse.papyrus.infra.queries.core.configurat - ion;singleton:=true -Bundle-RequiredExecutionEnvironment: J2SE-1.5 - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/about.html b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/about.html deleted file mode 100644 index 82d49bf5f81..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/about.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - -About - - -

About This Content

- -

June 5, 2007

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") 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 http://www.eclipse.org.

- - - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/build.properties b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/build.properties deleted file mode 100644 index e05d6efaf6a..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -# -#Mon Sep 12 09:29:39 CEST 2011 -output..=bin/ -bin.includes=.,model/,META-INF/,plugin.xml,plugin.properties,about.html -jars.compile.order=. -src.includes = about.html -source..=src-gen/ -bin..=bin/ diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecore b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecore deleted file mode 100644 index 5e4046fa300..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecore +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecorediag b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecorediag deleted file mode 100644 index 7b7dc6485ef..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecorediag +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.genmodel b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.genmodel deleted file mode 100644 index e1ab6b1384f..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.genmodel +++ /dev/null @@ -1,41 +0,0 @@ - - - Configuration.ecore - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/plugin.properties b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/plugin.properties deleted file mode 100644 index 27eac336a7e..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/plugin.properties +++ /dev/null @@ -1,12 +0,0 @@ -################################################################################ -# Copyright (c) 2008 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 -################################################################################ -pluginName=Configuration Model for queries (Incubation) -providerName=Eclipse Modeling Project diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/plugin.xml b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/plugin.xml deleted file mode 100644 index 52cff66df0a..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/plugin.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConfigurationFactory.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConfigurationFactory.java deleted file mode 100644 index a41797e0838..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConfigurationFactory.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration; - -import org.eclipse.emf.ecore.EFactory; - -/** - * - * The Factory for the model. - * It provides a create method for each non-abstract class of the model. - * - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage - * @generated - */ -public interface ConfigurationFactory extends EFactory { - /** - * The singleton instance of the factory. - * - * - * @generated - */ - ConfigurationFactory eINSTANCE = org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationFactoryImpl.init(); - - /** - * Returns a new object of class 'Modisco Query Configuration'. - * - * - * @return a new object of class 'Modisco Query Configuration'. - * @generated - */ - ModiscoQueryConfiguration createModiscoQueryConfiguration(); - - /** - * Returns a new object of class 'Query Execution Value'. - * - * - * @return a new object of class 'Query Execution Value'. - * @generated - */ - QueryExecutionValue createQueryExecutionValue(); - - /** - * Returns a new object of class 'Constant Parameter Value'. - * - * - * @return a new object of class 'Constant Parameter Value'. - * @generated - */ - ConstantParameterValue createConstantParameterValue(); - - /** - * Returns a new object of class 'List Parameter Value'. - * - * - * @return a new object of class 'List Parameter Value'. - * @generated - */ - ListParameterValue createListParameterValue(); - - /** - * Returns the package supported by this factory. - * - * - * @return the package supported by this factory. - * @generated - */ - ConfigurationPackage getConfigurationPackage(); - -} //ConfigurationFactory diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConfigurationPackage.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConfigurationPackage.java deleted file mode 100644 index 5560e67ef85..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConfigurationPackage.java +++ /dev/null @@ -1,553 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -/** - * - * The Package for the model. - * It contains accessors for the meta objects to represent - *
    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationFactory - * @model kind="package" - * @generated - */ -public interface ConfigurationPackage extends EPackage { - /** - * The package name. - * - * - * @generated - */ - String eNAME = "configuration"; - - /** - * The package namespace URI. - * - * - * @generated - */ - String eNS_URI = "http://www.eclipse.org/papyrus/core/queries/0.7"; - - /** - * The package namespace name. - * - * - * @generated - */ - String eNS_PREFIX = "configuration"; - - /** - * The singleton instance of the package. - * - * - * @generated - */ - ConfigurationPackage eINSTANCE = org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl.init(); - - /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryConfigurationImpl Query Configuration}' class. - * - * - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryConfigurationImpl - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getQueryConfiguration() - * @generated - */ - int QUERY_CONFIGURATION = 0; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int QUERY_CONFIGURATION__NAME = 0; - - /** - * The number of structural features of the 'Query Configuration' class. - * - * - * @generated - * @ordered - */ - int QUERY_CONFIGURATION_FEATURE_COUNT = 1; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ModiscoQueryConfigurationImpl Modisco Query Configuration}' class. - * - * - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ModiscoQueryConfigurationImpl - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getModiscoQueryConfiguration() - * @generated - */ - int MODISCO_QUERY_CONFIGURATION = 1; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int MODISCO_QUERY_CONFIGURATION__NAME = QUERY_CONFIGURATION__NAME; - - /** - * The feature id for the 'Query' reference. - * - * - * @generated - * @ordered - */ - int MODISCO_QUERY_CONFIGURATION__QUERY = QUERY_CONFIGURATION_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Parameter Values' containment reference list. - * - * - * @generated - * @ordered - */ - int MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES = QUERY_CONFIGURATION_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Modisco Query Configuration' class. - * - * - * @generated - * @ordered - */ - int MODISCO_QUERY_CONFIGURATION_FEATURE_COUNT = QUERY_CONFIGURATION_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ParameterValueImpl Parameter Value}' class. - * - * - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ParameterValueImpl - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getParameterValue() - * @generated - */ - int PARAMETER_VALUE = 2; - - /** - * The feature id for the 'Parameter' reference. - * - * - * @generated - * @ordered - */ - int PARAMETER_VALUE__PARAMETER = 0; - - /** - * The number of structural features of the 'Parameter Value' class. - * - * - * @generated - * @ordered - */ - int PARAMETER_VALUE_FEATURE_COUNT = 1; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryExecutionValueImpl Query Execution Value}' class. - * - * - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryExecutionValueImpl - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getQueryExecutionValue() - * @generated - */ - int QUERY_EXECUTION_VALUE = 3; - - /** - * The feature id for the 'Parameter' reference. - * - * - * @generated - * @ordered - */ - int QUERY_EXECUTION_VALUE__PARAMETER = PARAMETER_VALUE__PARAMETER; - - /** - * The feature id for the 'Configuration' reference. - * - * - * @generated - * @ordered - */ - int QUERY_EXECUTION_VALUE__CONFIGURATION = PARAMETER_VALUE_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'Query Execution Value' class. - * - * - * @generated - * @ordered - */ - int QUERY_EXECUTION_VALUE_FEATURE_COUNT = PARAMETER_VALUE_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ConstantParameterValueImpl Constant Parameter Value}' class. - * - * - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConstantParameterValueImpl - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getConstantParameterValue() - * @generated - */ - int CONSTANT_PARAMETER_VALUE = 4; - - /** - * The feature id for the 'Parameter' reference. - * - * - * @generated - * @ordered - */ - int CONSTANT_PARAMETER_VALUE__PARAMETER = PARAMETER_VALUE__PARAMETER; - - /** - * The feature id for the 'Value Instance' containment reference. - * - * - * @generated - * @ordered - */ - int CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE = PARAMETER_VALUE_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'Constant Parameter Value' class. - * - * - * @generated - * @ordered - */ - int CONSTANT_PARAMETER_VALUE_FEATURE_COUNT = PARAMETER_VALUE_FEATURE_COUNT + 1; - - /** - * The meta object id for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ListParameterValueImpl List Parameter Value}' class. - * - * - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ListParameterValueImpl - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getListParameterValue() - * @generated - */ - int LIST_PARAMETER_VALUE = 5; - - /** - * The feature id for the 'Parameter' reference. - * - * - * @generated - * @ordered - */ - int LIST_PARAMETER_VALUE__PARAMETER = PARAMETER_VALUE__PARAMETER; - - /** - * The feature id for the 'Values' reference list. - * - * - * @generated - * @ordered - */ - int LIST_PARAMETER_VALUE__VALUES = PARAMETER_VALUE_FEATURE_COUNT + 0; - - /** - * The number of structural features of the 'List Parameter Value' class. - * - * - * @generated - * @ordered - */ - int LIST_PARAMETER_VALUE_FEATURE_COUNT = PARAMETER_VALUE_FEATURE_COUNT + 1; - - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration Query Configuration}'. - * - * - * @return the meta object for class 'Query Configuration'. - * @see org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration - * @generated - */ - EClass getQueryConfiguration(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration#getName() - * @see #getQueryConfiguration() - * @generated - */ - EAttribute getQueryConfiguration_Name(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration Modisco Query Configuration}'. - * - * - * @return the meta object for class 'Modisco Query Configuration'. - * @see org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration - * @generated - */ - EClass getModiscoQueryConfiguration(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration#getQuery Query}'. - * - * - * @return the meta object for the reference 'Query'. - * @see org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration#getQuery() - * @see #getModiscoQueryConfiguration() - * @generated - */ - EReference getModiscoQueryConfiguration_Query(); - - /** - * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration#getParameterValues Parameter Values}'. - * - * - * @return the meta object for the containment reference list 'Parameter Values'. - * @see org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration#getParameterValues() - * @see #getModiscoQueryConfiguration() - * @generated - */ - EReference getModiscoQueryConfiguration_ParameterValues(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue Parameter Value}'. - * - * - * @return the meta object for class 'Parameter Value'. - * @see org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue - * @generated - */ - EClass getParameterValue(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue#getParameter Parameter}'. - * - * - * @return the meta object for the reference 'Parameter'. - * @see org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue#getParameter() - * @see #getParameterValue() - * @generated - */ - EReference getParameterValue_Parameter(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue Query Execution Value}'. - * - * - * @return the meta object for class 'Query Execution Value'. - * @see org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue - * @generated - */ - EClass getQueryExecutionValue(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue#getConfiguration Configuration}'. - * - * - * @return the meta object for the reference 'Configuration'. - * @see org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue#getConfiguration() - * @see #getQueryExecutionValue() - * @generated - */ - EReference getQueryExecutionValue_Configuration(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue Constant Parameter Value}'. - * - * - * @return the meta object for class 'Constant Parameter Value'. - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue - * @generated - */ - EClass getConstantParameterValue(); - - /** - * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue#getValueInstance Value Instance}'. - * - * - * @return the meta object for the containment reference 'Value Instance'. - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue#getValueInstance() - * @see #getConstantParameterValue() - * @generated - */ - EReference getConstantParameterValue_ValueInstance(); - - /** - * Returns the meta object for class '{@link org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue List Parameter Value}'. - * - * - * @return the meta object for class 'List Parameter Value'. - * @see org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue - * @generated - */ - EClass getListParameterValue(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue#getValues Values}'. - * - * - * @return the meta object for the reference list 'Values'. - * @see org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue#getValues() - * @see #getListParameterValue() - * @generated - */ - EReference getListParameterValue_Values(); - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - ConfigurationFactory getConfigurationFactory(); - - /** - * - * Defines literals for the meta objects that represent - *
    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * @generated - */ - interface Literals { - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryConfigurationImpl Query Configuration}' class. - * - * - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryConfigurationImpl - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getQueryConfiguration() - * @generated - */ - EClass QUERY_CONFIGURATION = eINSTANCE.getQueryConfiguration(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute QUERY_CONFIGURATION__NAME = eINSTANCE.getQueryConfiguration_Name(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ModiscoQueryConfigurationImpl Modisco Query Configuration}' class. - * - * - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ModiscoQueryConfigurationImpl - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getModiscoQueryConfiguration() - * @generated - */ - EClass MODISCO_QUERY_CONFIGURATION = eINSTANCE.getModiscoQueryConfiguration(); - - /** - * The meta object literal for the 'Query' reference feature. - * - * - * @generated - */ - EReference MODISCO_QUERY_CONFIGURATION__QUERY = eINSTANCE.getModiscoQueryConfiguration_Query(); - - /** - * The meta object literal for the 'Parameter Values' containment reference list feature. - * - * - * @generated - */ - EReference MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES = eINSTANCE.getModiscoQueryConfiguration_ParameterValues(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ParameterValueImpl Parameter Value}' class. - * - * - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ParameterValueImpl - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getParameterValue() - * @generated - */ - EClass PARAMETER_VALUE = eINSTANCE.getParameterValue(); - - /** - * The meta object literal for the 'Parameter' reference feature. - * - * - * @generated - */ - EReference PARAMETER_VALUE__PARAMETER = eINSTANCE.getParameterValue_Parameter(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryExecutionValueImpl Query Execution Value}' class. - * - * - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryExecutionValueImpl - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getQueryExecutionValue() - * @generated - */ - EClass QUERY_EXECUTION_VALUE = eINSTANCE.getQueryExecutionValue(); - - /** - * The meta object literal for the 'Configuration' reference feature. - * - * - * @generated - */ - EReference QUERY_EXECUTION_VALUE__CONFIGURATION = eINSTANCE.getQueryExecutionValue_Configuration(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ConstantParameterValueImpl Constant Parameter Value}' class. - * - * - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConstantParameterValueImpl - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getConstantParameterValue() - * @generated - */ - EClass CONSTANT_PARAMETER_VALUE = eINSTANCE.getConstantParameterValue(); - - /** - * The meta object literal for the 'Value Instance' containment reference feature. - * - * - * @generated - */ - EReference CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE = eINSTANCE.getConstantParameterValue_ValueInstance(); - - /** - * The meta object literal for the '{@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ListParameterValueImpl List Parameter Value}' class. - * - * - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ListParameterValueImpl - * @see org.eclipse.papyrus.infra.queries.core.configuration.impl.ConfigurationPackageImpl#getListParameterValue() - * @generated - */ - EClass LIST_PARAMETER_VALUE = eINSTANCE.getListParameterValue(); - - /** - * The meta object literal for the 'Values' reference list feature. - * - * - * @generated - */ - EReference LIST_PARAMETER_VALUE__VALUES = eINSTANCE.getListParameterValue_Values(); - - } - -} //ConfigurationPackage diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConstantParameterValue.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConstantParameterValue.java deleted file mode 100644 index c7a98e250b4..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ConstantParameterValue.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration; - -import org.eclipse.uml2.uml.ValueSpecification; - -/** - * - * A representation of the model object 'Constant Parameter Value'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue#getValueInstance Value Instance}
  • - *
- *

- * - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getConstantParameterValue() - * @model - * @generated - */ -public interface ConstantParameterValue extends ParameterValue { - /** - * Returns the value of the 'Value Instance' containment reference. - * - *

- * If the meaning of the 'Value Instance' containment reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Value Instance' containment reference. - * @see #setValueInstance(ValueSpecification) - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getConstantParameterValue_ValueInstance() - * @model containment="true" - * @generated - */ - ValueSpecification getValueInstance(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue#getValueInstance Value Instance}' containment reference. - * - * - * @param value the new value of the 'Value Instance' containment reference. - * @see #getValueInstance() - * @generated - */ - void setValueInstance(ValueSpecification value); - -} // ConstantParameterValue diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ListParameterValue.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ListParameterValue.java deleted file mode 100644 index a15a622ece5..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ListParameterValue.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration; - -import org.eclipse.emf.common.util.EList; - -/** - * - * A representation of the model object 'List Parameter Value'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue#getValues Values}
  • - *
- *

- * - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getListParameterValue() - * @model - * @generated - */ -public interface ListParameterValue extends ParameterValue { - /** - * Returns the value of the 'Values' reference list. - * The list contents are of type {@link org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue}. - * - *

- * If the meaning of the 'Values' reference list isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Values' reference list. - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getListParameterValue_Values() - * @model - * @generated - */ - EList getValues(); - -} // ListParameterValue diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ModiscoQueryConfiguration.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ModiscoQueryConfiguration.java deleted file mode 100644 index e6316e5443c..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ModiscoQueryConfiguration.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.facet.infra.query.ModelQuery; - -/** - * - * A representation of the model object 'Modisco Query Configuration'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration#getQuery Query}
  • - *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration#getParameterValues Parameter Values}
  • - *
- *

- * - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getModiscoQueryConfiguration() - * @model - * @generated - */ -public interface ModiscoQueryConfiguration extends QueryConfiguration { - /** - * Returns the value of the 'Query' reference. - * - *

- * If the meaning of the 'Query' reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Query' reference. - * @see #setQuery(ModelQuery) - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getModiscoQueryConfiguration_Query() - * @model required="true" - * @generated - */ - ModelQuery getQuery(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration#getQuery Query}' reference. - * - * - * @param value the new value of the 'Query' reference. - * @see #getQuery() - * @generated - */ - void setQuery(ModelQuery value); - - /** - * Returns the value of the 'Parameter Values' containment reference list. - * The list contents are of type {@link org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue}. - * - *

- * If the meaning of the 'Parameter Values' containment reference list isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Parameter Values' containment reference list. - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getModiscoQueryConfiguration_ParameterValues() - * @model containment="true" - * @generated - */ - EList getParameterValues(); - -} // ModiscoQueryConfiguration diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ParameterValue.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ParameterValue.java deleted file mode 100644 index 2f82772c2c2..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/ParameterValue.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.facet.infra.query.ModelQueryParameter; - -/** - * - * A representation of the model object 'Parameter Value'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue#getParameter Parameter}
  • - *
- *

- * - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getParameterValue() - * @model abstract="true" - * @generated - */ -public interface ParameterValue extends EObject { - /** - * Returns the value of the 'Parameter' reference. - * - *

- * If the meaning of the 'Parameter' reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Parameter' reference. - * @see #setParameter(ModelQueryParameter) - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getParameterValue_Parameter() - * @model required="true" - * @generated - */ - ModelQueryParameter getParameter(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue#getParameter Parameter}' reference. - * - * - * @param value the new value of the 'Parameter' reference. - * @see #getParameter() - * @generated - */ - void setParameter(ModelQueryParameter value); - -} // ParameterValue diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/QueryConfiguration.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/QueryConfiguration.java deleted file mode 100644 index a97e1cc6261..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/QueryConfiguration.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Query Configuration'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration#getName Name}
  • - *
- *

- * - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getQueryConfiguration() - * @model abstract="true" - * @generated - */ -public interface QueryConfiguration extends EObject { - /** - * Returns the value of the 'Name' attribute. - * - *

- * If the meaning of the 'Name' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getQueryConfiguration_Name() - * @model required="true" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration#getName Name}' attribute. - * - * - * @param value the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - -} // QueryConfiguration diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/QueryExecutionValue.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/QueryExecutionValue.java deleted file mode 100644 index 768f82c46da..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/QueryExecutionValue.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration; - - -/** - * - * A representation of the model object 'Query Execution Value'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue#getConfiguration Configuration}
  • - *
- *

- * - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getQueryExecutionValue() - * @model - * @generated - */ -public interface QueryExecutionValue extends ParameterValue { - /** - * Returns the value of the 'Configuration' reference. - * - *

- * If the meaning of the 'Configuration' reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Configuration' reference. - * @see #setConfiguration(QueryConfiguration) - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#getQueryExecutionValue_Configuration() - * @model required="true" - * @generated - */ - QueryConfiguration getConfiguration(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue#getConfiguration Configuration}' reference. - * - * - * @param value the new value of the 'Configuration' reference. - * @see #getConfiguration() - * @generated - */ - void setConfiguration(QueryConfiguration value); - -} // QueryExecutionValue diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConfigurationFactoryImpl.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConfigurationFactoryImpl.java deleted file mode 100644 index c08ed885209..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConfigurationFactoryImpl.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.impl.EFactoryImpl; -import org.eclipse.emf.ecore.plugin.EcorePlugin; -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationFactory; -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; -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.QueryExecutionValue; - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class ConfigurationFactoryImpl extends EFactoryImpl implements ConfigurationFactory { - /** - * Creates the default factory implementation. - * - * - * @generated - */ - public static ConfigurationFactory init() { - try { - ConfigurationFactory theConfigurationFactory = (ConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/core/queries/0.7"); - if (theConfigurationFactory != null) { - return theConfigurationFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new ConfigurationFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * - * @generated - */ - public ConfigurationFactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION: return createModiscoQueryConfiguration(); - case ConfigurationPackage.QUERY_EXECUTION_VALUE: return createQueryExecutionValue(); - case ConfigurationPackage.CONSTANT_PARAMETER_VALUE: return createConstantParameterValue(); - case ConfigurationPackage.LIST_PARAMETER_VALUE: return createListParameterValue(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public ModiscoQueryConfiguration createModiscoQueryConfiguration() { - ModiscoQueryConfigurationImpl modiscoQueryConfiguration = new ModiscoQueryConfigurationImpl(); - return modiscoQueryConfiguration; - } - - /** - * - * - * @generated - */ - public QueryExecutionValue createQueryExecutionValue() { - QueryExecutionValueImpl queryExecutionValue = new QueryExecutionValueImpl(); - return queryExecutionValue; - } - - /** - * - * - * @generated - */ - public ConstantParameterValue createConstantParameterValue() { - ConstantParameterValueImpl constantParameterValue = new ConstantParameterValueImpl(); - return constantParameterValue; - } - - /** - * - * - * @generated - */ - public ListParameterValue createListParameterValue() { - ListParameterValueImpl listParameterValue = new ListParameterValueImpl(); - return listParameterValue; - } - - /** - * - * - * @generated - */ - public ConfigurationPackage getConfigurationPackage() { - return (ConfigurationPackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - @Deprecated - public static ConfigurationPackage getPackage() { - return ConfigurationPackage.eINSTANCE; - } - -} //ConfigurationFactoryImpl diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConfigurationPackageImpl.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConfigurationPackageImpl.java deleted file mode 100644 index 93081f21411..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConfigurationPackageImpl.java +++ /dev/null @@ -1,371 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.impl.EPackageImpl; -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationFactory; -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; -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.uml2.types.TypesPackage; -import org.eclipse.uml2.types.internal.impl.TypesPackageImpl; -import org.eclipse.uml2.uml.UMLPackage; - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class ConfigurationPackageImpl extends EPackageImpl implements ConfigurationPackage { - /** - * - * - * @generated - */ - private EClass queryConfigurationEClass = null; - - /** - * - * - * @generated - */ - private EClass modiscoQueryConfigurationEClass = null; - - /** - * - * - * @generated - */ - private EClass parameterValueEClass = null; - - /** - * - * - * @generated - */ - private EClass queryExecutionValueEClass = null; - - /** - * - * - * @generated - */ - private EClass constantParameterValueEClass = null; - - /** - * - * - * @generated - */ - private EClass listParameterValueEClass = null; - - /** - * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - *

Note: the correct way to create the package is via the static - * factory method {@link #init init()}, which also performs - * initialization of the package, or returns the registered package, - * if one already exists. - * - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage#eNS_URI - * @see #init() - * @generated - */ - private ConfigurationPackageImpl() { - super(eNS_URI, ConfigurationFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - * - *

This method is used to initialize {@link ConfigurationPackage#eINSTANCE} when that field is accessed. - * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static ConfigurationPackage init() { - if (isInited) return (ConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(ConfigurationPackage.eNS_URI); - - // Obtain or create and register package - ConfigurationPackageImpl theConfigurationPackage = (ConfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ConfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ConfigurationPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - //QueryPackage.eINSTANCE.eClass(); - UMLPackage.eINSTANCE.eClass(); - - // Obtain or create and register interdependencies - TypesPackageImpl theTypesPackage = (TypesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI) instanceof TypesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI) : TypesPackage.eINSTANCE); - - // Create package meta-data objects - theConfigurationPackage.createPackageContents(); - theTypesPackage.createPackageContents(); - - // Initialize created meta-data - theConfigurationPackage.initializePackageContents(); - theTypesPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theConfigurationPackage.freeze(); - - - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(ConfigurationPackage.eNS_URI, theConfigurationPackage); - return theConfigurationPackage; - } - - /** - * - * - * @generated - */ - public EClass getQueryConfiguration() { - return queryConfigurationEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getQueryConfiguration_Name() { - return (EAttribute)queryConfigurationEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getModiscoQueryConfiguration() { - return modiscoQueryConfigurationEClass; - } - - /** - * - * - * @generated - */ - public EReference getModiscoQueryConfiguration_Query() { - return (EReference)modiscoQueryConfigurationEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getModiscoQueryConfiguration_ParameterValues() { - return (EReference)modiscoQueryConfigurationEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getParameterValue() { - return parameterValueEClass; - } - - /** - * - * - * @generated - */ - public EReference getParameterValue_Parameter() { - return (EReference)parameterValueEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getQueryExecutionValue() { - return queryExecutionValueEClass; - } - - /** - * - * - * @generated - */ - public EReference getQueryExecutionValue_Configuration() { - return (EReference)queryExecutionValueEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getConstantParameterValue() { - return constantParameterValueEClass; - } - - /** - * - * - * @generated - */ - public EReference getConstantParameterValue_ValueInstance() { - return (EReference)constantParameterValueEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getListParameterValue() { - return listParameterValueEClass; - } - - /** - * - * - * @generated - */ - public EReference getListParameterValue_Values() { - return (EReference)listParameterValueEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public ConfigurationFactory getConfigurationFactory() { - return (ConfigurationFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - queryConfigurationEClass = createEClass(QUERY_CONFIGURATION); - createEAttribute(queryConfigurationEClass, QUERY_CONFIGURATION__NAME); - - modiscoQueryConfigurationEClass = createEClass(MODISCO_QUERY_CONFIGURATION); - createEReference(modiscoQueryConfigurationEClass, MODISCO_QUERY_CONFIGURATION__QUERY); - createEReference(modiscoQueryConfigurationEClass, MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES); - - parameterValueEClass = createEClass(PARAMETER_VALUE); - createEReference(parameterValueEClass, PARAMETER_VALUE__PARAMETER); - - queryExecutionValueEClass = createEClass(QUERY_EXECUTION_VALUE); - createEReference(queryExecutionValueEClass, QUERY_EXECUTION_VALUE__CONFIGURATION); - - constantParameterValueEClass = createEClass(CONSTANT_PARAMETER_VALUE); - createEReference(constantParameterValueEClass, CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE); - - listParameterValueEClass = createEClass(LIST_PARAMETER_VALUE); - createEReference(listParameterValueEClass, LIST_PARAMETER_VALUE__VALUES); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - //QueryPackage theQueryPackage = (QueryPackage)EPackage.Registry.INSTANCE.getEPackage(QueryPackage.eNS_URI); - UMLPackage theUMLPackage = (UMLPackage)EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI); - - // Create type parameters - - // Set bounds for type parameters - - // Add supertypes to classes - modiscoQueryConfigurationEClass.getESuperTypes().add(this.getQueryConfiguration()); - queryExecutionValueEClass.getESuperTypes().add(this.getParameterValue()); - constantParameterValueEClass.getESuperTypes().add(this.getParameterValue()); - listParameterValueEClass.getESuperTypes().add(this.getParameterValue()); - - // Initialize classes and features; add operations and parameters - initEClass(queryConfigurationEClass, QueryConfiguration.class, "QueryConfiguration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getQueryConfiguration_Name(), ecorePackage.getEString(), "name", null, 1, 1, QueryConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(modiscoQueryConfigurationEClass, ModiscoQueryConfiguration.class, "ModiscoQueryConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - //initEReference(getModiscoQueryConfiguration_Query(), theQueryPackage.getModelQuery(), null, "query", null, 1, 1, ModiscoQueryConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getModiscoQueryConfiguration_ParameterValues(), this.getParameterValue(), null, "parameterValues", null, 0, -1, ModiscoQueryConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(parameterValueEClass, ParameterValue.class, "ParameterValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - //initEReference(getParameterValue_Parameter(), theQueryPackage.getModelQueryParameter(), null, "parameter", null, 1, 1, ParameterValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(queryExecutionValueEClass, QueryExecutionValue.class, "QueryExecutionValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getQueryExecutionValue_Configuration(), this.getQueryConfiguration(), null, "configuration", null, 1, 1, QueryExecutionValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(constantParameterValueEClass, ConstantParameterValue.class, "ConstantParameterValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getConstantParameterValue_ValueInstance(), theUMLPackage.getValueSpecification(), null, "valueInstance", null, 0, 1, ConstantParameterValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(listParameterValueEClass, ListParameterValue.class, "ListParameterValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getListParameterValue_Values(), this.getParameterValue(), null, "values", null, 0, -1, ListParameterValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - // Create resource - createResource(eNS_URI); - } - -} //ConfigurationPackageImpl diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConstantParameterValueImpl.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConstantParameterValueImpl.java deleted file mode 100644 index dde0ce6ecd6..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ConstantParameterValueImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; -import org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue; -import org.eclipse.uml2.uml.ValueSpecification; - -/** - * - * An implementation of the model object 'Constant Parameter Value'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ConstantParameterValueImpl#getValueInstance Value Instance}
  • - *
- *

- * - * @generated - */ -public class ConstantParameterValueImpl extends ParameterValueImpl implements ConstantParameterValue { - /** - * The cached value of the '{@link #getValueInstance() Value Instance}' containment reference. - * - * - * @see #getValueInstance() - * @generated - * @ordered - */ - protected ValueSpecification valueInstance; - - /** - * - * - * @generated - */ - protected ConstantParameterValueImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ConfigurationPackage.Literals.CONSTANT_PARAMETER_VALUE; - } - - /** - * - * - * @generated - */ - public ValueSpecification getValueInstance() { - return valueInstance; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetValueInstance(ValueSpecification newValueInstance, NotificationChain msgs) { - ValueSpecification oldValueInstance = valueInstance; - valueInstance = newValueInstance; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, oldValueInstance, newValueInstance); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setValueInstance(ValueSpecification newValueInstance) { - if (newValueInstance != valueInstance) { - NotificationChain msgs = null; - if (valueInstance != null) - msgs = ((InternalEObject)valueInstance).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, null, msgs); - if (newValueInstance != null) - msgs = ((InternalEObject)newValueInstance).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, null, msgs); - msgs = basicSetValueInstance(newValueInstance, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE, newValueInstance, newValueInstance)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE: - return basicSetValueInstance(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE: - return getValueInstance(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE: - setValueInstance((ValueSpecification)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE: - setValueInstance((ValueSpecification)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ConfigurationPackage.CONSTANT_PARAMETER_VALUE__VALUE_INSTANCE: - return valueInstance != null; - } - return super.eIsSet(featureID); - } - -} //ConstantParameterValueImpl diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ListParameterValueImpl.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ListParameterValueImpl.java deleted file mode 100644 index a99d8db56bc..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ListParameterValueImpl.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.util.EObjectResolvingEList; -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; -import org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue; -import org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue; - -/** - * - * An implementation of the model object 'List Parameter Value'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ListParameterValueImpl#getValues Values}
  • - *
- *

- * - * @generated - */ -public class ListParameterValueImpl extends ParameterValueImpl implements ListParameterValue { - /** - * The cached value of the '{@link #getValues() Values}' reference list. - * - * - * @see #getValues() - * @generated - * @ordered - */ - protected EList values; - - /** - * - * - * @generated - */ - protected ListParameterValueImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ConfigurationPackage.Literals.LIST_PARAMETER_VALUE; - } - - /** - * - * - * @generated - */ - public EList getValues() { - if (values == null) { - values = new EObjectResolvingEList(ParameterValue.class, this, ConfigurationPackage.LIST_PARAMETER_VALUE__VALUES); - } - return values; - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ConfigurationPackage.LIST_PARAMETER_VALUE__VALUES: - return getValues(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ConfigurationPackage.LIST_PARAMETER_VALUE__VALUES: - getValues().clear(); - getValues().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ConfigurationPackage.LIST_PARAMETER_VALUE__VALUES: - getValues().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ConfigurationPackage.LIST_PARAMETER_VALUE__VALUES: - return values != null && !values.isEmpty(); - } - return super.eIsSet(featureID); - } - -} //ListParameterValueImpl diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ModiscoQueryConfigurationImpl.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ModiscoQueryConfigurationImpl.java deleted file mode 100644 index d68c0622dca..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ModiscoQueryConfigurationImpl.java +++ /dev/null @@ -1,213 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.eclipse.emf.facet.infra.query.ModelQuery; -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; -import org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration; -import org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue; - -/** - * - * An implementation of the model object 'Modisco Query Configuration'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ModiscoQueryConfigurationImpl#getQuery Query}
  • - *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ModiscoQueryConfigurationImpl#getParameterValues Parameter Values}
  • - *
- *

- * - * @generated - */ -public class ModiscoQueryConfigurationImpl extends QueryConfigurationImpl implements ModiscoQueryConfiguration { - /** - * The cached value of the '{@link #getQuery() Query}' reference. - * - * - * @see #getQuery() - * @generated - * @ordered - */ - protected ModelQuery query; - - /** - * The cached value of the '{@link #getParameterValues() Parameter Values}' containment reference list. - * - * - * @see #getParameterValues() - * @generated - * @ordered - */ - protected EList parameterValues; - - /** - * - * - * @generated - */ - protected ModiscoQueryConfigurationImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ConfigurationPackage.Literals.MODISCO_QUERY_CONFIGURATION; - } - - /** - * - * - * @generated - */ - public ModelQuery getQuery() { - if (query != null && query.eIsProxy()) { - InternalEObject oldQuery = (InternalEObject)query; - query = (ModelQuery)eResolveProxy(oldQuery); - if (query != oldQuery) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__QUERY, oldQuery, query)); - } - } - return query; - } - - /** - * - * - * @generated - */ - public ModelQuery basicGetQuery() { - return query; - } - - /** - * - * - * @generated - */ - public void setQuery(ModelQuery newQuery) { - ModelQuery oldQuery = query; - query = newQuery; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__QUERY, oldQuery, query)); - } - - /** - * - * - * @generated - */ - public EList getParameterValues() { - if (parameterValues == null) { - parameterValues = new EObjectContainmentEList(ParameterValue.class, this, ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES); - } - return parameterValues; - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES: - return ((InternalEList)getParameterValues()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__QUERY: - if (resolve) return getQuery(); - return basicGetQuery(); - case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES: - return getParameterValues(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__QUERY: - setQuery((ModelQuery)newValue); - return; - case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES: - getParameterValues().clear(); - getParameterValues().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__QUERY: - setQuery((ModelQuery)null); - return; - case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES: - getParameterValues().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__QUERY: - return query != null; - case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION__PARAMETER_VALUES: - return parameterValues != null && !parameterValues.isEmpty(); - } - return super.eIsSet(featureID); - } - -} //ModiscoQueryConfigurationImpl diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ParameterValueImpl.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ParameterValueImpl.java deleted file mode 100644 index 6b2f1f9f252..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/ParameterValueImpl.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.facet.infra.query.ModelQueryParameter; -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; -import org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue; - -/** - * - * An implementation of the model object 'Parameter Value'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.impl.ParameterValueImpl#getParameter Parameter}
  • - *
- *

- * - * @generated - */ -public abstract class ParameterValueImpl extends EObjectImpl implements ParameterValue { - /** - * The cached value of the '{@link #getParameter() Parameter}' reference. - * - * - * @see #getParameter() - * @generated - * @ordered - */ - protected ModelQueryParameter parameter; - - /** - * - * - * @generated - */ - protected ParameterValueImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ConfigurationPackage.Literals.PARAMETER_VALUE; - } - - /** - * - * - * @generated - */ - public ModelQueryParameter getParameter() { - if (parameter != null && parameter.eIsProxy()) { - InternalEObject oldParameter = (InternalEObject)parameter; - parameter = (ModelQueryParameter)eResolveProxy(oldParameter); - if (parameter != oldParameter) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.PARAMETER_VALUE__PARAMETER, oldParameter, parameter)); - } - } - return parameter; - } - - /** - * - * - * @generated - */ - public ModelQueryParameter basicGetParameter() { - return parameter; - } - - /** - * - * - * @generated - */ - public void setParameter(ModelQueryParameter newParameter) { - ModelQueryParameter oldParameter = parameter; - parameter = newParameter; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PARAMETER_VALUE__PARAMETER, oldParameter, parameter)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ConfigurationPackage.PARAMETER_VALUE__PARAMETER: - if (resolve) return getParameter(); - return basicGetParameter(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ConfigurationPackage.PARAMETER_VALUE__PARAMETER: - setParameter((ModelQueryParameter)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ConfigurationPackage.PARAMETER_VALUE__PARAMETER: - setParameter((ModelQueryParameter)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ConfigurationPackage.PARAMETER_VALUE__PARAMETER: - return parameter != null; - } - return super.eIsSet(featureID); - } - -} //ParameterValueImpl diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/QueryConfigurationImpl.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/QueryConfigurationImpl.java deleted file mode 100644 index 95bbfb9e23c..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/QueryConfigurationImpl.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; -import org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration; - -/** - * - * An implementation of the model object 'Query Configuration'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryConfigurationImpl#getName Name}
  • - *
- *

- * - * @generated - */ -public abstract class QueryConfigurationImpl extends EObjectImpl implements QueryConfiguration { - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * - * - * @generated - */ - protected QueryConfigurationImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ConfigurationPackage.Literals.QUERY_CONFIGURATION; - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.QUERY_CONFIGURATION__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ConfigurationPackage.QUERY_CONFIGURATION__NAME: - return getName(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ConfigurationPackage.QUERY_CONFIGURATION__NAME: - setName((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ConfigurationPackage.QUERY_CONFIGURATION__NAME: - setName(NAME_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ConfigurationPackage.QUERY_CONFIGURATION__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); - result.append(name); - result.append(')'); - return result.toString(); - } - -} //QueryConfigurationImpl diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/QueryExecutionValueImpl.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/QueryExecutionValueImpl.java deleted file mode 100644 index 767a4719dc3..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/impl/QueryExecutionValueImpl.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; -import org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration; -import org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue; - -/** - * - * An implementation of the model object 'Query Execution Value'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.papyrus.infra.queries.core.configuration.impl.QueryExecutionValueImpl#getConfiguration Configuration}
  • - *
- *

- * - * @generated - */ -public class QueryExecutionValueImpl extends ParameterValueImpl implements QueryExecutionValue { - /** - * The cached value of the '{@link #getConfiguration() Configuration}' reference. - * - * - * @see #getConfiguration() - * @generated - * @ordered - */ - protected QueryConfiguration configuration; - - /** - * - * - * @generated - */ - protected QueryExecutionValueImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return ConfigurationPackage.Literals.QUERY_EXECUTION_VALUE; - } - - /** - * - * - * @generated - */ - public QueryConfiguration getConfiguration() { - if (configuration != null && configuration.eIsProxy()) { - InternalEObject oldConfiguration = (InternalEObject)configuration; - configuration = (QueryConfiguration)eResolveProxy(oldConfiguration); - if (configuration != oldConfiguration) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION, oldConfiguration, configuration)); - } - } - return configuration; - } - - /** - * - * - * @generated - */ - public QueryConfiguration basicGetConfiguration() { - return configuration; - } - - /** - * - * - * @generated - */ - public void setConfiguration(QueryConfiguration newConfiguration) { - QueryConfiguration oldConfiguration = configuration; - configuration = newConfiguration; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION, oldConfiguration, configuration)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION: - if (resolve) return getConfiguration(); - return basicGetConfiguration(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION: - setConfiguration((QueryConfiguration)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case ConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION: - setConfiguration((QueryConfiguration)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case ConfigurationPackage.QUERY_EXECUTION_VALUE__CONFIGURATION: - return configuration != null; - } - return super.eIsSet(featureID); - } - -} //QueryExecutionValueImpl diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/plugin/Activator.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/plugin/Activator.java deleted file mode 100644 index 3f795c4cb92..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/plugin/Activator.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.plugin; - -import org.eclipse.emf.common.EMFPlugin; -import org.eclipse.emf.common.util.ResourceLocator; - -/** - * This is the central singleton for the Configuration model plugin. - * - * - * @generated - */ -public final class Activator extends EMFPlugin { - /** - * Keep track of the singleton. - * - * - * @generated - */ - public static final Activator INSTANCE = new Activator(); - - /** - * Keep track of the singleton. - * - * - * @generated - */ - private static Implementation plugin; - - /** - * Create the instance. - * - * - * @generated - */ - public Activator() { - super(new ResourceLocator [] {}); - } - - /** - * Returns the singleton instance of the Eclipse plugin. - * - * - * @return the singleton instance. - * @generated - */ - @Override - public ResourceLocator getPluginResourceLocator() { - return plugin; - } - - /** - * Returns the singleton instance of the Eclipse plugin. - * - * - * @return the singleton instance. - * @generated - */ - public static Implementation getPlugin() { - return plugin; - } - - /** - * The actual implementation of the Eclipse Plugin. - * - * - * @generated - */ - public static class Implementation extends EclipsePlugin { - /** - * Creates an instance. - * - * - * @generated - */ - public Implementation() { - super(); - - // Remember the static instance. - // - plugin = this; - } - } - -} diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationAdapterFactory.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationAdapterFactory.java deleted file mode 100644 index 7222535c6d5..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationAdapterFactory.java +++ /dev/null @@ -1,217 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.util; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; -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; - -/** - * - * The Adapter Factory for the model. - * It provides an adapter createXXX method for each class of the model. - * - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage - * @generated - */ -public class ConfigurationAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * - * - * @generated - */ - protected static ConfigurationPackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * - * @generated - */ - public ConfigurationAdapterFactory() { - if (modelPackage == null) { - modelPackage = ConfigurationPackage.eINSTANCE; - } - } - - /** - * Returns whether this factory is applicable for the type of the object. - * - * This implementation returns true if the object is either the model's package or is an instance object of the model. - * - * @return whether this factory is applicable for the type of the object. - * @generated - */ - @Override - public boolean isFactoryForType(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch that delegates to the createXXX methods. - * - * - * @generated - */ - protected ConfigurationSwitch modelSwitch = - new ConfigurationSwitch() { - @Override - public Adapter caseQueryConfiguration(QueryConfiguration object) { - return createQueryConfigurationAdapter(); - } - @Override - public Adapter caseModiscoQueryConfiguration(ModiscoQueryConfiguration object) { - return createModiscoQueryConfigurationAdapter(); - } - @Override - public Adapter caseParameterValue(ParameterValue object) { - return createParameterValueAdapter(); - } - @Override - public Adapter caseQueryExecutionValue(QueryExecutionValue object) { - return createQueryExecutionValueAdapter(); - } - @Override - public Adapter caseConstantParameterValue(ConstantParameterValue object) { - return createConstantParameterValueAdapter(); - } - @Override - public Adapter caseListParameterValue(ListParameterValue object) { - return createListParameterValueAdapter(); - } - @Override - public Adapter defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the target. - * - * - * @param target the object to adapt. - * @return the adapter for the target. - * @generated - */ - @Override - public Adapter createAdapter(Notifier target) { - return modelSwitch.doSwitch((EObject)target); - } - - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration Query Configuration}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration - * @generated - */ - public Adapter createQueryConfigurationAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration Modisco Query Configuration}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.infra.queries.core.configuration.ModiscoQueryConfiguration - * @generated - */ - public Adapter createModiscoQueryConfigurationAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue Parameter Value}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.infra.queries.core.configuration.ParameterValue - * @generated - */ - public Adapter createParameterValueAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue Query Execution Value}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.infra.queries.core.configuration.QueryExecutionValue - * @generated - */ - public Adapter createQueryExecutionValueAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue Constant Parameter Value}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConstantParameterValue - * @generated - */ - public Adapter createConstantParameterValueAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue List Parameter Value}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.papyrus.infra.queries.core.configuration.ListParameterValue - * @generated - */ - public Adapter createListParameterValueAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * - * This default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - -} //ConfigurationAdapterFactory diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationResourceFactoryImpl.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationResourceFactoryImpl.java deleted file mode 100644 index cf45077cb5e..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationResourceFactoryImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.util; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; -import org.eclipse.emf.ecore.xmi.XMLResource; - -/** - * - * The Resource Factory associated with the package. - * - * @see org.eclipse.papyrus.infra.queries.core.configuration.util.ConfigurationResourceImpl - * @generated - */ -public class ConfigurationResourceFactoryImpl extends ResourceFactoryImpl { - /** - * Creates an instance of the resource factory. - * - * - * @generated - */ - public ConfigurationResourceFactoryImpl() { - super(); - } - - /** - * Creates an instance of the resource. - * - * - * @generated - */ - @Override - public Resource createResource(URI uri) { - XMLResource result = new ConfigurationResourceImpl(uri); - result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); - result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); - - result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); - - result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); - result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); - - result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); - return result; - } - -} //ConfigurationResourceFactoryImpl diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationResourceImpl.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationResourceImpl.java deleted file mode 100644 index 6f579e7873e..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationResourceImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.util; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; - -/** - * - * The Resource associated with the package. - * - * @see org.eclipse.papyrus.infra.queries.core.configuration.util.ConfigurationResourceFactoryImpl - * @generated - */ -public class ConfigurationResourceImpl extends XMLResourceImpl { - /** - * Creates an instance of the resource. - * - * - * @param uri the URI of the new resource. - * @generated - */ - public ConfigurationResourceImpl(URI uri) { - super(uri); - } - -} //ConfigurationResourceImpl diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationSwitch.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationSwitch.java deleted file mode 100644 index 726b23f70ab..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationSwitch.java +++ /dev/null @@ -1,227 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.util; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.util.Switch; -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; -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; - -/** - * - * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the caseXXX method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * - * @see org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage - * @generated - */ -public class ConfigurationSwitch extends Switch { - /** - * The cached model package - * - * - * @generated - */ - protected static ConfigurationPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public ConfigurationSwitch() { - if (modelPackage == null) { - modelPackage = ConfigurationPackage.eINSTANCE; - } - } - - /** - * Checks whether this is a switch for the given package. - * - * - * @parameter ePackage the package in question. - * @return whether this is a switch for the given package. - * @generated - */ - @Override - protected boolean isSwitchFor(EPackage ePackage) { - return ePackage == modelPackage; - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - @Override - protected T doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case ConfigurationPackage.QUERY_CONFIGURATION: { - QueryConfiguration queryConfiguration = (QueryConfiguration)theEObject; - T result = caseQueryConfiguration(queryConfiguration); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ConfigurationPackage.MODISCO_QUERY_CONFIGURATION: { - ModiscoQueryConfiguration modiscoQueryConfiguration = (ModiscoQueryConfiguration)theEObject; - T result = caseModiscoQueryConfiguration(modiscoQueryConfiguration); - if (result == null) result = caseQueryConfiguration(modiscoQueryConfiguration); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ConfigurationPackage.PARAMETER_VALUE: { - ParameterValue parameterValue = (ParameterValue)theEObject; - T result = caseParameterValue(parameterValue); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ConfigurationPackage.QUERY_EXECUTION_VALUE: { - QueryExecutionValue queryExecutionValue = (QueryExecutionValue)theEObject; - T result = caseQueryExecutionValue(queryExecutionValue); - if (result == null) result = caseParameterValue(queryExecutionValue); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ConfigurationPackage.CONSTANT_PARAMETER_VALUE: { - ConstantParameterValue constantParameterValue = (ConstantParameterValue)theEObject; - T result = caseConstantParameterValue(constantParameterValue); - if (result == null) result = caseParameterValue(constantParameterValue); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ConfigurationPackage.LIST_PARAMETER_VALUE: { - ListParameterValue listParameterValue = (ListParameterValue)theEObject; - T result = caseListParameterValue(listParameterValue); - if (result == null) result = caseParameterValue(listParameterValue); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of 'Query Configuration'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Query Configuration'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseQueryConfiguration(QueryConfiguration object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Modisco Query Configuration'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Modisco Query Configuration'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseModiscoQueryConfiguration(ModiscoQueryConfiguration object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Parameter Value'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Parameter Value'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseParameterValue(ParameterValue object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Query Execution Value'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Query Execution Value'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseQueryExecutionValue(QueryExecutionValue object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Constant Parameter Value'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Constant Parameter Value'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseConstantParameterValue(ConstantParameterValue object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'List Parameter Value'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'List Parameter Value'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseListParameterValue(ListParameterValue object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'EObject'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - @Override - public T defaultCase(EObject object) { - return null; - } - -} //ConfigurationSwitch diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationXMLProcessor.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationXMLProcessor.java deleted file mode 100644 index e1d7197cc16..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core.configuration/src-gen/org/eclipse/papyrus/infra/queries/core/configuration/util/ConfigurationXMLProcessor.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.eclipse.papyrus.infra.queries.core.configuration.util; - -import java.util.Map; - -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.xmi.util.XMLProcessor; -import org.eclipse.papyrus.infra.queries.core.configuration.ConfigurationPackage; - -/** - * This class contains helper methods to serialize and deserialize XML documents - * - * - * @generated - */ -public class ConfigurationXMLProcessor extends XMLProcessor { - - /** - * Public constructor to instantiate the helper. - * - * - * @generated - */ - public ConfigurationXMLProcessor() { - super((EPackage.Registry.INSTANCE)); - ConfigurationPackage.eINSTANCE.eClass(); - } - - /** - * Register for "*" and "xml" file extensions the ConfigurationResourceFactoryImpl factory. - * - * - * @generated - */ - @Override - protected Map getRegistrations() { - if (registrations == null) { - super.getRegistrations(); - registrations.put(XML_EXTENSION, new ConfigurationResourceFactoryImpl()); - registrations.put(STAR_EXTENSION, new ConfigurationResourceFactoryImpl()); - } - return registrations; - } - -} //ConfigurationXMLProcessor diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/.classpath b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/.classpath deleted file mode 100644 index 2d1a4302f04..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/.project b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/.project deleted file mode 100644 index 35970c3736b..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.papyrus.infra.queries.core - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.core.resources.prefs b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index a960e953d11..00000000000 --- a/plugins/infra/queries/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/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3b447f78043..00000000000 --- a/plugins/infra/queries/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/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/META-INF/MANIFEST.MF b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/META-INF/MANIFEST.MF deleted file mode 100644 index d9cee11dc74..00000000000 --- a/plugins/infra/queries/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/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/about.html b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/about.html deleted file mode 100644 index 82d49bf5f81..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/about.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - -About - - -

About This Content

- -

June 5, 2007

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") 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 http://www.eclipse.org.

- - - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/build.properties b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/build.properties deleted file mode 100644 index bfc183478ca..00000000000 --- a/plugins/infra/queries/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/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/plugin.properties b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/plugin.properties deleted file mode 100644 index fe4e8ecaa6a..00000000000 --- a/plugins/infra/queries/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/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecore b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecore deleted file mode 100644 index 9d21ce6e9db..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecore +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecorediag b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecorediag deleted file mode 100644 index 88be98ad0bd..00000000000 --- a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/resources/ToolConfiguration.ecorediag +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/Activator.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/Activator.java deleted file mode 100644 index 33bc5c2b73d..00000000000 --- a/plugins/infra/queries/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/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterNotfoundException.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterNotfoundException.java deleted file mode 100644 index ce3c5be4356..00000000000 --- a/plugins/infra/queries/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/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterRegistry.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ConverterRegistry.java deleted file mode 100644 index fed4d51e1e6..00000000000 --- a/plugins/infra/queries/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, IConverter> converterMaps = new HashMap, 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>() { - - /** - * {@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 values = new ArrayList(); - for(ParameterValue parameterValue : listParameterValue.getValues()) { - values.addAll(convertToList(context, parameterType, parameterValue)); - } - return values; - }; - - }.doSwitch(parameterValue); - } -} diff --git a/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToBooleanConverter.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToBooleanConverter.java deleted file mode 100644 index facfdeb5920..00000000000 --- a/plugins/infra/queries/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/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToIntegerConverter.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ObjectToIntegerConverter.java deleted file mode 100644 index c6a8735690d..00000000000 --- a/plugins/infra/queries/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/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToBooleanConverter.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToBooleanConverter.java deleted file mode 100644 index fe244a435bb..00000000000 --- a/plugins/infra/queries/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/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToIntegerConverter.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToIntegerConverter.java deleted file mode 100644 index b7393eace12..00000000000 --- a/plugins/infra/queries/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/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToStringConverter.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/converter/ValueSpecificationToStringConverter.java deleted file mode 100644 index b2987996f4f..00000000000 --- a/plugins/infra/queries/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/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQueryNotFoundException.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQueryNotFoundException.java deleted file mode 100644 index b6b5a445a07..00000000000 --- a/plugins/infra/queries/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/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQuerySetNotFoundException.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/ModelQuerySetNotFoundException.java deleted file mode 100644 index efe014c6678..00000000000 --- a/plugins/infra/queries/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/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/QueryUtil.java b/plugins/infra/queries/org.eclipse.papyrus.infra.queries.core/src/org/eclipse/papyrus/infra/queries/core/modisco/QueryUtil.java deleted file mode 100644 index f87a4810a9a..00000000000 --- a/plugins/infra/queries/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 true 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 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 queryParameters = query.getParameters(); -// List parameterValues = new ArrayList(); -// 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 true 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 true 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 true 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 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 createParameterValuesListFromConfiguration(EObject context, ModiscoQueryConfiguration queryConfiguration) { -// List parameterValues = new ArrayList(); -// -// List 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() { -// -// /** -// * {@inheritDoc} -// */ -// @Override -// public Object caseListParameterValue(ListParameterValue listParameterValue) { -// ArrayList values = new ArrayList(); -// 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 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 true 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 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 null. -// * @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 null, returning a boolean value, etc. -// * -// * @param query -// * the query to test -// * @return true 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 null, returning a boolean value, etc. -// * @param query the query to test -// * @return true 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 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 status = new ArrayList(); -// -// // 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; -// } -} -- cgit v1.2.3 From 4f48b678d5cf586e86f275817b04696116726e29 Mon Sep 17 00:00:00 2001 From: Camille Letavernier Date: Fri, 14 Mar 2014 18:44:04 +0100 Subject: [Releng] Move the oepi.gmfdiag.xtext.glue plug-in to the deprecated folder --- .../.classpath | 7 + .../.project | 28 ++ .../.settings/org.eclipse.core.resources.prefs | 3 + .../.settings/org.eclipse.jdt.core.prefs | 369 ++++++++++++++++ .../.settings/org.eclipse.jdt.launching.prefs | 3 + .../.settings/org.eclipse.jdt.ui.prefs | 118 +++++ .../.settings/org.eclipse.pde.prefs | 25 ++ .../META-INF/MANIFEST.MF | 32 ++ .../about.html | 28 ++ .../build.properties | 7 + .../plugin.xml | 11 + .../infra/gmfdiag/xtext/glue/Activator.java | 72 ++++ .../xtext/glue/PopupEditorConfiguration.java | 151 +++++++ .../ConcurrentModificationObserver.java | 91 ++++ .../glue/concurrency/EditingDomainAdapter.java | 256 +++++++++++ .../glue/concurrency/SimpleDirtyResource.java | 65 +++ .../contentassist/CompletionProposalUtils.java | 152 +++++++ .../contentassist/CustomCompletionProposal.java | 132 ++++++ .../xtext/glue/edit/part/AntlrParserWrapper.java | 123 ++++++ .../edit/part/DefaultXtextSemanticValidator.java | 32 ++ .../glue/edit/part/IXTextSemanticValidator.java | 33 ++ .../xtext/glue/edit/part/IXtextEMFReconciler.java | 36 ++ .../glue/edit/part/PopupXtextEditorHelper.java | 477 +++++++++++++++++++++ .../edit/part/PopupXtextEditorKeyListener.java | 98 +++++ .../gmfdiag/xtext/glue/edit/part/StringUtil.java | 41 ++ .../editingdomain/ChangeAggregatorAdapter.java | 163 +++++++ .../editingdomain/SemanticRootUnloadListener.java | 95 ++++ .../UpdateXtextResourceTextCommand.java | 107 +++++ .../editingdomain/XtextNodeModelReconciler.java | 135 ++++++ .../partialEditing/CustomXtextSourceViewer.java | 63 +++ .../glue/partialEditing/HighlightingHelper.java | 161 +++++++ .../partialEditing/HighlightingReconciler.java | 291 +++++++++++++ .../glue/partialEditing/IActionContributor.java | 47 ++ .../IPartialContentAssistParser.java | 24 ++ .../partialEditing/ISyntheticResourceProvider.java | 24 ++ .../partialEditing/OperationHistoryListener.java | 44 ++ .../PartialContentAssistContextFactory.java | 34 ++ .../glue/partialEditing/PartialModelEditor.java | 163 +++++++ .../glue/partialEditing/SourceViewerHandle.java | 131 ++++++ .../partialEditing/SourceViewerHandleFactory.java | 130 ++++++ .../partialEditing/SyntheticResourceProvider.java | 56 +++ .../.classpath | 7 - .../.project | 28 -- .../.settings/org.eclipse.core.resources.prefs | 3 - .../.settings/org.eclipse.jdt.core.prefs | 369 ---------------- .../.settings/org.eclipse.jdt.launching.prefs | 3 - .../.settings/org.eclipse.jdt.ui.prefs | 118 ----- .../.settings/org.eclipse.pde.prefs | 25 -- .../META-INF/MANIFEST.MF | 32 -- .../about.html | 28 -- .../build.properties | 7 - .../plugin.xml | 11 - .../infra/gmfdiag/xtext/glue/Activator.java | 72 ---- .../xtext/glue/PopupEditorConfiguration.java | 151 ------- .../ConcurrentModificationObserver.java | 91 ---- .../glue/concurrency/EditingDomainAdapter.java | 256 ----------- .../glue/concurrency/SimpleDirtyResource.java | 65 --- .../contentassist/CompletionProposalUtils.java | 152 ------- .../contentassist/CustomCompletionProposal.java | 132 ------ .../xtext/glue/edit/part/AntlrParserWrapper.java | 123 ------ .../edit/part/DefaultXtextSemanticValidator.java | 32 -- .../glue/edit/part/IXTextSemanticValidator.java | 33 -- .../xtext/glue/edit/part/IXtextEMFReconciler.java | 36 -- .../glue/edit/part/PopupXtextEditorHelper.java | 477 --------------------- .../edit/part/PopupXtextEditorKeyListener.java | 98 ----- .../gmfdiag/xtext/glue/edit/part/StringUtil.java | 41 -- .../editingdomain/ChangeAggregatorAdapter.java | 163 ------- .../editingdomain/SemanticRootUnloadListener.java | 95 ---- .../UpdateXtextResourceTextCommand.java | 107 ----- .../editingdomain/XtextNodeModelReconciler.java | 135 ------ .../partialEditing/CustomXtextSourceViewer.java | 63 --- .../glue/partialEditing/HighlightingHelper.java | 161 ------- .../partialEditing/HighlightingReconciler.java | 291 ------------- .../glue/partialEditing/IActionContributor.java | 47 -- .../IPartialContentAssistParser.java | 24 -- .../partialEditing/ISyntheticResourceProvider.java | 24 -- .../partialEditing/OperationHistoryListener.java | 44 -- .../PartialContentAssistContextFactory.java | 34 -- .../glue/partialEditing/PartialModelEditor.java | 163 ------- .../glue/partialEditing/SourceViewerHandle.java | 131 ------ .../partialEditing/SourceViewerHandleFactory.java | 130 ------ .../partialEditing/SyntheticResourceProvider.java | 56 --- 82 files changed, 4058 insertions(+), 4058 deletions(-) create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.classpath create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.project create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.core.resources.prefs create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.core.prefs create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.launching.prefs create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.ui.prefs create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.pde.prefs create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/META-INF/MANIFEST.MF create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/about.html create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/build.properties create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/plugin.xml create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/Activator.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/PopupEditorConfiguration.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/ConcurrentModificationObserver.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/EditingDomainAdapter.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/SimpleDirtyResource.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/contentassist/CompletionProposalUtils.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/contentassist/CustomCompletionProposal.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/AntlrParserWrapper.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/DefaultXtextSemanticValidator.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/IXTextSemanticValidator.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/IXtextEMFReconciler.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/PopupXtextEditorHelper.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/PopupXtextEditorKeyListener.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/StringUtil.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/ChangeAggregatorAdapter.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/SemanticRootUnloadListener.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/UpdateXtextResourceTextCommand.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/XtextNodeModelReconciler.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/CustomXtextSourceViewer.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/HighlightingHelper.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/HighlightingReconciler.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/IActionContributor.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/IPartialContentAssistParser.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/ISyntheticResourceProvider.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/OperationHistoryListener.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/PartialContentAssistContextFactory.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/PartialModelEditor.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SourceViewerHandle.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SourceViewerHandleFactory.java create mode 100644 deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SyntheticResourceProvider.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.classpath delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.project delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.core.resources.prefs delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.core.prefs delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.launching.prefs delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.ui.prefs delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.pde.prefs delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/META-INF/MANIFEST.MF delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/about.html delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/build.properties delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/plugin.xml delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/Activator.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/PopupEditorConfiguration.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/ConcurrentModificationObserver.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/EditingDomainAdapter.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/SimpleDirtyResource.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/contentassist/CompletionProposalUtils.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/contentassist/CustomCompletionProposal.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/AntlrParserWrapper.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/DefaultXtextSemanticValidator.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/IXTextSemanticValidator.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/IXtextEMFReconciler.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/PopupXtextEditorHelper.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/PopupXtextEditorKeyListener.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/StringUtil.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/ChangeAggregatorAdapter.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/SemanticRootUnloadListener.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/UpdateXtextResourceTextCommand.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/XtextNodeModelReconciler.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/CustomXtextSourceViewer.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/HighlightingHelper.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/HighlightingReconciler.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/IActionContributor.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/IPartialContentAssistParser.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/ISyntheticResourceProvider.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/OperationHistoryListener.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/PartialContentAssistContextFactory.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/PartialModelEditor.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SourceViewerHandle.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SourceViewerHandleFactory.java delete mode 100644 plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SyntheticResourceProvider.java (limited to 'plugins') diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.classpath b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.classpath new file mode 100644 index 00000000000..64c5e31b7a2 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.project b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.project new file mode 100644 index 00000000000..a0496ee9a76 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.project @@ -0,0 +1,28 @@ + + + org.eclipse.papyrus.infra.gmfdiag.xtext.glue + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.core.resources.prefs b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000000..52164b21347 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +#Tue Aug 18 18:37:57 CEST 2009 +eclipse.preferences.version=1 +encoding/=ISO-8859-1 diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.core.prefs b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..74df85c62f7 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,369 @@ +#Tue Jun 29 13:20:15 CEST 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=error +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=false +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=120 +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=120 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.launching.prefs b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000000..cd7271ff61d --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,3 @@ +#Wed Aug 12 21:10:17 CEST 2009 +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.ui.prefs b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..f6caf599885 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,118 @@ +#Wed Oct 14 22:36:24 CEST 2009 +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_serial_version_id=true +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=false +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_blocks=false +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_Xtext +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_'Xtext' +formatter_settings_version=11 +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.staticondemandthreshold=1 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=false +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=false +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.pde.prefs b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.pde.prefs new file mode 100644 index 00000000000..2bd5814c381 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.pde.prefs @@ -0,0 +1,25 @@ +#Wed Aug 12 21:14:13 CEST 2009 +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=2 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=2 +compilers.p.missing-version-require-bundle=2 +compilers.p.no-required-att=0 +compilers.p.not-externalized-att=2 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +eclipse.preferences.version=1 diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..321050a31b5 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/META-INF/MANIFEST.MF @@ -0,0 +1,32 @@ +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.emf.common;bundle-version="2.5.0", + org.eclipse.xtext;bundle-version="1.0.1", + org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.2.1", + org.eclipse.ui.ide;bundle-version="3.5.0", + org.eclipse.xtext.ui;bundle-version="0.8.0", + org.eclipse.core.expressions;bundle-version="3.4.100", + org.eclipse.xtext.ui.shared;bundle-version="1.0.1", + org.apache.log4j;bundle-version="1.2.15", + org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.0.0", + org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0", + org.eclipse.uml2.uml;bundle-version="4.1.0", + org.eclipse.papyrus.infra.core;bundle-version="1.0.0" +Export-Package: org.eclipse.papyrus.infra.gmfdiag.xtext.glue, + org.eclipse.papyrus.infra.gmfdiag.xtext.glue.concurrency, + org.eclipse.papyrus.infra.gmfdiag.xtext.glue.contentassist, + org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part, + org.eclipse.papyrus.infra.gmfdiag.xtext.glue.editingdomain, + org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing +Bundle-Vendor: Eclipse Modeling Project +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.0.0.qualifier +Bundle-Name: XText GMF Glue (Incubation) +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.xtext.glue.Activat + or +Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.xtext.glue;sing + leton:=true +Bundle-RequiredExecutionEnvironment: J2SE-1.5 + diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/about.html b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/about.html new file mode 100644 index 00000000000..82d49bf5f81 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

About This Content

+ +

June 5, 2007

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") 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 http://www.eclipse.org.

+ + + diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/build.properties b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/build.properties new file mode 100644 index 00000000000..e5a949cc43c --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + about.html +src.includes = about.html diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/plugin.xml b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/plugin.xml new file mode 100644 index 00000000000..30f1ff73ff3 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/plugin.xml @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/Activator.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/Activator.java new file mode 100644 index 00000000000..b22de38760d --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/Activator.java @@ -0,0 +1,72 @@ +/******************************************************************************* + * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + * + * @author koehnlein + */ +public class Activator extends AbstractUIPlugin { + + /** + * The plug-in ID + */ + public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.gmfdiag.xtext.glue"; + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + * @param t + */ + public static void logError(Throwable t) { + getDefault().getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, t.getMessage(), t)); + } +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/PopupEditorConfiguration.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/PopupEditorConfiguration.java new file mode 100644 index 00000000000..3cff16ceb76 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/PopupEditorConfiguration.java @@ -0,0 +1,151 @@ +/***************************************************************************** + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue; + +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.jface.dialogs.IInputValidator; +import org.eclipse.jface.text.source.SourceViewerConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part.IXTextSemanticValidator; +import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part.IXtextEMFReconciler; +import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part.PopupXtextEditorHelper; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.widgets.Composite; + +import com.google.inject.Injector; + + +/** + * @author CEA LIST - Initial contribution and API + * This class is provided as a basis for contribution to the extension point directEditors of Papyrus, + * for the case of popup editors. + * Clients must simply override the method createPopupEditorHelper(Object editPart) + * + * This class is deprecated, use DefaultDirectEditorConfiguration instead + */ +@Deprecated +public abstract class PopupEditorConfiguration implements IPopupEditorConfiguration { + + private String language = ""; + + /** + * Default constructor + */ + public PopupEditorConfiguration() { + // Auto-generated constructor stub + } + + /** + * This abstract method must be implemented for the integration of each specific textual editor. + * Implementation usually consist in calling createPopupEditorHelper. + * The implementation must simply determine the values to be passed as parameters of this method call. + * + * @param editPart The edit part on which a direct edit has been performed. The type of this element + * is Object, in order to avoid direct dependencies with GMF (see the direct editors extension point of + * Papyrus). It is however expected that editPart is instanceof IGraphicalEditPart. + */ + public abstract IPopupEditorHelper createPopupEditorHelper(Object editPart) ; + + /** + * Basic implementation which simply consists in returning a new PopupXtextEditorHelper + * @param editPart The editPart on which a direct edit has been performed. + * @param xtextInjector The xtextInjector. + * @param xtextEditorContextUpdater The IXtextEditorContextUpdater, to update the currently select xtext editor + * @param modelReconciler The IXtextEMFReconciler, to update the context UML model with changes textually specified in the popup xtext editor + * @param textToEdit the initialization text, used as the initial textual content for the popup xtext editor + * @param fileExtension the extension for the temporary textual file (underlying the editor) + * @param semanticValidator the semantic validator used to semantically validate the model before saving + * @return IPopupEditorHelper + */ + public IPopupEditorHelper createPopupEditorHelper(IGraphicalEditPart editPart, + Injector xtextInjector, + IXtextEMFReconciler modelReconciler, + String textToEdit, + String fileExtension, + IXTextSemanticValidator semanticValidator) { + + return new PopupXtextEditorHelper(editPart, + xtextInjector, + modelReconciler, + textToEdit, + fileExtension, + semanticValidator); + } + + //// + + public int getStyle() { + // Auto-generated method stub + return 0; + } + + public Point getPreferedSize() { + // Auto-generated method stub + return null; + } + + public SourceViewerConfiguration getSourceViewerConfiguration() { + // Auto-generated method stub + return null; + } + + public String getTextToEdit(Object editedObject) { + // Auto-generated method stub + return null; + } + + public Object preEditAction(Object editedObject) { + // Auto-generated method stub + return null; + } + + public Object postEditAction(Object editedObject, String newText) { + // Auto-generated method stub + return null; + } + + public Composite createExtendedDialogArea(Composite parent) { + // Auto-generated method stub + return null; + } + + public String getLanguage() { + return language; + } + + public void setLanguage(String language) { + this.language = "" + language ; + } + + + public IInputValidator getInputValidator() { + // Auto-generated method stub + return null; + } + + public void setInputValidator(IInputValidator validator) { + // Auto-generated method stub + + } + + public Selection getTextSelection(String value, Object editedObject) { + // Auto-generated method stub + return null; + } + + + +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/ConcurrentModificationObserver.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/ConcurrentModificationObserver.java new file mode 100644 index 00000000000..a4a7936d051 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/ConcurrentModificationObserver.java @@ -0,0 +1,91 @@ +/******************************************************************************* + * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.concurrency; + +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IEditorReference; +import org.eclipse.ui.IPartListener; +import org.eclipse.ui.IStartup; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.PlatformUI; + +/** + * Detects concurrent modifications of GMF and Xtext editors based on Xtext's dirty state management. + * + * @author koehnlein + */ +public class ConcurrentModificationObserver implements IPartListener { + + private EditingDomainAdapter.Factory factory; + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + * @param activePage + */ + public ConcurrentModificationObserver(IWorkbenchPage activePage) { + factory = new EditingDomainAdapter.Factory(); + for (IEditorReference editorRef : activePage.getEditorReferences()) { + IEditorPart editor = editorRef.getEditor(false); + if (editor != null) { + partOpened(editor); + } + } + } + + public void partOpened(IWorkbenchPart part) { + if (part instanceof DiagramEditor) { + TransactionalEditingDomain editingDomain = ((DiagramEditor) part).getEditingDomain(); + factory.adapt(editingDomain, EditingDomainAdapter.class); + } + } + + public void partClosed(IWorkbenchPart part) { + if (part instanceof DiagramEditor) { + // as long as bug 299920 is not fixed, we have to dispose the adapter manually + TransactionalEditingDomain editingDomain = ((DiagramEditor) part).getEditingDomain(); + if (editingDomain != null) { + EditingDomainAdapter adapter = (EditingDomainAdapter) factory.adapt(editingDomain, + EditingDomainAdapter.class); + if (adapter != null) { + adapter.dispose(); + } + } + } + } + + public void partActivated(IWorkbenchPart part) { + // do nothing + } + + public void partDeactivated(IWorkbenchPart part) { + // do nothing + } + + public void partBroughtToTop(IWorkbenchPart part) { + // do nothing + } + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + */ + public static class Initializer implements IStartup { + public void earlyStartup() { + Display.getDefault().asyncExec(new Runnable() { + public void run() { + IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); + activePage.addPartListener(new ConcurrentModificationObserver(activePage)); + } + }); + } + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/EditingDomainAdapter.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/EditingDomainAdapter.java new file mode 100644 index 00000000000..cb51de74209 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/EditingDomainAdapter.java @@ -0,0 +1,256 @@ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.concurrency; + +import java.util.List; +import java.util.Map; + +import org.apache.log4j.Logger; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.common.notify.impl.AdapterImpl; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.transaction.NotificationFilter; +import org.eclipse.emf.transaction.ResourceSetChangeEvent; +import org.eclipse.emf.transaction.ResourceSetListener; +import org.eclipse.emf.transaction.RollbackException; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.emf.transaction.TransactionalEditingDomain.Lifecycle; +import org.eclipse.emf.transaction.TransactionalEditingDomainEvent; +import org.eclipse.emf.transaction.TransactionalEditingDomainListener; +import org.eclipse.emf.transaction.util.TransactionUtil; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.Activator; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.xtext.resource.IResourceServiceProvider; +import org.eclipse.xtext.resource.XtextResource; +import org.eclipse.xtext.ui.editor.IDirtyResource; +import org.eclipse.xtext.ui.editor.IDirtyStateManager; +import org.eclipse.xtext.ui.shared.Access; + +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; + +/** + * This element comes from the XText/GMF integration example, and was not originally documented. + */ +public class EditingDomainAdapter extends AdapterImpl implements ResourceSetListener, + TransactionalEditingDomainListener { + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + */ + public static class Factory extends AdapterFactoryImpl { + @Override + public boolean isFactoryForType(Object type) { + return super.isFactoryForType(type == EditingDomainAdapter.class); + } + + @Override + protected Object resolve(Object object, Object type) { + if (object instanceof TransactionalEditingDomain) { + return adapt(((TransactionalEditingDomain) object).getResourceSet(), type); + } + return super.resolve(object, type); + } + + @Override + protected Adapter createAdapter(Notifier target) { + if (target instanceof ResourceSet) { + return new EditingDomainAdapter(TransactionUtil.getEditingDomain(target)); + } else { + return null; + } + } + } + + private final TransactionalEditingDomain editingDomain; + + private IDirtyStateManager dirtyStateManager; + + private Map uri2dirtyResource; + + private static final Logger LOG = Logger.getLogger(EditingDomainAdapter.class); + + protected EditingDomainAdapter(TransactionalEditingDomain editingDomain) { + this.editingDomain = editingDomain; + editingDomain.addResourceSetListener(this); + dirtyStateManager = Access.getIDirtyStateManager().get(); + uri2dirtyResource = Maps.newHashMap(); + Lifecycle lifecycle = TransactionUtil.getAdapter(editingDomain, Lifecycle.class); + lifecycle.addTransactionalEditingDomainListener(this); + } + + public NotificationFilter getFilter() { + return null; + } + + public boolean isAggregatePrecommitListener() { + return true; + } + + public boolean isPostcommitOnly() { + return false; + } + + public boolean isPrecommitOnly() { + return false; + } + + public void resourceSetChanged(ResourceSetChangeEvent event) { + List remainingURIs = Lists.newArrayList(uri2dirtyResource.keySet()); + for (Resource resource : editingDomain.getResourceSet().getResources()) { + if (resource instanceof XtextResource) { + XtextResource xtextResource = (XtextResource) resource; + remainingURIs.remove(xtextResource.getURI()); + IDirtyResource dirtyResource = uri2dirtyResource.get(xtextResource.getURI()); + if (xtextResource.isModified()) { + if (dirtyResource == null) { + createAndRegisterDirtyState(xtextResource); + } + } else { + if (dirtyResource != null) { + uri2dirtyResource.remove(xtextResource.getURI()); + dirtyStateManager.discardDirtyState(dirtyResource); + } + } + } + } + // removed resources + for (URI remainingURI : remainingURIs) { + IDirtyResource dirtyResource = uri2dirtyResource.get(remainingURI); + dirtyStateManager.discardDirtyState(dirtyResource); + uri2dirtyResource.remove(remainingURI); + } + } + + public Command transactionAboutToCommit(ResourceSetChangeEvent event) throws RollbackException { + List resourcesWithConflicts = null; + for (Resource resource : editingDomain.getResourceSet().getResources()) { + if (resource instanceof XtextResource && resource.isModified()) { + XtextResource xtextResource = (XtextResource) resource; + IDirtyResource dirtyResource = uri2dirtyResource.get(xtextResource.getURI()); + if (dirtyResource == null) { + if (!createAndRegisterDirtyState(xtextResource)) { + if (resourcesWithConflicts == null) { + resourcesWithConflicts = Lists.newArrayList(); + } + resourcesWithConflicts.add(xtextResource); + } + } + } + } + if (resourcesWithConflicts != null) { + if (queryApplyChanges()) { + for (XtextResource resourceWithConflicts : resourcesWithConflicts) { + try { + IDirtyResource dirtyResource = createDirtyResource(resourceWithConflicts); + // assert resource is serializable + dirtyResource.getContents(); + dirtyStateManager.announceDirtyStateChanged(dirtyResource); + } catch (Exception exc) { + LOG.error("Error serializing resource", exc); + } + } + } else { + throw new RollbackException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, + "Transaction aborted by user")); + } + } + return null; + } + + protected boolean createAndRegisterDirtyState(XtextResource xtextResource) { + IDirtyResource dirtyResource = createDirtyResource(xtextResource); + if (dirtyResource == null) { + return true; + } else { + boolean isSuccess = dirtyStateManager.manageDirtyState(dirtyResource); + if (isSuccess) { + uri2dirtyResource.put(xtextResource.getURI(), dirtyResource); + } + return isSuccess; + } + } + + protected IDirtyResource createDirtyResource(XtextResource xtextResource) { + IResourceServiceProvider resourceServiceProvider = IResourceServiceProvider.Registry.INSTANCE + .getResourceServiceProvider(xtextResource.getURI()); + if (resourceServiceProvider == null) { + return null; + } + return new SimpleDirtyResource(xtextResource, resourceServiceProvider); + } + + public void editingDomainDisposing(TransactionalEditingDomainEvent event) { + dispose(); + } + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + */ + public void dispose() { + if (uri2dirtyResource != null) { + for (IDirtyResource dirtyResource : uri2dirtyResource.values()) { + dirtyStateManager.discardDirtyState(dirtyResource); + } + uri2dirtyResource = null; + } + Lifecycle lifecycle = TransactionUtil.getAdapter(editingDomain, Lifecycle.class); + if (lifecycle != null) { + lifecycle.removeTransactionalEditingDomainListener(this); + } + editingDomain.removeResourceSetListener(this); + } + + protected boolean queryApplyChanges() { + DialogPrompter dialogPrompter = new DialogPrompter(); + Display.getDefault().syncExec(dialogPrompter); + boolean yesResult = dialogPrompter.isYesResult(); + return yesResult; + } + + protected class DialogPrompter implements Runnable { + + private boolean isYesResult; + + public boolean isYesResult() { + return isYesResult; + } + + public void run() { + Shell shell = Display.getDefault().getActiveShell(); + isYesResult = MessageDialog.open(MessageDialog.QUESTION, shell, "Concurrent Modification", + "Other editors have a modified version of models you are going to change.\n" + + "If apply your changes you are loosing the possibility to save the others.\n" + + "Apply changes anyway?", SWT.NONE); + } + } + + public void transactionClosed(TransactionalEditingDomainEvent event) { + // do nothing + } + + public void transactionClosing(TransactionalEditingDomainEvent event) { + // do nothing + } + + public void transactionInterrupted(TransactionalEditingDomainEvent event) { + // do nothing + } + + public void transactionStarted(TransactionalEditingDomainEvent event) { + // do nothing + } + + public void transactionStarting(TransactionalEditingDomainEvent event) { + // do nothing + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/SimpleDirtyResource.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/SimpleDirtyResource.java new file mode 100644 index 00000000000..1108a6dbf91 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/SimpleDirtyResource.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.concurrency; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.xtext.resource.IResourceDescription; +import org.eclipse.xtext.resource.IResourceDescription.Manager; +import org.eclipse.xtext.resource.IResourceServiceProvider; +import org.eclipse.xtext.resource.XtextResource; +import org.eclipse.xtext.ui.editor.IDirtyResource; + +/** + * An implementation of {@link IDirtyResource} for resources without an underlying document. + * + * @author koehnlein - Initial contribution and API + */ +public class SimpleDirtyResource implements IDirtyResource { + + private XtextResource resource; + + private Manager resourceDescriptionManager; + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + * @param resource + * @param resourceServiceProvider + */ + public SimpleDirtyResource(XtextResource resource, IResourceServiceProvider resourceServiceProvider) { + this.resource = resource; + this.resourceDescriptionManager = resourceServiceProvider.getResourceDescriptionManager(); + } + + public String getContents() { + return resource.getSerializer().serialize(resource.getContents().get(0)); + } + + public String getActualContents() { + return getContents(); + } + + public IResourceDescription getDescription() { + return resourceDescriptionManager.getResourceDescription(resource); + } + + public URI getURI() { + return resource.getURI(); + } + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + * @return Resource + */ + public Resource getResource() { + return resource; + } + + + +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/contentassist/CompletionProposalUtils.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/contentassist/CompletionProposalUtils.java new file mode 100644 index 00000000000..0e46b3393f8 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/contentassist/CompletionProposalUtils.java @@ -0,0 +1,152 @@ +/***************************************************************************** + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.contentassist; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.papyrus.infra.core.utils.DisplayUtils; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.NamedElement; +import org.eclipse.uml2.uml.Namespace; +import org.eclipse.uml2.uml.Package; +import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext; + +/** + * @author CEA LIST - Initial contribution and API + */ +public class CompletionProposalUtils { + + protected final static ILabelProvider labelProvider = DisplayUtils.getLabelProvider() ; + + /** + * Public Utility method for creating a completion proposal + * + * @param namedElement The named element for which completion proposal must be created + * @param completionString The actual completion string + * @param displayString The way the completion is displayed in the completion list + * @param context Some information related to the context of the completion + * @return completion proposal + */ + public static CustomCompletionProposal createCompletionProposal(NamedElement namedElement, + String completionString, + String displayString, + ContentAssistContext context) { + String additionalProposalInfo = "" + namedElement.getQualifiedName() + "\n" + '(' + namedElement.eClass().getName() + ')' ; + + CustomCompletionProposal completionProposal = new CustomCompletionProposal(completionString, // String to be inserted + context.getOffset(), // Offset + context.getSelectedText().length(), // Replacement length + completionString.length(), // cursorPosition + labelProvider.getImage(namedElement) , // image + " " + displayString, // displayString + null , // contextInformation + additionalProposalInfo, // additionalProposalInfo + context); + return completionProposal ; + } + + /** + * Public Utility method for creating a completion proposal with replacement of prefix + * + * @param namedElement The named element for which completion proposal must be created + * @param completionString The actual completion string + * @param displayString The way the completion is displayed in the completion list + * @param context Some information related to the context of the completion + * @return completion proposal + */ + public static CustomCompletionProposal createCompletionProposalWithReplacementOfPrefix(NamedElement namedElement, + String completionString, + String displayString, + ContentAssistContext context) { + String additionalProposalInfo = "" + namedElement.getQualifiedName() + "\n" + '(' + namedElement.eClass().getName() + ')' ; + + CustomCompletionProposal completionProposal = new CustomCompletionProposal(completionString, // String to be inserted + context.getOffset() - context.getPrefix().length(), // Offset + context.getPrefix().length(), // Replacement length + completionString.length(), // cursorPosition + labelProvider.getImage(namedElement) , // image + " " + displayString, // displayString + null , // contextInformation + additionalProposalInfo, // additionalProposalInfo + context); + return completionProposal ; + } + + /** + * Public Utility method for creating a completion proposal + * + * @param completionString The actual completion string + * @param displayString The way the completion is displayed in the completion list + * @param context Some information related to the context of the completion + * @return completion proposal + */ + public static CustomCompletionProposal createCompletionProposal(String completionString, + String displayString, + ContentAssistContext context) { + + CustomCompletionProposal completionProposal = new CustomCompletionProposal(completionString, // String to be inserted + context.getOffset(), // Offset + context.getSelectedText().length(), // Replacement length + completionString.length(), // cursorPosition + null , // image + " " + displayString, // displayString + null , // contextInformation + null, // additionalProposalInfo + context); + return completionProposal ; + } + + /** + * Public utility method that computes a qualified name, taking into account packages imported by the namespace model + * + * @param namedElement + * @param model + * @return the qualified name label + */ + public static String getQualifiedNameLabelWithSufficientDepth(NamedElement namedElement, Namespace model) { + String label = "" ; + + List importedPackages = new ArrayList(model.getImportedPackages()) ; + + List visitedNamespaces = new ArrayList() ; + Namespace currentNamespace = namedElement.getNamespace() ; + + boolean rootFound = false ; + boolean modelIsTheRoot = false ; + + while (currentNamespace != null && !rootFound) { + visitedNamespaces.add(currentNamespace) ; + if (importedPackages.contains(currentNamespace) || currentNamespace == model) { + rootFound = true ; + if (currentNamespace == model) + modelIsTheRoot = true ; + } + Element owner = currentNamespace.getOwner() ; + while (owner != null && !(owner instanceof Namespace)) + owner = owner.getOwner() ; + + currentNamespace = owner != null ? (Namespace)owner : null ; + } + + for (int i = visitedNamespaces.size() - 1 - (modelIsTheRoot ? 1 : 0) ; i >= 0 ; i--) { + label += visitedNamespaces.get(i).getName() + "::" ; + } + + return label + namedElement.getName() ; + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/contentassist/CustomCompletionProposal.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/contentassist/CustomCompletionProposal.java new file mode 100644 index 00000000000..31f79f3e1a5 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/contentassist/CustomCompletionProposal.java @@ -0,0 +1,132 @@ +/***************************************************************************** + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.contentassist; + +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.contentassist.CompletionProposal; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.jface.text.contentassist.ICompletionProposalExtension; +import org.eclipse.jface.text.contentassist.IContextInformation; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext; + +/** + * @author CEA LIST - Initial contribution and API + */ +public class CustomCompletionProposal implements ICompletionProposal, ICompletionProposalExtension { + + private CompletionProposal completionProposal ; + private int fReplacementOffset ; + private ContentAssistContext fContentAssistContext ; + private String fReplacementString ; + + /** + * @param replacementString + * @param replacementOffset + * @param replacementLength + * @param cursorPosition + * @param image + * @param displayString + * @param contextInformation + * @param additionalProposalInfo + * @param contentAssistContext + * + */ + public CustomCompletionProposal (String replacementString, + int replacementOffset, + int replacementLength, + int cursorPosition, + Image image, + String displayString, + IContextInformation contextInformation, + String additionalProposalInfo, + ContentAssistContext contentAssistContext) { + completionProposal = new CompletionProposal(replacementString, + replacementOffset, + replacementLength, + cursorPosition, + image, + displayString, + contextInformation, + additionalProposalInfo) ; + fReplacementOffset = replacementOffset ; + fReplacementString = replacementString ; + fContentAssistContext = contentAssistContext ; + } + + public void apply(IDocument document, char trigger, int offset) { + try { + int length = 0 ; + if (offset != fReplacementOffset) + length = offset - fReplacementOffset ; + else + length = fContentAssistContext.getSelectedText().length() ; + document.replace(fReplacementOffset , + length, + fReplacementString) ; + } + catch (BadLocationException e) { + // ignore + } + } + + public boolean isValidFor(IDocument document, int offset) { + try { + int length = offset - fReplacementOffset ; + return completionProposal.getDisplayString().toLowerCase().contains(document.get(fReplacementOffset, length).toLowerCase()) ; + } + catch (BadLocationException e) { + // ignore + } + return false; + } + + public char[] getTriggerCharacters() { + // TODO Auto-generated method stub + return null; + } + + public int getContextInformationPosition() { + // TODO Auto-generated method stub + return 0; + } + + public void apply(IDocument document) { + // TODO Auto-generated method stub + + } + + public Point getSelection(IDocument document) { + return completionProposal.getSelection(document); + } + + public String getAdditionalProposalInfo() { + return completionProposal.getAdditionalProposalInfo(); + } + + public String getDisplayString() { + return completionProposal.getDisplayString(); + } + + public Image getImage() { + return completionProposal.getImage(); + } + + public IContextInformation getContextInformation() { + return completionProposal.getContextInformation(); + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/AntlrParserWrapper.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/AntlrParserWrapper.java new file mode 100644 index 00000000000..2b61fd571cd --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/AntlrParserWrapper.java @@ -0,0 +1,123 @@ +/******************************************************************************* + * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.xtext.parser.IParseResult; +import org.eclipse.xtext.ui.editor.contentassist.XtextContentAssistProcessor; + +import com.google.inject.Inject; +import com.google.inject.Injector; +//import org.eclipse.xtext.parser.antlr.IAntlrParser; +//import org.eclipse.xtext.parsetree.CompositeNode; +//import org.eclipse.xtext.parsetree.NodeAdapter; +//import org.eclipse.xtext.parsetree.NodeUtil; +//import org.eclipse.xtext.parsetree.SyntaxError; + +/** + * Wraps a (partial) Xtext parser in a GMF {@link IParser}. + * + * @author koehnlein + */ +public class AntlrParserWrapper implements IParser { + + @Inject + private XtextContentAssistProcessor xtextContentAssistProcessor; + + @Inject + private org.eclipse.xtext.parser.IParser xtextParser; + + private final String parserRuleName; + + private final IParser originalParser; + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + * @param parserRuleName + * @param originalParser + * @param xtextInjector + */ + public AntlrParserWrapper(String parserRuleName, IParser originalParser, Injector xtextInjector) { + this.parserRuleName = parserRuleName; + this.originalParser = originalParser; + xtextInjector.injectMembers(this); + } + + public IContentAssistProcessor getCompletionProcessor(IAdaptable element) { + // TODO does not work. need to fake an XtextDocument + return xtextContentAssistProcessor; + } + + public String getEditString(IAdaptable element, int flags) { +// EObject semanticElement = (EObject) element.getAdapter(EObject.class); +// if (semanticElement != null) { +// NodeAdapter nodeAdapter = NodeUtil.getNodeAdapter(semanticElement); +// if (nodeAdapter != null) { +// return nodeAdapter.getParserNode().serialize().trim(); +// } +// } + return "invalid"; + } + + public ICommand getParseCommand(IAdaptable element, final String newString, int flags) { +// EObject semanticElement = (EObject) element.getAdapter(EObject.class); +// if (semanticElement != null) { +// IParseResult parseResult = xtextParser.parse(parserRuleName, new StringInputStream(newString)); +// if (isValidParseResult(parseResult, semanticElement)) { +// NodeAdapter nodeAdapter = NodeUtil.getNodeAdapter(semanticElement); +// if (nodeAdapter != null) { +// final ICompositeNode parserNode = nodeAdapter.getParserNode(); +// final XtextResource semanticResource = (XtextResource) semanticElement.eResource(); +// ICommand reparseCommand = UpdateXtextResourceTextCommand.createUpdateCommand(semanticResource, +// parserNode.getOffset(), parserNode.getLength(), newString); +// return reparseCommand; +// } +// } +// } +// return UnexecutableCommand.INSTANCE; + return null ; + } + + public String getPrintString(IAdaptable element, int flags) { + return originalParser.getPrintString(element, flags); + } + + public boolean isAffectingEvent(Object event, int flags) { + return false; + } + + public IParserEditStatus isValidEditString(IAdaptable element, String editString) { +// try { +// IParseResult parseResult = xtextParser.parse(parserRuleName, new StringInputStream(editString)); +// if (isValidParseResult(parseResult, (EObject) element.getAdapter(EObject.class))) { +// return new ParserEditStatus(IStatus.OK, Activator.PLUGIN_ID, IParserEditStatus.EDITABLE, "OK", null); +// } else { +// SyntaxError syntaxError = parseResult.getParseErrors().get(0); +// return new ParserEditStatus(IStatus.INFO, Activator.PLUGIN_ID, IParserEditStatus.UNEDITABLE, +// syntaxError.getMessage(), null); +// } +// } catch (Exception exc) { +// return new ParserEditStatus(IStatus.INFO, Activator.PLUGIN_ID, IParserEditStatus.UNEDITABLE, exc +// .getMessage(), exc); +// } + return null ; + } + + private boolean isValidParseResult(IParseResult parseResult, EObject semanticElement) { +// EObject rootASTElement = parseResult.getRootASTElement(); +// return parseResult.getParseErrors().isEmpty() && rootASTElement != null && semanticElement != null +// && semanticElement.eClass() == rootASTElement.eClass(); + return false ; + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/DefaultXtextSemanticValidator.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/DefaultXtextSemanticValidator.java new file mode 100644 index 00000000000..64f0219be9c --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/DefaultXtextSemanticValidator.java @@ -0,0 +1,32 @@ +/***************************************************************************** + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part; + +/** + * Default implementation for IXtextSemanticValidator. + * + * @author CEA LIST - Initial contribution and API + */ +public class DefaultXtextSemanticValidator implements IXTextSemanticValidator { + + /** + * Default implementation. Always returns true. + * @return always returns true. + */ + public boolean validate() { + return true; + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/IXTextSemanticValidator.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/IXTextSemanticValidator.java new file mode 100644 index 00000000000..274ca08acec --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/IXTextSemanticValidator.java @@ -0,0 +1,33 @@ +/***************************************************************************** + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part; + +/** + * Optional interface to be implemented by each client plug-in. The validation is taken into account before + * closing a textual editor, in order to determine if the model contains semantic errors. If it contains + * semantic errors, modifications are not saved in order to avoid corrupting the context UML model. + * + * @author CEA LIST - Initial contribution and API + */ +public interface IXTextSemanticValidator { + + + /** + * + * @return Implementations must return true if the xtext model is semantically valid + */ + public boolean validate() ; + +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/IXtextEMFReconciler.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/IXtextEMFReconciler.java new file mode 100644 index 00000000000..137c58a0462 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/IXtextEMFReconciler.java @@ -0,0 +1,36 @@ +/***************************************************************************** + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part; + +import org.eclipse.emf.ecore.EObject; + +/** + * This interface is used for the reconciliation of the context UML model with respect to the textual + * specification obtained via edition from a popup xtext editor, in the case where this edition implies + * changes in the original model. + * + * @author CEA LIST - Initial contribution and API + */ +public interface IXtextEMFReconciler { + + /** + * This method is called for performing the reconciliation, in the case where the popup xtext editor is + * closed with request for saving (i.e., by pressing ctrl + enter). + * @param modelObject The context UML model element + * @param xtextObject The xtext object resulting from the textual specification + */ + void reconcile (EObject modelObject, EObject xtextObject) ; + +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/PopupXtextEditorHelper.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/PopupXtextEditorHelper.java new file mode 100644 index 00000000000..475ec38eee0 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/PopupXtextEditorHelper.java @@ -0,0 +1,477 @@ +/******************************************************************************* + * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part; + + +import java.util.List; +import java.util.Map; + +import org.eclipse.core.commands.operations.IOperationHistory; +import org.eclipse.core.commands.operations.IUndoContext; +import org.eclipse.core.expressions.Expression; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain; +import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramEditDomain; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.commands.ActionHandler; +import org.eclipse.jface.text.ITextOperationTarget; +import org.eclipse.jface.text.contentassist.ContentAssistant; +import org.eclipse.jface.text.source.ISourceViewer; +import org.eclipse.jface.text.source.SourceViewer; +import org.eclipse.jface.text.templates.TemplateException; +import org.eclipse.jface.viewers.TextCellEditor; +import org.eclipse.papyrus.commands.CheckedOperationHistory; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.Activator; +import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing.CustomXtextSourceViewer; +import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing.ISyntheticResourceProvider; +import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing.OperationHistoryListener; +import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing.PartialModelEditor; +import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing.SourceViewerHandle; +import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing.SourceViewerHandleFactory; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.events.DisposeEvent; +import org.eclipse.swt.events.DisposeListener; +import org.eclipse.swt.events.FocusEvent; +import org.eclipse.swt.events.FocusListener; +import org.eclipse.swt.graphics.FontMetrics; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.text.undo.DocumentUndoManagerRegistry; +import org.eclipse.text.undo.IDocumentUndoManager; +import org.eclipse.ui.ActiveShellExpression; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IWorkbenchCommandConstants; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.console.actions.TextViewerAction; +import org.eclipse.ui.handlers.IHandlerActivation; +import org.eclipse.ui.handlers.IHandlerService; +import org.eclipse.ui.texteditor.ITextEditorActionConstants; +import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds; +import org.eclipse.ui.texteditor.IUpdate; +import org.eclipse.xtext.parser.IParseResult; +import org.eclipse.xtext.resource.XtextResource; +import org.eclipse.xtext.ui.editor.model.IXtextDocument; +import org.eclipse.xtext.util.concurrent.IUnitOfWork; + +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.inject.Injector; + +/** + * Base class to handle a small in-diagram XtextEditor. + * + * Override the generated performDirectEdit methods in the EditPart of the label to be directly edited, and + * call {@link #showEditor()} instead of opening the default {@link TextCellEditor}. + * + * @author koehnlein + * @author CEA LIST (A. Cuccuru, A. Radermacher): Modifications for the integration into Papyrus + * Changes: + * - Added "implements" relationship towards IPopupEditorHelper, + * related to the DirectEditor extension point of Papyrus + * - Signature of the constructor modified + * - Method showEditor modified, with the creation of a temporary file, underlying the popup xtext editor + * - Method closeEditor modified, with new statements for managing the reconciliation between the original + * UML model and the textual specification resulting from the edition in the popup xtext editor. The + * temporary text file created by showEditor is also deleted. + * - Method createXTextEditor modified. Now uses the Papyrus IEditorSite, and also adds a focus listener for + * managing the context eobject and current xtext editor. + * - Method setEditorRegin modified (needs some work...) + * - Method setEditorBounds modified (needs some work...) + * - Method activateServices and deactivateServices, for managing the key binding of the context diagram + * editor. + */ + +public class PopupXtextEditorHelper implements IPopupEditorHelper { + + private static IGraphicalEditPart hostEditPart; + private IEditorPart diagramEditor; + private int editorOffset; + private int initialEditorSize; + private int initialDocumentSize; + private Composite xtextEditorComposite; + private final Injector xtextInjector; + private XtextResource xtextResource; + private String semanticElementFragment; + private EObject semanticElement ; + private String textToEdit ; + /** prevent the reconciliation from being applied twice (See Bug 395439) */ + private boolean closing = false; + + /** + * get the host editpart + * @return the editpart + */ + public static IGraphicalEditPart getHostEditPart() { + return hostEditPart; + } + + /** + * The file extension used to dynamically select the appropriate xtext editor + */ + public static String fileExtension ; + private IXtextEMFReconciler modelReconciler; + private ISyntheticResourceProvider resourceProvider ; + private SourceViewerHandle sourceViewerHandle ; + + /** + * @return The source viewer handle for this PopupXtextEditorHelper + * + */ + public SourceViewerHandle getSourceViewerHandle() { + return sourceViewerHandle; + } + + private PartialModelEditor partialEditor ; + private Shell diagramShell ; + private OperationHistoryListener operationHistoryListener; + private IXTextSemanticValidator semanticValidator ; + /** + * The context EObject for this editor. It can be used for content assist, verification, etc. + */ + public static EObject context ; + + /** + * + */ + public static boolean ignoreFocusLost = false ; + + /** + * This element was originally undocumented in the XText/GMF integration example + * + * Modifications performed by CEA LIST + * - Signature changed: was public PopupXtextEditorHelper(IGraphicalEditPart editPart, Injector xtextInjector) + * @param editPart The editPart on which a direct edit has been performed. + * @param xtextInjector The xtextInjector. + * @param modelReconciler The IXtextEMFReconciler, to update the context UML model with changes textually specified in the popup xtext editor + * @param textToEdit the initialization text, used as the initial textual content for the popup xtext editor + * @param fileExtension the extension for the temporary textual file (underlying the editor) + * @param semanticValidator the semantic validator used to semantically validate the xtext model before saving + */ + public PopupXtextEditorHelper(IGraphicalEditPart editPart, + Injector xtextInjector, + IXtextEMFReconciler modelReconciler, + String textToEdit, + String fileExtension, + IXTextSemanticValidator semanticValidator) { + this.hostEditPart = editPart; + this.xtextInjector = xtextInjector ; + this.textToEdit = "" + textToEdit ; + this.modelReconciler = modelReconciler ; + PopupXtextEditorHelper.fileExtension = "" + fileExtension ; + this.semanticValidator = semanticValidator ; + ignoreFocusLost = false ; + } + + /** + * This element was originally not documented in the XText / GMF integration example. + * + */ + public void showEditor() { + try { + semanticElement = hostEditPart.resolveSemanticElement(); + if (semanticElement == null) { + return; + } + context = semanticElement ; + Resource semanticResource = semanticElement.eResource(); + + semanticElementFragment = semanticResource.getURIFragment(semanticElement); + if (semanticElementFragment == null || "".equals(semanticElementFragment)) { + return; + } + IDiagramEditDomain diagramEditDomain = hostEditPart.getDiagramEditDomain(); + + diagramEditor = ((DiagramEditDomain) diagramEditDomain).getEditorPart(); + + createXtextEditor(null) ; + + } catch (Exception e) { + Activator.logError(e); + } + } + + /** + * This element was originally not documented in the XText/GMF integration example. + * + * Changes performed by CEA LIST: + * - new statements for managing the reconciliation between the original UML model and + * the textual specification resulting from the edition in the popup xtext editor. + * @param isReconcile Determines whether a reconciliation must be performed or not + */ + public void closeEditor(boolean isReconcile) { + if (sourceViewerHandle != null) { + if (!closing) { + if (isReconcile && this.semanticValidator.validate()) { + try { + final IXtextDocument xtextDocument = sourceViewerHandle.getDocument(); + if (!isDocumentHasErrors(xtextDocument)) { + int documentGrowth = xtextDocument.getLength() - initialDocumentSize; + String newText = xtextDocument.get(editorOffset, initialEditorSize + documentGrowth); + xtextResource = partialEditor.createResource(newText); + if (xtextResource.getAllContents().hasNext()) + modelReconciler.reconcile(semanticElement, xtextResource.getAllContents().next()); + } + } catch (Exception exc) { + Activator.logError(exc); + } + } + } + try { + closing = true; + xtextEditorComposite.setVisible(false); + xtextEditorComposite.dispose(); + } finally { + closing = false; + } + } + SourceViewerHandle.bindPartialModelEditorClass(null) ; + } + + /** + * This element was originally not documented in the XText/GMF integration example + * + * Changes performed by CEA LIST: + * - adds a focus listener for managing the context eobject and current xtext editor. + * + * @param editorInput + */ + private void createXtextEditor(IEditorInput editorInput) throws Exception { + diagramShell = diagramEditor.getSite().getShell(); + xtextEditorComposite = new Shell(SWT.RESIZE) ; + xtextEditorComposite.setLayout(new FillLayout()); + + + resourceProvider = xtextInjector.getInstance(ISyntheticResourceProvider.class) ; + SourceViewerHandleFactory factory = xtextInjector.getInstance(SourceViewerHandleFactory.class) ; + sourceViewerHandle = factory.create(xtextEditorComposite, resourceProvider) ; + partialEditor = sourceViewerHandle.createPartialEditor("", textToEdit, "", semanticElement, modelReconciler) ; + registerKeyListener(); + setEditorBounds(); + + initializeActions(); + installUndoRedoSupport(sourceViewerHandle.getViewer()); + + sourceViewerHandle.getViewer().getTextWidget().addFocusListener(new FocusListener() { + + public void focusLost(FocusEvent e) { + checkedClose(); + } + + public void focusGained(FocusEvent e) { + context = semanticElement ; + } + }) ; + + xtextEditorComposite.setVisible(true); + sourceViewerHandle.getViewer().showAnnotationsOverview(true) ; + sourceViewerHandle.getViewer().getTextWidget().setFocus() ; + + // This last statement is used to trigger initial validation + sourceViewerHandle.getViewer().getTextWidget().append("") ; + } + + /** + * Perform additional checks before close + * (added by CEA LIST) + */ + private void checkedClose() { + context = semanticElement ; + if (! keyListener.isContentAssistActive()) { + // additional sanity check: on X11 systems, the focus is already lost during resize. + // An unwanted closing can be prevented by verifying if the activeShell still points + // to the xtextEditorComposite + if (xtextEditorComposite.getDisplay().getActiveShell() != xtextEditorComposite) { + if (!ignoreFocusLost) { + closeEditor(true) ; + } + else + closeEditor(false) ; + } + } + } + + + private PopupXtextEditorKeyListener keyListener ; + + private void registerKeyListener() { + //XtextSourceViewer sourceViewer = (XtextSourceViewer) xtextEditor.getInternalSourceViewer(); + final StyledText xtextTextWidget = sourceViewerHandle.getViewer().getTextWidget(); + CustomXtextSourceViewer viewer = (CustomXtextSourceViewer)sourceViewerHandle.getViewer() ; + keyListener = + new PopupXtextEditorKeyListener + (this, (ContentAssistant) viewer.getContentAssistant()); + //keyListener.installUndoRedoSupport(sourceViewerHandle.getViewer()) ; + xtextTextWidget.addVerifyKeyListener(keyListener); + xtextTextWidget.addKeyListener(keyListener); + } + + /** + * This element was originally not documented in the XText/GMF integration example + * + * Modifications from CEA LIST: + * - modifications to rules for computing the initial location and size of the popup editor. + * This still needs some work... + */ + private void setEditorBounds() { + + String editString = "" + textToEdit ; + int[] numLinesNumColums = StringUtil.getNumLinesNumColumns(editString) ; + int numLines = numLinesNumColums[0] ; + int numColumns = numLinesNumColums[1]; + // ninimal sizes + if (numLines < 5) { + numLines = 5; + } + if (numColumns < 60) { + numColumns = 60; + } + + IFigure figure = hostEditPart.getFigure() ; + Rectangle bounds = figure.getBounds().getCopy(); + figure.translateToAbsolute(bounds) ; + Point newCoord = diagramShell.getDisplay().map(hostEditPart.getViewer().getControl(), null, new Point(bounds.x, bounds.y)) ; + bounds.x = newCoord.x ; + bounds.y = newCoord.y ; + + // not used, delivers wrong results + // FontData fontData = figure.getFont().getFontData()[0]; + // int fontHeightInPixel = fontData.getHeight(); + + GC gc = new GC (xtextEditorComposite); + FontMetrics fm = gc.getFontMetrics (); + int width = numColumns * fm.getAverageCharWidth () + 40; + int height = numLines * fm.getHeight(); + gc.dispose (); + + // xtextEditorComposite contains a composite which in turn contains the text widget and an area for markers. + // Take difference between client area and size into account. Cannot set size of text widget directly, + // since suitable packing is not supported by the layout of the text widget's parent. + org.eclipse.swt.graphics.Rectangle clientArea = xtextEditorComposite.getClientArea(); + // only correct height, since width is estimated anyway. + height += xtextEditorComposite.getSize().y - clientArea.height; + xtextEditorComposite.setBounds(bounds.x, bounds.y, width, height); + } + + + + + private boolean isDocumentHasErrors(final IXtextDocument xtextDocument) { + return (xtextDocument.readOnly(new IUnitOfWork() { + public Boolean exec(XtextResource state) throws Exception { + IParseResult parseResult = state.getParseResult(); + return !state.getErrors().isEmpty() || parseResult == null || parseResult.hasSyntaxErrors(); + } + })); + } + + protected Status createErrorStatus(String message, TemplateException e) { + return new Status(IStatus.ERROR, + "org.eclipse.papyrus.property.editor.xtext",message, e); + + } + + + protected void installUndoRedoSupport(SourceViewer viewer) { + IDocumentUndoManager undoManager = DocumentUndoManagerRegistry.getDocumentUndoManager(viewer.getDocument()); + final IUndoContext context = undoManager.getUndoContext(); + IOperationHistory operationHistory = CheckedOperationHistory.getInstance(); + operationHistoryListener = new OperationHistoryListener(context, new IUpdate() { + public void update() { + updateAction(ITextEditorActionConstants.REDO); + updateAction(ITextEditorActionConstants.UNDO); + } + }); + operationHistory.addOperationHistoryListener(operationHistoryListener); + } + + private Map fGlobalActions= Maps.newHashMapWithExpectedSize(10); + private List fSelectionActions = Lists.newArrayListWithExpectedSize(3); + + protected void updateAction(String actionId) { + IAction action= fGlobalActions.get(actionId); + if (action instanceof IUpdate) + ((IUpdate) action).update(); + } + + protected void uninstallUndoRedoSupport() { + IOperationHistory operationHistory = PlatformUI.getWorkbench().getOperationSupport().getOperationHistory(); + operationHistory.removeOperationHistoryListener(operationHistoryListener); + operationHistoryListener = null; + } + + private void initializeActions() { + final List handlerActivations= Lists.newArrayListWithExpectedSize(3); + final IHandlerService handlerService= (IHandlerService) PlatformUI.getWorkbench().getAdapter(IHandlerService.class); + final Expression expression= new ActiveShellExpression(sourceViewerHandle.getViewer().getControl().getShell()); + + diagramShell.addDisposeListener(new DisposeListener() { + public void widgetDisposed(DisposeEvent e) { + handlerService.deactivateHandlers(handlerActivations); + } + }); + + TextViewerAction action= new TextViewerAction(sourceViewerHandle.getViewer(), ITextOperationTarget.UNDO); + action.setText("UNDO"); + fGlobalActions.put(ITextEditorActionConstants.UNDO, action); + + action= new TextViewerAction(sourceViewerHandle.getViewer(), ITextOperationTarget.REDO); + action.setText("REDO"); + fGlobalActions.put(ITextEditorActionConstants.REDO, action); + + action= new TextViewerAction(sourceViewerHandle.getViewer(), ITextOperationTarget.CUT); + action.setText("CUT"); + fGlobalActions.put(ITextEditorActionConstants.CUT, action); + + action= new TextViewerAction(sourceViewerHandle.getViewer(), ITextOperationTarget.COPY); + action.setText("COPY"); + fGlobalActions.put(ITextEditorActionConstants.COPY, action); + + action= new TextViewerAction(sourceViewerHandle.getViewer(), ITextOperationTarget.PASTE); + action.setText("PASTE"); + fGlobalActions.put(ITextEditorActionConstants.PASTE, action); + + action= new TextViewerAction(sourceViewerHandle.getViewer(), ITextOperationTarget.SELECT_ALL); + action.setText("SELECT_ALL"); + fGlobalActions.put(ITextEditorActionConstants.SELECT_ALL, action); + + action= new TextViewerAction(sourceViewerHandle.getViewer(), ISourceViewer.CONTENTASSIST_PROPOSALS); + action.setText("CONTENTASSIST_PROPOSALS"); + fGlobalActions.put(ITextEditorActionConstants.CONTENT_ASSIST, action); + + fSelectionActions.add(ITextEditorActionConstants.CUT); + fSelectionActions.add(ITextEditorActionConstants.COPY); + fSelectionActions.add(ITextEditorActionConstants.PASTE); + + sourceViewerHandle.getViewer().getTextWidget().addFocusListener(new FocusListener() { + public void focusLost(FocusEvent e) { + handlerService.deactivateHandlers(handlerActivations); + } + public void focusGained(FocusEvent e) { + IAction action= fGlobalActions.get(ITextEditorActionConstants.REDO); + handlerActivations.add(handlerService.activateHandler(IWorkbenchCommandConstants.EDIT_REDO, new ActionHandler(action), expression)); + action= fGlobalActions.get(ITextEditorActionConstants.UNDO); + handlerActivations.add(handlerService.activateHandler(IWorkbenchCommandConstants.EDIT_UNDO, new ActionHandler(action), expression)); + action= fGlobalActions.get(ITextEditorActionConstants.CONTENT_ASSIST); + handlerActivations.add(handlerService.activateHandler(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, new ActionHandler(action), expression)); + } + }); + + } +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/PopupXtextEditorKeyListener.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/PopupXtextEditorKeyListener.java new file mode 100644 index 00000000000..0cc682bb923 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/PopupXtextEditorKeyListener.java @@ -0,0 +1,98 @@ +/******************************************************************************* + * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part; + +import org.eclipse.jface.text.contentassist.ContentAssistEvent; +import org.eclipse.jface.text.contentassist.ContentAssistant; +import org.eclipse.jface.text.contentassist.ICompletionListener; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.VerifyKeyListener; +import org.eclipse.swt.events.KeyAdapter; +import org.eclipse.swt.events.KeyEvent; +import org.eclipse.swt.events.VerifyEvent; + +/** + * @author koehnlein + */ +public class PopupXtextEditorKeyListener extends KeyAdapter implements VerifyKeyListener { + + private final PopupXtextEditorHelper popupXtextEditorHelper; + + private ContentAssistant contentAssistant; + + private boolean isIgnoreNextESC; + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + * @param popupXtextEditorHelper + * @param contentAssistant + */ + public PopupXtextEditorKeyListener(PopupXtextEditorHelper popupXtextEditorHelper, ContentAssistant contentAssistant) { + this.popupXtextEditorHelper = popupXtextEditorHelper; + this.contentAssistant = contentAssistant; + isIgnoreNextESC = false; + } + + @Override + public void keyPressed(KeyEvent e) { + int keyCode = e.keyCode; + if ((e.stateMask & SWT.CTRL) != 0 && ((keyCode == SWT.KEYPAD_CR) || (keyCode == SWT.CR))) { + this.popupXtextEditorHelper.closeEditor(true); + } + if (keyCode == SWT.ESC) { + if (isIgnoreNextESC) { + isIgnoreNextESC = false; + } else { + PopupXtextEditorHelper.ignoreFocusLost = true ; + this.popupXtextEditorHelper.closeEditor(false); + } + } + if ((e.stateMask & SWT.CTRL) != 0 && (keyCode == ' ')) { + this.contentAssistant.setRepeatedInvocationMode(true) ; + this.contentAssistant.showPossibleCompletions() ; + + this.isIgnoreNextESC = true ; + contentAssistant.addCompletionListener(new ICompletionListener() { + + public void selectionChanged(ICompletionProposal proposal, boolean smartToggle) { + } + + public void assistSessionStarted(ContentAssistEvent event) { + } + + public void assistSessionEnded(ContentAssistEvent event) { + try { + popupXtextEditorHelper.getSourceViewerHandle().getViewer().getTextWidget().setFocus() ; + } + catch (Exception e) { + //ignore + } + } + }) ; + } + } + + public void verifyKey(VerifyEvent e) { + if (e.keyCode == SWT.ESC && isContentAssistActive()) { + isIgnoreNextESC = true; + } + if ((e.stateMask & SWT.CTRL) != 0 && ((e.keyCode == SWT.KEYPAD_CR) || (e.keyCode == SWT.CR))) { + e.doit = false; + } + } + + /** + * @return true if the proposal popup has focus + * + */ + public boolean isContentAssistActive() { + return contentAssistant != null && contentAssistant.hasProposalPopupFocus(); + } + +} \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/StringUtil.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/StringUtil.java new file mode 100644 index 00000000000..e15dc5553f6 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/StringUtil.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part; + +/** + * @author koehnlein + */ +public class StringUtil { + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + * @param s + * @return int + */ + public static int[] getNumLinesNumColumns(String s) { + int numLines = 1; + int numColumns = 0; + int[] dimensions = new int[2] ; + dimensions[0] = numLines ; + dimensions[1] = 0 ; + for (char c : s.toCharArray()) { + if (c == '\n') { + ++numLines; + dimensions[1] = Math.max(dimensions[1], numColumns) ; + numColumns = 0 ; + } + else { + ++numColumns; + } + } + dimensions[0] = numLines ; + dimensions[1] = Math.max(dimensions[1], numColumns) ; + return dimensions; + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/ChangeAggregatorAdapter.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/ChangeAggregatorAdapter.java new file mode 100644 index 00000000000..d3a9fdc516f --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/ChangeAggregatorAdapter.java @@ -0,0 +1,163 @@ +/******************************************************************************* + * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.editingdomain; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.util.EContentAdapter; +import org.eclipse.xtext.resource.XtextResource; + +import com.google.common.collect.Lists; + +/** + * @author Knut Wannheden - Initial contribution and API + * @author Jan Koehnlein + */ +public class ChangeAggregatorAdapter extends EContentAdapter { + + private Collection modifiedObjects = new LinkedHashSet(); + + private boolean isRecording = false; + + private boolean isSuspended = false; + + @Override + public void notifyChanged(Notification notification) { + super.notifyChanged(notification); + + if (!doRecord(notification)) + return; + + if (notification.getNotifier() instanceof EObject) { + recordObjectModification((EObject) notification.getNotifier()); + } + } + + protected void recordObjectModification(EObject obj) { + if (obj.eResource() == null || false == obj.eResource() instanceof XtextResource) + modifiedObjects.remove(obj); + else + modifiedObjects.add(obj); + } + + protected boolean doRecord(Notification notification) { + if (!isRecording || isSuspended || notification.isTouch()) + return false; + + switch (notification.getEventType()) { + case Notification.ADD: + case Notification.ADD_MANY: + case Notification.MOVE: + case Notification.REMOVE: + case Notification.REMOVE_MANY: + case Notification.SET: + case Notification.UNSET: + return true; + default: + return false; + } + } + + private void reset() { + modifiedObjects.clear(); + } + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + */ + public void beginRecording() { + reset(); + isRecording = true; + } + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + */ + public void endRecording() { + isRecording = false; + } + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + * @param isSuspended + */ + public void setSuspended(boolean isSuspended) { + this.isSuspended = isSuspended; + } + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + * @return List + */ + public List getModificationRoots() { + Map> resource2ChangePathMap = new HashMap>(); + for (EObject eObject : modifiedObjects) { + if (!eObject.eIsProxy()) { + Resource resource = eObject.eResource(); + List resourceChangePath = resource2ChangePathMap.get(resource); + if (resourceChangePath == null) { + resourceChangePath = allContainers(eObject); + resource2ChangePathMap.put(resource, resourceChangePath); + } else { + resourceChangePath.retainAll(allContainers(eObject)); + } + } + } + List modificationRoots = new ArrayList(resource2ChangePathMap.size()); + for (List changePath : resource2ChangePathMap.values()) { + if (!changePath.isEmpty()) { + modificationRoots.add(changePath.get(changePath.size() - 1)); + } + } + return modificationRoots; + } + + private LinkedList allContainers(EObject eObject) { + final LinkedList allContainers = Lists.newLinkedList(); + allContainers.add(eObject); + EObject currentContainer = eObject.eContainer(); + final Resource resource = eObject.eResource(); + while (currentContainer != null && resource == currentContainer.eResource()) { + allContainers.addFirst(currentContainer); + currentContainer = currentContainer.eContainer(); + } + return allContainers; + } + + /** + * Only attach to XtextResources + */ + @Override + protected void setTarget(Resource target) { + if (target instanceof XtextResource) { + super.setTarget(target); + } + } + + @Override + protected void setTarget(EObject target) { + if (target.eResource() instanceof XtextResource) { + super.setTarget(target); + } + } + + @Override + public boolean isAdapterForType(Object type) { + return type == ChangeAggregatorAdapter.class; + } + +} \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/SemanticRootUnloadListener.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/SemanticRootUnloadListener.java new file mode 100644 index 00000000000..6fb03239ea9 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/SemanticRootUnloadListener.java @@ -0,0 +1,95 @@ +/******************************************************************************* + * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.editingdomain; + +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.transaction.NotificationFilter; +import org.eclipse.emf.transaction.ResourceSetChangeEvent; +import org.eclipse.emf.transaction.ResourceSetListener; +import org.eclipse.emf.transaction.RollbackException; +import org.eclipse.gef.EditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart; +import org.eclipse.xtext.resource.XtextResource; + +/** + * Reloads the semantic root element (the element of the diagram) on changes and refreshes the diagram. GMF does by + * default not listen to such events which can occur in an {@link XtextResource}, if the document changes close to the + * root element. + * + * Activate an instance of this in the {@link EditPart#activate()} method of the {@link DiagramEditPart}. + * + * @author koehnlein + */ +public class SemanticRootUnloadListener implements ResourceSetListener { + + private DiagramEditPart rootEditPart; + private EObject semanticRootElement; + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + * @param rootEditPart + * + */ + public SemanticRootUnloadListener(DiagramEditPart rootEditPart) { + this.rootEditPart = rootEditPart; + this.semanticRootElement = rootEditPart.resolveSemanticElement(); + } + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + */ + public void activate() { + rootEditPart.getEditingDomain().addResourceSetListener(this); + } + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + */ + public void deactivate() { + rootEditPart.getEditingDomain().removeResourceSetListener(this); + } + + public NotificationFilter getFilter() { + return new NotificationFilter.Custom() { + @Override + public boolean matches(Notification notification) { + int featureID = notification.getFeatureID(Resource.class); + Object notifier = notification.getNotifier(); + int eventType = notification.getEventType(); + return notification.getOldValue() == semanticRootElement && featureID == Resource.RESOURCE__CONTENTS + && (eventType == Notification.REMOVE || eventType == Notification.SET) + && notifier instanceof Resource; + } + }; + } + + public boolean isAggregatePrecommitListener() { + return false; + } + + public boolean isPostcommitOnly() { + return true; + } + + public boolean isPrecommitOnly() { + return false; + } + + public void resourceSetChanged(ResourceSetChangeEvent event) { + semanticRootElement = rootEditPart.resolveSemanticElement(); + rootEditPart.refresh(); + } + + public Command transactionAboutToCommit(ResourceSetChangeEvent event) throws RollbackException { + return null; + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/UpdateXtextResourceTextCommand.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/UpdateXtextResourceTextCommand.java new file mode 100644 index 00000000000..a1f4a622e05 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/UpdateXtextResourceTextCommand.java @@ -0,0 +1,107 @@ +/******************************************************************************* + * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.editingdomain; + +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.emf.transaction.util.TransactionUtil; +import org.eclipse.gmf.runtime.common.core.command.CommandResult; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand; +import org.eclipse.xtext.resource.XtextResource; + +/** + * A Command that deactivates the {@link ChangeAggregatorAdapter} and updates a textual section of an Xtext model in an + * Xtext resource. Used to avoid cycles in the change aggregation. + * + * @author koehnlein + */ +public class UpdateXtextResourceTextCommand { + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + * @param xtextResource + * @param offset + * @param length + * @param newText + * @return Command + */ + public static Command createEMFCommand(final XtextResource xtextResource, final int offset, final int length, + final String newText) { + final TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(xtextResource); + if (editingDomain == null) { + return null; + } + ResourceSet resourceSet = editingDomain.getResourceSet(); + final ChangeAggregatorAdapter changeAggregator = (ChangeAggregatorAdapter) EcoreUtil.getAdapter(resourceSet + .eAdapters(), ChangeAggregatorAdapter.class); + return new RecordingCommand(editingDomain, "update xtext resource") { + @Override + protected void doExecute() { + try { + if (changeAggregator != null) { + changeAggregator.setSuspended(true); + } + xtextResource.update(offset, length, newText); + xtextResource.setModified(true); + } finally { + if (changeAggregator != null) { + changeAggregator.setSuspended(false); + } + } + + } + }; + } + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + * @param xtextResource + * @param offset + * @param length + * @param newText + * @return ICommand + */ + public static ICommand createUpdateCommand(final XtextResource xtextResource, final int offset, final int length, + final String newText) { + final TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(xtextResource); + if (editingDomain == null) { + return null; + } + ResourceSet resourceSet = editingDomain.getResourceSet(); + final ChangeAggregatorAdapter changeAggregator = (ChangeAggregatorAdapter) EcoreUtil.getAdapter(resourceSet + .eAdapters(), ChangeAggregatorAdapter.class); + return new AbstractTransactionalCommand(editingDomain, "update xtext resource", null) { + @Override + protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) + throws ExecutionException { + try { + if (changeAggregator != null) { + changeAggregator.setSuspended(true); + } + xtextResource.update(offset, length, newText); + xtextResource.setModified(true); + return CommandResult.newOKCommandResult(); + } catch (Exception exc) { + return CommandResult.newErrorCommandResult(exc); + } finally { + if (changeAggregator != null) { + changeAggregator.setSuspended(false); + } + } + } + }; + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/XtextNodeModelReconciler.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/XtextNodeModelReconciler.java new file mode 100644 index 00000000000..4605d2a1a5c --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/XtextNodeModelReconciler.java @@ -0,0 +1,135 @@ +/******************************************************************************* + * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.editingdomain; + +import org.eclipse.core.commands.operations.IOperationHistory; +import org.eclipse.core.commands.operations.IOperationHistoryListener; +import org.eclipse.core.commands.operations.OperationHistoryEvent; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.common.notify.impl.AdapterImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.emf.transaction.TransactionalEditingDomain.Lifecycle; +import org.eclipse.emf.transaction.TransactionalEditingDomainEvent; +import org.eclipse.emf.transaction.TransactionalEditingDomainListener; +import org.eclipse.emf.transaction.util.TransactionUtil; +import org.eclipse.emf.workspace.IWorkspaceCommandStack; +//import org.eclipse.xtext.parsetree.CompositeNode; +//import org.eclipse.xtext.parsetree.NodeAdapter; +//import org.eclipse.xtext.parsetree.NodeUtil; + +/** + * Reconciles the node models of all XtextResources in a TransactionalEditingDomain with semantic changes. + * + * @author koehnlein + */ +public class XtextNodeModelReconciler extends AdapterImpl implements TransactionalEditingDomainListener, + IOperationHistoryListener { + + private TransactionalEditingDomain editingDomain; + + private ChangeAggregatorAdapter changeAggregator; + + private XtextNodeModelReconciler(TransactionalEditingDomain editingDomain) { + this.editingDomain = editingDomain; + Lifecycle lifecycle = TransactionUtil.getAdapter(editingDomain, Lifecycle.class); + lifecycle.addTransactionalEditingDomainListener(this); + changeAggregator = new ChangeAggregatorAdapter(); + editingDomain.getResourceSet().eAdapters().add(changeAggregator); + CommandStack commandStack = editingDomain.getCommandStack(); + if (commandStack instanceof IWorkspaceCommandStack) { + IOperationHistory operationHistory = ((IWorkspaceCommandStack) commandStack).getOperationHistory(); + operationHistory.addOperationHistoryListener(this); + } + changeAggregator.beginRecording(); + } + + public void editingDomainDisposing(TransactionalEditingDomainEvent event) { + changeAggregator.endRecording(); + CommandStack commandStack = editingDomain.getCommandStack(); + if (commandStack instanceof IWorkspaceCommandStack) { + IOperationHistory operationHistory = ((IWorkspaceCommandStack) commandStack).getOperationHistory(); + operationHistory.removeOperationHistoryListener(this); + } + editingDomain.getResourceSet().eAdapters().remove(changeAggregator); + Lifecycle lifecycle = TransactionUtil.getAdapter(editingDomain, Lifecycle.class); + lifecycle.removeTransactionalEditingDomainListener(XtextNodeModelReconciler.this); + } + + public void transactionClosed(TransactionalEditingDomainEvent event) { + // ignore + } + + public void transactionClosing(TransactionalEditingDomainEvent event) { + // ignore + } + + public void transactionInterrupted(TransactionalEditingDomainEvent event) { + // ignore + } + + public void transactionStarted(TransactionalEditingDomainEvent event) { + // ignore + } + + public void transactionStarting(TransactionalEditingDomainEvent event) { + // ignore + } + + /** + * This element comes from the XText/GMF integration example, and was not originally documented. + * @param editingDomain + * @return XtextNodeModelReconciler + * + */ + public static XtextNodeModelReconciler adapt(TransactionalEditingDomain editingDomain) { + XtextNodeModelReconciler adapter = (XtextNodeModelReconciler) EcoreUtil.getAdapter(editingDomain + .getResourceSet().eAdapters(), XtextNodeModelReconciler.class); + if (adapter == null) { + adapter = new XtextNodeModelReconciler(editingDomain); + } + return adapter; + } + + public void historyNotification(OperationHistoryEvent event) { + int eventType = event.getEventType(); +// switch (eventType) { +// case OperationHistoryEvent.DONE: +// case OperationHistoryEvent.UNDONE: +// case OperationHistoryEvent.REDONE: +// changeAggregator.endRecording(); +// ICommand updateXtextResourceTextCommand = null; +// for (EObject modificationRoot : changeAggregator.getModificationRoots()) { +// XtextResource xtextResource = (XtextResource) modificationRoot.eResource(); +// NodeAdapter nodeAdapter = NodeUtil.getNodeAdapter(modificationRoot); +// CompositeNode parserNode = nodeAdapter.getParserNode(); +// Serializer serializer = xtextResource.getSerializer(); +// String newText = serializer.serialize(modificationRoot); +// ICommand newCommand = UpdateXtextResourceTextCommand.createUpdateCommand(xtextResource, parserNode +// .getOffset(), parserNode.getLength(), newText); +// if (updateXtextResourceTextCommand == null) { +// updateXtextResourceTextCommand = newCommand; +// } else { +// updateXtextResourceTextCommand.compose(newCommand); +// } +// } +// try { +// if (updateXtextResourceTextCommand != null) { +// updateXtextResourceTextCommand.execute(null, null); +// } +// } catch (ExecutionException exc) { +// Activator.logError(exc); +// } +// changeAggregator.beginRecording(); +// break; +// default: +// // ignore +// } + + } +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/CustomXtextSourceViewer.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/CustomXtextSourceViewer.java new file mode 100644 index 00000000000..577dcd58091 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/CustomXtextSourceViewer.java @@ -0,0 +1,63 @@ +/***************************************************************************** + * Copyright (c) 2011 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; + +import org.eclipse.jface.text.DocumentCommand; +import org.eclipse.jface.text.contentassist.IContentAssistant; +import org.eclipse.jface.text.source.IOverviewRuler; +import org.eclipse.jface.text.source.IVerticalRuler; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.xtext.ui.editor.XtextSourceViewer; + +/** + * This class extends XtextSourceViewer with the method getContentAssistant() + * This method was available on XtextSourceViewer in Xtext 1.0, and used + * for integration in Papyrus. + * + * @author CEA LIST - Initial contribution and API + */ +public class CustomXtextSourceViewer extends XtextSourceViewer { + + /** + * @param parent + * @param ruler + * @param overviewRuler + * @param showsAnnotationOverview + * @param styles + * + */ + public CustomXtextSourceViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler, + boolean showsAnnotationOverview, int styles) { + super(parent, ruler, overviewRuler, showsAnnotationOverview, styles); + } + + /** + * Used in papyrus integration for managing content assist in popup editors. + * @return the content assistant + * + */ + public IContentAssistant getContentAssistant() { + return fContentAssistant; + } + + @Override + protected void customizeDocumentCommand(DocumentCommand command) { + // TODO: TextViewer.customizeDocumentCommand generates exceptions. Why? + //super.customizeDocumentCommand(command); + } + + + +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/HighlightingHelper.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/HighlightingHelper.java new file mode 100644 index 00000000000..0f0e7114282 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/HighlightingHelper.java @@ -0,0 +1,161 @@ +/******************************************************************************* + * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; + +import org.eclipse.jface.util.IPropertyChangeListener; +import org.eclipse.jface.util.PropertyChangeEvent; +import org.eclipse.xtext.ui.editor.XtextPresentationReconciler; +import org.eclipse.xtext.ui.editor.XtextSourceViewer; +import org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration; +import org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreAccess; +import org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingPresenter; + +import com.google.inject.Inject; +import com.google.inject.Provider; + +/** + * @author Sebastian Zarnekow - Initial contribution and API + */ +public class HighlightingHelper implements IPropertyChangeListener { + + @Inject + private Provider reconcilerProvider; + + @Inject + private Provider presenterProvider; + + @Inject + private IPreferenceStoreAccess preferenceStoreAccessor; + + /** Highlighting presenter */ + private HighlightingPresenter fPresenter; + /** Highlighting reconciler */ + private HighlightingReconciler fReconciler; + + /** The source viewer */ + private XtextSourceViewer fSourceViewer; + /** The source viewer configuration */ + private XtextSourceViewerConfiguration fConfiguration; + /** The presentation reconciler */ + private XtextPresentationReconciler fPresentationReconciler; + + /** + * @param configuration + * @param sourceViewer + * + */ + public void install(XtextSourceViewerConfiguration configuration, XtextSourceViewer sourceViewer) { + fSourceViewer= sourceViewer; + fConfiguration= configuration; + fPresentationReconciler= (XtextPresentationReconciler) fConfiguration.getPresentationReconciler(sourceViewer); + preferenceStoreAccessor.getPreferenceStore().addPropertyChangeListener(this); + enable(); + } + + /** + * Enable advanced highlighting. + */ + private void enable() { + fPresenter= getPresenterProvider().get(); + fPresenter.install(fSourceViewer, fPresentationReconciler); + + if (fSourceViewer.getDocument() != null) { + fReconciler= reconcilerProvider.get(); + fReconciler.install(fSourceViewer, fPresenter); + } + } + + /** + * + */ + public void uninstall() { + disable(); + preferenceStoreAccessor.getPreferenceStore().removePropertyChangeListener(this); + fSourceViewer= null; + fConfiguration= null; + fPresentationReconciler= null; + } + + /** + * Disable advanced highlighting. + */ + private void disable() { + if (fReconciler != null) { + fReconciler.uninstall(); + fReconciler= null; + } + + if (fPresenter != null) { + fPresenter.uninstall(); + fPresenter= null; + } + } + + /** + * Returns this hightlighter's reconciler. + * + * @return the highlighter reconciler or null if none + */ + public HighlightingReconciler getReconciler() { + return fReconciler; + } + + /** + * @param reconcilerProvider + * + */ + public void setReconcilerProvider(Provider reconcilerProvider) { + this.reconcilerProvider = reconcilerProvider; + } + + /** + * @return Provider + * + */ + public Provider getReconcilerProvider() { + return reconcilerProvider; + } + + /** + * @param presenterProvider + * + */ + + public void setPresenterProvider(Provider presenterProvider) { + this.presenterProvider = presenterProvider; + } + + /** + * @return Provider + */ + public Provider getPresenterProvider() { + return presenterProvider; + } + + /** + * @param preferenceStoreAccessor + * + */ + public void setPreferenceStoreAccessor(IPreferenceStoreAccess preferenceStoreAccessor) { + this.preferenceStoreAccessor = preferenceStoreAccessor; + } + + /** + * @return IPreferenceStoreAccessor + * + */ + public IPreferenceStoreAccess getPreferenceStoreAccessor() { + return preferenceStoreAccessor; + } + + public void propertyChange(PropertyChangeEvent event) { + if (fReconciler != null && event.getProperty().contains(".syntaxColorer.tokenStyles")) + fReconciler.refresh(); + } +} + diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/HighlightingReconciler.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/HighlightingReconciler.java new file mode 100644 index 00000000000..bce3698527e --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/HighlightingReconciler.java @@ -0,0 +1,291 @@ +/******************************************************************************* + * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.ITextInputListener; +import org.eclipse.jface.text.TextAttribute; +import org.eclipse.jface.text.TextPresentation; +import org.eclipse.swt.widgets.Display; +import org.eclipse.xtext.resource.XtextResource; +import org.eclipse.xtext.ui.editor.XtextSourceViewer; +import org.eclipse.xtext.ui.editor.model.IXtextDocument; +import org.eclipse.xtext.ui.editor.model.IXtextModelListener; +import org.eclipse.xtext.ui.editor.model.XtextDocument; +import org.eclipse.xtext.ui.editor.syntaxcoloring.AttributedPosition; +import org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingPresenter; +import org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightedPositionAcceptor; +import org.eclipse.xtext.ui.editor.syntaxcoloring.ISemanticHighlightingCalculator; +import org.eclipse.xtext.ui.editor.syntaxcoloring.ITextAttributeProvider; +import org.eclipse.xtext.ui.editor.syntaxcoloring.MergingHighlightedPositionAcceptor; +import org.eclipse.xtext.util.concurrent.IUnitOfWork; + +import com.google.inject.Inject; + +/** + * @author Sebastian Zarnekow - Initial contribution and API + */ +public class HighlightingReconciler implements ITextInputListener, IXtextModelListener, IHighlightedPositionAcceptor { + + @Inject(optional=true) + private ISemanticHighlightingCalculator calculator; + + @Inject + private ITextAttributeProvider attributeProvider; + + /** The source viewer this highlighting reconciler is installed on */ + private XtextSourceViewer sourceViewer; + /** The highlighting presenter */ + private HighlightingPresenter presenter; + + /** Background job's added highlighted positions */ + private final List addedPositions = new ArrayList(); + /** Background job's removed highlighted positions */ + private List removedPositions = new ArrayList(); + /** Number of removed positions */ + private int removedPositionCount; + + /** + * Reconcile operation lock. + * + * @since 3.2 + */ + private final Object fReconcileLock = new Object(); + /** + * true if any thread is executing reconcile, false otherwise. + * + * @since 3.2 + */ + private boolean reconciling = false; + + /** + * Start reconciling positions. + */ + private void startReconcilingPositions() { + presenter.addAllPositions(removedPositions); + removedPositionCount = removedPositions.size(); + } + + /** + * Reconcile positions based on the AST subtrees + * + * @param subtrees + * the AST subtrees + */ + private void reconcilePositions(XtextResource resource) { + // for (int i= 0, n= subtrees.length; i < n; i++) + // subtrees[i].accept(fCollector); + MergingHighlightedPositionAcceptor acceptor = new MergingHighlightedPositionAcceptor(calculator); + acceptor.provideHighlightingFor(resource, this); +// calculator.provideHighlightingFor(resource, this); + List oldPositions = removedPositions; + List newPositions = new ArrayList(removedPositionCount); + for (int i = 0, n = oldPositions.size(); i < n; i++) { + AttributedPosition current = oldPositions.get(i); + if (current != null) + newPositions.add(current); + } + removedPositions = newPositions; + } + + /** + * Add a position with the given range and highlighting if it does not exist already. + * @param offset The range offset + * @param length The range length + * @param highlighting The highlighting + */ + public void addPosition(int offset, int length, String... ids) { + TextAttribute highlighting = ids.length == 1 ? + attributeProvider.getAttribute(ids[0]) + : attributeProvider.getMergedAttributes(ids); + boolean isExisting= false; + // TODO: use binary search + for (int i= 0, n= removedPositions.size(); i < n; i++) { + AttributedPosition position= removedPositions.get(i); + if (position == null) + continue; + if (position.isEqual(offset, length, highlighting)) { + isExisting= true; + removedPositions.set(i, null); + removedPositionCount--; + break; + } + } + + if (!isExisting) { + AttributedPosition position= presenter.createHighlightedPosition(offset, length, highlighting); + addedPositions.add(position); + } + } + + /** + * Update the presentation. + * + * @param textPresentation + * the text presentation + * @param addedPositions + * the added positions + * @param removedPositions + * the removed positions + */ + private void updatePresentation(TextPresentation textPresentation, List addedPositions, + List removedPositions) { + Runnable runnable = presenter.createUpdateRunnable(textPresentation, addedPositions, removedPositions); + if (runnable == null) + return; + + Display display = getDisplay(); + display.asyncExec(runnable); + } + + private Display getDisplay() { + return this.sourceViewer.getControl().getDisplay(); + } + + /** + * Stop reconciling positions. + */ + private void stopReconcilingPositions() { + removedPositions.clear(); + removedPositionCount = 0; + addedPositions.clear(); + } + + /** + * Install this reconciler on the given editor and presenter. + * + * @param editor + * the editor + * @param sourceViewer + * the source viewer + * @param presenter + * the highlighting presenter + */ + public void install(XtextSourceViewer sourceViewer, HighlightingPresenter presenter) { + this.presenter = presenter; + this.sourceViewer = sourceViewer; + if (calculator != null) { + ((IXtextDocument) sourceViewer.getDocument()).addModelListener(this); + sourceViewer.addTextInputListener(this); + } + refresh(); + } + + /** + * Uninstall this reconciler from the editor + */ + public void uninstall() { + if (presenter != null) + presenter.setCanceled(true); + + if (sourceViewer.getDocument() != null) { + if (calculator != null) { + XtextDocument document = (XtextDocument) sourceViewer.getDocument(); + document.removeModelListener(this); + sourceViewer.removeTextInputListener(this); + } + } + + sourceViewer = null; + presenter = null; + } + + /* + * @see org.eclipse.jface.text.ITextInputListener#inputDocumentAboutToBeChanged(org.eclipse.jface.text.IDocument, org.eclipse.jface.text.IDocument) + */ + public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) { + if (oldInput != null) + ((IXtextDocument) oldInput).removeModelListener(this); + } + + /* + * @see org.eclipse.jface.text.ITextInputListener#inputDocumentChanged(org.eclipse.jface.text.IDocument, org.eclipse.jface.text.IDocument) + */ + public void inputDocumentChanged(IDocument oldInput, IDocument newInput) { + if (newInput != null) { + refresh(); + ((IXtextDocument) newInput).addModelListener(this); + } + } + + /** + * Refreshes the highlighting. + */ + public void refresh() { + if (calculator != null) { + ((XtextDocument) sourceViewer.getDocument()).readOnly(new IUnitOfWork.Void() { + @Override + public void process(XtextResource state) throws Exception { + modelChanged(state); + } + }); + } else { + Display display = getDisplay(); + display.asyncExec(presenter.createSimpleUpdateRunnable()); + } + } + + public void modelChanged(XtextResource resource) { + // ensure at most one thread can be reconciling at any time + synchronized (fReconcileLock) { + if (reconciling) + return; + reconciling = true; + } + final HighlightingPresenter highlightingPresenter = presenter; + try { + if (highlightingPresenter == null) + return; + + highlightingPresenter.setCanceled(false); + + if (highlightingPresenter.isCanceled()) + return; + + startReconcilingPositions(); + + if (!highlightingPresenter.isCanceled()) { + reconcilePositions(resource); + } + + final TextPresentation[] textPresentation = new TextPresentation[1]; + if (!highlightingPresenter.isCanceled()) { + textPresentation[0] = highlightingPresenter.createPresentation(addedPositions, removedPositions); + } + + if (!highlightingPresenter.isCanceled()) + updatePresentation(textPresentation[0], addedPositions, removedPositions); + + stopReconcilingPositions(); + } + finally { + synchronized (fReconcileLock) { + reconciling = false; + } + } + } + + /** + * @param calculator + * + */ + public void setCalculator(ISemanticHighlightingCalculator calculator) { + this.calculator = calculator; + } + + /** + * @return ISemanticHighlightingCalculator + * + */ + public ISemanticHighlightingCalculator getCalculator() { + return calculator; + } +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/IActionContributor.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/IActionContributor.java new file mode 100644 index 00000000000..1805f2bfcc9 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/IActionContributor.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; + +import java.util.List; + +import com.google.inject.Binding; +import com.google.inject.Inject; +import com.google.inject.Injector; +import com.google.inject.Singleton; +import com.google.inject.TypeLiteral; + +/** + * + */ +public interface IActionContributor { + /** + * hook used to contribute any actions on editor start up. + * @param editor + */ + public void contributeActions(PartialModelEditor editor); + + + /** + * composite action contributor delegating call to all registered {@link IActionContributor} + */ + @Singleton + public class CompositeImpl implements IActionContributor { + + @Inject + private Injector injector; + + public void contributeActions(PartialModelEditor editor) { + List> bindingsByType = injector.findBindingsByType(TypeLiteral.get(IActionContributor.class)); + for (Binding binding : bindingsByType) { + IActionContributor actionContributor = injector.getInstance(binding.getKey()); + actionContributor.contributeActions(editor); + } + } + + } +} \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/IPartialContentAssistParser.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/IPartialContentAssistParser.java new file mode 100644 index 00000000000..95133155d81 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/IPartialContentAssistParser.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; + +import org.eclipse.xtext.AbstractRule; +import org.eclipse.xtext.ui.editor.contentassist.antlr.IContentAssistParser; + +/** + * @author Sebastian Zarnekow - Initial contribution and API + */ +public interface IPartialContentAssistParser extends IContentAssistParser { + + /** + * @param rule + * + */ + void initializeFor(AbstractRule rule); + +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/ISyntheticResourceProvider.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/ISyntheticResourceProvider.java new file mode 100644 index 00000000000..50d9eab79d1 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/ISyntheticResourceProvider.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; + +import org.eclipse.xtext.resource.XtextResource; + +import com.google.inject.ImplementedBy; + +/** + * + */ +@ImplementedBy(SyntheticResourceProvider.class) +public interface ISyntheticResourceProvider { + /** + * @return XtextResource + * + */ + XtextResource createResource(); +} \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/OperationHistoryListener.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/OperationHistoryListener.java new file mode 100644 index 00000000000..9db63acc890 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/OperationHistoryListener.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; + +import org.eclipse.core.commands.operations.IOperationHistoryListener; +import org.eclipse.core.commands.operations.IUndoContext; +import org.eclipse.core.commands.operations.OperationHistoryEvent; +import org.eclipse.ui.texteditor.IUpdate; + +/** + * + */ +public class OperationHistoryListener implements IOperationHistoryListener { + private final IUndoContext context; + private final IUpdate update; + + /** + * @param context + * @param update + * + */ + public OperationHistoryListener(IUndoContext context, IUpdate update) { + this.context = context; + this.update = update; + } + + public void historyNotification(OperationHistoryEvent event) { + final int type= event.getEventType(); + switch (type) { + case OperationHistoryEvent.UNDONE: + case OperationHistoryEvent.REDONE: + case OperationHistoryEvent.OPERATION_NOT_OK: + // if this is one of our operations + if (event.getOperation().hasContext(context)) { + update.update(); + } + } + } +} \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/PartialContentAssistContextFactory.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/PartialContentAssistContextFactory.java new file mode 100644 index 00000000000..c6baf0199e1 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/PartialContentAssistContextFactory.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; + +import org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory; + +/** + * @author Sebastian Zarnekow - Initial contribution and API + */ +public class PartialContentAssistContextFactory extends ParserBasedContentAssistContextFactory { + +// /** +// * @param partialContentAssistParser +// * +// */ +// @Inject +// public void setPartialParser(IPartialContentAssistParser partialContentAssistParser) { +// super.setParser(partialContentAssistParser); +// } +// +// /** +// * @param rule +// * +// */ +// public void initializeFor(AbstractRule rule) { +// ((IPartialContentAssistParser) getParser()).initializeFor(rule); +// } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/PartialModelEditor.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/PartialModelEditor.java new file mode 100644 index 00000000000..79d3cbb2d32 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/PartialModelEditor.java @@ -0,0 +1,163 @@ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; + +import java.util.Collections; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.ISynchronizable; +import org.eclipse.jface.text.source.AnnotationModel; +import org.eclipse.jface.text.source.SourceViewer; +import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part.IXtextEMFReconciler; +import org.eclipse.xtext.resource.XtextResource; +import org.eclipse.xtext.ui.editor.model.XtextDocument; +import org.eclipse.xtext.util.StringInputStream; + +/** + * + */ +public class PartialModelEditor { + + protected final SourceViewer viewer; + protected final boolean insertLineBreaks; + protected final ISyntheticResourceProvider resourceProvider; + protected EObject semanticElement ; + protected IXtextEMFReconciler modelReconciler ; + //private final Injector xtextInjector ; + + /** + * @param viewer + * @param resourceProvider + * @param insertLineBreaks + * @param semanticElement + * @param modelReconciler + * + */ + public PartialModelEditor(SourceViewer viewer, + ISyntheticResourceProvider resourceProvider, + boolean insertLineBreaks, + EObject semanticElement, + IXtextEMFReconciler modelReconciler) { + //this.xtextInjector = xtextInjector ; + this.viewer = viewer; + this.resourceProvider = resourceProvider; + this.insertLineBreaks = insertLineBreaks; + this.semanticElement = semanticElement ; + this.modelReconciler = modelReconciler ; + } + + /** + * @param document + * @param prefix + * @param editablePart + * @param suffix + * + */ + public void setModel(XtextDocument document, String prefix, String editablePart, String suffix) { + if (insertLineBreaks) { + String delimiter = document.getLegalLineDelimiters()[0]; + prefix = prefix + delimiter; + suffix = delimiter + suffix; + } + String model = prefix + editablePart + suffix; + document.set(model); + XtextResource resource = createResource(model); + document.setInput(resource); + AnnotationModel annotationModel = new AnnotationModel(); + if (document instanceof ISynchronizable) { + Object lock= ((ISynchronizable)document).getLockObject(); + if (lock == null) { + lock= new Object(); + ((ISynchronizable)document).setLockObject(lock); + } + ((ISynchronizable) annotationModel).setLockObject(lock); + } + viewer.setDocument(document, annotationModel, prefix.length(), editablePart.length()); + viewer.getUndoManager().reset(); + } + + /** + * @param content + * @return XtextResource + * + */ + public XtextResource createResource(String content) { + XtextResource result = resourceProvider.createResource(); + try { + result.load(new StringInputStream(content, result.getEncoding()), Collections.emptyMap()); + } catch (Exception e) { + throw new RuntimeException(e); + } + return result; + } + + /** + * @param prefix + * @param editablePart + * @param suffix + * + */ + public void updateModel(String prefix, String editablePart, String suffix) { + IDocument document= viewer.getDocument(); + if (insertLineBreaks) { + String delimiter = document.getLegalLineDelimiters()[0]; + prefix = prefix + delimiter; + suffix = delimiter + suffix; + } + String model = prefix + editablePart + suffix; + viewer.setRedraw(false); + viewer.getUndoManager().disconnect(); + document.set(model); + viewer.setVisibleRegion(prefix.length(), editablePart.length()); + viewer.getUndoManager().connect(viewer); + viewer.setRedraw(true); + } + + /** + * @param prefix + * + */ + public void updatePrefix(String prefix) { + try { + IDocument document= viewer.getDocument(); + IRegion visibleRegion = viewer.getVisibleRegion(); + String editablePart = document.get(visibleRegion.getOffset(), visibleRegion.getLength()); + int suffixOffset = visibleRegion.getOffset() + visibleRegion.getLength(); + String suffix = ""; + if (document.getLength() - suffixOffset > 0) { + suffix = document.get(suffixOffset, document.getLength() - suffixOffset); + if (insertLineBreaks) { + String delimiter = document.getLegalLineDelimiters()[0]; + suffix = suffix.substring(delimiter.length()); + } + } + updateModel(prefix, editablePart, suffix); + } catch(BadLocationException e) { + throw new RuntimeException(e); + } + } + + /** + * @return String + * + */ + public String getEditablePart() { + IDocument doc= viewer.getDocument(); + IRegion visible= viewer.getVisibleRegion(); + try { + return doc.get(visible.getOffset(), visible.getLength()); + } catch (BadLocationException e) { + return ""; //$NON-NLS-1$ + } + } + + /** + * @return String + * + */ + public String getSerializedModel() { + return viewer.getDocument().get(); + } + +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SourceViewerHandle.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SourceViewerHandle.java new file mode 100644 index 00000000000..52fe8a87962 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SourceViewerHandle.java @@ -0,0 +1,131 @@ +/******************************************************************************* + * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; + +import java.lang.reflect.Constructor; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jface.text.source.SourceViewer; +import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part.IXtextEMFReconciler; +import org.eclipse.xtext.ui.editor.XtextSourceViewer; +import org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration; +import org.eclipse.xtext.ui.editor.model.XtextDocument; +import org.eclipse.xtext.ui.editor.validation.IValidationIssueProcessor; + +import com.google.inject.Injector; + +/** + * + */ +public class SourceViewerHandle { + protected IValidationIssueProcessor issueProcessor; + protected final XtextSourceViewer viewer; + protected final ISyntheticResourceProvider resourceProvider; + protected final XtextDocument document; + protected final XtextSourceViewerConfiguration configuration; + protected static Class partialModelEditorClass = null ; + private Class defaultModelEditorClass = PartialModelEditor.class ; + protected EObject semanticElement ; + protected IXtextEMFReconciler modelReconciler ; + + SourceViewerHandle(XtextDocument document, XtextSourceViewer viewer, XtextSourceViewerConfiguration configuration, ISyntheticResourceProvider resourceProvider, Injector xtextInjector) { + this.document = document; + this.viewer = viewer; + this.configuration = configuration; + this.resourceProvider = resourceProvider; + } + + /** + * @param issueProcessor + * + */ + public void setIssueProcessor(IValidationIssueProcessor issueProcessor) { + this.issueProcessor = issueProcessor; + } + + /** + * @return IValidationIssueProcessor + * + */ + public IValidationIssueProcessor getIssueProcessor() { + return issueProcessor; + } + + /** + * @return XtextSourceViewer + * + */ + public XtextSourceViewer getViewer() { + return viewer; + } + + /** + * @return XtextDocument + * + */ + public XtextDocument getDocument() { + return document; + } + + /** + * @return XtextSourceViewerConfiguration + * + */ + public XtextSourceViewerConfiguration getConfiguration() { + return configuration; + } + + /** + * @param prefix + * @param editablePart + * @param suffix + * @param semanticElement + * @param modelReconciler + * @return PartialModelEditor + * + */ + public PartialModelEditor createPartialEditor(String prefix, String editablePart, String suffix, EObject semanticElement, IXtextEMFReconciler modelReconciler) { + //PartialModelEditor result = new PartialModelEditor(viewer, resourceProvider, false); + PartialModelEditor result = null; + try { + if (partialModelEditorClass == null) + partialModelEditorClass = defaultModelEditorClass ; + Constructor c = partialModelEditorClass.getConstructor(SourceViewer.class, + ISyntheticResourceProvider.class, + boolean.class, + EObject.class, + IXtextEMFReconciler.class + ) ; + this.semanticElement = semanticElement ; + this.modelReconciler = modelReconciler ; + result = (PartialModelEditor)c.newInstance(viewer, resourceProvider, false, semanticElement, modelReconciler) ; + result.setModel(getDocument(), prefix, editablePart, suffix); + } + catch (Exception e) { + e.printStackTrace() ; + } + // result.setModel(getDocument(), prefix, editablePart, suffix); + return result; + } + + /** + * @param modelEditorClass + * + */ + public static void bindPartialModelEditorClass(Class modelEditorClass) { + partialModelEditorClass = modelEditorClass ; + } + + /** + * @return PartialModelEditor + * + */ + public PartialModelEditor createPartialEditor() { + return createPartialEditor("", "", "", null, null); + } +} \ No newline at end of file diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SourceViewerHandleFactory.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SourceViewerHandleFactory.java new file mode 100644 index 00000000000..c4b05c671f5 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SourceViewerHandleFactory.java @@ -0,0 +1,130 @@ +/******************************************************************************* + * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; + +import java.util.Iterator; +import java.util.List; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.jface.text.source.IOverviewRuler; +import org.eclipse.jface.text.source.ISharedTextColors; +import org.eclipse.jface.text.source.IVerticalRuler; +import org.eclipse.jface.text.source.OverviewRuler; +import org.eclipse.jface.text.source.VerticalRuler; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.DisposeEvent; +import org.eclipse.swt.events.DisposeListener; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.editors.text.EditorsUI; +import org.eclipse.ui.texteditor.AnnotationPreference; +import org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess; +import org.eclipse.ui.texteditor.MarkerAnnotationPreferences; +import org.eclipse.ui.texteditor.SourceViewerDecorationSupport; +import org.eclipse.xtext.ui.editor.XtextSourceViewer; +import org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration; +import org.eclipse.xtext.ui.editor.model.XtextDocument; +import org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreAccess; +import org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider; +import org.eclipse.xtext.ui.editor.validation.AnnotationIssueProcessor; +import org.eclipse.xtext.ui.editor.validation.IValidationIssueProcessor; +import org.eclipse.xtext.ui.editor.validation.ValidationJob; +import org.eclipse.xtext.validation.CheckMode; +import org.eclipse.xtext.validation.IResourceValidator; +import org.eclipse.xtext.validation.Issue; + +import com.google.common.collect.Iterators; +import com.google.inject.Inject; +import com.google.inject.Injector; +import com.google.inject.Provider; + +/** + * @author Sebastian Zarnekow - Initial contribution and API + */ +public class SourceViewerHandleFactory { + + @Inject + private XtextSourceViewer.Factory sourceViewerFactory; + + @Inject + private Provider sourceViewerConfigurationProvider; + + @Inject + private Provider documentProvider; + + @Inject + private IResourceValidator resourceValidator; + + @Inject + private IPreferenceStoreAccess preferenceStoreAccess; + + private Injector xtextInjector ; + + protected static final int VERTICAL_RULER_WIDTH= 12; + + /** + * @param parent + * @param resourceProvider + * @return SourceViewerHandle + * + */ + public SourceViewerHandle create(Composite parent, ISyntheticResourceProvider resourceProvider) { + final IVerticalRuler ruler = new VerticalRuler(VERTICAL_RULER_WIDTH, new DefaultMarkerAnnotationAccess()); + final IOverviewRuler oRuler = new OverviewRuler(new DefaultMarkerAnnotationAccess(), VERTICAL_RULER_WIDTH, getSharedColors()); + //final XtextSourceViewer viewer = sourceViewerFactory.createSourceViewer(parent, ruler, oRuler, true, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL); + final XtextSourceViewer viewer = new CustomXtextSourceViewer(parent, ruler, oRuler, false, SWT.V_SCROLL | SWT.H_SCROLL); + /* + * final IVerticalRuler ruler = new VerticalRuler(VERTICAL_RULER_WIDTH, null) ; + final XtextSourceViewer viewer = new CustomXtextSourceViewer(parent, ruler, null, true, SWT.None); + */ + + + XtextSourceViewerConfiguration viewerConfiguration = sourceViewerConfigurationProvider.get(); + viewer.configure(viewerConfiguration); + + final SourceViewerDecorationSupport viewerDecorationSupport = new SourceViewerDecorationSupport(viewer, null, new DefaultMarkerAnnotationAccess(), getSharedColors()); + MarkerAnnotationPreferences annotationPreferences = new MarkerAnnotationPreferences(); + Iterator e= Iterators.filter(annotationPreferences.getAnnotationPreferences().iterator(), AnnotationPreference.class); + while (e.hasNext()) + viewerDecorationSupport.setAnnotationPreference(e.next()); + viewerDecorationSupport.install(preferenceStoreAccess.getPreferenceStore()); + parent.addDisposeListener(new DisposeListener() { + public void widgetDisposed(DisposeEvent e) { + viewerDecorationSupport.dispose(); + } + }); + final XtextDocument document = documentProvider.get(); + final SourceViewerHandle result = new SourceViewerHandle(document, viewer, viewerConfiguration, resourceProvider, xtextInjector); + ValidationJob job = new ValidationJob(resourceValidator, document, + new IValidationIssueProcessor() { + private AnnotationIssueProcessor annotationIssueProcessor; + + public void processIssues(List issues, IProgressMonitor monitor) { + if(viewer.getTextWidget() == null) { + // the text widget is disposed => don't try displaying errors in this widget + return; + } + IValidationIssueProcessor issueProcessor = result.getIssueProcessor(); + if (issueProcessor != null) + issueProcessor.processIssues(issues, monitor); + if (annotationIssueProcessor == null) { + annotationIssueProcessor = new AnnotationIssueProcessor(document, + viewer.getAnnotationModel(), + new IssueResolutionProvider.NullImpl()); + } + if (annotationIssueProcessor != null) + annotationIssueProcessor.processIssues(issues, monitor); + } + }, CheckMode.FAST_ONLY); + document.setValidationJob(job); + return result; + } + + protected ISharedTextColors getSharedColors() { + return EditorsUI.getSharedTextColors(); + } +} diff --git a/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SyntheticResourceProvider.java b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SyntheticResourceProvider.java new file mode 100644 index 00000000000..616ce3a3dc0 --- /dev/null +++ b/deprecated/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SyntheticResourceProvider.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. + * 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 + *******************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part.PopupXtextEditorHelper; +import org.eclipse.xtext.IGrammarAccess; +import org.eclipse.xtext.resource.XtextResource; +import org.eclipse.xtext.resource.XtextResourceSet; + +import com.google.inject.Inject; +import com.google.inject.Provider; + +/** + * @author Sebastian Zarnekow - Initial contribution and API + */ +public class SyntheticResourceProvider implements ISyntheticResourceProvider { + + /** + * + */ + public static final String SYNTHETIC_SCHEME = "synthetic"; + + //@Inject + //private IResourceSetProvider resourceSetProvider; + @Inject + private Provider resourceSetProvider; + + @Inject + private IGrammarAccess grammarAccess; + + + + public XtextResource createResource() { + ResourceSet resourceSet = resourceSetProvider.get(); +// EObject context = PopupXtextEditorHelper.context ; +// ResourceSet resourceSet = context.eResource().getResourceSet() ; + Resource grammarResource = resourceSet.createResource( + URI.createURI(SYNTHETIC_SCHEME + ":/" + grammarAccess.getGrammar().getName() + ".xtext")); + grammarResource.getContents().add(EcoreUtil.copy(grammarAccess.getGrammar())); + XtextResource result = (XtextResource) resourceSet.createResource( + URI.createURI(SYNTHETIC_SCHEME + ":/" + grammarAccess.getGrammar().getName() + "." + PopupXtextEditorHelper.fileExtension)); + resourceSet.getResources().add(result); + return result ; + + } + +} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.classpath b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.classpath deleted file mode 100644 index 64c5e31b7a2..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.project b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.project deleted file mode 100644 index a0496ee9a76..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.papyrus.infra.gmfdiag.xtext.glue - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.core.resources.prefs b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 52164b21347..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Tue Aug 18 18:37:57 CEST 2009 -eclipse.preferences.version=1 -encoding/=ISO-8859-1 diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 74df85c62f7..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,369 +0,0 @@ -#Tue Jun 29 13:20:15 CEST 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.builder.cleanOutputFolder=clean -org.eclipse.jdt.core.builder.duplicateResourceTask=warning -org.eclipse.jdt.core.builder.invalidClasspath=abort -org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore -org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch -org.eclipse.jdt.core.circularClasspath=error -org.eclipse.jdt.core.classpath.exclusionPatterns=enabled -org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled -org.eclipse.jdt.core.codeComplete.argumentPrefixes= -org.eclipse.jdt.core.codeComplete.argumentSuffixes= -org.eclipse.jdt.core.codeComplete.fieldPrefixes= -org.eclipse.jdt.core.codeComplete.fieldSuffixes= -org.eclipse.jdt.core.codeComplete.localPrefixes= -org.eclipse.jdt.core.codeComplete.localSuffixes= -org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= -org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= -org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= -org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.doc.comment.support=enabled -org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore -org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning -org.eclipse.jdt.core.compiler.problem.deadCode=warning -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=warning -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=error -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning -org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error -org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -org.eclipse.jdt.core.compiler.problem.nullReference=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning -org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.5 -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 -org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_after_package=1 -org.eclipse.jdt.core.formatter.blank_lines_before_field=0 -org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 -org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 -org.eclipse.jdt.core.formatter.blank_lines_before_method=1 -org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 -org.eclipse.jdt.core.formatter.blank_lines_before_package=0 -org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 -org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 -org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false -org.eclipse.jdt.core.formatter.comment.format_block_comments=false -org.eclipse.jdt.core.formatter.comment.format_header=false -org.eclipse.jdt.core.formatter.comment.format_html=true -org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.comment.format_line_comments=false -org.eclipse.jdt.core.formatter.comment.format_source_code=true -org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true -org.eclipse.jdt.core.formatter.comment.indent_root_tags=true -org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert -org.eclipse.jdt.core.formatter.comment.line_length=120 -org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=2 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 -org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true -org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_empty_lines=false -org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true -org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true -org.eclipse.jdt.core.formatter.indentation.size=4 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert -org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.join_lines_in_comments=true -org.eclipse.jdt.core.formatter.join_wrapped_lines=true -org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false -org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false -org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=120 -org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 -org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 -org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true -org.eclipse.jdt.core.formatter.tabulation.char=tab -org.eclipse.jdt.core.formatter.tabulation.size=4 -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true -org.eclipse.jdt.core.incompatibleJDKLevel=ignore -org.eclipse.jdt.core.incompleteClasspath=error diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.launching.prefs b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.launching.prefs deleted file mode 100644 index cd7271ff61d..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.launching.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Wed Aug 12 21:10:17 CEST 2009 -eclipse.preferences.version=1 -org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.ui.prefs b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index f6caf599885..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,118 +0,0 @@ -#Wed Oct 14 22:36:24 CEST 2009 -cleanup.add_default_serial_version_id=true -cleanup.add_generated_serial_version_id=false -cleanup.add_missing_annotations=true -cleanup.add_missing_deprecated_annotations=true -cleanup.add_missing_methods=false -cleanup.add_missing_nls_tags=false -cleanup.add_missing_override_annotations=true -cleanup.add_serial_version_id=true -cleanup.always_use_blocks=true -cleanup.always_use_parentheses_in_expressions=false -cleanup.always_use_this_for_non_static_field_access=false -cleanup.always_use_this_for_non_static_method_access=false -cleanup.convert_to_enhanced_for_loop=false -cleanup.correct_indentation=false -cleanup.format_source_code=false -cleanup.format_source_code_changes_only=false -cleanup.make_local_variable_final=true -cleanup.make_parameters_final=false -cleanup.make_private_fields_final=true -cleanup.make_type_abstract_if_missing_method=false -cleanup.make_variable_declarations_final=false -cleanup.never_use_blocks=false -cleanup.never_use_parentheses_in_expressions=true -cleanup.organize_imports=false -cleanup.qualify_static_field_accesses_with_declaring_class=false -cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true -cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true -cleanup.qualify_static_member_accesses_with_declaring_class=true -cleanup.qualify_static_method_accesses_with_declaring_class=false -cleanup.remove_private_constructors=true -cleanup.remove_trailing_whitespaces=true -cleanup.remove_trailing_whitespaces_all=true -cleanup.remove_trailing_whitespaces_ignore_empty=false -cleanup.remove_unnecessary_casts=true -cleanup.remove_unnecessary_nls_tags=true -cleanup.remove_unused_imports=false -cleanup.remove_unused_local_variables=false -cleanup.remove_unused_private_fields=true -cleanup.remove_unused_private_members=false -cleanup.remove_unused_private_methods=true -cleanup.remove_unused_private_types=true -cleanup.sort_members=false -cleanup.sort_members_all=false -cleanup.use_blocks=false -cleanup.use_blocks_only_for_return_and_throw=false -cleanup.use_parentheses_in_expressions=false -cleanup.use_this_for_non_static_field_access=false -cleanup.use_this_for_non_static_field_access_only_if_necessary=true -cleanup.use_this_for_non_static_method_access=false -cleanup.use_this_for_non_static_method_access_only_if_necessary=true -cleanup_profile=_Xtext -cleanup_settings_version=2 -eclipse.preferences.version=1 -editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true -formatter_profile=_'Xtext' -formatter_settings_version=11 -org.eclipse.jdt.ui.exception.name=e -org.eclipse.jdt.ui.gettersetter.use.is=true -org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=java;javax;org;com; -org.eclipse.jdt.ui.javadoc=true -org.eclipse.jdt.ui.keywordthis=false -org.eclipse.jdt.ui.ondemandthreshold=99 -org.eclipse.jdt.ui.overrideannotation=true -org.eclipse.jdt.ui.staticondemandthreshold=1 -org.eclipse.jdt.ui.text.custom_code_templates= -sp_cleanup.add_default_serial_version_id=true -sp_cleanup.add_generated_serial_version_id=false -sp_cleanup.add_missing_annotations=true -sp_cleanup.add_missing_deprecated_annotations=true -sp_cleanup.add_missing_methods=false -sp_cleanup.add_missing_nls_tags=false -sp_cleanup.add_missing_override_annotations=true -sp_cleanup.add_serial_version_id=false -sp_cleanup.always_use_blocks=true -sp_cleanup.always_use_parentheses_in_expressions=false -sp_cleanup.always_use_this_for_non_static_field_access=false -sp_cleanup.always_use_this_for_non_static_method_access=false -sp_cleanup.convert_to_enhanced_for_loop=false -sp_cleanup.correct_indentation=false -sp_cleanup.format_source_code=false -sp_cleanup.format_source_code_changes_only=false -sp_cleanup.make_local_variable_final=false -sp_cleanup.make_parameters_final=false -sp_cleanup.make_private_fields_final=true -sp_cleanup.make_type_abstract_if_missing_method=false -sp_cleanup.make_variable_declarations_final=false -sp_cleanup.never_use_blocks=false -sp_cleanup.never_use_parentheses_in_expressions=true -sp_cleanup.on_save_use_additional_actions=true -sp_cleanup.organize_imports=false -sp_cleanup.qualify_static_field_accesses_with_declaring_class=false -sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_with_declaring_class=false -sp_cleanup.qualify_static_method_accesses_with_declaring_class=false -sp_cleanup.remove_private_constructors=true -sp_cleanup.remove_trailing_whitespaces=false -sp_cleanup.remove_trailing_whitespaces_all=true -sp_cleanup.remove_trailing_whitespaces_ignore_empty=false -sp_cleanup.remove_unnecessary_casts=true -sp_cleanup.remove_unnecessary_nls_tags=false -sp_cleanup.remove_unused_imports=false -sp_cleanup.remove_unused_local_variables=false -sp_cleanup.remove_unused_private_fields=true -sp_cleanup.remove_unused_private_members=false -sp_cleanup.remove_unused_private_methods=true -sp_cleanup.remove_unused_private_types=true -sp_cleanup.sort_members=false -sp_cleanup.sort_members_all=false -sp_cleanup.use_blocks=false -sp_cleanup.use_blocks_only_for_return_and_throw=false -sp_cleanup.use_parentheses_in_expressions=false -sp_cleanup.use_this_for_non_static_field_access=false -sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true -sp_cleanup.use_this_for_non_static_method_access=false -sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.pde.prefs b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.pde.prefs deleted file mode 100644 index 2bd5814c381..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/.settings/org.eclipse.pde.prefs +++ /dev/null @@ -1,25 +0,0 @@ -#Wed Aug 12 21:14:13 CEST 2009 -compilers.f.unresolved-features=1 -compilers.f.unresolved-plugins=1 -compilers.incompatible-environment=1 -compilers.p.build=1 -compilers.p.deprecated=1 -compilers.p.discouraged-class=1 -compilers.p.internal=1 -compilers.p.missing-packages=2 -compilers.p.missing-version-export-package=2 -compilers.p.missing-version-import-package=2 -compilers.p.missing-version-require-bundle=2 -compilers.p.no-required-att=0 -compilers.p.not-externalized-att=2 -compilers.p.unknown-attribute=1 -compilers.p.unknown-class=1 -compilers.p.unknown-element=1 -compilers.p.unknown-identifier=1 -compilers.p.unknown-resource=1 -compilers.p.unresolved-ex-points=0 -compilers.p.unresolved-import=0 -compilers.s.create-docs=false -compilers.s.doc-folder=doc -compilers.s.open-tags=1 -eclipse.preferences.version=1 diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/META-INF/MANIFEST.MF deleted file mode 100644 index 321050a31b5..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/META-INF/MANIFEST.MF +++ /dev/null @@ -1,32 +0,0 @@ -Manifest-Version: 1.0 -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.emf.common;bundle-version="2.5.0", - org.eclipse.xtext;bundle-version="1.0.1", - org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.2.1", - org.eclipse.ui.ide;bundle-version="3.5.0", - org.eclipse.xtext.ui;bundle-version="0.8.0", - org.eclipse.core.expressions;bundle-version="3.4.100", - org.eclipse.xtext.ui.shared;bundle-version="1.0.1", - org.apache.log4j;bundle-version="1.2.15", - org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.0.0", - org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0", - org.eclipse.uml2.uml;bundle-version="4.1.0", - org.eclipse.papyrus.infra.core;bundle-version="1.0.0" -Export-Package: org.eclipse.papyrus.infra.gmfdiag.xtext.glue, - org.eclipse.papyrus.infra.gmfdiag.xtext.glue.concurrency, - org.eclipse.papyrus.infra.gmfdiag.xtext.glue.contentassist, - org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part, - org.eclipse.papyrus.infra.gmfdiag.xtext.glue.editingdomain, - org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing -Bundle-Vendor: Eclipse Modeling Project -Bundle-ActivationPolicy: lazy -Bundle-Version: 1.0.0.qualifier -Bundle-Name: XText GMF Glue (Incubation) -Bundle-ManifestVersion: 2 -Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.xtext.glue.Activat - or -Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.xtext.glue;sing - leton:=true -Bundle-RequiredExecutionEnvironment: J2SE-1.5 - diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/about.html b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/about.html deleted file mode 100644 index 82d49bf5f81..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/about.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - -About - - -

About This Content

- -

June 5, 2007

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") 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 http://www.eclipse.org.

- - - diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/build.properties b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/build.properties deleted file mode 100644 index e5a949cc43c..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/build.properties +++ /dev/null @@ -1,7 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - about.html -src.includes = about.html diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/plugin.xml deleted file mode 100644 index 30f1ff73ff3..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/plugin.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/Activator.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/Activator.java deleted file mode 100644 index b22de38760d..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/Activator.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - * - * @author koehnlein - */ -public class Activator extends AbstractUIPlugin { - - /** - * The plug-in ID - */ - public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.gmfdiag.xtext.glue"; - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - @Override - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - @Override - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - * @param t - */ - public static void logError(Throwable t) { - getDefault().getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, t.getMessage(), t)); - } -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/PopupEditorConfiguration.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/PopupEditorConfiguration.java deleted file mode 100644 index 3cff16ceb76..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/PopupEditorConfiguration.java +++ /dev/null @@ -1,151 +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: - * CEA LIST - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue; - -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.jface.dialogs.IInputValidator; -import org.eclipse.jface.text.source.SourceViewerConfiguration; -import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; -import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; -import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part.IXTextSemanticValidator; -import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part.IXtextEMFReconciler; -import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part.PopupXtextEditorHelper; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.widgets.Composite; - -import com.google.inject.Injector; - - -/** - * @author CEA LIST - Initial contribution and API - * This class is provided as a basis for contribution to the extension point directEditors of Papyrus, - * for the case of popup editors. - * Clients must simply override the method createPopupEditorHelper(Object editPart) - * - * This class is deprecated, use DefaultDirectEditorConfiguration instead - */ -@Deprecated -public abstract class PopupEditorConfiguration implements IPopupEditorConfiguration { - - private String language = ""; - - /** - * Default constructor - */ - public PopupEditorConfiguration() { - // Auto-generated constructor stub - } - - /** - * This abstract method must be implemented for the integration of each specific textual editor. - * Implementation usually consist in calling createPopupEditorHelper. - * The implementation must simply determine the values to be passed as parameters of this method call. - * - * @param editPart The edit part on which a direct edit has been performed. The type of this element - * is Object, in order to avoid direct dependencies with GMF (see the direct editors extension point of - * Papyrus). It is however expected that editPart is instanceof IGraphicalEditPart. - */ - public abstract IPopupEditorHelper createPopupEditorHelper(Object editPart) ; - - /** - * Basic implementation which simply consists in returning a new PopupXtextEditorHelper - * @param editPart The editPart on which a direct edit has been performed. - * @param xtextInjector The xtextInjector. - * @param xtextEditorContextUpdater The IXtextEditorContextUpdater, to update the currently select xtext editor - * @param modelReconciler The IXtextEMFReconciler, to update the context UML model with changes textually specified in the popup xtext editor - * @param textToEdit the initialization text, used as the initial textual content for the popup xtext editor - * @param fileExtension the extension for the temporary textual file (underlying the editor) - * @param semanticValidator the semantic validator used to semantically validate the model before saving - * @return IPopupEditorHelper - */ - public IPopupEditorHelper createPopupEditorHelper(IGraphicalEditPart editPart, - Injector xtextInjector, - IXtextEMFReconciler modelReconciler, - String textToEdit, - String fileExtension, - IXTextSemanticValidator semanticValidator) { - - return new PopupXtextEditorHelper(editPart, - xtextInjector, - modelReconciler, - textToEdit, - fileExtension, - semanticValidator); - } - - //// - - public int getStyle() { - // Auto-generated method stub - return 0; - } - - public Point getPreferedSize() { - // Auto-generated method stub - return null; - } - - public SourceViewerConfiguration getSourceViewerConfiguration() { - // Auto-generated method stub - return null; - } - - public String getTextToEdit(Object editedObject) { - // Auto-generated method stub - return null; - } - - public Object preEditAction(Object editedObject) { - // Auto-generated method stub - return null; - } - - public Object postEditAction(Object editedObject, String newText) { - // Auto-generated method stub - return null; - } - - public Composite createExtendedDialogArea(Composite parent) { - // Auto-generated method stub - return null; - } - - public String getLanguage() { - return language; - } - - public void setLanguage(String language) { - this.language = "" + language ; - } - - - public IInputValidator getInputValidator() { - // Auto-generated method stub - return null; - } - - public void setInputValidator(IInputValidator validator) { - // Auto-generated method stub - - } - - public Selection getTextSelection(String value, Object editedObject) { - // Auto-generated method stub - return null; - } - - - -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/ConcurrentModificationObserver.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/ConcurrentModificationObserver.java deleted file mode 100644 index a4a7936d051..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/ConcurrentModificationObserver.java +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.concurrency; - -import org.eclipse.emf.transaction.TransactionalEditingDomain; -import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IEditorReference; -import org.eclipse.ui.IPartListener; -import org.eclipse.ui.IStartup; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.PlatformUI; - -/** - * Detects concurrent modifications of GMF and Xtext editors based on Xtext's dirty state management. - * - * @author koehnlein - */ -public class ConcurrentModificationObserver implements IPartListener { - - private EditingDomainAdapter.Factory factory; - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - * @param activePage - */ - public ConcurrentModificationObserver(IWorkbenchPage activePage) { - factory = new EditingDomainAdapter.Factory(); - for (IEditorReference editorRef : activePage.getEditorReferences()) { - IEditorPart editor = editorRef.getEditor(false); - if (editor != null) { - partOpened(editor); - } - } - } - - public void partOpened(IWorkbenchPart part) { - if (part instanceof DiagramEditor) { - TransactionalEditingDomain editingDomain = ((DiagramEditor) part).getEditingDomain(); - factory.adapt(editingDomain, EditingDomainAdapter.class); - } - } - - public void partClosed(IWorkbenchPart part) { - if (part instanceof DiagramEditor) { - // as long as bug 299920 is not fixed, we have to dispose the adapter manually - TransactionalEditingDomain editingDomain = ((DiagramEditor) part).getEditingDomain(); - if (editingDomain != null) { - EditingDomainAdapter adapter = (EditingDomainAdapter) factory.adapt(editingDomain, - EditingDomainAdapter.class); - if (adapter != null) { - adapter.dispose(); - } - } - } - } - - public void partActivated(IWorkbenchPart part) { - // do nothing - } - - public void partDeactivated(IWorkbenchPart part) { - // do nothing - } - - public void partBroughtToTop(IWorkbenchPart part) { - // do nothing - } - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - */ - public static class Initializer implements IStartup { - public void earlyStartup() { - Display.getDefault().asyncExec(new Runnable() { - public void run() { - IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); - activePage.addPartListener(new ConcurrentModificationObserver(activePage)); - } - }); - } - } - -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/EditingDomainAdapter.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/EditingDomainAdapter.java deleted file mode 100644 index cb51de74209..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/EditingDomainAdapter.java +++ /dev/null @@ -1,256 +0,0 @@ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.concurrency; - -import java.util.List; -import java.util.Map; - -import org.apache.log4j.Logger; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.emf.common.command.Command; -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; -import org.eclipse.emf.common.notify.impl.AdapterImpl; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.transaction.NotificationFilter; -import org.eclipse.emf.transaction.ResourceSetChangeEvent; -import org.eclipse.emf.transaction.ResourceSetListener; -import org.eclipse.emf.transaction.RollbackException; -import org.eclipse.emf.transaction.TransactionalEditingDomain; -import org.eclipse.emf.transaction.TransactionalEditingDomain.Lifecycle; -import org.eclipse.emf.transaction.TransactionalEditingDomainEvent; -import org.eclipse.emf.transaction.TransactionalEditingDomainListener; -import org.eclipse.emf.transaction.util.TransactionUtil; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.Activator; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.xtext.resource.IResourceServiceProvider; -import org.eclipse.xtext.resource.XtextResource; -import org.eclipse.xtext.ui.editor.IDirtyResource; -import org.eclipse.xtext.ui.editor.IDirtyStateManager; -import org.eclipse.xtext.ui.shared.Access; - -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; - -/** - * This element comes from the XText/GMF integration example, and was not originally documented. - */ -public class EditingDomainAdapter extends AdapterImpl implements ResourceSetListener, - TransactionalEditingDomainListener { - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - */ - public static class Factory extends AdapterFactoryImpl { - @Override - public boolean isFactoryForType(Object type) { - return super.isFactoryForType(type == EditingDomainAdapter.class); - } - - @Override - protected Object resolve(Object object, Object type) { - if (object instanceof TransactionalEditingDomain) { - return adapt(((TransactionalEditingDomain) object).getResourceSet(), type); - } - return super.resolve(object, type); - } - - @Override - protected Adapter createAdapter(Notifier target) { - if (target instanceof ResourceSet) { - return new EditingDomainAdapter(TransactionUtil.getEditingDomain(target)); - } else { - return null; - } - } - } - - private final TransactionalEditingDomain editingDomain; - - private IDirtyStateManager dirtyStateManager; - - private Map uri2dirtyResource; - - private static final Logger LOG = Logger.getLogger(EditingDomainAdapter.class); - - protected EditingDomainAdapter(TransactionalEditingDomain editingDomain) { - this.editingDomain = editingDomain; - editingDomain.addResourceSetListener(this); - dirtyStateManager = Access.getIDirtyStateManager().get(); - uri2dirtyResource = Maps.newHashMap(); - Lifecycle lifecycle = TransactionUtil.getAdapter(editingDomain, Lifecycle.class); - lifecycle.addTransactionalEditingDomainListener(this); - } - - public NotificationFilter getFilter() { - return null; - } - - public boolean isAggregatePrecommitListener() { - return true; - } - - public boolean isPostcommitOnly() { - return false; - } - - public boolean isPrecommitOnly() { - return false; - } - - public void resourceSetChanged(ResourceSetChangeEvent event) { - List remainingURIs = Lists.newArrayList(uri2dirtyResource.keySet()); - for (Resource resource : editingDomain.getResourceSet().getResources()) { - if (resource instanceof XtextResource) { - XtextResource xtextResource = (XtextResource) resource; - remainingURIs.remove(xtextResource.getURI()); - IDirtyResource dirtyResource = uri2dirtyResource.get(xtextResource.getURI()); - if (xtextResource.isModified()) { - if (dirtyResource == null) { - createAndRegisterDirtyState(xtextResource); - } - } else { - if (dirtyResource != null) { - uri2dirtyResource.remove(xtextResource.getURI()); - dirtyStateManager.discardDirtyState(dirtyResource); - } - } - } - } - // removed resources - for (URI remainingURI : remainingURIs) { - IDirtyResource dirtyResource = uri2dirtyResource.get(remainingURI); - dirtyStateManager.discardDirtyState(dirtyResource); - uri2dirtyResource.remove(remainingURI); - } - } - - public Command transactionAboutToCommit(ResourceSetChangeEvent event) throws RollbackException { - List resourcesWithConflicts = null; - for (Resource resource : editingDomain.getResourceSet().getResources()) { - if (resource instanceof XtextResource && resource.isModified()) { - XtextResource xtextResource = (XtextResource) resource; - IDirtyResource dirtyResource = uri2dirtyResource.get(xtextResource.getURI()); - if (dirtyResource == null) { - if (!createAndRegisterDirtyState(xtextResource)) { - if (resourcesWithConflicts == null) { - resourcesWithConflicts = Lists.newArrayList(); - } - resourcesWithConflicts.add(xtextResource); - } - } - } - } - if (resourcesWithConflicts != null) { - if (queryApplyChanges()) { - for (XtextResource resourceWithConflicts : resourcesWithConflicts) { - try { - IDirtyResource dirtyResource = createDirtyResource(resourceWithConflicts); - // assert resource is serializable - dirtyResource.getContents(); - dirtyStateManager.announceDirtyStateChanged(dirtyResource); - } catch (Exception exc) { - LOG.error("Error serializing resource", exc); - } - } - } else { - throw new RollbackException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, - "Transaction aborted by user")); - } - } - return null; - } - - protected boolean createAndRegisterDirtyState(XtextResource xtextResource) { - IDirtyResource dirtyResource = createDirtyResource(xtextResource); - if (dirtyResource == null) { - return true; - } else { - boolean isSuccess = dirtyStateManager.manageDirtyState(dirtyResource); - if (isSuccess) { - uri2dirtyResource.put(xtextResource.getURI(), dirtyResource); - } - return isSuccess; - } - } - - protected IDirtyResource createDirtyResource(XtextResource xtextResource) { - IResourceServiceProvider resourceServiceProvider = IResourceServiceProvider.Registry.INSTANCE - .getResourceServiceProvider(xtextResource.getURI()); - if (resourceServiceProvider == null) { - return null; - } - return new SimpleDirtyResource(xtextResource, resourceServiceProvider); - } - - public void editingDomainDisposing(TransactionalEditingDomainEvent event) { - dispose(); - } - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - */ - public void dispose() { - if (uri2dirtyResource != null) { - for (IDirtyResource dirtyResource : uri2dirtyResource.values()) { - dirtyStateManager.discardDirtyState(dirtyResource); - } - uri2dirtyResource = null; - } - Lifecycle lifecycle = TransactionUtil.getAdapter(editingDomain, Lifecycle.class); - if (lifecycle != null) { - lifecycle.removeTransactionalEditingDomainListener(this); - } - editingDomain.removeResourceSetListener(this); - } - - protected boolean queryApplyChanges() { - DialogPrompter dialogPrompter = new DialogPrompter(); - Display.getDefault().syncExec(dialogPrompter); - boolean yesResult = dialogPrompter.isYesResult(); - return yesResult; - } - - protected class DialogPrompter implements Runnable { - - private boolean isYesResult; - - public boolean isYesResult() { - return isYesResult; - } - - public void run() { - Shell shell = Display.getDefault().getActiveShell(); - isYesResult = MessageDialog.open(MessageDialog.QUESTION, shell, "Concurrent Modification", - "Other editors have a modified version of models you are going to change.\n" - + "If apply your changes you are loosing the possibility to save the others.\n" - + "Apply changes anyway?", SWT.NONE); - } - } - - public void transactionClosed(TransactionalEditingDomainEvent event) { - // do nothing - } - - public void transactionClosing(TransactionalEditingDomainEvent event) { - // do nothing - } - - public void transactionInterrupted(TransactionalEditingDomainEvent event) { - // do nothing - } - - public void transactionStarted(TransactionalEditingDomainEvent event) { - // do nothing - } - - public void transactionStarting(TransactionalEditingDomainEvent event) { - // do nothing - } - -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/SimpleDirtyResource.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/SimpleDirtyResource.java deleted file mode 100644 index 1108a6dbf91..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/concurrency/SimpleDirtyResource.java +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.concurrency; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.xtext.resource.IResourceDescription; -import org.eclipse.xtext.resource.IResourceDescription.Manager; -import org.eclipse.xtext.resource.IResourceServiceProvider; -import org.eclipse.xtext.resource.XtextResource; -import org.eclipse.xtext.ui.editor.IDirtyResource; - -/** - * An implementation of {@link IDirtyResource} for resources without an underlying document. - * - * @author koehnlein - Initial contribution and API - */ -public class SimpleDirtyResource implements IDirtyResource { - - private XtextResource resource; - - private Manager resourceDescriptionManager; - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - * @param resource - * @param resourceServiceProvider - */ - public SimpleDirtyResource(XtextResource resource, IResourceServiceProvider resourceServiceProvider) { - this.resource = resource; - this.resourceDescriptionManager = resourceServiceProvider.getResourceDescriptionManager(); - } - - public String getContents() { - return resource.getSerializer().serialize(resource.getContents().get(0)); - } - - public String getActualContents() { - return getContents(); - } - - public IResourceDescription getDescription() { - return resourceDescriptionManager.getResourceDescription(resource); - } - - public URI getURI() { - return resource.getURI(); - } - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - * @return Resource - */ - public Resource getResource() { - return resource; - } - - - -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/contentassist/CompletionProposalUtils.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/contentassist/CompletionProposalUtils.java deleted file mode 100644 index 0e46b3393f8..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/contentassist/CompletionProposalUtils.java +++ /dev/null @@ -1,152 +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: - * CEA LIST - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.contentassist; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.jface.viewers.ILabelProvider; -import org.eclipse.papyrus.infra.core.utils.DisplayUtils; -import org.eclipse.uml2.uml.Element; -import org.eclipse.uml2.uml.NamedElement; -import org.eclipse.uml2.uml.Namespace; -import org.eclipse.uml2.uml.Package; -import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext; - -/** - * @author CEA LIST - Initial contribution and API - */ -public class CompletionProposalUtils { - - protected final static ILabelProvider labelProvider = DisplayUtils.getLabelProvider() ; - - /** - * Public Utility method for creating a completion proposal - * - * @param namedElement The named element for which completion proposal must be created - * @param completionString The actual completion string - * @param displayString The way the completion is displayed in the completion list - * @param context Some information related to the context of the completion - * @return completion proposal - */ - public static CustomCompletionProposal createCompletionProposal(NamedElement namedElement, - String completionString, - String displayString, - ContentAssistContext context) { - String additionalProposalInfo = "" + namedElement.getQualifiedName() + "\n" + '(' + namedElement.eClass().getName() + ')' ; - - CustomCompletionProposal completionProposal = new CustomCompletionProposal(completionString, // String to be inserted - context.getOffset(), // Offset - context.getSelectedText().length(), // Replacement length - completionString.length(), // cursorPosition - labelProvider.getImage(namedElement) , // image - " " + displayString, // displayString - null , // contextInformation - additionalProposalInfo, // additionalProposalInfo - context); - return completionProposal ; - } - - /** - * Public Utility method for creating a completion proposal with replacement of prefix - * - * @param namedElement The named element for which completion proposal must be created - * @param completionString The actual completion string - * @param displayString The way the completion is displayed in the completion list - * @param context Some information related to the context of the completion - * @return completion proposal - */ - public static CustomCompletionProposal createCompletionProposalWithReplacementOfPrefix(NamedElement namedElement, - String completionString, - String displayString, - ContentAssistContext context) { - String additionalProposalInfo = "" + namedElement.getQualifiedName() + "\n" + '(' + namedElement.eClass().getName() + ')' ; - - CustomCompletionProposal completionProposal = new CustomCompletionProposal(completionString, // String to be inserted - context.getOffset() - context.getPrefix().length(), // Offset - context.getPrefix().length(), // Replacement length - completionString.length(), // cursorPosition - labelProvider.getImage(namedElement) , // image - " " + displayString, // displayString - null , // contextInformation - additionalProposalInfo, // additionalProposalInfo - context); - return completionProposal ; - } - - /** - * Public Utility method for creating a completion proposal - * - * @param completionString The actual completion string - * @param displayString The way the completion is displayed in the completion list - * @param context Some information related to the context of the completion - * @return completion proposal - */ - public static CustomCompletionProposal createCompletionProposal(String completionString, - String displayString, - ContentAssistContext context) { - - CustomCompletionProposal completionProposal = new CustomCompletionProposal(completionString, // String to be inserted - context.getOffset(), // Offset - context.getSelectedText().length(), // Replacement length - completionString.length(), // cursorPosition - null , // image - " " + displayString, // displayString - null , // contextInformation - null, // additionalProposalInfo - context); - return completionProposal ; - } - - /** - * Public utility method that computes a qualified name, taking into account packages imported by the namespace model - * - * @param namedElement - * @param model - * @return the qualified name label - */ - public static String getQualifiedNameLabelWithSufficientDepth(NamedElement namedElement, Namespace model) { - String label = "" ; - - List importedPackages = new ArrayList(model.getImportedPackages()) ; - - List visitedNamespaces = new ArrayList() ; - Namespace currentNamespace = namedElement.getNamespace() ; - - boolean rootFound = false ; - boolean modelIsTheRoot = false ; - - while (currentNamespace != null && !rootFound) { - visitedNamespaces.add(currentNamespace) ; - if (importedPackages.contains(currentNamespace) || currentNamespace == model) { - rootFound = true ; - if (currentNamespace == model) - modelIsTheRoot = true ; - } - Element owner = currentNamespace.getOwner() ; - while (owner != null && !(owner instanceof Namespace)) - owner = owner.getOwner() ; - - currentNamespace = owner != null ? (Namespace)owner : null ; - } - - for (int i = visitedNamespaces.size() - 1 - (modelIsTheRoot ? 1 : 0) ; i >= 0 ; i--) { - label += visitedNamespaces.get(i).getName() + "::" ; - } - - return label + namedElement.getName() ; - } - -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/contentassist/CustomCompletionProposal.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/contentassist/CustomCompletionProposal.java deleted file mode 100644 index 31f79f3e1a5..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/contentassist/CustomCompletionProposal.java +++ /dev/null @@ -1,132 +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: - * CEA LIST - Initial API and implementation - * - *****************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.contentassist; - -import org.eclipse.jface.text.BadLocationException; -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.contentassist.CompletionProposal; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.jface.text.contentassist.ICompletionProposalExtension; -import org.eclipse.jface.text.contentassist.IContextInformation; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext; - -/** - * @author CEA LIST - Initial contribution and API - */ -public class CustomCompletionProposal implements ICompletionProposal, ICompletionProposalExtension { - - private CompletionProposal completionProposal ; - private int fReplacementOffset ; - private ContentAssistContext fContentAssistContext ; - private String fReplacementString ; - - /** - * @param replacementString - * @param replacementOffset - * @param replacementLength - * @param cursorPosition - * @param image - * @param displayString - * @param contextInformation - * @param additionalProposalInfo - * @param contentAssistContext - * - */ - public CustomCompletionProposal (String replacementString, - int replacementOffset, - int replacementLength, - int cursorPosition, - Image image, - String displayString, - IContextInformation contextInformation, - String additionalProposalInfo, - ContentAssistContext contentAssistContext) { - completionProposal = new CompletionProposal(replacementString, - replacementOffset, - replacementLength, - cursorPosition, - image, - displayString, - contextInformation, - additionalProposalInfo) ; - fReplacementOffset = replacementOffset ; - fReplacementString = replacementString ; - fContentAssistContext = contentAssistContext ; - } - - public void apply(IDocument document, char trigger, int offset) { - try { - int length = 0 ; - if (offset != fReplacementOffset) - length = offset - fReplacementOffset ; - else - length = fContentAssistContext.getSelectedText().length() ; - document.replace(fReplacementOffset , - length, - fReplacementString) ; - } - catch (BadLocationException e) { - // ignore - } - } - - public boolean isValidFor(IDocument document, int offset) { - try { - int length = offset - fReplacementOffset ; - return completionProposal.getDisplayString().toLowerCase().contains(document.get(fReplacementOffset, length).toLowerCase()) ; - } - catch (BadLocationException e) { - // ignore - } - return false; - } - - public char[] getTriggerCharacters() { - // TODO Auto-generated method stub - return null; - } - - public int getContextInformationPosition() { - // TODO Auto-generated method stub - return 0; - } - - public void apply(IDocument document) { - // TODO Auto-generated method stub - - } - - public Point getSelection(IDocument document) { - return completionProposal.getSelection(document); - } - - public String getAdditionalProposalInfo() { - return completionProposal.getAdditionalProposalInfo(); - } - - public String getDisplayString() { - return completionProposal.getDisplayString(); - } - - public Image getImage() { - return completionProposal.getImage(); - } - - public IContextInformation getContextInformation() { - return completionProposal.getContextInformation(); - } - -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/AntlrParserWrapper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/AntlrParserWrapper.java deleted file mode 100644 index 2b61fd571cd..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/AntlrParserWrapper.java +++ /dev/null @@ -1,123 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part; - -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.gmf.runtime.common.core.command.ICommand; -import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; -import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; -import org.eclipse.jface.text.contentassist.IContentAssistProcessor; -import org.eclipse.xtext.parser.IParseResult; -import org.eclipse.xtext.ui.editor.contentassist.XtextContentAssistProcessor; - -import com.google.inject.Inject; -import com.google.inject.Injector; -//import org.eclipse.xtext.parser.antlr.IAntlrParser; -//import org.eclipse.xtext.parsetree.CompositeNode; -//import org.eclipse.xtext.parsetree.NodeAdapter; -//import org.eclipse.xtext.parsetree.NodeUtil; -//import org.eclipse.xtext.parsetree.SyntaxError; - -/** - * Wraps a (partial) Xtext parser in a GMF {@link IParser}. - * - * @author koehnlein - */ -public class AntlrParserWrapper implements IParser { - - @Inject - private XtextContentAssistProcessor xtextContentAssistProcessor; - - @Inject - private org.eclipse.xtext.parser.IParser xtextParser; - - private final String parserRuleName; - - private final IParser originalParser; - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - * @param parserRuleName - * @param originalParser - * @param xtextInjector - */ - public AntlrParserWrapper(String parserRuleName, IParser originalParser, Injector xtextInjector) { - this.parserRuleName = parserRuleName; - this.originalParser = originalParser; - xtextInjector.injectMembers(this); - } - - public IContentAssistProcessor getCompletionProcessor(IAdaptable element) { - // TODO does not work. need to fake an XtextDocument - return xtextContentAssistProcessor; - } - - public String getEditString(IAdaptable element, int flags) { -// EObject semanticElement = (EObject) element.getAdapter(EObject.class); -// if (semanticElement != null) { -// NodeAdapter nodeAdapter = NodeUtil.getNodeAdapter(semanticElement); -// if (nodeAdapter != null) { -// return nodeAdapter.getParserNode().serialize().trim(); -// } -// } - return "invalid"; - } - - public ICommand getParseCommand(IAdaptable element, final String newString, int flags) { -// EObject semanticElement = (EObject) element.getAdapter(EObject.class); -// if (semanticElement != null) { -// IParseResult parseResult = xtextParser.parse(parserRuleName, new StringInputStream(newString)); -// if (isValidParseResult(parseResult, semanticElement)) { -// NodeAdapter nodeAdapter = NodeUtil.getNodeAdapter(semanticElement); -// if (nodeAdapter != null) { -// final ICompositeNode parserNode = nodeAdapter.getParserNode(); -// final XtextResource semanticResource = (XtextResource) semanticElement.eResource(); -// ICommand reparseCommand = UpdateXtextResourceTextCommand.createUpdateCommand(semanticResource, -// parserNode.getOffset(), parserNode.getLength(), newString); -// return reparseCommand; -// } -// } -// } -// return UnexecutableCommand.INSTANCE; - return null ; - } - - public String getPrintString(IAdaptable element, int flags) { - return originalParser.getPrintString(element, flags); - } - - public boolean isAffectingEvent(Object event, int flags) { - return false; - } - - public IParserEditStatus isValidEditString(IAdaptable element, String editString) { -// try { -// IParseResult parseResult = xtextParser.parse(parserRuleName, new StringInputStream(editString)); -// if (isValidParseResult(parseResult, (EObject) element.getAdapter(EObject.class))) { -// return new ParserEditStatus(IStatus.OK, Activator.PLUGIN_ID, IParserEditStatus.EDITABLE, "OK", null); -// } else { -// SyntaxError syntaxError = parseResult.getParseErrors().get(0); -// return new ParserEditStatus(IStatus.INFO, Activator.PLUGIN_ID, IParserEditStatus.UNEDITABLE, -// syntaxError.getMessage(), null); -// } -// } catch (Exception exc) { -// return new ParserEditStatus(IStatus.INFO, Activator.PLUGIN_ID, IParserEditStatus.UNEDITABLE, exc -// .getMessage(), exc); -// } - return null ; - } - - private boolean isValidParseResult(IParseResult parseResult, EObject semanticElement) { -// EObject rootASTElement = parseResult.getRootASTElement(); -// return parseResult.getParseErrors().isEmpty() && rootASTElement != null && semanticElement != null -// && semanticElement.eClass() == rootASTElement.eClass(); - return false ; - } - -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/DefaultXtextSemanticValidator.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/DefaultXtextSemanticValidator.java deleted file mode 100644 index 64f0219be9c..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/DefaultXtextSemanticValidator.java +++ /dev/null @@ -1,32 +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: - * CEA LIST - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part; - -/** - * Default implementation for IXtextSemanticValidator. - * - * @author CEA LIST - Initial contribution and API - */ -public class DefaultXtextSemanticValidator implements IXTextSemanticValidator { - - /** - * Default implementation. Always returns true. - * @return always returns true. - */ - public boolean validate() { - return true; - } - -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/IXTextSemanticValidator.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/IXTextSemanticValidator.java deleted file mode 100644 index 274ca08acec..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/IXTextSemanticValidator.java +++ /dev/null @@ -1,33 +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: - * CEA LIST - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part; - -/** - * Optional interface to be implemented by each client plug-in. The validation is taken into account before - * closing a textual editor, in order to determine if the model contains semantic errors. If it contains - * semantic errors, modifications are not saved in order to avoid corrupting the context UML model. - * - * @author CEA LIST - Initial contribution and API - */ -public interface IXTextSemanticValidator { - - - /** - * - * @return Implementations must return true if the xtext model is semantically valid - */ - public boolean validate() ; - -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/IXtextEMFReconciler.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/IXtextEMFReconciler.java deleted file mode 100644 index 137c58a0462..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/IXtextEMFReconciler.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: - * CEA LIST - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part; - -import org.eclipse.emf.ecore.EObject; - -/** - * This interface is used for the reconciliation of the context UML model with respect to the textual - * specification obtained via edition from a popup xtext editor, in the case where this edition implies - * changes in the original model. - * - * @author CEA LIST - Initial contribution and API - */ -public interface IXtextEMFReconciler { - - /** - * This method is called for performing the reconciliation, in the case where the popup xtext editor is - * closed with request for saving (i.e., by pressing ctrl + enter). - * @param modelObject The context UML model element - * @param xtextObject The xtext object resulting from the textual specification - */ - void reconcile (EObject modelObject, EObject xtextObject) ; - -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/PopupXtextEditorHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/PopupXtextEditorHelper.java deleted file mode 100644 index 475ec38eee0..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/PopupXtextEditorHelper.java +++ /dev/null @@ -1,477 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part; - - -import java.util.List; -import java.util.Map; - -import org.eclipse.core.commands.operations.IOperationHistory; -import org.eclipse.core.commands.operations.IUndoContext; -import org.eclipse.core.expressions.Expression; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; -import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain; -import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramEditDomain; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.commands.ActionHandler; -import org.eclipse.jface.text.ITextOperationTarget; -import org.eclipse.jface.text.contentassist.ContentAssistant; -import org.eclipse.jface.text.source.ISourceViewer; -import org.eclipse.jface.text.source.SourceViewer; -import org.eclipse.jface.text.templates.TemplateException; -import org.eclipse.jface.viewers.TextCellEditor; -import org.eclipse.papyrus.commands.CheckedOperationHistory; -import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; -import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.Activator; -import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing.CustomXtextSourceViewer; -import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing.ISyntheticResourceProvider; -import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing.OperationHistoryListener; -import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing.PartialModelEditor; -import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing.SourceViewerHandle; -import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing.SourceViewerHandleFactory; -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.StyledText; -import org.eclipse.swt.events.DisposeEvent; -import org.eclipse.swt.events.DisposeListener; -import org.eclipse.swt.events.FocusEvent; -import org.eclipse.swt.events.FocusListener; -import org.eclipse.swt.graphics.FontMetrics; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.text.undo.DocumentUndoManagerRegistry; -import org.eclipse.text.undo.IDocumentUndoManager; -import org.eclipse.ui.ActiveShellExpression; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IWorkbenchCommandConstants; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.console.actions.TextViewerAction; -import org.eclipse.ui.handlers.IHandlerActivation; -import org.eclipse.ui.handlers.IHandlerService; -import org.eclipse.ui.texteditor.ITextEditorActionConstants; -import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds; -import org.eclipse.ui.texteditor.IUpdate; -import org.eclipse.xtext.parser.IParseResult; -import org.eclipse.xtext.resource.XtextResource; -import org.eclipse.xtext.ui.editor.model.IXtextDocument; -import org.eclipse.xtext.util.concurrent.IUnitOfWork; - -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import com.google.inject.Injector; - -/** - * Base class to handle a small in-diagram XtextEditor. - * - * Override the generated performDirectEdit methods in the EditPart of the label to be directly edited, and - * call {@link #showEditor()} instead of opening the default {@link TextCellEditor}. - * - * @author koehnlein - * @author CEA LIST (A. Cuccuru, A. Radermacher): Modifications for the integration into Papyrus - * Changes: - * - Added "implements" relationship towards IPopupEditorHelper, - * related to the DirectEditor extension point of Papyrus - * - Signature of the constructor modified - * - Method showEditor modified, with the creation of a temporary file, underlying the popup xtext editor - * - Method closeEditor modified, with new statements for managing the reconciliation between the original - * UML model and the textual specification resulting from the edition in the popup xtext editor. The - * temporary text file created by showEditor is also deleted. - * - Method createXTextEditor modified. Now uses the Papyrus IEditorSite, and also adds a focus listener for - * managing the context eobject and current xtext editor. - * - Method setEditorRegin modified (needs some work...) - * - Method setEditorBounds modified (needs some work...) - * - Method activateServices and deactivateServices, for managing the key binding of the context diagram - * editor. - */ - -public class PopupXtextEditorHelper implements IPopupEditorHelper { - - private static IGraphicalEditPart hostEditPart; - private IEditorPart diagramEditor; - private int editorOffset; - private int initialEditorSize; - private int initialDocumentSize; - private Composite xtextEditorComposite; - private final Injector xtextInjector; - private XtextResource xtextResource; - private String semanticElementFragment; - private EObject semanticElement ; - private String textToEdit ; - /** prevent the reconciliation from being applied twice (See Bug 395439) */ - private boolean closing = false; - - /** - * get the host editpart - * @return the editpart - */ - public static IGraphicalEditPart getHostEditPart() { - return hostEditPart; - } - - /** - * The file extension used to dynamically select the appropriate xtext editor - */ - public static String fileExtension ; - private IXtextEMFReconciler modelReconciler; - private ISyntheticResourceProvider resourceProvider ; - private SourceViewerHandle sourceViewerHandle ; - - /** - * @return The source viewer handle for this PopupXtextEditorHelper - * - */ - public SourceViewerHandle getSourceViewerHandle() { - return sourceViewerHandle; - } - - private PartialModelEditor partialEditor ; - private Shell diagramShell ; - private OperationHistoryListener operationHistoryListener; - private IXTextSemanticValidator semanticValidator ; - /** - * The context EObject for this editor. It can be used for content assist, verification, etc. - */ - public static EObject context ; - - /** - * - */ - public static boolean ignoreFocusLost = false ; - - /** - * This element was originally undocumented in the XText/GMF integration example - * - * Modifications performed by CEA LIST - * - Signature changed: was public PopupXtextEditorHelper(IGraphicalEditPart editPart, Injector xtextInjector) - * @param editPart The editPart on which a direct edit has been performed. - * @param xtextInjector The xtextInjector. - * @param modelReconciler The IXtextEMFReconciler, to update the context UML model with changes textually specified in the popup xtext editor - * @param textToEdit the initialization text, used as the initial textual content for the popup xtext editor - * @param fileExtension the extension for the temporary textual file (underlying the editor) - * @param semanticValidator the semantic validator used to semantically validate the xtext model before saving - */ - public PopupXtextEditorHelper(IGraphicalEditPart editPart, - Injector xtextInjector, - IXtextEMFReconciler modelReconciler, - String textToEdit, - String fileExtension, - IXTextSemanticValidator semanticValidator) { - this.hostEditPart = editPart; - this.xtextInjector = xtextInjector ; - this.textToEdit = "" + textToEdit ; - this.modelReconciler = modelReconciler ; - PopupXtextEditorHelper.fileExtension = "" + fileExtension ; - this.semanticValidator = semanticValidator ; - ignoreFocusLost = false ; - } - - /** - * This element was originally not documented in the XText / GMF integration example. - * - */ - public void showEditor() { - try { - semanticElement = hostEditPart.resolveSemanticElement(); - if (semanticElement == null) { - return; - } - context = semanticElement ; - Resource semanticResource = semanticElement.eResource(); - - semanticElementFragment = semanticResource.getURIFragment(semanticElement); - if (semanticElementFragment == null || "".equals(semanticElementFragment)) { - return; - } - IDiagramEditDomain diagramEditDomain = hostEditPart.getDiagramEditDomain(); - - diagramEditor = ((DiagramEditDomain) diagramEditDomain).getEditorPart(); - - createXtextEditor(null) ; - - } catch (Exception e) { - Activator.logError(e); - } - } - - /** - * This element was originally not documented in the XText/GMF integration example. - * - * Changes performed by CEA LIST: - * - new statements for managing the reconciliation between the original UML model and - * the textual specification resulting from the edition in the popup xtext editor. - * @param isReconcile Determines whether a reconciliation must be performed or not - */ - public void closeEditor(boolean isReconcile) { - if (sourceViewerHandle != null) { - if (!closing) { - if (isReconcile && this.semanticValidator.validate()) { - try { - final IXtextDocument xtextDocument = sourceViewerHandle.getDocument(); - if (!isDocumentHasErrors(xtextDocument)) { - int documentGrowth = xtextDocument.getLength() - initialDocumentSize; - String newText = xtextDocument.get(editorOffset, initialEditorSize + documentGrowth); - xtextResource = partialEditor.createResource(newText); - if (xtextResource.getAllContents().hasNext()) - modelReconciler.reconcile(semanticElement, xtextResource.getAllContents().next()); - } - } catch (Exception exc) { - Activator.logError(exc); - } - } - } - try { - closing = true; - xtextEditorComposite.setVisible(false); - xtextEditorComposite.dispose(); - } finally { - closing = false; - } - } - SourceViewerHandle.bindPartialModelEditorClass(null) ; - } - - /** - * This element was originally not documented in the XText/GMF integration example - * - * Changes performed by CEA LIST: - * - adds a focus listener for managing the context eobject and current xtext editor. - * - * @param editorInput - */ - private void createXtextEditor(IEditorInput editorInput) throws Exception { - diagramShell = diagramEditor.getSite().getShell(); - xtextEditorComposite = new Shell(SWT.RESIZE) ; - xtextEditorComposite.setLayout(new FillLayout()); - - - resourceProvider = xtextInjector.getInstance(ISyntheticResourceProvider.class) ; - SourceViewerHandleFactory factory = xtextInjector.getInstance(SourceViewerHandleFactory.class) ; - sourceViewerHandle = factory.create(xtextEditorComposite, resourceProvider) ; - partialEditor = sourceViewerHandle.createPartialEditor("", textToEdit, "", semanticElement, modelReconciler) ; - registerKeyListener(); - setEditorBounds(); - - initializeActions(); - installUndoRedoSupport(sourceViewerHandle.getViewer()); - - sourceViewerHandle.getViewer().getTextWidget().addFocusListener(new FocusListener() { - - public void focusLost(FocusEvent e) { - checkedClose(); - } - - public void focusGained(FocusEvent e) { - context = semanticElement ; - } - }) ; - - xtextEditorComposite.setVisible(true); - sourceViewerHandle.getViewer().showAnnotationsOverview(true) ; - sourceViewerHandle.getViewer().getTextWidget().setFocus() ; - - // This last statement is used to trigger initial validation - sourceViewerHandle.getViewer().getTextWidget().append("") ; - } - - /** - * Perform additional checks before close - * (added by CEA LIST) - */ - private void checkedClose() { - context = semanticElement ; - if (! keyListener.isContentAssistActive()) { - // additional sanity check: on X11 systems, the focus is already lost during resize. - // An unwanted closing can be prevented by verifying if the activeShell still points - // to the xtextEditorComposite - if (xtextEditorComposite.getDisplay().getActiveShell() != xtextEditorComposite) { - if (!ignoreFocusLost) { - closeEditor(true) ; - } - else - closeEditor(false) ; - } - } - } - - - private PopupXtextEditorKeyListener keyListener ; - - private void registerKeyListener() { - //XtextSourceViewer sourceViewer = (XtextSourceViewer) xtextEditor.getInternalSourceViewer(); - final StyledText xtextTextWidget = sourceViewerHandle.getViewer().getTextWidget(); - CustomXtextSourceViewer viewer = (CustomXtextSourceViewer)sourceViewerHandle.getViewer() ; - keyListener = - new PopupXtextEditorKeyListener - (this, (ContentAssistant) viewer.getContentAssistant()); - //keyListener.installUndoRedoSupport(sourceViewerHandle.getViewer()) ; - xtextTextWidget.addVerifyKeyListener(keyListener); - xtextTextWidget.addKeyListener(keyListener); - } - - /** - * This element was originally not documented in the XText/GMF integration example - * - * Modifications from CEA LIST: - * - modifications to rules for computing the initial location and size of the popup editor. - * This still needs some work... - */ - private void setEditorBounds() { - - String editString = "" + textToEdit ; - int[] numLinesNumColums = StringUtil.getNumLinesNumColumns(editString) ; - int numLines = numLinesNumColums[0] ; - int numColumns = numLinesNumColums[1]; - // ninimal sizes - if (numLines < 5) { - numLines = 5; - } - if (numColumns < 60) { - numColumns = 60; - } - - IFigure figure = hostEditPart.getFigure() ; - Rectangle bounds = figure.getBounds().getCopy(); - figure.translateToAbsolute(bounds) ; - Point newCoord = diagramShell.getDisplay().map(hostEditPart.getViewer().getControl(), null, new Point(bounds.x, bounds.y)) ; - bounds.x = newCoord.x ; - bounds.y = newCoord.y ; - - // not used, delivers wrong results - // FontData fontData = figure.getFont().getFontData()[0]; - // int fontHeightInPixel = fontData.getHeight(); - - GC gc = new GC (xtextEditorComposite); - FontMetrics fm = gc.getFontMetrics (); - int width = numColumns * fm.getAverageCharWidth () + 40; - int height = numLines * fm.getHeight(); - gc.dispose (); - - // xtextEditorComposite contains a composite which in turn contains the text widget and an area for markers. - // Take difference between client area and size into account. Cannot set size of text widget directly, - // since suitable packing is not supported by the layout of the text widget's parent. - org.eclipse.swt.graphics.Rectangle clientArea = xtextEditorComposite.getClientArea(); - // only correct height, since width is estimated anyway. - height += xtextEditorComposite.getSize().y - clientArea.height; - xtextEditorComposite.setBounds(bounds.x, bounds.y, width, height); - } - - - - - private boolean isDocumentHasErrors(final IXtextDocument xtextDocument) { - return (xtextDocument.readOnly(new IUnitOfWork() { - public Boolean exec(XtextResource state) throws Exception { - IParseResult parseResult = state.getParseResult(); - return !state.getErrors().isEmpty() || parseResult == null || parseResult.hasSyntaxErrors(); - } - })); - } - - protected Status createErrorStatus(String message, TemplateException e) { - return new Status(IStatus.ERROR, - "org.eclipse.papyrus.property.editor.xtext",message, e); - - } - - - protected void installUndoRedoSupport(SourceViewer viewer) { - IDocumentUndoManager undoManager = DocumentUndoManagerRegistry.getDocumentUndoManager(viewer.getDocument()); - final IUndoContext context = undoManager.getUndoContext(); - IOperationHistory operationHistory = CheckedOperationHistory.getInstance(); - operationHistoryListener = new OperationHistoryListener(context, new IUpdate() { - public void update() { - updateAction(ITextEditorActionConstants.REDO); - updateAction(ITextEditorActionConstants.UNDO); - } - }); - operationHistory.addOperationHistoryListener(operationHistoryListener); - } - - private Map fGlobalActions= Maps.newHashMapWithExpectedSize(10); - private List fSelectionActions = Lists.newArrayListWithExpectedSize(3); - - protected void updateAction(String actionId) { - IAction action= fGlobalActions.get(actionId); - if (action instanceof IUpdate) - ((IUpdate) action).update(); - } - - protected void uninstallUndoRedoSupport() { - IOperationHistory operationHistory = PlatformUI.getWorkbench().getOperationSupport().getOperationHistory(); - operationHistory.removeOperationHistoryListener(operationHistoryListener); - operationHistoryListener = null; - } - - private void initializeActions() { - final List handlerActivations= Lists.newArrayListWithExpectedSize(3); - final IHandlerService handlerService= (IHandlerService) PlatformUI.getWorkbench().getAdapter(IHandlerService.class); - final Expression expression= new ActiveShellExpression(sourceViewerHandle.getViewer().getControl().getShell()); - - diagramShell.addDisposeListener(new DisposeListener() { - public void widgetDisposed(DisposeEvent e) { - handlerService.deactivateHandlers(handlerActivations); - } - }); - - TextViewerAction action= new TextViewerAction(sourceViewerHandle.getViewer(), ITextOperationTarget.UNDO); - action.setText("UNDO"); - fGlobalActions.put(ITextEditorActionConstants.UNDO, action); - - action= new TextViewerAction(sourceViewerHandle.getViewer(), ITextOperationTarget.REDO); - action.setText("REDO"); - fGlobalActions.put(ITextEditorActionConstants.REDO, action); - - action= new TextViewerAction(sourceViewerHandle.getViewer(), ITextOperationTarget.CUT); - action.setText("CUT"); - fGlobalActions.put(ITextEditorActionConstants.CUT, action); - - action= new TextViewerAction(sourceViewerHandle.getViewer(), ITextOperationTarget.COPY); - action.setText("COPY"); - fGlobalActions.put(ITextEditorActionConstants.COPY, action); - - action= new TextViewerAction(sourceViewerHandle.getViewer(), ITextOperationTarget.PASTE); - action.setText("PASTE"); - fGlobalActions.put(ITextEditorActionConstants.PASTE, action); - - action= new TextViewerAction(sourceViewerHandle.getViewer(), ITextOperationTarget.SELECT_ALL); - action.setText("SELECT_ALL"); - fGlobalActions.put(ITextEditorActionConstants.SELECT_ALL, action); - - action= new TextViewerAction(sourceViewerHandle.getViewer(), ISourceViewer.CONTENTASSIST_PROPOSALS); - action.setText("CONTENTASSIST_PROPOSALS"); - fGlobalActions.put(ITextEditorActionConstants.CONTENT_ASSIST, action); - - fSelectionActions.add(ITextEditorActionConstants.CUT); - fSelectionActions.add(ITextEditorActionConstants.COPY); - fSelectionActions.add(ITextEditorActionConstants.PASTE); - - sourceViewerHandle.getViewer().getTextWidget().addFocusListener(new FocusListener() { - public void focusLost(FocusEvent e) { - handlerService.deactivateHandlers(handlerActivations); - } - public void focusGained(FocusEvent e) { - IAction action= fGlobalActions.get(ITextEditorActionConstants.REDO); - handlerActivations.add(handlerService.activateHandler(IWorkbenchCommandConstants.EDIT_REDO, new ActionHandler(action), expression)); - action= fGlobalActions.get(ITextEditorActionConstants.UNDO); - handlerActivations.add(handlerService.activateHandler(IWorkbenchCommandConstants.EDIT_UNDO, new ActionHandler(action), expression)); - action= fGlobalActions.get(ITextEditorActionConstants.CONTENT_ASSIST); - handlerActivations.add(handlerService.activateHandler(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, new ActionHandler(action), expression)); - } - }); - - } -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/PopupXtextEditorKeyListener.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/PopupXtextEditorKeyListener.java deleted file mode 100644 index 0cc682bb923..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/PopupXtextEditorKeyListener.java +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part; - -import org.eclipse.jface.text.contentassist.ContentAssistEvent; -import org.eclipse.jface.text.contentassist.ContentAssistant; -import org.eclipse.jface.text.contentassist.ICompletionListener; -import org.eclipse.jface.text.contentassist.ICompletionProposal; -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.VerifyKeyListener; -import org.eclipse.swt.events.KeyAdapter; -import org.eclipse.swt.events.KeyEvent; -import org.eclipse.swt.events.VerifyEvent; - -/** - * @author koehnlein - */ -public class PopupXtextEditorKeyListener extends KeyAdapter implements VerifyKeyListener { - - private final PopupXtextEditorHelper popupXtextEditorHelper; - - private ContentAssistant contentAssistant; - - private boolean isIgnoreNextESC; - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - * @param popupXtextEditorHelper - * @param contentAssistant - */ - public PopupXtextEditorKeyListener(PopupXtextEditorHelper popupXtextEditorHelper, ContentAssistant contentAssistant) { - this.popupXtextEditorHelper = popupXtextEditorHelper; - this.contentAssistant = contentAssistant; - isIgnoreNextESC = false; - } - - @Override - public void keyPressed(KeyEvent e) { - int keyCode = e.keyCode; - if ((e.stateMask & SWT.CTRL) != 0 && ((keyCode == SWT.KEYPAD_CR) || (keyCode == SWT.CR))) { - this.popupXtextEditorHelper.closeEditor(true); - } - if (keyCode == SWT.ESC) { - if (isIgnoreNextESC) { - isIgnoreNextESC = false; - } else { - PopupXtextEditorHelper.ignoreFocusLost = true ; - this.popupXtextEditorHelper.closeEditor(false); - } - } - if ((e.stateMask & SWT.CTRL) != 0 && (keyCode == ' ')) { - this.contentAssistant.setRepeatedInvocationMode(true) ; - this.contentAssistant.showPossibleCompletions() ; - - this.isIgnoreNextESC = true ; - contentAssistant.addCompletionListener(new ICompletionListener() { - - public void selectionChanged(ICompletionProposal proposal, boolean smartToggle) { - } - - public void assistSessionStarted(ContentAssistEvent event) { - } - - public void assistSessionEnded(ContentAssistEvent event) { - try { - popupXtextEditorHelper.getSourceViewerHandle().getViewer().getTextWidget().setFocus() ; - } - catch (Exception e) { - //ignore - } - } - }) ; - } - } - - public void verifyKey(VerifyEvent e) { - if (e.keyCode == SWT.ESC && isContentAssistActive()) { - isIgnoreNextESC = true; - } - if ((e.stateMask & SWT.CTRL) != 0 && ((e.keyCode == SWT.KEYPAD_CR) || (e.keyCode == SWT.CR))) { - e.doit = false; - } - } - - /** - * @return true if the proposal popup has focus - * - */ - public boolean isContentAssistActive() { - return contentAssistant != null && contentAssistant.hasProposalPopupFocus(); - } - -} \ No newline at end of file diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/StringUtil.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/StringUtil.java deleted file mode 100644 index e15dc5553f6..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/edit/part/StringUtil.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part; - -/** - * @author koehnlein - */ -public class StringUtil { - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - * @param s - * @return int - */ - public static int[] getNumLinesNumColumns(String s) { - int numLines = 1; - int numColumns = 0; - int[] dimensions = new int[2] ; - dimensions[0] = numLines ; - dimensions[1] = 0 ; - for (char c : s.toCharArray()) { - if (c == '\n') { - ++numLines; - dimensions[1] = Math.max(dimensions[1], numColumns) ; - numColumns = 0 ; - } - else { - ++numColumns; - } - } - dimensions[0] = numLines ; - dimensions[1] = Math.max(dimensions[1], numColumns) ; - return dimensions; - } - -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/ChangeAggregatorAdapter.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/ChangeAggregatorAdapter.java deleted file mode 100644 index d3a9fdc516f..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/ChangeAggregatorAdapter.java +++ /dev/null @@ -1,163 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.editingdomain; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.LinkedHashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.util.EContentAdapter; -import org.eclipse.xtext.resource.XtextResource; - -import com.google.common.collect.Lists; - -/** - * @author Knut Wannheden - Initial contribution and API - * @author Jan Koehnlein - */ -public class ChangeAggregatorAdapter extends EContentAdapter { - - private Collection modifiedObjects = new LinkedHashSet(); - - private boolean isRecording = false; - - private boolean isSuspended = false; - - @Override - public void notifyChanged(Notification notification) { - super.notifyChanged(notification); - - if (!doRecord(notification)) - return; - - if (notification.getNotifier() instanceof EObject) { - recordObjectModification((EObject) notification.getNotifier()); - } - } - - protected void recordObjectModification(EObject obj) { - if (obj.eResource() == null || false == obj.eResource() instanceof XtextResource) - modifiedObjects.remove(obj); - else - modifiedObjects.add(obj); - } - - protected boolean doRecord(Notification notification) { - if (!isRecording || isSuspended || notification.isTouch()) - return false; - - switch (notification.getEventType()) { - case Notification.ADD: - case Notification.ADD_MANY: - case Notification.MOVE: - case Notification.REMOVE: - case Notification.REMOVE_MANY: - case Notification.SET: - case Notification.UNSET: - return true; - default: - return false; - } - } - - private void reset() { - modifiedObjects.clear(); - } - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - */ - public void beginRecording() { - reset(); - isRecording = true; - } - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - */ - public void endRecording() { - isRecording = false; - } - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - * @param isSuspended - */ - public void setSuspended(boolean isSuspended) { - this.isSuspended = isSuspended; - } - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - * @return List - */ - public List getModificationRoots() { - Map> resource2ChangePathMap = new HashMap>(); - for (EObject eObject : modifiedObjects) { - if (!eObject.eIsProxy()) { - Resource resource = eObject.eResource(); - List resourceChangePath = resource2ChangePathMap.get(resource); - if (resourceChangePath == null) { - resourceChangePath = allContainers(eObject); - resource2ChangePathMap.put(resource, resourceChangePath); - } else { - resourceChangePath.retainAll(allContainers(eObject)); - } - } - } - List modificationRoots = new ArrayList(resource2ChangePathMap.size()); - for (List changePath : resource2ChangePathMap.values()) { - if (!changePath.isEmpty()) { - modificationRoots.add(changePath.get(changePath.size() - 1)); - } - } - return modificationRoots; - } - - private LinkedList allContainers(EObject eObject) { - final LinkedList allContainers = Lists.newLinkedList(); - allContainers.add(eObject); - EObject currentContainer = eObject.eContainer(); - final Resource resource = eObject.eResource(); - while (currentContainer != null && resource == currentContainer.eResource()) { - allContainers.addFirst(currentContainer); - currentContainer = currentContainer.eContainer(); - } - return allContainers; - } - - /** - * Only attach to XtextResources - */ - @Override - protected void setTarget(Resource target) { - if (target instanceof XtextResource) { - super.setTarget(target); - } - } - - @Override - protected void setTarget(EObject target) { - if (target.eResource() instanceof XtextResource) { - super.setTarget(target); - } - } - - @Override - public boolean isAdapterForType(Object type) { - return type == ChangeAggregatorAdapter.class; - } - -} \ No newline at end of file diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/SemanticRootUnloadListener.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/SemanticRootUnloadListener.java deleted file mode 100644 index 6fb03239ea9..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/SemanticRootUnloadListener.java +++ /dev/null @@ -1,95 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.editingdomain; - -import org.eclipse.emf.common.command.Command; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.transaction.NotificationFilter; -import org.eclipse.emf.transaction.ResourceSetChangeEvent; -import org.eclipse.emf.transaction.ResourceSetListener; -import org.eclipse.emf.transaction.RollbackException; -import org.eclipse.gef.EditPart; -import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart; -import org.eclipse.xtext.resource.XtextResource; - -/** - * Reloads the semantic root element (the element of the diagram) on changes and refreshes the diagram. GMF does by - * default not listen to such events which can occur in an {@link XtextResource}, if the document changes close to the - * root element. - * - * Activate an instance of this in the {@link EditPart#activate()} method of the {@link DiagramEditPart}. - * - * @author koehnlein - */ -public class SemanticRootUnloadListener implements ResourceSetListener { - - private DiagramEditPart rootEditPart; - private EObject semanticRootElement; - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - * @param rootEditPart - * - */ - public SemanticRootUnloadListener(DiagramEditPart rootEditPart) { - this.rootEditPart = rootEditPart; - this.semanticRootElement = rootEditPart.resolveSemanticElement(); - } - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - */ - public void activate() { - rootEditPart.getEditingDomain().addResourceSetListener(this); - } - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - */ - public void deactivate() { - rootEditPart.getEditingDomain().removeResourceSetListener(this); - } - - public NotificationFilter getFilter() { - return new NotificationFilter.Custom() { - @Override - public boolean matches(Notification notification) { - int featureID = notification.getFeatureID(Resource.class); - Object notifier = notification.getNotifier(); - int eventType = notification.getEventType(); - return notification.getOldValue() == semanticRootElement && featureID == Resource.RESOURCE__CONTENTS - && (eventType == Notification.REMOVE || eventType == Notification.SET) - && notifier instanceof Resource; - } - }; - } - - public boolean isAggregatePrecommitListener() { - return false; - } - - public boolean isPostcommitOnly() { - return true; - } - - public boolean isPrecommitOnly() { - return false; - } - - public void resourceSetChanged(ResourceSetChangeEvent event) { - semanticRootElement = rootEditPart.resolveSemanticElement(); - rootEditPart.refresh(); - } - - public Command transactionAboutToCommit(ResourceSetChangeEvent event) throws RollbackException { - return null; - } - -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/UpdateXtextResourceTextCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/UpdateXtextResourceTextCommand.java deleted file mode 100644 index a1f4a622e05..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/UpdateXtextResourceTextCommand.java +++ /dev/null @@ -1,107 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.editingdomain; - -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.emf.common.command.Command; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.transaction.RecordingCommand; -import org.eclipse.emf.transaction.TransactionalEditingDomain; -import org.eclipse.emf.transaction.util.TransactionUtil; -import org.eclipse.gmf.runtime.common.core.command.CommandResult; -import org.eclipse.gmf.runtime.common.core.command.ICommand; -import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand; -import org.eclipse.xtext.resource.XtextResource; - -/** - * A Command that deactivates the {@link ChangeAggregatorAdapter} and updates a textual section of an Xtext model in an - * Xtext resource. Used to avoid cycles in the change aggregation. - * - * @author koehnlein - */ -public class UpdateXtextResourceTextCommand { - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - * @param xtextResource - * @param offset - * @param length - * @param newText - * @return Command - */ - public static Command createEMFCommand(final XtextResource xtextResource, final int offset, final int length, - final String newText) { - final TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(xtextResource); - if (editingDomain == null) { - return null; - } - ResourceSet resourceSet = editingDomain.getResourceSet(); - final ChangeAggregatorAdapter changeAggregator = (ChangeAggregatorAdapter) EcoreUtil.getAdapter(resourceSet - .eAdapters(), ChangeAggregatorAdapter.class); - return new RecordingCommand(editingDomain, "update xtext resource") { - @Override - protected void doExecute() { - try { - if (changeAggregator != null) { - changeAggregator.setSuspended(true); - } - xtextResource.update(offset, length, newText); - xtextResource.setModified(true); - } finally { - if (changeAggregator != null) { - changeAggregator.setSuspended(false); - } - } - - } - }; - } - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - * @param xtextResource - * @param offset - * @param length - * @param newText - * @return ICommand - */ - public static ICommand createUpdateCommand(final XtextResource xtextResource, final int offset, final int length, - final String newText) { - final TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(xtextResource); - if (editingDomain == null) { - return null; - } - ResourceSet resourceSet = editingDomain.getResourceSet(); - final ChangeAggregatorAdapter changeAggregator = (ChangeAggregatorAdapter) EcoreUtil.getAdapter(resourceSet - .eAdapters(), ChangeAggregatorAdapter.class); - return new AbstractTransactionalCommand(editingDomain, "update xtext resource", null) { - @Override - protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) - throws ExecutionException { - try { - if (changeAggregator != null) { - changeAggregator.setSuspended(true); - } - xtextResource.update(offset, length, newText); - xtextResource.setModified(true); - return CommandResult.newOKCommandResult(); - } catch (Exception exc) { - return CommandResult.newErrorCommandResult(exc); - } finally { - if (changeAggregator != null) { - changeAggregator.setSuspended(false); - } - } - } - }; - } - -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/XtextNodeModelReconciler.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/XtextNodeModelReconciler.java deleted file mode 100644 index 4605d2a1a5c..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/editingdomain/XtextNodeModelReconciler.java +++ /dev/null @@ -1,135 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.editingdomain; - -import org.eclipse.core.commands.operations.IOperationHistory; -import org.eclipse.core.commands.operations.IOperationHistoryListener; -import org.eclipse.core.commands.operations.OperationHistoryEvent; -import org.eclipse.emf.common.command.CommandStack; -import org.eclipse.emf.common.notify.impl.AdapterImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.transaction.TransactionalEditingDomain; -import org.eclipse.emf.transaction.TransactionalEditingDomain.Lifecycle; -import org.eclipse.emf.transaction.TransactionalEditingDomainEvent; -import org.eclipse.emf.transaction.TransactionalEditingDomainListener; -import org.eclipse.emf.transaction.util.TransactionUtil; -import org.eclipse.emf.workspace.IWorkspaceCommandStack; -//import org.eclipse.xtext.parsetree.CompositeNode; -//import org.eclipse.xtext.parsetree.NodeAdapter; -//import org.eclipse.xtext.parsetree.NodeUtil; - -/** - * Reconciles the node models of all XtextResources in a TransactionalEditingDomain with semantic changes. - * - * @author koehnlein - */ -public class XtextNodeModelReconciler extends AdapterImpl implements TransactionalEditingDomainListener, - IOperationHistoryListener { - - private TransactionalEditingDomain editingDomain; - - private ChangeAggregatorAdapter changeAggregator; - - private XtextNodeModelReconciler(TransactionalEditingDomain editingDomain) { - this.editingDomain = editingDomain; - Lifecycle lifecycle = TransactionUtil.getAdapter(editingDomain, Lifecycle.class); - lifecycle.addTransactionalEditingDomainListener(this); - changeAggregator = new ChangeAggregatorAdapter(); - editingDomain.getResourceSet().eAdapters().add(changeAggregator); - CommandStack commandStack = editingDomain.getCommandStack(); - if (commandStack instanceof IWorkspaceCommandStack) { - IOperationHistory operationHistory = ((IWorkspaceCommandStack) commandStack).getOperationHistory(); - operationHistory.addOperationHistoryListener(this); - } - changeAggregator.beginRecording(); - } - - public void editingDomainDisposing(TransactionalEditingDomainEvent event) { - changeAggregator.endRecording(); - CommandStack commandStack = editingDomain.getCommandStack(); - if (commandStack instanceof IWorkspaceCommandStack) { - IOperationHistory operationHistory = ((IWorkspaceCommandStack) commandStack).getOperationHistory(); - operationHistory.removeOperationHistoryListener(this); - } - editingDomain.getResourceSet().eAdapters().remove(changeAggregator); - Lifecycle lifecycle = TransactionUtil.getAdapter(editingDomain, Lifecycle.class); - lifecycle.removeTransactionalEditingDomainListener(XtextNodeModelReconciler.this); - } - - public void transactionClosed(TransactionalEditingDomainEvent event) { - // ignore - } - - public void transactionClosing(TransactionalEditingDomainEvent event) { - // ignore - } - - public void transactionInterrupted(TransactionalEditingDomainEvent event) { - // ignore - } - - public void transactionStarted(TransactionalEditingDomainEvent event) { - // ignore - } - - public void transactionStarting(TransactionalEditingDomainEvent event) { - // ignore - } - - /** - * This element comes from the XText/GMF integration example, and was not originally documented. - * @param editingDomain - * @return XtextNodeModelReconciler - * - */ - public static XtextNodeModelReconciler adapt(TransactionalEditingDomain editingDomain) { - XtextNodeModelReconciler adapter = (XtextNodeModelReconciler) EcoreUtil.getAdapter(editingDomain - .getResourceSet().eAdapters(), XtextNodeModelReconciler.class); - if (adapter == null) { - adapter = new XtextNodeModelReconciler(editingDomain); - } - return adapter; - } - - public void historyNotification(OperationHistoryEvent event) { - int eventType = event.getEventType(); -// switch (eventType) { -// case OperationHistoryEvent.DONE: -// case OperationHistoryEvent.UNDONE: -// case OperationHistoryEvent.REDONE: -// changeAggregator.endRecording(); -// ICommand updateXtextResourceTextCommand = null; -// for (EObject modificationRoot : changeAggregator.getModificationRoots()) { -// XtextResource xtextResource = (XtextResource) modificationRoot.eResource(); -// NodeAdapter nodeAdapter = NodeUtil.getNodeAdapter(modificationRoot); -// CompositeNode parserNode = nodeAdapter.getParserNode(); -// Serializer serializer = xtextResource.getSerializer(); -// String newText = serializer.serialize(modificationRoot); -// ICommand newCommand = UpdateXtextResourceTextCommand.createUpdateCommand(xtextResource, parserNode -// .getOffset(), parserNode.getLength(), newText); -// if (updateXtextResourceTextCommand == null) { -// updateXtextResourceTextCommand = newCommand; -// } else { -// updateXtextResourceTextCommand.compose(newCommand); -// } -// } -// try { -// if (updateXtextResourceTextCommand != null) { -// updateXtextResourceTextCommand.execute(null, null); -// } -// } catch (ExecutionException exc) { -// Activator.logError(exc); -// } -// changeAggregator.beginRecording(); -// break; -// default: -// // ignore -// } - - } -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/CustomXtextSourceViewer.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/CustomXtextSourceViewer.java deleted file mode 100644 index 577dcd58091..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/CustomXtextSourceViewer.java +++ /dev/null @@ -1,63 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2011 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: - * CEA LIST - Initial API and implementation - * - *****************************************************************************/ - -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; - -import org.eclipse.jface.text.DocumentCommand; -import org.eclipse.jface.text.contentassist.IContentAssistant; -import org.eclipse.jface.text.source.IOverviewRuler; -import org.eclipse.jface.text.source.IVerticalRuler; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.xtext.ui.editor.XtextSourceViewer; - -/** - * This class extends XtextSourceViewer with the method getContentAssistant() - * This method was available on XtextSourceViewer in Xtext 1.0, and used - * for integration in Papyrus. - * - * @author CEA LIST - Initial contribution and API - */ -public class CustomXtextSourceViewer extends XtextSourceViewer { - - /** - * @param parent - * @param ruler - * @param overviewRuler - * @param showsAnnotationOverview - * @param styles - * - */ - public CustomXtextSourceViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler, - boolean showsAnnotationOverview, int styles) { - super(parent, ruler, overviewRuler, showsAnnotationOverview, styles); - } - - /** - * Used in papyrus integration for managing content assist in popup editors. - * @return the content assistant - * - */ - public IContentAssistant getContentAssistant() { - return fContentAssistant; - } - - @Override - protected void customizeDocumentCommand(DocumentCommand command) { - // TODO: TextViewer.customizeDocumentCommand generates exceptions. Why? - //super.customizeDocumentCommand(command); - } - - - -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/HighlightingHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/HighlightingHelper.java deleted file mode 100644 index 0f0e7114282..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/HighlightingHelper.java +++ /dev/null @@ -1,161 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; - -import org.eclipse.jface.util.IPropertyChangeListener; -import org.eclipse.jface.util.PropertyChangeEvent; -import org.eclipse.xtext.ui.editor.XtextPresentationReconciler; -import org.eclipse.xtext.ui.editor.XtextSourceViewer; -import org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration; -import org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreAccess; -import org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingPresenter; - -import com.google.inject.Inject; -import com.google.inject.Provider; - -/** - * @author Sebastian Zarnekow - Initial contribution and API - */ -public class HighlightingHelper implements IPropertyChangeListener { - - @Inject - private Provider reconcilerProvider; - - @Inject - private Provider presenterProvider; - - @Inject - private IPreferenceStoreAccess preferenceStoreAccessor; - - /** Highlighting presenter */ - private HighlightingPresenter fPresenter; - /** Highlighting reconciler */ - private HighlightingReconciler fReconciler; - - /** The source viewer */ - private XtextSourceViewer fSourceViewer; - /** The source viewer configuration */ - private XtextSourceViewerConfiguration fConfiguration; - /** The presentation reconciler */ - private XtextPresentationReconciler fPresentationReconciler; - - /** - * @param configuration - * @param sourceViewer - * - */ - public void install(XtextSourceViewerConfiguration configuration, XtextSourceViewer sourceViewer) { - fSourceViewer= sourceViewer; - fConfiguration= configuration; - fPresentationReconciler= (XtextPresentationReconciler) fConfiguration.getPresentationReconciler(sourceViewer); - preferenceStoreAccessor.getPreferenceStore().addPropertyChangeListener(this); - enable(); - } - - /** - * Enable advanced highlighting. - */ - private void enable() { - fPresenter= getPresenterProvider().get(); - fPresenter.install(fSourceViewer, fPresentationReconciler); - - if (fSourceViewer.getDocument() != null) { - fReconciler= reconcilerProvider.get(); - fReconciler.install(fSourceViewer, fPresenter); - } - } - - /** - * - */ - public void uninstall() { - disable(); - preferenceStoreAccessor.getPreferenceStore().removePropertyChangeListener(this); - fSourceViewer= null; - fConfiguration= null; - fPresentationReconciler= null; - } - - /** - * Disable advanced highlighting. - */ - private void disable() { - if (fReconciler != null) { - fReconciler.uninstall(); - fReconciler= null; - } - - if (fPresenter != null) { - fPresenter.uninstall(); - fPresenter= null; - } - } - - /** - * Returns this hightlighter's reconciler. - * - * @return the highlighter reconciler or null if none - */ - public HighlightingReconciler getReconciler() { - return fReconciler; - } - - /** - * @param reconcilerProvider - * - */ - public void setReconcilerProvider(Provider reconcilerProvider) { - this.reconcilerProvider = reconcilerProvider; - } - - /** - * @return Provider - * - */ - public Provider getReconcilerProvider() { - return reconcilerProvider; - } - - /** - * @param presenterProvider - * - */ - - public void setPresenterProvider(Provider presenterProvider) { - this.presenterProvider = presenterProvider; - } - - /** - * @return Provider - */ - public Provider getPresenterProvider() { - return presenterProvider; - } - - /** - * @param preferenceStoreAccessor - * - */ - public void setPreferenceStoreAccessor(IPreferenceStoreAccess preferenceStoreAccessor) { - this.preferenceStoreAccessor = preferenceStoreAccessor; - } - - /** - * @return IPreferenceStoreAccessor - * - */ - public IPreferenceStoreAccess getPreferenceStoreAccessor() { - return preferenceStoreAccessor; - } - - public void propertyChange(PropertyChangeEvent event) { - if (fReconciler != null && event.getProperty().contains(".syntaxColorer.tokenStyles")) - fReconciler.refresh(); - } -} - diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/HighlightingReconciler.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/HighlightingReconciler.java deleted file mode 100644 index bce3698527e..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/HighlightingReconciler.java +++ /dev/null @@ -1,291 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.ITextInputListener; -import org.eclipse.jface.text.TextAttribute; -import org.eclipse.jface.text.TextPresentation; -import org.eclipse.swt.widgets.Display; -import org.eclipse.xtext.resource.XtextResource; -import org.eclipse.xtext.ui.editor.XtextSourceViewer; -import org.eclipse.xtext.ui.editor.model.IXtextDocument; -import org.eclipse.xtext.ui.editor.model.IXtextModelListener; -import org.eclipse.xtext.ui.editor.model.XtextDocument; -import org.eclipse.xtext.ui.editor.syntaxcoloring.AttributedPosition; -import org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingPresenter; -import org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightedPositionAcceptor; -import org.eclipse.xtext.ui.editor.syntaxcoloring.ISemanticHighlightingCalculator; -import org.eclipse.xtext.ui.editor.syntaxcoloring.ITextAttributeProvider; -import org.eclipse.xtext.ui.editor.syntaxcoloring.MergingHighlightedPositionAcceptor; -import org.eclipse.xtext.util.concurrent.IUnitOfWork; - -import com.google.inject.Inject; - -/** - * @author Sebastian Zarnekow - Initial contribution and API - */ -public class HighlightingReconciler implements ITextInputListener, IXtextModelListener, IHighlightedPositionAcceptor { - - @Inject(optional=true) - private ISemanticHighlightingCalculator calculator; - - @Inject - private ITextAttributeProvider attributeProvider; - - /** The source viewer this highlighting reconciler is installed on */ - private XtextSourceViewer sourceViewer; - /** The highlighting presenter */ - private HighlightingPresenter presenter; - - /** Background job's added highlighted positions */ - private final List addedPositions = new ArrayList(); - /** Background job's removed highlighted positions */ - private List removedPositions = new ArrayList(); - /** Number of removed positions */ - private int removedPositionCount; - - /** - * Reconcile operation lock. - * - * @since 3.2 - */ - private final Object fReconcileLock = new Object(); - /** - * true if any thread is executing reconcile, false otherwise. - * - * @since 3.2 - */ - private boolean reconciling = false; - - /** - * Start reconciling positions. - */ - private void startReconcilingPositions() { - presenter.addAllPositions(removedPositions); - removedPositionCount = removedPositions.size(); - } - - /** - * Reconcile positions based on the AST subtrees - * - * @param subtrees - * the AST subtrees - */ - private void reconcilePositions(XtextResource resource) { - // for (int i= 0, n= subtrees.length; i < n; i++) - // subtrees[i].accept(fCollector); - MergingHighlightedPositionAcceptor acceptor = new MergingHighlightedPositionAcceptor(calculator); - acceptor.provideHighlightingFor(resource, this); -// calculator.provideHighlightingFor(resource, this); - List oldPositions = removedPositions; - List newPositions = new ArrayList(removedPositionCount); - for (int i = 0, n = oldPositions.size(); i < n; i++) { - AttributedPosition current = oldPositions.get(i); - if (current != null) - newPositions.add(current); - } - removedPositions = newPositions; - } - - /** - * Add a position with the given range and highlighting if it does not exist already. - * @param offset The range offset - * @param length The range length - * @param highlighting The highlighting - */ - public void addPosition(int offset, int length, String... ids) { - TextAttribute highlighting = ids.length == 1 ? - attributeProvider.getAttribute(ids[0]) - : attributeProvider.getMergedAttributes(ids); - boolean isExisting= false; - // TODO: use binary search - for (int i= 0, n= removedPositions.size(); i < n; i++) { - AttributedPosition position= removedPositions.get(i); - if (position == null) - continue; - if (position.isEqual(offset, length, highlighting)) { - isExisting= true; - removedPositions.set(i, null); - removedPositionCount--; - break; - } - } - - if (!isExisting) { - AttributedPosition position= presenter.createHighlightedPosition(offset, length, highlighting); - addedPositions.add(position); - } - } - - /** - * Update the presentation. - * - * @param textPresentation - * the text presentation - * @param addedPositions - * the added positions - * @param removedPositions - * the removed positions - */ - private void updatePresentation(TextPresentation textPresentation, List addedPositions, - List removedPositions) { - Runnable runnable = presenter.createUpdateRunnable(textPresentation, addedPositions, removedPositions); - if (runnable == null) - return; - - Display display = getDisplay(); - display.asyncExec(runnable); - } - - private Display getDisplay() { - return this.sourceViewer.getControl().getDisplay(); - } - - /** - * Stop reconciling positions. - */ - private void stopReconcilingPositions() { - removedPositions.clear(); - removedPositionCount = 0; - addedPositions.clear(); - } - - /** - * Install this reconciler on the given editor and presenter. - * - * @param editor - * the editor - * @param sourceViewer - * the source viewer - * @param presenter - * the highlighting presenter - */ - public void install(XtextSourceViewer sourceViewer, HighlightingPresenter presenter) { - this.presenter = presenter; - this.sourceViewer = sourceViewer; - if (calculator != null) { - ((IXtextDocument) sourceViewer.getDocument()).addModelListener(this); - sourceViewer.addTextInputListener(this); - } - refresh(); - } - - /** - * Uninstall this reconciler from the editor - */ - public void uninstall() { - if (presenter != null) - presenter.setCanceled(true); - - if (sourceViewer.getDocument() != null) { - if (calculator != null) { - XtextDocument document = (XtextDocument) sourceViewer.getDocument(); - document.removeModelListener(this); - sourceViewer.removeTextInputListener(this); - } - } - - sourceViewer = null; - presenter = null; - } - - /* - * @see org.eclipse.jface.text.ITextInputListener#inputDocumentAboutToBeChanged(org.eclipse.jface.text.IDocument, org.eclipse.jface.text.IDocument) - */ - public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) { - if (oldInput != null) - ((IXtextDocument) oldInput).removeModelListener(this); - } - - /* - * @see org.eclipse.jface.text.ITextInputListener#inputDocumentChanged(org.eclipse.jface.text.IDocument, org.eclipse.jface.text.IDocument) - */ - public void inputDocumentChanged(IDocument oldInput, IDocument newInput) { - if (newInput != null) { - refresh(); - ((IXtextDocument) newInput).addModelListener(this); - } - } - - /** - * Refreshes the highlighting. - */ - public void refresh() { - if (calculator != null) { - ((XtextDocument) sourceViewer.getDocument()).readOnly(new IUnitOfWork.Void() { - @Override - public void process(XtextResource state) throws Exception { - modelChanged(state); - } - }); - } else { - Display display = getDisplay(); - display.asyncExec(presenter.createSimpleUpdateRunnable()); - } - } - - public void modelChanged(XtextResource resource) { - // ensure at most one thread can be reconciling at any time - synchronized (fReconcileLock) { - if (reconciling) - return; - reconciling = true; - } - final HighlightingPresenter highlightingPresenter = presenter; - try { - if (highlightingPresenter == null) - return; - - highlightingPresenter.setCanceled(false); - - if (highlightingPresenter.isCanceled()) - return; - - startReconcilingPositions(); - - if (!highlightingPresenter.isCanceled()) { - reconcilePositions(resource); - } - - final TextPresentation[] textPresentation = new TextPresentation[1]; - if (!highlightingPresenter.isCanceled()) { - textPresentation[0] = highlightingPresenter.createPresentation(addedPositions, removedPositions); - } - - if (!highlightingPresenter.isCanceled()) - updatePresentation(textPresentation[0], addedPositions, removedPositions); - - stopReconcilingPositions(); - } - finally { - synchronized (fReconcileLock) { - reconciling = false; - } - } - } - - /** - * @param calculator - * - */ - public void setCalculator(ISemanticHighlightingCalculator calculator) { - this.calculator = calculator; - } - - /** - * @return ISemanticHighlightingCalculator - * - */ - public ISemanticHighlightingCalculator getCalculator() { - return calculator; - } -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/IActionContributor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/IActionContributor.java deleted file mode 100644 index 1805f2bfcc9..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/IActionContributor.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; - -import java.util.List; - -import com.google.inject.Binding; -import com.google.inject.Inject; -import com.google.inject.Injector; -import com.google.inject.Singleton; -import com.google.inject.TypeLiteral; - -/** - * - */ -public interface IActionContributor { - /** - * hook used to contribute any actions on editor start up. - * @param editor - */ - public void contributeActions(PartialModelEditor editor); - - - /** - * composite action contributor delegating call to all registered {@link IActionContributor} - */ - @Singleton - public class CompositeImpl implements IActionContributor { - - @Inject - private Injector injector; - - public void contributeActions(PartialModelEditor editor) { - List> bindingsByType = injector.findBindingsByType(TypeLiteral.get(IActionContributor.class)); - for (Binding binding : bindingsByType) { - IActionContributor actionContributor = injector.getInstance(binding.getKey()); - actionContributor.contributeActions(editor); - } - } - - } -} \ No newline at end of file diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/IPartialContentAssistParser.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/IPartialContentAssistParser.java deleted file mode 100644 index 95133155d81..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/IPartialContentAssistParser.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; - -import org.eclipse.xtext.AbstractRule; -import org.eclipse.xtext.ui.editor.contentassist.antlr.IContentAssistParser; - -/** - * @author Sebastian Zarnekow - Initial contribution and API - */ -public interface IPartialContentAssistParser extends IContentAssistParser { - - /** - * @param rule - * - */ - void initializeFor(AbstractRule rule); - -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/ISyntheticResourceProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/ISyntheticResourceProvider.java deleted file mode 100644 index 50d9eab79d1..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/ISyntheticResourceProvider.java +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; - -import org.eclipse.xtext.resource.XtextResource; - -import com.google.inject.ImplementedBy; - -/** - * - */ -@ImplementedBy(SyntheticResourceProvider.class) -public interface ISyntheticResourceProvider { - /** - * @return XtextResource - * - */ - XtextResource createResource(); -} \ No newline at end of file diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/OperationHistoryListener.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/OperationHistoryListener.java deleted file mode 100644 index 9db63acc890..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/OperationHistoryListener.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; - -import org.eclipse.core.commands.operations.IOperationHistoryListener; -import org.eclipse.core.commands.operations.IUndoContext; -import org.eclipse.core.commands.operations.OperationHistoryEvent; -import org.eclipse.ui.texteditor.IUpdate; - -/** - * - */ -public class OperationHistoryListener implements IOperationHistoryListener { - private final IUndoContext context; - private final IUpdate update; - - /** - * @param context - * @param update - * - */ - public OperationHistoryListener(IUndoContext context, IUpdate update) { - this.context = context; - this.update = update; - } - - public void historyNotification(OperationHistoryEvent event) { - final int type= event.getEventType(); - switch (type) { - case OperationHistoryEvent.UNDONE: - case OperationHistoryEvent.REDONE: - case OperationHistoryEvent.OPERATION_NOT_OK: - // if this is one of our operations - if (event.getOperation().hasContext(context)) { - update.update(); - } - } - } -} \ No newline at end of file diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/PartialContentAssistContextFactory.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/PartialContentAssistContextFactory.java deleted file mode 100644 index c6baf0199e1..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/PartialContentAssistContextFactory.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; - -import org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory; - -/** - * @author Sebastian Zarnekow - Initial contribution and API - */ -public class PartialContentAssistContextFactory extends ParserBasedContentAssistContextFactory { - -// /** -// * @param partialContentAssistParser -// * -// */ -// @Inject -// public void setPartialParser(IPartialContentAssistParser partialContentAssistParser) { -// super.setParser(partialContentAssistParser); -// } -// -// /** -// * @param rule -// * -// */ -// public void initializeFor(AbstractRule rule) { -// ((IPartialContentAssistParser) getParser()).initializeFor(rule); -// } - -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/PartialModelEditor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/PartialModelEditor.java deleted file mode 100644 index 79d3cbb2d32..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/PartialModelEditor.java +++ /dev/null @@ -1,163 +0,0 @@ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; - -import java.util.Collections; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jface.text.BadLocationException; -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.IRegion; -import org.eclipse.jface.text.ISynchronizable; -import org.eclipse.jface.text.source.AnnotationModel; -import org.eclipse.jface.text.source.SourceViewer; -import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part.IXtextEMFReconciler; -import org.eclipse.xtext.resource.XtextResource; -import org.eclipse.xtext.ui.editor.model.XtextDocument; -import org.eclipse.xtext.util.StringInputStream; - -/** - * - */ -public class PartialModelEditor { - - protected final SourceViewer viewer; - protected final boolean insertLineBreaks; - protected final ISyntheticResourceProvider resourceProvider; - protected EObject semanticElement ; - protected IXtextEMFReconciler modelReconciler ; - //private final Injector xtextInjector ; - - /** - * @param viewer - * @param resourceProvider - * @param insertLineBreaks - * @param semanticElement - * @param modelReconciler - * - */ - public PartialModelEditor(SourceViewer viewer, - ISyntheticResourceProvider resourceProvider, - boolean insertLineBreaks, - EObject semanticElement, - IXtextEMFReconciler modelReconciler) { - //this.xtextInjector = xtextInjector ; - this.viewer = viewer; - this.resourceProvider = resourceProvider; - this.insertLineBreaks = insertLineBreaks; - this.semanticElement = semanticElement ; - this.modelReconciler = modelReconciler ; - } - - /** - * @param document - * @param prefix - * @param editablePart - * @param suffix - * - */ - public void setModel(XtextDocument document, String prefix, String editablePart, String suffix) { - if (insertLineBreaks) { - String delimiter = document.getLegalLineDelimiters()[0]; - prefix = prefix + delimiter; - suffix = delimiter + suffix; - } - String model = prefix + editablePart + suffix; - document.set(model); - XtextResource resource = createResource(model); - document.setInput(resource); - AnnotationModel annotationModel = new AnnotationModel(); - if (document instanceof ISynchronizable) { - Object lock= ((ISynchronizable)document).getLockObject(); - if (lock == null) { - lock= new Object(); - ((ISynchronizable)document).setLockObject(lock); - } - ((ISynchronizable) annotationModel).setLockObject(lock); - } - viewer.setDocument(document, annotationModel, prefix.length(), editablePart.length()); - viewer.getUndoManager().reset(); - } - - /** - * @param content - * @return XtextResource - * - */ - public XtextResource createResource(String content) { - XtextResource result = resourceProvider.createResource(); - try { - result.load(new StringInputStream(content, result.getEncoding()), Collections.emptyMap()); - } catch (Exception e) { - throw new RuntimeException(e); - } - return result; - } - - /** - * @param prefix - * @param editablePart - * @param suffix - * - */ - public void updateModel(String prefix, String editablePart, String suffix) { - IDocument document= viewer.getDocument(); - if (insertLineBreaks) { - String delimiter = document.getLegalLineDelimiters()[0]; - prefix = prefix + delimiter; - suffix = delimiter + suffix; - } - String model = prefix + editablePart + suffix; - viewer.setRedraw(false); - viewer.getUndoManager().disconnect(); - document.set(model); - viewer.setVisibleRegion(prefix.length(), editablePart.length()); - viewer.getUndoManager().connect(viewer); - viewer.setRedraw(true); - } - - /** - * @param prefix - * - */ - public void updatePrefix(String prefix) { - try { - IDocument document= viewer.getDocument(); - IRegion visibleRegion = viewer.getVisibleRegion(); - String editablePart = document.get(visibleRegion.getOffset(), visibleRegion.getLength()); - int suffixOffset = visibleRegion.getOffset() + visibleRegion.getLength(); - String suffix = ""; - if (document.getLength() - suffixOffset > 0) { - suffix = document.get(suffixOffset, document.getLength() - suffixOffset); - if (insertLineBreaks) { - String delimiter = document.getLegalLineDelimiters()[0]; - suffix = suffix.substring(delimiter.length()); - } - } - updateModel(prefix, editablePart, suffix); - } catch(BadLocationException e) { - throw new RuntimeException(e); - } - } - - /** - * @return String - * - */ - public String getEditablePart() { - IDocument doc= viewer.getDocument(); - IRegion visible= viewer.getVisibleRegion(); - try { - return doc.get(visible.getOffset(), visible.getLength()); - } catch (BadLocationException e) { - return ""; //$NON-NLS-1$ - } - } - - /** - * @return String - * - */ - public String getSerializedModel() { - return viewer.getDocument().get(); - } - -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SourceViewerHandle.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SourceViewerHandle.java deleted file mode 100644 index 52fe8a87962..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SourceViewerHandle.java +++ /dev/null @@ -1,131 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; - -import java.lang.reflect.Constructor; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jface.text.source.SourceViewer; -import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part.IXtextEMFReconciler; -import org.eclipse.xtext.ui.editor.XtextSourceViewer; -import org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration; -import org.eclipse.xtext.ui.editor.model.XtextDocument; -import org.eclipse.xtext.ui.editor.validation.IValidationIssueProcessor; - -import com.google.inject.Injector; - -/** - * - */ -public class SourceViewerHandle { - protected IValidationIssueProcessor issueProcessor; - protected final XtextSourceViewer viewer; - protected final ISyntheticResourceProvider resourceProvider; - protected final XtextDocument document; - protected final XtextSourceViewerConfiguration configuration; - protected static Class partialModelEditorClass = null ; - private Class defaultModelEditorClass = PartialModelEditor.class ; - protected EObject semanticElement ; - protected IXtextEMFReconciler modelReconciler ; - - SourceViewerHandle(XtextDocument document, XtextSourceViewer viewer, XtextSourceViewerConfiguration configuration, ISyntheticResourceProvider resourceProvider, Injector xtextInjector) { - this.document = document; - this.viewer = viewer; - this.configuration = configuration; - this.resourceProvider = resourceProvider; - } - - /** - * @param issueProcessor - * - */ - public void setIssueProcessor(IValidationIssueProcessor issueProcessor) { - this.issueProcessor = issueProcessor; - } - - /** - * @return IValidationIssueProcessor - * - */ - public IValidationIssueProcessor getIssueProcessor() { - return issueProcessor; - } - - /** - * @return XtextSourceViewer - * - */ - public XtextSourceViewer getViewer() { - return viewer; - } - - /** - * @return XtextDocument - * - */ - public XtextDocument getDocument() { - return document; - } - - /** - * @return XtextSourceViewerConfiguration - * - */ - public XtextSourceViewerConfiguration getConfiguration() { - return configuration; - } - - /** - * @param prefix - * @param editablePart - * @param suffix - * @param semanticElement - * @param modelReconciler - * @return PartialModelEditor - * - */ - public PartialModelEditor createPartialEditor(String prefix, String editablePart, String suffix, EObject semanticElement, IXtextEMFReconciler modelReconciler) { - //PartialModelEditor result = new PartialModelEditor(viewer, resourceProvider, false); - PartialModelEditor result = null; - try { - if (partialModelEditorClass == null) - partialModelEditorClass = defaultModelEditorClass ; - Constructor c = partialModelEditorClass.getConstructor(SourceViewer.class, - ISyntheticResourceProvider.class, - boolean.class, - EObject.class, - IXtextEMFReconciler.class - ) ; - this.semanticElement = semanticElement ; - this.modelReconciler = modelReconciler ; - result = (PartialModelEditor)c.newInstance(viewer, resourceProvider, false, semanticElement, modelReconciler) ; - result.setModel(getDocument(), prefix, editablePart, suffix); - } - catch (Exception e) { - e.printStackTrace() ; - } - // result.setModel(getDocument(), prefix, editablePart, suffix); - return result; - } - - /** - * @param modelEditorClass - * - */ - public static void bindPartialModelEditorClass(Class modelEditorClass) { - partialModelEditorClass = modelEditorClass ; - } - - /** - * @return PartialModelEditor - * - */ - public PartialModelEditor createPartialEditor() { - return createPartialEditor("", "", "", null, null); - } -} \ No newline at end of file diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SourceViewerHandleFactory.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SourceViewerHandleFactory.java deleted file mode 100644 index c4b05c671f5..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SourceViewerHandleFactory.java +++ /dev/null @@ -1,130 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; - -import java.util.Iterator; -import java.util.List; - -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.jface.text.source.IOverviewRuler; -import org.eclipse.jface.text.source.ISharedTextColors; -import org.eclipse.jface.text.source.IVerticalRuler; -import org.eclipse.jface.text.source.OverviewRuler; -import org.eclipse.jface.text.source.VerticalRuler; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.DisposeEvent; -import org.eclipse.swt.events.DisposeListener; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.editors.text.EditorsUI; -import org.eclipse.ui.texteditor.AnnotationPreference; -import org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess; -import org.eclipse.ui.texteditor.MarkerAnnotationPreferences; -import org.eclipse.ui.texteditor.SourceViewerDecorationSupport; -import org.eclipse.xtext.ui.editor.XtextSourceViewer; -import org.eclipse.xtext.ui.editor.XtextSourceViewerConfiguration; -import org.eclipse.xtext.ui.editor.model.XtextDocument; -import org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreAccess; -import org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider; -import org.eclipse.xtext.ui.editor.validation.AnnotationIssueProcessor; -import org.eclipse.xtext.ui.editor.validation.IValidationIssueProcessor; -import org.eclipse.xtext.ui.editor.validation.ValidationJob; -import org.eclipse.xtext.validation.CheckMode; -import org.eclipse.xtext.validation.IResourceValidator; -import org.eclipse.xtext.validation.Issue; - -import com.google.common.collect.Iterators; -import com.google.inject.Inject; -import com.google.inject.Injector; -import com.google.inject.Provider; - -/** - * @author Sebastian Zarnekow - Initial contribution and API - */ -public class SourceViewerHandleFactory { - - @Inject - private XtextSourceViewer.Factory sourceViewerFactory; - - @Inject - private Provider sourceViewerConfigurationProvider; - - @Inject - private Provider documentProvider; - - @Inject - private IResourceValidator resourceValidator; - - @Inject - private IPreferenceStoreAccess preferenceStoreAccess; - - private Injector xtextInjector ; - - protected static final int VERTICAL_RULER_WIDTH= 12; - - /** - * @param parent - * @param resourceProvider - * @return SourceViewerHandle - * - */ - public SourceViewerHandle create(Composite parent, ISyntheticResourceProvider resourceProvider) { - final IVerticalRuler ruler = new VerticalRuler(VERTICAL_RULER_WIDTH, new DefaultMarkerAnnotationAccess()); - final IOverviewRuler oRuler = new OverviewRuler(new DefaultMarkerAnnotationAccess(), VERTICAL_RULER_WIDTH, getSharedColors()); - //final XtextSourceViewer viewer = sourceViewerFactory.createSourceViewer(parent, ruler, oRuler, true, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL); - final XtextSourceViewer viewer = new CustomXtextSourceViewer(parent, ruler, oRuler, false, SWT.V_SCROLL | SWT.H_SCROLL); - /* - * final IVerticalRuler ruler = new VerticalRuler(VERTICAL_RULER_WIDTH, null) ; - final XtextSourceViewer viewer = new CustomXtextSourceViewer(parent, ruler, null, true, SWT.None); - */ - - - XtextSourceViewerConfiguration viewerConfiguration = sourceViewerConfigurationProvider.get(); - viewer.configure(viewerConfiguration); - - final SourceViewerDecorationSupport viewerDecorationSupport = new SourceViewerDecorationSupport(viewer, null, new DefaultMarkerAnnotationAccess(), getSharedColors()); - MarkerAnnotationPreferences annotationPreferences = new MarkerAnnotationPreferences(); - Iterator e= Iterators.filter(annotationPreferences.getAnnotationPreferences().iterator(), AnnotationPreference.class); - while (e.hasNext()) - viewerDecorationSupport.setAnnotationPreference(e.next()); - viewerDecorationSupport.install(preferenceStoreAccess.getPreferenceStore()); - parent.addDisposeListener(new DisposeListener() { - public void widgetDisposed(DisposeEvent e) { - viewerDecorationSupport.dispose(); - } - }); - final XtextDocument document = documentProvider.get(); - final SourceViewerHandle result = new SourceViewerHandle(document, viewer, viewerConfiguration, resourceProvider, xtextInjector); - ValidationJob job = new ValidationJob(resourceValidator, document, - new IValidationIssueProcessor() { - private AnnotationIssueProcessor annotationIssueProcessor; - - public void processIssues(List issues, IProgressMonitor monitor) { - if(viewer.getTextWidget() == null) { - // the text widget is disposed => don't try displaying errors in this widget - return; - } - IValidationIssueProcessor issueProcessor = result.getIssueProcessor(); - if (issueProcessor != null) - issueProcessor.processIssues(issues, monitor); - if (annotationIssueProcessor == null) { - annotationIssueProcessor = new AnnotationIssueProcessor(document, - viewer.getAnnotationModel(), - new IssueResolutionProvider.NullImpl()); - } - if (annotationIssueProcessor != null) - annotationIssueProcessor.processIssues(issues, monitor); - } - }, CheckMode.FAST_ONLY); - document.setValidationJob(job); - return result; - } - - protected ISharedTextColors getSharedColors() { - return EditorsUI.getSharedTextColors(); - } -} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SyntheticResourceProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SyntheticResourceProvider.java deleted file mode 100644 index 616ce3a3dc0..00000000000 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.xtext.glue/src/org/eclipse/papyrus/infra/gmfdiag/xtext/glue/partialEditing/SyntheticResourceProvider.java +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others. - * 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 - *******************************************************************************/ -package org.eclipse.papyrus.infra.gmfdiag.xtext.glue.partialEditing; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.papyrus.infra.gmfdiag.xtext.glue.edit.part.PopupXtextEditorHelper; -import org.eclipse.xtext.IGrammarAccess; -import org.eclipse.xtext.resource.XtextResource; -import org.eclipse.xtext.resource.XtextResourceSet; - -import com.google.inject.Inject; -import com.google.inject.Provider; - -/** - * @author Sebastian Zarnekow - Initial contribution and API - */ -public class SyntheticResourceProvider implements ISyntheticResourceProvider { - - /** - * - */ - public static final String SYNTHETIC_SCHEME = "synthetic"; - - //@Inject - //private IResourceSetProvider resourceSetProvider; - @Inject - private Provider resourceSetProvider; - - @Inject - private IGrammarAccess grammarAccess; - - - - public XtextResource createResource() { - ResourceSet resourceSet = resourceSetProvider.get(); -// EObject context = PopupXtextEditorHelper.context ; -// ResourceSet resourceSet = context.eResource().getResourceSet() ; - Resource grammarResource = resourceSet.createResource( - URI.createURI(SYNTHETIC_SCHEME + ":/" + grammarAccess.getGrammar().getName() + ".xtext")); - grammarResource.getContents().add(EcoreUtil.copy(grammarAccess.getGrammar())); - XtextResource result = (XtextResource) resourceSet.createResource( - URI.createURI(SYNTHETIC_SCHEME + ":/" + grammarAccess.getGrammar().getName() + "." + PopupXtextEditorHelper.fileExtension)); - resourceSet.getResources().add(result); - return result ; - - } - -} -- cgit v1.2.3 From 0055a29b2a603c54f63a90de39cae25bf5c62c50 Mon Sep 17 00:00:00 2001 From: ptessier Date: Thu, 3 Apr 2014 15:26:16 +0200 Subject: 431216: [All Diagrams] Layout issues in Compartments https://bugs.eclipse.org/bugs/show_bug.cgi?id=431216 --- .../common/figure/node/NodeNamedElementFigure.java | 2 +- ...AppliedStereotypeCommentCreationEditPolicy.java | 14 +- .../diagram/stereotypeproperty/AllTests.java | 3 +- .../TestLayoutWithStereotype.java | 447 +++++++++++++++++++++ .../stereotypeproperty/TestProfileApplication.java | 3 +- .../TestStereotypeApplication.java | 8 +- 6 files changed, 465 insertions(+), 12 deletions(-) create mode 100644 tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestLayoutWithStereotype.java (limited to 'plugins') diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java index f9c16e55e98..8273710d68b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java @@ -188,7 +188,7 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru public void restoreStereotypeLabel() { if(stereotypesLabel!=null){ stereotypesLabel.setOpaque(false); - getStereotypeLabelContainer().add(stereotypesLabel, getStereotypeLabelConstraint(), getStereotypePropertiesLabelPosition()); + getStereotypeLabelContainer().add(stereotypesLabel, getStereotypeLabelConstraint(), getStereotypeLabelPosition()); } } diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCommentCreationEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCommentCreationEditPolicy.java index 39d51b4fb27..718f5cd32f2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCommentCreationEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCommentCreationEditPolicy.java @@ -41,6 +41,7 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNode import org.eclipse.papyrus.uml.diagram.stereotype.edition.command.CreateAppliedStereotypeCommentViewCommand; import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypesCommentLinkEditPart; import org.eclipse.papyrus.uml.tools.listeners.PapyrusStereotypeListener; +import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil; import org.eclipse.swt.widgets.Display; /** @@ -77,9 +78,20 @@ public class AppliedStereotypeCommentCreationEditPolicy extends AppliedStereotyp } } } + + //test if the comment has to be removed if(getAppliedStereotypeCommentNode() != null) { View commentNode = getAppliedStereotypeCommentNode(); - if(!stereotypeLocalizationToDisplay.equals(UMLVisualInformationPapyrusConstant.STEREOTYPE_COMMENT_LOCATION) || getvisisbleAppliedStereotypeCompartment(commentNode, getUMLElement()) == 0) { + + //1. the display is not comment + if(!stereotypeLocalizationToDisplay.equals(UMLVisualInformationPapyrusConstant.STEREOTYPE_COMMENT_LOCATION) ) { + final TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(commentNode); + executeAppliedStereotypeCommentDeletion(domain, commentNode); + } + + //the result of properties to display is null so no compartment will be created + String todisplay = StereotypeUtil.getPropertiesValues(stereotypePropertiesToDisplay, getUMLElement()); + if("".equals(todisplay.trim())) { final TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(commentNode); executeAppliedStereotypeCommentDeletion(domain, commentNode); } diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/AllTests.java b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/AllTests.java index 164528bb9dd..9e43a2a8169 100644 --- a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/AllTests.java +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/AllTests.java @@ -24,7 +24,8 @@ import org.junit.runners.Suite.SuiteClasses; @SuiteClasses({ // canonical TestProfileApplication.class, -TestStereotypeApplication.class +TestStereotypeApplication.class, +TestLayoutWithStereotype.class }) public class AllTests { diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestLayoutWithStereotype.java b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestLayoutWithStereotype.java new file mode 100644 index 00000000000..6863231c590 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestLayoutWithStereotype.java @@ -0,0 +1,447 @@ +/***************************************************************************** + * Copyright (c) 2012 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.diagram.stereotypeproperty; + +import java.util.ArrayList; + +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.RectangleFigure; +import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.commands.UnexecutableCommand; +import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy; +import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand; +import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure; +import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure; +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest; +import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.draw2d.ui.text.TextFlowEx; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper; +import org.eclipse.papyrus.infra.core.utils.ServiceUtils; +import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IShapeCompartmentEditPart; +import org.eclipse.papyrus.uml.appearance.helper.AppliedStereotypeHelper; +import org.eclipse.papyrus.uml.appearance.helper.UMLVisualInformationPapyrusConstant; +import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPart; +import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; +import org.eclipse.papyrus.uml.diagram.common.figure.node.AutomaticCompartmentLayoutManager; +import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure; +import org.eclipse.papyrus.uml.diagram.common.figure.node.EditingFlowPage; +import org.eclipse.papyrus.uml.diagram.common.figure.node.StereotypePropertiesCompartment; +import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeConpartmentEditPart; +import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeMultilinePropertyEditPart; +import org.eclipse.papyrus.uml.extensionpoints.profile.RegisteredProfile; +import org.eclipse.papyrus.uml.extensionpoints.utils.Util; +import org.eclipse.papyrus.uml.tools.commands.ApplyStereotypeCommand; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.Model; +import org.eclipse.uml2.uml.Profile; +import org.eclipse.uml2.uml.Stereotype; +import org.junit.Before; +import org.junit.Test; + +/** + * the purpose of this class is to test the layout + * + */ +public class TestLayoutWithStereotype extends AbstractPapyrusTestCase { + + + private static final String TEST_PROFILE_STEREOTYPE1 = "testProfile::Stereotype1"; + + @Test + public void testToManageModel() { + testToCreateANode(UMLElementTypes.Class_2008); + + } + + /** + * Test to create a node. + * + * @param type + * the type + */ + public void testToCreateANode(IElementType type) { + + //VARIABLES + org.eclipse.uml2.uml.Class class1=null; + //stereotype that is applied on class1 + Stereotype stereotypeTest=null; + //view of the class + View NotationClass1=null; + ClassifierFigure class1figure=null; + //editpart of class1 + GraphicalEditPart classEditPart=null; + //compartment of stereotype + View appliedStereotypeCompartmentNotation = null; + //compartment Shape + View shapeCompartmentView=null; + //the view of the applied stereotype property + View stereotypePropertyView=null; + GraphicalEditPart stereotypeCompartmentEdipart=null; + GraphicalEditPart stereotypePropertyEdipart=null; + + + //CREATION + assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0); + + assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 1); + //1 element element due to the reference to the profile + assertTrue(CREATION + INITIALIZATION_TEST, ((Model)getRootSemanticModel()).getAllAppliedProfiles().size() == 1); + + + {//execution of the command + CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint()); + Command command = getDiagramEditPart().getCommand(requestcreation); + assertNotNull(CREATION + COMMAND_NULL, command); + assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE); + assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command); + assertTrue(CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 1); + } + + + + //get the created Class + class1 = (org.eclipse.uml2.uml.Class)((org.eclipse.uml2.uml.Package)getRootSemanticModel()).getPackagedElement("Class1"); + assertNotNull("created class must be not null", class1 ); + //look for the editpart that the class + classEditPart = (ClassEditPart)getDiagramEditPart().getChildren().get(0); + //test if stereotype can be applied + assertTrue("stereotype1 must be applicable on class1", class1.getApplicableStereotype(TEST_PROFILE_STEREOTYPE1) != null); + + + //look for the applied stereotype compartment + NotationClass1=classEditPart.getNotationView(); + {//execution of the command + SetBoundsCommand resizeCommand = new SetBoundsCommand(diagramEditor.getEditingDomain(), + "resize", + new EObjectAdapter((View) NotationClass1), + new Rectangle(0, 0, 200, 200) ); + + assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, resizeCommand.canExecute() == true); + diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(new ICommandProxy( resizeCommand)); + } + {//test about the layout + org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure nodePlate=(org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure)((BorderedNodeFigure)classEditPart.getFigure()).getChildren().get(0); + // now verify position of each subfigure + class1figure=((ClassifierFigure)nodePlate.getChildren().get(0)); + class1figure.setBounds(new Rectangle(0,0,200,200)); + assertTrue("The figure of class1 is not an automaticCompartmentLayoutManager",class1figure.getLayoutManager() instanceof AutomaticCompartmentLayoutManager); + class1figure.getLayoutManager().layout(class1figure); + assertTrue("The figure of the Class has not the good X coordinate",class1figure.getBounds().x==0); + assertTrue("The figure of the Class has not the good Y coordinate",class1figure.getBounds().y==0); + assertTrue("The figure of the Class has not the good width coordinate",class1figure.getBounds().width==200); + assertTrue("The figure of the Class has not the good height coordinate",class1figure.getBounds().height==200); + + // At this moment the class figure must contain 4 sub-figures 1label+ 3compartments + assertTrue("The number of figure children must be equal to 4",class1figure.getChildren().size()==4); + + //wrappinglabel for name + assertTrue("The sub figure [0] is not a wrapping label",class1figure.getChildren().get(0) instanceof WrappingLabel); + WrappingLabel labelClass=(WrappingLabel)class1figure.getChildren().get(0); + + assertTrue("The label of the Class has not the good X coordinate",labelClass.getBounds().x==1); + assertTrue("The label of the Class has not the good Y coordinate",labelClass.getBounds().y==3); + assertTrue("The label of the Class has not the good width coordinate",labelClass.getBounds().width==200); + assertTrue("The label of the Class has not the good heightcoordinate",labelClass.getBounds().height==16); + assertTrue("The label of the Class does not display Class1",labelClass.getText().equals("Class1")); + + assertTrue("The sub figure [0] is not a compartment",class1figure.getChildren().get(1) instanceof RectangleFigure); + RectangleFigure propertiesClass=(RectangleFigure)class1figure.getChildren().get(1); + assertTrue("The sub figure [0] is not the attribute compartment is not a ResizableCompartmentFigure",propertiesClass.getChildren().get(0) instanceof ResizableCompartmentFigure); + + // compartment for attribute + assertTrue("The compartment attribute of the Class has not the good X coordinate",propertiesClass.getBounds().x==1); + assertTrue("The compartment attribute of the Class has not the good Y coordinate",propertiesClass.getBounds().y==20); + assertTrue("The compartment attribute of the Class has not the good width coordinate",propertiesClass.getBounds().width==200); + assertTrue("The compartment attribute of the Class has not the good height coordinate",propertiesClass.getBounds().height==59); + + + //compartment for operation + assertTrue("The figure of class1 is not an automaticCompartmentLayoutManager",class1figure.getChildren().get(2) instanceof RectangleFigure); + RectangleFigure operationsClass=(RectangleFigure)class1figure.getChildren().get(2); + assertTrue("The sub figure [0] is not the operation compartment is not a ResizableCompartmentFigure",operationsClass.getChildren().get(0) instanceof ResizableCompartmentFigure); + assertTrue("The compartment operation of the Class has not the good X coordinate",operationsClass.getBounds().x==1); + assertTrue("The compartment operation of the Class has not the good y coordinate",operationsClass.getBounds().y==80); + assertTrue("The compartment operation of the Class has not the good width coordinate",operationsClass.getBounds().width==200); + assertTrue("The compartment operation of the Class has not the good height coordinate",operationsClass.getBounds().height==59); + + + // compartment for nested classifier + assertTrue("The figure of class1 is not an automaticCompartmentLayoutManager",class1figure.getChildren().get(3) instanceof RectangleFigure); + RectangleFigure innerclassifiersClass=(RectangleFigure)class1figure.getChildren().get(3); + assertTrue("The sub figure [0] is not the nested Classifier compartment is not a ResizableCompartmentFigure",innerclassifiersClass.getChildren().get(0) instanceof ResizableCompartmentFigure); + assertTrue("The compartment nested classifier of the Class has not the good X coordinate",innerclassifiersClass.getBounds().x==1); + assertTrue("The compartment nested classifier of the Class has not the good Y coordinate",innerclassifiersClass.getBounds().y==140); + assertTrue("The compartment nested classifier of the Class has not the good width coordinate",innerclassifiersClass.getBounds().width==200); + assertTrue("The compartment nested classifier of the Class has not the good Height coordinate",innerclassifiersClass.getBounds().height==59); + + } + + {// execution of the application of the stereotype + ArrayList stereotypeslist = new ArrayList(); + stereotypeslist.add(class1.getApplicableStereotype(TEST_PROFILE_STEREOTYPE1)); + ApplyStereotypeCommand applyStereotypeCommand = new ApplyStereotypeCommand(((Element)classEditPart.resolveSemanticElement()), stereotypeslist, diagramEditor.getEditingDomain()); + diagramEditor.getEditingDomain().getCommandStack().execute(applyStereotypeCommand); + assertTrue("No applied stereotype found on the element ", class1.getAppliedStereotypes().size() != 0); + } + + + + for(int i = 0; i < NotationClass1.getTransientChildren().size(); i++) { + View view = (View) NotationClass1.getTransientChildren().get(i); + if(view.getType().equals(AppliedStereotypeConpartmentEditPart.ID)) { + appliedStereotypeCompartmentNotation = view; + } + if(view.getType().equals(IShapeCompartmentEditPart.VIEW_TYPE)) { + shapeCompartmentView= view; + } + } + // the mechanism of stereotype display is running. + //the thread is synchronous + assertTrue( "No stereotype Compartment found in the notation", appliedStereotypeCompartmentNotation != null); + assertTrue( "No stereotype shape Compartment found in the notation", shapeCompartmentView != null); + + //now display stereotypes + stereotypeTest=class1.getAppliedStereotypes().get(0); + + {//display stereotype1 + RecordingCommand displayStereotypeCommand= AppliedStereotypeHelper.getAppliedStereotypeToDisplayCommand(diagramEditor.getEditingDomain(), NotationClass1,stereotypeTest.getQualifiedName() , UMLVisualInformationPapyrusConstant.STEREOTYPE_COMPARTMENT_LOCATION); + + diagramEditor.getEditingDomain().getCommandStack().execute(displayStereotypeCommand); + org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure nodePlate=(org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure)((BorderedNodeFigure)classEditPart.getFigure()).getChildren().get(0); + + //get the label + org.eclipse.draw2d.Label stereotypeLabel=((ClassifierFigure)nodePlate.getChildren().get(0)).getStereotypesLabel(); + assertTrue( "stereotype label must be not null" ,stereotypeLabel!=null); + assertTrue( "text of stereotype label be equals to «stereotype1» " ,stereotypeLabel.getText().equals("«stereotype1»")); + } + + {//test about the layout + org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure nodePlate=(org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure)((BorderedNodeFigure)classEditPart.getFigure()).getChildren().get(0); + // now verify position of each subfigure + class1figure=((ClassifierFigure)nodePlate.getChildren().get(0)); + class1figure.setBounds(new Rectangle(0,0,200,200)); + assertTrue("The figure of «stereotype1»Class1 is not an automaticCompartmentLayoutManager",class1figure.getLayoutManager() instanceof AutomaticCompartmentLayoutManager); + class1figure.getLayoutManager().layout(class1figure); + assertTrue("The figure of the «stereotype1»Class1 has not the good X coordinate",class1figure.getBounds().x==0); + assertTrue("The figure of the «stereotype1»Class1 has not the good Y coordinate",class1figure.getBounds().y==0); + assertTrue("The figure of the «stereotype1»Class1 has not the good width coordinate",class1figure.getBounds().width==200); + assertTrue("The figure of the «stereotype1»Class1 has not the good height coordinate",class1figure.getBounds().height==200); + + // At this moment the class figure must contain 5 sub-figures 1 label for stereotype+ 1label for name+ 3compartments + assertTrue("The number of children «stereotype1»Class1 is not equals to 6",class1figure.getChildren().size()==5); + + + //wrappingLabel for stereotype + assertTrue("The sub figure [0] of «stereotype1»Class1 is not a label",class1figure.getChildren().get(0) instanceof Label); + Label stereotypelabelClass=(Label)class1figure.getChildren().get(0); + + assertTrue("The label of the Class has not the good X coordinate",stereotypelabelClass.getBounds().x==1); + assertTrue("The label of the Class has not the good Y coordinate",stereotypelabelClass.getBounds().y==3); + assertTrue("The label of the Class has not the good width coordinate",stereotypelabelClass.getBounds().width==200); + assertTrue("The label of the Class has not the good heightcoordinate",stereotypelabelClass.getBounds().height==15); + assertTrue("The label of the Class does not display «stereotype1»",stereotypelabelClass.getText().equals("«stereotype1»")); + + + //wrappingLabel for name + assertTrue("The sub figure [1] of «stereotype1»Class1 is not a wrapping label",class1figure.getChildren().get(1) instanceof WrappingLabel); + WrappingLabel labelClass=(WrappingLabel)class1figure.getChildren().get(1); + + assertTrue("The label of the Class has not the good X coordinate",labelClass.getBounds().x==1); + assertTrue("The label of the Class has not the good Y coordinate",labelClass.getBounds().y==19); + assertTrue("The label of the Class has not the good width coordinate",labelClass.getBounds().width==200); + assertTrue("The label of the Class has not the good heightcoordinate",labelClass.getBounds().height==16); + assertTrue("The label of the Class does not display Class1",labelClass.getText().equals("Class1")); + + // compartment for property of stereotype + assertTrue("The sub figure [0] of «stereotype1»Class1 is not a compartment",class1figure.getChildren().get(2) instanceof RectangleFigure); + RectangleFigure stereotypePropertiesClass=(RectangleFigure)class1figure.getChildren().get(2); + assertTrue("The sub figure [0] is not the attribute compartment is not a ResizableCompartmentFigure",stereotypePropertiesClass.getChildren().get(0) instanceof ResizableCompartmentFigure); + + + assertTrue("The compartment attribute of the Class has not the good X coordinate",stereotypePropertiesClass.getBounds().x==1); + assertTrue("The compartment attribute of the Class has not the good Y coordinate",stereotypePropertiesClass.getBounds().y==36); + assertTrue("The compartment attribute of the Class has not the good width coordinate",stereotypePropertiesClass.getBounds().width==200); + assertTrue("The compartment attribute of the Class has not the good height coordinate",stereotypePropertiesClass.getBounds().height==54); + + + // compartment attribute + assertTrue("The sub figure [0] of «stereotype1»Class1 is not a compartment",class1figure.getChildren().get(2) instanceof RectangleFigure); + RectangleFigure propertiesClass=(RectangleFigure)class1figure.getChildren().get(2); + assertTrue("The sub figure [0] is not the attribute compartment is not a ResizableCompartmentFigure",propertiesClass.getChildren().get(0) instanceof ResizableCompartmentFigure); + + + assertTrue("The compartment attribute of the Class has not the good X coordinate",propertiesClass.getBounds().x==1); + assertTrue("The compartment attribute of the Class has not the good Y coordinate",propertiesClass.getBounds().y==36); + assertTrue("The compartment attribute of the Class has not the good width coordinate",propertiesClass.getBounds().width==200); + assertTrue("The compartment attribute of the Class has not the good height coordinate",propertiesClass.getBounds().height==54); + + + //compartment for operation + assertTrue("The sub figure [2] of «stereotype1»Class1 is not a compartment",class1figure.getChildren().get(3) instanceof RectangleFigure); + RectangleFigure operationsClass=(RectangleFigure)class1figure.getChildren().get(3); + assertTrue("The sub figure [2] is not the operation compartment is not a ResizableCompartmentFigure",operationsClass.getChildren().get(0) instanceof ResizableCompartmentFigure); + assertTrue("The compartment operation of the Class has not the good X coordinate",operationsClass.getBounds().x==1); + assertTrue("The compartment operation of the Class has not the good y coordinate",operationsClass.getBounds().y==91); + assertTrue("The compartment operation of the Class has not the good width coordinate",operationsClass.getBounds().width==200); + assertTrue("The compartment operation of the Class has not the good height coordinate",operationsClass.getBounds().height==54); + + //compartment for nested classifier + assertTrue("The figure of class1 is not an automaticCompartmentLayoutManager",class1figure.getChildren().get(4) instanceof RectangleFigure); + RectangleFigure innerclassifiersClass=(RectangleFigure)class1figure.getChildren().get(4); + assertTrue("The sub figure [0] is not the nested Classifier compartment is not a ResizableCompartmentFigure",innerclassifiersClass.getChildren().get(0) instanceof ResizableCompartmentFigure); + assertTrue("The compartment nested classifier of the Class has not the good X coordinate",innerclassifiersClass.getBounds().x==1); + assertTrue("The compartment nested classifier of the Class has not the good Y coordinate",innerclassifiersClass.getBounds().y==146); + assertTrue("The compartment nested classifier of the Class has not the good width coordinate",innerclassifiersClass.getBounds().width==200); + assertTrue("The compartment nested classifier of the Class has not the good Height coordinate",innerclassifiersClass.getBounds().height==54); + + } + + + + + + + {//test display of property of stereotype in compartment + RecordingCommand displayPropertyStereotypeCommand= AppliedStereotypeHelper.getAddAppliedStereotypePropertiesCommand(diagramEditor.getEditingDomain(), NotationClass1,stereotypeTest.getQualifiedName()+".testInt"); + diagramEditor.getEditingDomain().getCommandStack().execute(displayPropertyStereotypeCommand); + + //the compartment must be visible + assertTrue( "the compartment must be visible", appliedStereotypeCompartmentNotation.isVisible()==true); + //look for view that represents the property of the applied stereotype + stereotypePropertyView=(View)appliedStereotypeCompartmentNotation.getChildren().get(0); + assertNotNull( "the view of the applied stereotype property must be created", stereotypePropertyView); + //look for the editpart that represents the property of applied stereotype + stereotypeCompartmentEdipart=(GraphicalEditPart)classEditPart.getChildBySemanticHint(AppliedStereotypeConpartmentEditPart.ID); + stereotypePropertyEdipart=(GraphicalEditPart)stereotypeCompartmentEdipart.getChildBySemanticHint(AppliedStereotypeMultilinePropertyEditPart.ID); + assertNotNull( "the editpart of the applied stereotype compartment must be created", stereotypeCompartmentEdipart); + assertNotNull( "the editpart of the applied stereotype property must be created", stereotypePropertyEdipart); + EditingFlowPage textarea=(EditingFlowPage)stereotypePropertyEdipart.getFigure(); + assertTrue( "text of stereotype label be equals to «stereotype1» " ,((TextFlowEx)textarea.getChildren().get(0)).getText().equals("testInt=0")); + } + + {//test about the layout + org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure nodePlate=(org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure)((BorderedNodeFigure)classEditPart.getFigure()).getChildren().get(0); + // now verify position of each subfigure + class1figure=((ClassifierFigure)nodePlate.getChildren().get(0)); + class1figure.setBounds(new Rectangle(0,0,200,200)); + assertTrue("The figure of «stereotype1»Class1 is not an automaticCompartmentLayoutManager",class1figure.getLayoutManager() instanceof AutomaticCompartmentLayoutManager); + class1figure.getLayoutManager().layout(class1figure); + assertTrue("The figure of the «stereotype1»Class1 has not the good X coordinate",class1figure.getBounds().x==0); + assertTrue("The figure of the «stereotype1»Class1 has not the good Y coordinate",class1figure.getBounds().y==0); + assertTrue("The figure of the «stereotype1»Class1 has not the good width coordinate",class1figure.getBounds().width==200); + assertTrue("The figure of the «stereotype1»Class1 has not the good height coordinate",class1figure.getBounds().height==200); + + // At this moment the class figure must contain 5 sub-figures 1 label for stereotype+ 1label for name+ compartment of stereotypes+ 3compartments + assertTrue("The number of children «stereotype1»Class1 is not equals to 6",class1figure.getChildren().size()==6); + + + //label for stereotype + assertTrue("The sub figure [0] of «stereotype1»Class1 is not a label",class1figure.getChildren().get(0) instanceof Label); + Label stereotypelabelClass=(Label)class1figure.getChildren().get(0); + + assertTrue("The label of the Class has not the good X coordinate",stereotypelabelClass.getBounds().x==1); + assertTrue("The label of the Class has not the good Y coordinate",stereotypelabelClass.getBounds().y==3); + assertTrue("The label of the Class has not the good width coordinate",stereotypelabelClass.getBounds().width==200); + assertTrue("The label of the Class has not the good heightcoordinate",stereotypelabelClass.getBounds().height==15); + assertTrue("The label of the Class does not display «stereotype1»",stereotypelabelClass.getText().equals("«stereotype1»")); + + + //wrappingLabel for name + assertTrue("The sub figure [1] of «stereotype1»Class1 is not a wrapping label",class1figure.getChildren().get(1) instanceof WrappingLabel); + WrappingLabel labelClass=(WrappingLabel)class1figure.getChildren().get(1); + + assertTrue("The label of the Class has not the good X coordinate",labelClass.getBounds().x==1); + assertTrue("The label of the Class has not the good Y coordinate",labelClass.getBounds().y==19); + assertTrue("The label of the Class has not the good width coordinate",labelClass.getBounds().width==200); + assertTrue("The label of the Class has not the good heightcoordinate",labelClass.getBounds().height==16); + assertTrue("The label of the Class does not display Class1",labelClass.getText().equals("Class1")); + + + // compartment for property of stereotypes + assertTrue("The sub figure [2] of «stereotype1»Class1 is not a compartment",class1figure.getChildren().get(2) instanceof StereotypePropertiesCompartment); + StereotypePropertiesCompartment sterotypesPropertiesClass=(StereotypePropertiesCompartment)class1figure.getChildren().get(2); + + assertTrue("the stereotype properties compartment does not conent the compartment for a stereotype",sterotypesPropertiesClass.getChildren().get(0) instanceof ResizableCompartmentFigure); + ResizableCompartmentFigure compartmentFigure=(ResizableCompartmentFigure) sterotypesPropertiesClass.getChildren().get(0); + assertTrue("The content of the sterotype properties compartment is not an EditingFlowPage",compartmentFigure.getContentPane().getChildren().get(0) instanceof EditingFlowPage); + EditingFlowPage stereotypeProperty= (EditingFlowPage)compartmentFigure.getContentPane().getChildren().get(0); + assertTrue( "text of stereotype label be equals to «stereotype1» " ,((TextFlowEx)stereotypeProperty.getChildren().get(0)).getText().equals("testInt=0")); + + assertTrue("The compartment property of stereotypes of the Class has not the good X coordinate",sterotypesPropertiesClass.getBounds().x==1); + assertTrue("The compartment property of stereotypes of the Class has not the good Y coordinate",sterotypesPropertiesClass.getBounds().y==36); + assertTrue("The compartment property of stereotypes of the Class has not the good width coordinate",sterotypesPropertiesClass.getBounds().width==200); + assertTrue("The compartment property of stereotypes of the Class has not the good height coordinate",sterotypesPropertiesClass.getBounds().height==51); + + //compartment for attribute + assertTrue("The sub figure [2] of «stereotype1»Class1 is not a compartment",class1figure.getChildren().get(3) instanceof RectangleFigure); + RectangleFigure propertiesClass=(RectangleFigure)class1figure.getChildren().get(3); + assertTrue("The sub figure [2] is not the attribute compartment is not a ResizableCompartmentFigure",propertiesClass.getChildren().get(0) instanceof ResizableCompartmentFigure); + + assertTrue("The compartment attribute of the Class has not the good X coordinate",propertiesClass.getBounds().x==1); + assertTrue("The compartment attribute of the Class has not the good Y coordinate",propertiesClass.getBounds().y==88); + assertTrue("The compartment attribute of the Class has not the good width coordinate",propertiesClass.getBounds().width==200); + assertTrue("The compartment attribute of the Class has not the good height coordinate",propertiesClass.getBounds().height==37); + + + //compartment for operation + assertTrue("The sub figure [2] of «stereotype1»Class1 is not a compartment",class1figure.getChildren().get(4) instanceof RectangleFigure); + RectangleFigure operationsClass=(RectangleFigure)class1figure.getChildren().get(4); + assertTrue("The sub figure [2] is not the operation compartment is not a ResizableCompartmentFigure",operationsClass.getChildren().get(0) instanceof ResizableCompartmentFigure); + assertTrue("The compartment operation of the Class has not the good X coordinate",operationsClass.getBounds().x==1); + assertTrue("The compartment operation of the Class has not the good y coordinate",operationsClass.getBounds().y==126); + assertTrue("The compartment operation of the Class has not the good width coordinate",operationsClass.getBounds().width==200); + assertTrue("The compartment operation of the Class has not the good height coordinate",operationsClass.getBounds().height==37); + + //compartment for nested classifier + assertTrue("The figure of class1 is not an automaticCompartmentLayoutManager",class1figure.getChildren().get(5) instanceof RectangleFigure); + RectangleFigure innerclassifiersClass=(RectangleFigure)class1figure.getChildren().get(5); + assertTrue("The sub figure [0] is not the nested Classifier compartment is not a ResizableCompartmentFigure",innerclassifiersClass.getChildren().get(0) instanceof ResizableCompartmentFigure); + assertTrue("The compartment nested classifier of the Class has not the good X coordinate",innerclassifiersClass.getBounds().x==1); + assertTrue("The compartment nested classifier of the Class has not the good Y coordinate",innerclassifiersClass.getBounds().y==164); + assertTrue("The compartment nested classifier of the Class has not the good width coordinate",innerclassifiersClass.getBounds().width==200); + assertTrue("The compartment nested classifier of the Class has not the good Height coordinate",innerclassifiersClass.getBounds().height==37); + + } + } + + @Before + @Override + protected void setUp() throws Exception { + super.setUp(); + RegisteredProfile registeredProfile = RegisteredProfile.getRegisteredProfile("TestProfile"); + final Model root = ((Model)getDiagramEditPart().resolveSemanticElement()); + URI modelUri = registeredProfile.uri; + @SuppressWarnings("deprecation") + final Resource modelResource = Util.getResourceSet(root).getResource(modelUri, true); + final Profile profile = (Profile)modelResource.getContents().get(0); + // PackageUtil.applyProfile(root,profile, false); + final TransactionalEditingDomain domain = ServiceUtils.getInstance().getTransactionalEditingDomain(papyrusEditor.getServicesRegistry()); + AppliedProfileCommand appliedProfileCommand = new AppliedProfileCommand(domain, root, profile); + domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(appliedProfileCommand)); + + + } +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestProfileApplication.java b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestProfileApplication.java index 2e807e5dc7c..f46ca5ce625 100644 --- a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestProfileApplication.java +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestProfileApplication.java @@ -13,7 +13,6 @@ *****************************************************************************/ package org.eclipse.papyrus.diagram.stereotypeproperty; -import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.transaction.TransactionalEditingDomain; @@ -35,6 +34,7 @@ public class TestProfileApplication extends AbstractPapyrusTestCase { final Model root = ((Model)getDiagramEditPart().resolveSemanticElement()); assertTrue("Registered profile not found", registeredProfile != null); URI modelUri = registeredProfile.uri; + @SuppressWarnings("deprecation") final Resource modelResource = Util.getResourceSet(root).getResource(modelUri, true); assertTrue("the registered profile is not a profile", (modelResource.getContents().get(0) instanceof Profile)); assertTrue("strange profile", ("".equals(registeredProfile.qualifiednames))); @@ -44,7 +44,6 @@ public class TestProfileApplication extends AbstractPapyrusTestCase { AppliedProfileCommand appliedProfileCommand = new AppliedProfileCommand(domain, root, profile); domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(appliedProfileCommand)); - EList list = root.getAllAppliedProfiles(); assertTrue("Profile not applied", root.getAllAppliedProfiles().size() == 1); } diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java index 0c3f999eef3..4c88dd3f61a 100644 --- a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java @@ -15,15 +15,12 @@ package org.eclipse.papyrus.diagram.stereotypeproperty; import java.util.ArrayList; -import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.transaction.RecordingCommand; import org.eclipse.emf.transaction.TransactionalEditingDomain; -import org.eclipse.gef.EditPart; import org.eclipse.gef.commands.Command; import org.eclipse.gef.commands.UnexecutableCommand; -import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy; import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; import org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure; import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest; @@ -31,11 +28,9 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory; import org.eclipse.gmf.runtime.draw2d.ui.text.TextFlowEx; import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper; import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper; import org.eclipse.papyrus.infra.core.utils.ServiceUtils; import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IShapeCompartmentEditPart; -import org.eclipse.papyrus.uml.appearance.commands.AddAppliedStereotypePropertiesToDisplayCommand; import org.eclipse.papyrus.uml.appearance.helper.AppliedStereotypeHelper; import org.eclipse.papyrus.uml.appearance.helper.UMLVisualInformationPapyrusConstant; import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPart; @@ -47,7 +42,6 @@ import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereo import org.eclipse.papyrus.uml.extensionpoints.profile.RegisteredProfile; import org.eclipse.papyrus.uml.extensionpoints.utils.Util; import org.eclipse.papyrus.uml.tools.commands.ApplyStereotypeCommand; -import org.eclipse.swt.widgets.Label; import org.eclipse.uml2.uml.Element; import org.eclipse.uml2.uml.Model; import org.eclipse.uml2.uml.Profile; @@ -97,7 +91,6 @@ public class TestStereotypeApplication extends AbstractPapyrusTestCase { assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 1); //1 element element due to the reference to the profile - EList list = ((Model)getRootSemanticModel()).getAllAppliedProfiles(); assertTrue(CREATION + INITIALIZATION_TEST, ((Model)getRootSemanticModel()).getAllAppliedProfiles().size() == 1); @@ -185,6 +178,7 @@ public class TestStereotypeApplication extends AbstractPapyrusTestCase { RegisteredProfile registeredProfile = RegisteredProfile.getRegisteredProfile("TestProfile"); final Model root = ((Model)getDiagramEditPart().resolveSemanticElement()); URI modelUri = registeredProfile.uri; + @SuppressWarnings("deprecation") final Resource modelResource = Util.getResourceSet(root).getResource(modelUri, true); final Profile profile = (Profile)modelResource.getContents().get(0); // PackageUtil.applyProfile(root,profile, false); -- cgit v1.2.3