Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/.project22
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/doc.html6
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/doc.mediawiki307
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig1.pngbin0 -> 21079 bytes
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig10.pngbin0 -> 38325 bytes
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig11.pngbin0 -> 27846 bytes
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig12.pngbin0 -> 26464 bytes
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig13.pngbin0 -> 169399 bytes
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig14.pngbin0 -> 107156 bytes
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig2.pngbin0 -> 39536 bytes
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig3.pngbin0 -> 55279 bytes
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig4.pngbin0 -> 26937 bytes
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig5.pngbin0 -> 27593 bytes
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig6.pngbin0 -> 26456 bytes
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig7.pngbin0 -> 41019 bytes
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig8.pngbin0 -> 1548 bytes
-rw-r--r--doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig9.pngbin0 -> 21193 bytes
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/META-INF/MANIFEST.MF16
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/AbstractQVTGenerator.java154
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EcoreGenerator.java162
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EditContextGenerator.java30
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/IGenerator.java41
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/ProfileGenerator.java178
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/messages/Messages.java24
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/messages/messages.properties12
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/AbstractValidator.java42
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/SourceValidator.java73
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/TargetValidator.java36
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextMainPage.java2
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextWizard.java5
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/GeneratorPage.java183
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectFieldsPage.java5
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectOutputPage.java199
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/FileChooser.java12
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/transforms/ecore2datacontext.qvto18
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/transforms/profile2datacontext.qvto39
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/CustomizationModelElement.java6
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/META-INF/MANIFEST.MF24
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractEditor.java96
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractValueEditor.java163
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanCheckbox.java23
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanCombo.java25
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanRadio.java29
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanToggle.java48
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompactMultipleValueEditor.java28
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/DoubleEditor.java61
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/EnumRadio.java55
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IntegerEditor.java82
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IntegerMask.java7
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IntegerSpinner.java163
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleDoubleEditor.java70
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleStringFileEditor.java10
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueEditor.java6
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueSelectorDialog.java80
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceCombo.java68
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceDialog.java144
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringCombo.java3
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringEditor.java257
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringFileSelector.java17
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringLabel.java11
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringMask.java11
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/UnlimitedNaturalEditor.java119
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/Messages.java14
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/messages.properties7
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/providers/FileExtensions.java12
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/validator/UnlimitedNaturalValidator.java11
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/Environment.xmi5
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleLiteralUnlimitedNatural.xwt11
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleRealLiteral.xwt9
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/datatype/StructuredDataTypeObservableValue.java1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java12
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/DynamicBodyEditor.java14
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/AbstractUMLValidator.java31
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/NamedElementValidator.java71
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/PapyrusObservableValue.java14
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties.model/META-INF/MANIFEST.MF5
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties.model/Model/Properties.ecore1
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/contexts/impl/ContextsFactoryImpl.java1
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/contexts/util/ContextsAdapterFactory.java1
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/contexts/util/ContextsSwitch.java1
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/Type.java27
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/impl/EnvironmentFactoryImpl.java3
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/impl/EnvironmentPackageImpl.java1
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/util/EnvironmentAdapterFactory.java1
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/util/EnvironmentSwitch.java1
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/ui/impl/UiFactoryImpl.java3
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/ui/util/UiAdapterFactory.java1
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/ui/util/UiSwitch.java1
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/model/Environment.xmi262
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AbstractModelElement.java9
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/DataSource.java14
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/ModelElement.java10
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/runtime/ConfigurationManager.java75
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/AbstractPropertyEditor.java51
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/DoubleEditor.java39
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/MultiDouble.java63
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/MultiReferenceEditorWithPropertyView.java6
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/StringFileSelectorEMF.java6
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/UnlimitedNaturalEditor.java31
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/xwt/XWTSection.java4
-rw-r--r--tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/META-INF/MANIFEST.MF7
-rw-r--r--tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/org.eclipse.papyrus.customization.properties.tests.launch7
-rw-r--r--tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/resources/profile/model3.profile.di2
-rw-r--r--tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/resources/profile/model3.profile.notation57
-rw-r--r--tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/resources/profile/model3.profile.uml104
-rw-r--r--tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/src/org/eclipse/papyrus/customization/properties/tests/qvt/TransformationsTests.java156
107 files changed, 3481 insertions, 855 deletions
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/.project b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/.project
new file mode 100644
index 00000000000..2c7104fb1bd
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.views.properties.doc</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/.settings/org.eclipse.core.resources.prefs b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 00000000000..3094d0be094
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/doc.html=utf-8
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/doc.html b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/doc.html
new file mode 100644
index 00000000000..6371dfbe6dd
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/doc.html
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body><h2 id="INTRODUCTION">INTRODUCTION</h2><p>In UML, the main information is represented in graphical diagrams. However, it is not always possible to represent graphically the whole semantic of UML, not talking of all the cosmetic properties. For example, it is pretty easy to represent and to edit a Class’ name graphically. While we still can represent the “is abstract†property graphically (By using the italic font for the Class’ name), it is harder to edit this property directly from the diagram. Worse, the “is leaf†property doesn’t even have a graphical representation. Thus, we often need a different view for representing all the properties of a UML Element, without polluting the graphical view.</p><p>As UML is highly extensible, through the mean of Profiles, it is also important to be able to represent and edit the profile’s properties, without managing everything from the diagram view.</p><p>Eclipse provides a standard view for these properties: the Properties Page. This view is a table representing all the properties available for the selected Element, including the ones that cannot be represented or edited graphically. This view is pretty useful, but is neither really user-friendly nor optimal, as it may require up to four clicks to simply edit a comment’s body. Moreover, it can only be extended via Java code, which requires some technical skills and prevents a dynamic modification of the view, as the Java code needs to be recompiled after each modification.</p><p>There is an extension of the base Property View framework, still in the standard Eclipse implementation, which fixes some of these problems. It is called the “Eclipse Tabbed Properties View†framework. It provides a better look and feel for the property view, with more flexibility, and a better usability. However, it keeps being difficult to customize, as it still hard-coded in Java.</p><p>Papyrus provides its own Property View framework, based on the Tabbed Property View framework. The Papyrus Property View can be extended in two ways:</p><ul><li>Dynamically, for the layout of the property view: show/hide a property, reorder the properties, add/remove a tab…</li><li>Statically, through Java code, for advanced operations: create a new widget for editing the properties, add a custom Content Provider for selecting a reference value…</li></ul><p>This document aims at detailing all the features related to the property view customization, both dynamically and statically.</p><h2 id="THE_CUSTOMIZATION_TOOL">THE CUSTOMIZATION TOOL</h2><p>Most customizations can be done through the Property view customization Editor. It provides native support for EMF Models, UML models and profiles. It also provides a set of basic widgets and property editors.</p><h3 id="Edit_a_configuration">Edit a configuration</h3><p>Each property view configuration is defined in a different set of files. Each configuration can contain elements from different contexts, but we typically have one configuration per Ecore Metamodel or UML Profile (i.e. one configuration for UML, one for the Diagram Appearance tab, another one for the SysML profile…)</p><p>To see the list of available configurations, open the properties view (Window -&gt; Show View -&gt; Other… -&gt; General/Properties). Click on the white arrow in the upper right corner of the Properties view, and select “Customize property viewâ€. You should see a dialog with the list of all available configurations.</p><p><img title="Open the property view customization menu" alt="Open the property view customization menu" border="0" src="ressource/fig1.png"/></p><p>As the standard configurations are read-only, you cannot edit them directly. You will first need to make a copy of the configuration. You will then be able to edit the copy.</p><p><img title="Copy an existing configuration to edit it" alt="Copy an existing configuration to edit it" border="0" src="ressource/fig2.png"/></p><p>The Property View Editor has three panes:</p><ul><li>The Editor part</li><li>The Preview part</li><li>The Properties part</li></ul><p>The Editor presents the elements defined by this configuration. The Preview displays an overview of the selected View, as it will be displayed in the property view at runtime. The properties view displays the properties of the selected element</p><p><img title="The property view Editor" alt="The property view Editor" border="0" src="ressource/fig3.png"/></p><h3 id="The_property_view_elements">The property view elements</h3><p>The editor contains a Tree, containing the following elements :</p><ul><li>Context: it is a property view configuration. You will typically have one property view Context per Ecore Metamodel or UML Profile, but you can choose the granularity you want. A context has a list of tabs, and a list of views.</li><li>Tab: describes a tab in the property view. A tab has a label, an (optional) image, and can be indented. It also has a priority.</li><li>View: describes a property view associated to a selection. The view has a name, a constraint, a multiplicity and a list of sections. The constraint is used to determine for what kind of object the view should be displayed.</li><li>Constraint: a query that inputs a selection, and outputs a boolean (true if the constraint matches the input object, false otherwise). It is possible to implement your own constraint type (In Java).</li><li>Section: a section is a sub-part of a view. A view generally needs only one section, but there are cases where you need more than one section. A section is associated to a single tab, so, if you want to display more than one tab in a single view (For example, « UML » and « Profile » in the UML property view), you will need at least two sections in that view (One for each tab). Another (advanced) case is described in « Dynamic sections ». A section has a name, a tab, and a Composite.</li><li>Composite: this is the actual presentation element. The composite is a widget which can contain other widgets. A composite has a type, and a list of widgets.</li><li>Layout: all composites need a layout. The default is « PropertiesLayout », which is a variant of the SWT standard GridLayout. A PropertiesLayout has a number of columns. The default is one column.</li><li>Property Editor: a property editor is a widget which is used to edit a single property of the selected object. You will typically have one Property editor for each property that you want to edit in the property view. The property editor has a property, and a widget to edit that property.</li><li>Standard Widget: a widget from the standard SWT Library. Few of them are currently available, because they are rarely needed.</li></ul><p>The Tree allows reordering or removing easily the elements (Through drag &amp; drop, delete). The editor also supports the Undo/Redo commands.</p><h4 id="Preview">Preview</h4><p>The preview displays a real-time overview of the selected View. However, some widgets can only be computed at runtime, which prevents a pertinent preview. This is the case of the “Enum Radio†widget, for example, as the enumerated values are only known at runtime.</p><h4 id="Property_view">Property view</h4><p>The property view is used to edit the properties of the element selected in the tree. The property view uses the Papyrus Property View framework, thus can be customized just the same way you would customize any other property view.</p><p><img title=" the three panes of the Property view editor" alt=" the three panes of the Property view editor" border="0" src="ressource/fig4.png"/></p><h3 id="Priorities_between_views">Priorities between views</h3><p>When more than one view match a selection, a priority mechanism will determine which one(s) should be displayed. The priorities are defined at the level of the view’s constraints, i.e. if the constraint for a View A overrides a constraint for the View B, the View B won’t be displayed. For example, a UML Class from a Class Diagram will match many views (The list is not exhaustive):</p><ul><li>SingleClass (From UML)</li><li>MultipleClass (As the -1 multiplicity actually means “any number of elementsâ€)</li><li>SingleElement (And MultipleElement)</li><li>SingleClassifier (And MultipleClassifier)</li><li>*Style (From GMF Notation model)</li><li>StereotypeDisplay (From UML Notation model)</li></ul><p>The priorities are computed in two ways:</p><ul><li>Automatic, according to the Java constraints implementations</li><li>Statically, according to the property view configuration</li></ul><p>When the “isOverrideable†property is set to false for a Constraint (In the property view model), only the static rules will be taken into account.</p><p><img title="The constraint cannot be dynamically overridden" alt="The constraint cannot be dynamically overridden" border="0" src="ressource/fig5.png"/></p><p>The automatic rules are the following:</p><ul><li>A constraint with a multiplicity of 1 always overrides the same constraint with a multiplicity of -1 (Or &gt;1). Thus, “MultipleClass†won’t be displayed, because “SingleClass†also matches our selection.</li><li>An EMF (Or UML) “Instance of†constraint always overrides a constraint matching a supertype. Thus, “SingleClassifier†won’t be displayed, because a Class is more specific than a Classifier. However, “SingleElement†*will be* displayed, because it is not overrideable (isOverrideable=false).</li><li>A stereotype constraint (HasStereotype) will *not* override its UML “Instance of†constraint. However, a specific implementation of this constraint has been provided for Scade, which *will* override the UML metaclass (i.e., a Block will override a Class’ property view, hiding the UML tab).</li><li>For CompositeConstraints: if a composite constraint is a superset of another constraint, it will override it (It is more specific). For example, a Composite Constraint “isA and isB†will override a constraint “isBâ€, but will not override a constraint “isB and isCâ€.</li></ul><p>Please note that each constraint has its own implementation of the overrides() method. See the advanced chapter for more information</p><p>The static rule is simple: when a Constraint explicitly overrides another constraint, it will always override it. This is especially useful when you’ve marked a constraint as “overrideable=falseâ€, but still want to override it in a specific case (Remember that overrideable=false only applies to *automatic* constraint resolution).</p><p><img title="Force this constraint to override another constraint" alt="Force this constraint to override another constraint" border="0" src="ressource/fig6.png"/></p><p>Finally, in the previous example, the following views will be displayed:</p><ul><li>SingleClass (Overrides MultipleClass, Single/MultipleClassifier ; UML Tab)</li><li>SingleElement (overrideable=false ; Profile tab)</li><li>FillStyle, FontStyle, LineStyle (Appearance tab)</li><li>StereotypeDisplay (overrideable=false ; Appearance tab)</li></ul><h3 id="Preferences">Preferences</h3><p>When you make a copy of a property view, it is not automatically activated. Thus, the modifications brought to the copy are not immediately visible on your property view. To activate a property view, you need to open the Papyrus preferences, from Window &gt; Preferences.</p><p><img title="Preferences" alt="Preferences" border="0" src="ressource/fig7.png"/></p><p>When making a copy of an existing configuration, you should uncheck the default one, and check the new one.</p><h2 id="ADVANCED_CUSTOMIZATION">ADVANCED CUSTOMIZATION</h2><p>The customization tool only allows basic operations, such as adding, removing or reordering properties.</p><p>The property view framework is much more powerful, but this requires some Java development. This chapter will focus on the advanced customization of the property view.</p><h3 id="The_Environment_model">The Environment model</h3><p>To associate Java implementations with the property view model, you need to declare an Environment model. You can create a new Environment model with the “Environment Model†wizard in “Example EMF Model Creation Wizards†category. Select “Environment†as the Model Object.</p><p>Once you’ve added your Java class declarations, you should register the environment model so that the property view knows about it. Add an extension to org.eclipse.papyrus.properties.environment, and select your model file.</p><h3 id="Create_a_new_widget">Create a new widget</h3><p>You can create new widgets for the property view. There are four kinds of graphical elements: CompositeWidget, Layout, StandardWidget and PropertyEditor.
+The widgets contain three common fields:</p><ul><li>Label: The label displayed in the Customization editor when the user selects a widget type.</li><li>Namespace: The XWT namespace associated to the Widget.</li><li>WidgetClass: The simple name of the Java class implementing the Widget.</li></ul><p>The PropertyEditor contains two additional fields:</p><ul><li>Multiplicity: The multiplicity of the properties it can handle (1 for single-valued properties, -1 for multivalued properties)</li><li>Type: The type of the properties it can handle.</li></ul><p>To implement a Composite, Layout or Standard widget, you should simply follow the SWT rules, i.e. extend either Composite, Canvas or Layout, and have a (Composite, int) constructor. To define a PropertyEditor, you have two options:</p><ul><li>Extend Composite, have a (Composite, int) constructor, and implement the CustomizablePropertyEditor interface (From org.eclipse.papyrus.properties.widgets)</li><li>Extend directly AbstractPropertyEditor (From org.eclipse.papyrus.properties.widgets)</li></ul><h3 id="Constraints">Constraints</h3><p>Adding a Constraint is similar to creating a new Widget. You have two options to implement a new Constraint:</p><ul><li>Implement the Constraint interface (From org.eclipse.papyrus.properties.constraints)</li><li>Extend the AbstractConstraint class (From org.eclipse.papyrus.properties.constraints)</li></ul><p>The important methods are the following (depending on whether you’re implement Constraint or extending AbstractConstraint):</p><ul><li>setDescriptor/setConstraintDescriptor: <ul><li>Configures the constraint.</li></ul></li><li>match(Object)/match(IStructuredSelection) : Boolean<ul><li>Indicates whether this constraint matches the given given or not</li></ul></li><li>overrides(Constraint) : Boolean<ul><li>Indicates whether this constraint overrides another constraint or not. A constraint should override another constraint when it is more specific.</li></ul></li><li>equivalent(Constraint) : Boolean<ul><li>This is only used by AbstractConstraint. Two constraints are equivalent if they have the same parameters (ConstraintDescriptor). Two equivalent constraints can have different multiplicities.</li></ul></li></ul><p>The equivalent() and overrides() methods are used to automatically resolve constraints conflicts (Two different constraints matching the same element).
+Once the Constraint is implemented, don’t forget to register it in your environment model.</p><h3 id="ModelElement">ModelElement</h3><p>The ModelElement is the interface between the property view and your domain model. It is used to retrieve information about the object(s) being edited from the property. These informations will be used to configure the widget. AbstractModelElement provides a base implementation for this interface.</p><p>All methods from this interface take a single parameter, which is the name of the property being edited.</p><ul><li>getObservable(String) / doGetObservable(String) :</li></ul><p>This method returns an IObservable which will be used to read and write a single property from the represented object. It should return an IObservableValue for single-valued properties, and IObservableList for multi-valued properties.</p><ul><li>getContentProvider(String) :</li></ul><p>This method is only used for reference and enumerated properties. It should return a list of values which can be set to the edited property. Unlike IStructuredContentProvider, this provider will not rely on a StructuredViewer to retrieve an input object: the method getElement() will be called without any parameter, so the implementation should be able to retrieve its own typically. This will typically be achieved by passing a context object in the provider’s constructor.</p><ul><li>getLabelProvider(String) :</li></ul><p>This method is used to display an element’s label for a few widgets. Note that the same instance of label provider can be used by more than one Viewer for a given property. For example, the MultiReference widget will display three viewers, each using the same label provider. Each viewer will try to dispose the LabelProvider as soon as they are themselves disposed (For example, when closing the selection dialog from MultiReference). Thus, you should probably not implement the dispose() method, to avoid inconsistent providers.</p><ul><li>getValidator(String) : </li></ul><p>This method returns an IValidator, if there’s one which is set up for the current property. </p><h3 id="ModelElement_Factory">ModelElement Factory</h3><p>The ModelElements are associated to DataContextElements through a ModelElementFactory. The ModelElementFactory is defined on the DataContextRoot. All children of a DataContextRoot will share the same ModelElementFactory.</p><p>To add a new ModelElement, you should also create a new ModelElementFactory, and register it in your Environment model. Then, you can set this factory to your DataContextRoot.</p><p>Note: to display the Data contexts, you need to check the toggle button on top of the editor: <img border="0" src="ressource/fig8.png"/></p><p><img title="The UML DataContextRoots, with their own factories" alt="The UML DataContextRoots, with their own factories" border="0" src="ressource/fig9.png"/></p><h3 id="Content_Providers_and_Widgets">Content Providers and Widgets</h3><p>Note: The ContentProviders have been refactored in Papyrus 0.9, to be simplified. However, most of this chapter should remain true.</p><p>The ContentProvider is a complex features, which often evolves in the Papyrus property view. The ModelElement has been designed to be compatible with many kinds of different widgets (Combo-box, Tree-based dialogs…). The problem is that these widgets typically use different kinds of JFace ContentProvider (IStructuredContentProvider for flat display, ITreeContentProvider for Tree display). In the Property view, we needed to unify these providers.</p><p>Thus, it is recommended to use a IHierarchicContentProvider, which extends ITreeContentProvider, with an additional method: isValidValue(Object). In a Tree, we typically have two kinds of elements: the elements which can potentially be selected, and their containers, which often cannot. The isValidValue() method is used to distinguish between these values.</p><p>When a flat widget (e.g. ReferenceCombo) is used, only the valid values will be displayed. When a tree-based widget (e.g. ReferenceDialog) is used, a sub-tree will be displayed, excluding the sub-trees which don’t contain any valid value. Moreover, the invalid values won’t be selectable (For example, in the ReferenceDialog, the “ok†button will be grayed).</p><p><img title="IHierarchicContentProvider at runtime" alt="IHierarchicContentProvider at runtime" border="0" src="ressource/fig10.png"/></p><h3 id="Dynamic_sections">Dynamic sections</h3><p>Sometimes, the property view should not depend on a selection, but on a specific property of the selected element. In such a case, it is frequent that this specific property might be edited by the property view itself. However, the property view is only refreshed when the selection changes.</p><p>To overcome this problem, Papyrus offers a “Dynamic section†feature, which allows refreshing dynamically one or more sections of the property view. For example, when you’re editing a View’s constraint in the Property view Editor, the constraint’s properties directly depend on the constraint’s type. When you select an UML constraint, the constraint’s parameter is the name of a UML Metaclass. When you select an EMF constraint, the constraint has two parameters: Namespace URI of the Metamodel, and the name of the Metaclass. Changing the constraint type should also change the constraint’s parameters editors.</p><p><img title="A view with a static and a dynamic section" alt="A view with a static and a dynamic section" border="0" src="ressource/fig11.png"/></p><p>This can be achieved with dynamic sections, i.e. a section with a constraint. The constraint will be executed once at the beginning, and once again each time a property from the property view changes. If the constraint is matched, the section will be displayed. Otherwise, it will be hidden.
+A view with dynamic sections will typically look like the following:</p><ul><li>A single unconstrained section containing the common parameters</li><li>One dynamic (i.e. constrained) section for each specific case</li></ul><p><img title="Dynamic sections configuration" alt="Dynamic sections configuration" border="0" src="ressource/fig12.png"/></p><p>Please note that tabs cannot be added nor removed dynamically. For example, when you apply a stereotype on a UML Element, the tab associated to the stereotype’s property view cannot be displayed until you select the element again.</p><h3 id="Property_view_Header">Property view Header</h3><p>The Eclipse Tabbed Property View offers an extension point to define the label provider for the property view header. However, this label provider will be specific to the editor. For generic editors, it is not always possible to provide a pertinent label provider: they will always be too generic, and won’t be able to handle specific elements. For example, a generic EMF Model Editor with the customizable property view will only be able to display standard EMF labels and icons. To overcome this problem, Papyrus offers a configurable label provider for the header: org.eclipse.papyrus.properties.provider.SelectionLabelProvider</p><p>This label provider uses the selected element to find the most appropriate label provider, then dispatches the getText and getIcon calls to it. This label provider can be configured through an extension point: org.eclipse.papyrus.properties.labelprovider</p><p>This extension point takes an implementation of IFilteredLabelProvider and a priority. The IFilteredLabelProvider is a label provider with an additional method: boolean accept(IStructuredSelection). For each selection, the label provider accepting the selection, and having the highest priority will be used to display a header for it. It will then be possible to define a generic label provider for all java objects, with the lowest priority; another generic label provider for all EMF Objects, and a really specific label provider for a given metamodel (with the highest priority).
+In Papyrus, we have such an example for UML. The Papyrus UML Diagrams use the GMF model, which doesn’t have icons. We wanted to have a different icon for each type of Diagram: this is not possible with a standard EMF label provider, which associates an icon to an EClass, independently of its instances’ attributes.</p><p>So, we registered the standard EMF Label Provider with a medium priority, which can handle any kind of EObject, and a UML Label Provider, which can only handle UML Elements and GMF Diagrams, with a higher priority.</p><p>The lower the priority number, the higher the priority actually is: </p><ul><li>100: Lowest priority. The standard EMF Object label provider has a priority of 100, and is called iff no other label provider can accept an EObject.</li><li>50: Medium priority. The Papyrus UML Label Provider has a priority of 50.</li><li>10: High priority. </li><li>0: Highest priority.</li></ul><p>If no label provider matches the selection, the default JFace LabelProvider is used.</p><h3 id="Binding_and_Validation">Binding and Validation</h3><p>View Properties support JFace Databinding, which connects our UI to our model. For the validation there are two kinds of validators: </p><ul><li>Widget validators: they check that our input is the kind of data expected by our widget before synchronizing it ( e.g IntegerEditor must have a correct integer for input) </li></ul><ul><li>Model validators: they check that our input verifies our model constraint, they must be instantiate in UmlModelElement#getValidator();</li></ul><p>If there are errors during the binding a control decoration is shown next to the widget. It also supports three level of severity (Ok, Warning, Error).</p><p><img title="Example of binding with a model validator and warning severity result" alt="Example of binding with a model validator and warning severity result" border="0" src="ressource/fig13.png"/></p><h3 id="Field_coloration">Field coloration</h3><p>Properties views have fields’ coloration. If you modify a value the background of the field will be orange, when you validate a change the background will turn green for couple of seconds if the synchronization was successful, it will turn red otherwise. </p><p><img title="Example of a field being modified" alt="Example of a field being modified" border="0" src="ressource/fig14.png"/></p><h2 id="GENERATION_TOOL">GENERATION TOOL</h2><p>Editing an existing property view can be useful, but most of the time, you’ll want a brand new configuration for your own profile or meta-model. Thus, the framework provides a tool to automatically generate the initial property view, which you can then customize using the customization tool.
+The generator can create a property view configuration from either a UML Profile or an Ecore Meta-model. The wizard is available in the Papyrus category: File -&gt; New -&gt; Other… -&gt; Papyrus/Property view configuration.</p><p>The wizard provides two default generators:</p><ul><li>Generate a property view from a UML Profile</li><li>Generate a property view from an Ecore Meta-model</li></ul><p>The source file must be located in your workspace. A default target file named will be filled with the .ctx extension (This is the extension for a property view configuration).</p><p>Press next: a combo asks you which strategy to use. </p><p>A basic method: all the elements from the profile or meta-model will be extracted, with no dependencies to other models. </p><p>Same CTX file: you are asked to choose which models you want to extract, and will be saved in the same file</p><p>Different CTX file(s): you are asked to choose which models you want to extract and they will be saved in different files, (each profile name will be the name of the generated ctx file)</p><p>Press next: a table with all the elements extracted from your profile or meta-model is displayed. This table contains four columns:</p><ul><li>Field: the name of the element or property</li><li>Display single: whether this property should be displayed when a single instance of this element is selected</li><li>Display multiple: whether this property should be displayed when more than one instance of this element is selected</li><li>Description: the description of the property (Most of the time, it will be N/A, as the default generators cannot extract the documentation from the source model).</li></ul><p>Press finish: two files or more files according to the chosen strategy and a folder are generated:</p><ul><li>The *.ctx file, corresponding to your property view configuration</li><li>The ui/ folder, containing a set of XWT files, which contain the graphical information of your property views</li><li>The *FieldSelection.xmi file, which reminds the choices you’ve made about displaying each property. This file is currently unused.</li></ul><p>You can now open the *.ctx file and customize your property view.</p><h2 id="DEPLOYING_A_PROPERTY_VIEW">DEPLOYING A PROPERTY VIEW</h2><p>Papyrus provides a simple tool to deploy a property view locally (Right click on a CTX file -&gt; Deploy/Undeploy) </p></body></html> \ No newline at end of file
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/doc.mediawiki b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/doc.mediawiki
new file mode 100644
index 00000000000..a24d1ffa520
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/doc.mediawiki
@@ -0,0 +1,307 @@
+== INTRODUCTION ==
+In UML, the main information is represented in graphical diagrams. However, it is not always possible to represent graphically the whole semantic of UML, not talking of all the cosmetic properties. For example, it is pretty easy to represent and to edit a Class’ name graphically. While we still can represent the “is abstract” property graphically (By using the italic font for the Class’ name), it is harder to edit this property directly from the diagram. Worse, the “is leaf” property doesn’t even have a graphical representation. Thus, we often need a different view for representing all the properties of a UML Element, without polluting the graphical view.
+
+
+As UML is highly extensible, through the mean of Profiles, it is also important to be able to represent and edit the profile’s properties, without managing everything from the diagram view.
+
+
+Eclipse provides a standard view for these properties: the Properties Page. This view is a table representing all the properties available for the selected Element, including the ones that cannot be represented or edited graphically. This view is pretty useful, but is neither really user-friendly nor optimal, as it may require up to four clicks to simply edit a comment’s body. Moreover, it can only be extended via Java code, which requires some technical skills and prevents a dynamic modification of the view, as the Java code needs to be recompiled after each modification.
+
+
+There is an extension of the base Property View framework, still in the standard Eclipse implementation, which fixes some of these problems. It is called the “Eclipse Tabbed Properties View” framework. It provides a better look and feel for the property view, with more flexibility, and a better usability. However, it keeps being difficult to customize, as it still hard-coded in Java.
+
+
+Papyrus provides its own Property View framework, based on the Tabbed Property View framework. The Papyrus Property View can be extended in two ways:
+* Dynamically, for the layout of the property view: show/hide a property, reorder the properties, add/remove a tab…
+* Statically, through Java code, for advanced operations: create a new widget for editing the properties, add a custom Content Provider for selecting a reference value…
+This document aims at detailing all the features related to the property view customization, both dynamically and statically.
+
+== THE CUSTOMIZATION TOOL ==
+
+Most customizations can be done through the Property view customization Editor. It provides native support for EMF Models, UML models and profiles. It also provides a set of basic widgets and property editors.
+
+=== Edit a configuration ===
+
+Each property view configuration is defined in a different set of files. Each configuration can contain elements from different contexts, but we typically have one configuration per Ecore Metamodel or UML Profile (i.e. one configuration for UML, one for the Diagram Appearance tab, another one for the SysML profile…)
+
+To see the list of available configurations, open the properties view (Window -> Show View -> Other… -> General/Properties). Click on the white arrow in the upper right corner of the Properties view, and select “Customize property view”. You should see a dialog with the list of all available configurations.
+
+
+[[File:ressource/fig1.png|Open the property view customization menu]]
+
+As the standard configurations are read-only, you cannot edit them directly. You will first need to make a copy of the configuration. You will then be able to edit the copy.
+
+[[File:ressource/fig2.png|Copy an existing configuration to edit it]]
+
+
+The Property View Editor has three panes:
+* The Editor part
+* The Preview part
+* The Properties part
+The Editor presents the elements defined by this configuration. The Preview displays an overview of the selected View, as it will be displayed in the property view at runtime. The properties view displays the properties of the selected element
+
+[[File:ressource/fig3.png|The property view Editor]]
+
+
+=== The property view elements ===
+
+The editor contains a Tree, containing the following elements :
+* Context: it is a property view configuration. You will typically have one property view Context per Ecore Metamodel or UML Profile, but you can choose the granularity you want. A context has a list of tabs, and a list of views.
+* Tab: describes a tab in the property view. A tab has a label, an (optional) image, and can be indented. It also has a priority.
+* View: describes a property view associated to a selection. The view has a name, a constraint, a multiplicity and a list of sections. The constraint is used to determine for what kind of object the view should be displayed.
+* Constraint: a query that inputs a selection, and outputs a boolean (true if the constraint matches the input object, false otherwise). It is possible to implement your own constraint type (In Java).
+* Section: a section is a sub-part of a view. A view generally needs only one section, but there are cases where you need more than one section. A section is associated to a single tab, so, if you want to display more than one tab in a single view (For example, « UML » and « Profile » in the UML property view), you will need at least two sections in that view (One for each tab). Another (advanced) case is described in « Dynamic sections ». A section has a name, a tab, and a Composite.
+* Composite: this is the actual presentation element. The composite is a widget which can contain other widgets. A composite has a type, and a list of widgets.
+* Layout: all composites need a layout. The default is « PropertiesLayout », which is a variant of the SWT standard GridLayout. A PropertiesLayout has a number of columns. The default is one column.
+* Property Editor: a property editor is a widget which is used to edit a single property of the selected object. You will typically have one Property editor for each property that you want to edit in the property view. The property editor has a property, and a widget to edit that property.
+* Standard Widget: a widget from the standard SWT Library. Few of them are currently available, because they are rarely needed.
+The Tree allows reordering or removing easily the elements (Through drag & drop, delete). The editor also supports the Undo/Redo commands.
+
+==== Preview ====
+
+The preview displays a real-time overview of the selected View. However, some widgets can only be computed at runtime, which prevents a pertinent preview. This is the case of the “Enum Radio” widget, for example, as the enumerated values are only known at runtime.
+
+==== Property view ====
+
+The property view is used to edit the properties of the element selected in the tree. The property view uses the Papyrus Property View framework, thus can be customized just the same way you would customize any other property view.
+
+[[File:ressource/fig4.png| the three panes of the Property view editor]]
+
+=== Priorities between views ===
+When more than one view match a selection, a priority mechanism will determine which one(s) should be displayed. The priorities are defined at the level of the view’s constraints, i.e. if the constraint for a View A overrides a constraint for the View B, the View B won’t be displayed. For example, a UML Class from a Class Diagram will match many views (The list is not exhaustive):
+
+* SingleClass (From UML)
+* MultipleClass (As the -1 multiplicity actually means “any number of elements”)
+* SingleElement (And MultipleElement)
+* SingleClassifier (And MultipleClassifier)
+* *Style (From GMF Notation model)
+* StereotypeDisplay (From UML Notation model)
+
+The priorities are computed in two ways:
+
+* Automatic, according to the Java constraints implementations
+* Statically, according to the property view configuration
+
+When the “isOverrideable” property is set to false for a Constraint (In the property view model), only the static rules will be taken into account.
+
+[[File:ressource/fig5.png|The constraint cannot be dynamically overridden]]
+
+The automatic rules are the following:
+
+* A constraint with a multiplicity of 1 always overrides the same constraint with a multiplicity of -1 (Or >1). Thus, “MultipleClass” won’t be displayed, because “SingleClass” also matches our selection.
+* An EMF (Or UML) “Instance of” constraint always overrides a constraint matching a supertype. Thus, “SingleClassifier” won’t be displayed, because a Class is more specific than a Classifier. However, “SingleElement” *will be* displayed, because it is not overrideable (isOverrideable=false).
+* A stereotype constraint (HasStereotype) will *not* override its UML “Instance of” constraint. However, a specific implementation of this constraint has been provided for Scade, which *will* override the UML metaclass (i.e., a Block will override a Class’ property view, hiding the UML tab).
+* For CompositeConstraints: if a composite constraint is a superset of another constraint, it will override it (It is more specific). For example, a Composite Constraint “isA and isB” will override a constraint “isB”, but will not override a constraint “isB and isC”.
+
+Please note that each constraint has its own implementation of the overrides() method. See the advanced chapter for more information
+
+The static rule is simple: when a Constraint explicitly overrides another constraint, it will always override it. This is especially useful when you’ve marked a constraint as “overrideable=false”, but still want to override it in a specific case (Remember that overrideable=false only applies to *automatic* constraint resolution).
+
+[[File:ressource/fig6.png|Force this constraint to override another constraint]]
+
+
+Finally, in the previous example, the following views will be displayed:
+
+* SingleClass (Overrides MultipleClass, Single/MultipleClassifier ; UML Tab)
+* SingleElement (overrideable=false ; Profile tab)
+* FillStyle, FontStyle, LineStyle (Appearance tab)
+* StereotypeDisplay (overrideable=false ; Appearance tab)
+
+=== Preferences ===
+
+When you make a copy of a property view, it is not automatically activated. Thus, the modifications brought to the copy are not immediately visible on your property view. To activate a property view, you need to open the Papyrus preferences, from Window > Preferences.
+
+[[File:ressource/fig7.png|Preferences]]
+
+When making a copy of an existing configuration, you should uncheck the default one, and check the new one.
+
+== ADVANCED CUSTOMIZATION ==
+
+The customization tool only allows basic operations, such as adding, removing or reordering properties.
+
+The property view framework is much more powerful, but this requires some Java development. This chapter will focus on the advanced customization of the property view.
+
+=== The Environment model ===
+
+To associate Java implementations with the property view model, you need to declare an Environment model. You can create a new Environment model with the “Environment Model” wizard in “Example EMF Model Creation Wizards” category. Select “Environment” as the Model Object.
+
+Once you’ve added your Java class declarations, you should register the environment model so that the property view knows about it. Add an extension to org.eclipse.papyrus.properties.environment, and select your model file.
+
+=== Create a new widget ===
+
+You can create new widgets for the property view. There are four kinds of graphical elements: CompositeWidget, Layout, StandardWidget and PropertyEditor.
+The widgets contain three common fields:
+
+* Label: The label displayed in the Customization editor when the user selects a widget type.
+* Namespace: The XWT namespace associated to the Widget.
+* WidgetClass: The simple name of the Java class implementing the Widget.
+
+The PropertyEditor contains two additional fields:
+
+* Multiplicity: The multiplicity of the properties it can handle (1 for single-valued properties, -1 for multivalued properties)
+* Type: The type of the properties it can handle.
+
+To implement a Composite, Layout or Standard widget, you should simply follow the SWT rules, i.e. extend either Composite, Canvas or Layout, and have a (Composite, int) constructor. To define a PropertyEditor, you have two options:
+
+* Extend Composite, have a (Composite, int) constructor, and implement the CustomizablePropertyEditor interface (From org.eclipse.papyrus.properties.widgets)
+* Extend directly AbstractPropertyEditor (From org.eclipse.papyrus.properties.widgets)
+
+=== Constraints ===
+
+Adding a Constraint is similar to creating a new Widget. You have two options to implement a new Constraint:
+
+* Implement the Constraint interface (From org.eclipse.papyrus.properties.constraints)
+* Extend the AbstractConstraint class (From org.eclipse.papyrus.properties.constraints)
+
+The important methods are the following (depending on whether you’re implement Constraint or extending AbstractConstraint):
+
+* setDescriptor/setConstraintDescriptor:
+** Configures the constraint.
+* match(Object)/match(IStructuredSelection) : Boolean
+** Indicates whether this constraint matches the given given or not
+* overrides(Constraint) : Boolean
+** Indicates whether this constraint overrides another constraint or not. A constraint should override another constraint when it is more specific.
+* equivalent(Constraint) : Boolean
+** This is only used by AbstractConstraint. Two constraints are equivalent if they have the same parameters (ConstraintDescriptor). Two equivalent constraints can have different multiplicities.
+
+The equivalent() and overrides() methods are used to automatically resolve constraints conflicts (Two different constraints matching the same element).
+Once the Constraint is implemented, don’t forget to register it in your environment model.
+
+===ModelElement===
+
+The ModelElement is the interface between the property view and your domain model. It is used to retrieve information about the object(s) being edited from the property. These informations will be used to configure the widget. AbstractModelElement provides a base implementation for this interface.
+
+All methods from this interface take a single parameter, which is the name of the property being edited.
+
+* getObservable(String) / doGetObservable(String) :
+
+This method returns an IObservable which will be used to read and write a single property from the represented object. It should return an IObservableValue for single-valued properties, and IObservableList for multi-valued properties.
+
+* getContentProvider(String) :
+
+This method is only used for reference and enumerated properties. It should return a list of values which can be set to the edited property. Unlike IStructuredContentProvider, this provider will not rely on a StructuredViewer to retrieve an input object: the method getElement() will be called without any parameter, so the implementation should be able to retrieve its own typically. This will typically be achieved by passing a context object in the provider’s constructor.
+
+* getLabelProvider(String) :
+
+This method is used to display an element’s label for a few widgets. Note that the same instance of label provider can be used by more than one Viewer for a given property. For example, the MultiReference widget will display three viewers, each using the same label provider. Each viewer will try to dispose the LabelProvider as soon as they are themselves disposed (For example, when closing the selection dialog from MultiReference). Thus, you should probably not implement the dispose() method, to avoid inconsistent providers.
+
+* getValidator(String) :
+
+This method returns an IValidator, if there’s one which is set up for the current property.
+
+=== ModelElement Factory ===
+
+The ModelElements are associated to DataContextElements through a ModelElementFactory. The ModelElementFactory is defined on the DataContextRoot. All children of a DataContextRoot will share the same ModelElementFactory.
+
+To add a new ModelElement, you should also create a new ModelElementFactory, and register it in your Environment model. Then, you can set this factory to your DataContextRoot.
+
+Note: to display the Data contexts, you need to check the toggle button on top of the editor: [[File:ressource/fig8.png]]
+
+[[File:ressource/fig9.png|The UML DataContextRoots, with their own factories]]
+
+=== Content Providers and Widgets ===
+
+Note: The ContentProviders have been refactored in Papyrus 0.9, to be simplified. However, most of this chapter should remain true.
+
+The ContentProvider is a complex features, which often evolves in the Papyrus property view. The ModelElement has been designed to be compatible with many kinds of different widgets (Combo-box, Tree-based dialogs…). The problem is that these widgets typically use different kinds of JFace ContentProvider (IStructuredContentProvider for flat display, ITreeContentProvider for Tree display). In the Property view, we needed to unify these providers.
+
+Thus, it is recommended to use a IHierarchicContentProvider, which extends ITreeContentProvider, with an additional method: isValidValue(Object). In a Tree, we typically have two kinds of elements: the elements which can potentially be selected, and their containers, which often cannot. The isValidValue() method is used to distinguish between these values.
+
+When a flat widget (e.g. ReferenceCombo) is used, only the valid values will be displayed. When a tree-based widget (e.g. ReferenceDialog) is used, a sub-tree will be displayed, excluding the sub-trees which don’t contain any valid value. Moreover, the invalid values won’t be selectable (For example, in the ReferenceDialog, the “ok” button will be grayed).
+
+[[File:ressource/fig10.png|IHierarchicContentProvider at runtime]]
+
+=== Dynamic sections ===
+
+Sometimes, the property view should not depend on a selection, but on a specific property of the selected element. In such a case, it is frequent that this specific property might be edited by the property view itself. However, the property view is only refreshed when the selection changes.
+
+To overcome this problem, Papyrus offers a “Dynamic section” feature, which allows refreshing dynamically one or more sections of the property view. For example, when you’re editing a View’s constraint in the Property view Editor, the constraint’s properties directly depend on the constraint’s type. When you select an UML constraint, the constraint’s parameter is the name of a UML Metaclass. When you select an EMF constraint, the constraint has two parameters: Namespace URI of the Metamodel, and the name of the Metaclass. Changing the constraint type should also change the constraint’s parameters editors.
+
+[[File:ressource/fig11.png|A view with a static and a dynamic section]]
+
+This can be achieved with dynamic sections, i.e. a section with a constraint. The constraint will be executed once at the beginning, and once again each time a property from the property view changes. If the constraint is matched, the section will be displayed. Otherwise, it will be hidden.
+A view with dynamic sections will typically look like the following:
+
+* A single unconstrained section containing the common parameters
+* One dynamic (i.e. constrained) section for each specific case
+
+[[File:ressource/fig12.png|Dynamic sections configuration]]
+
+Please note that tabs cannot be added nor removed dynamically. For example, when you apply a stereotype on a UML Element, the tab associated to the stereotype’s property view cannot be displayed until you select the element again.
+
+=== Property view Header ===
+The Eclipse Tabbed Property View offers an extension point to define the label provider for the property view header. However, this label provider will be specific to the editor. For generic editors, it is not always possible to provide a pertinent label provider: they will always be too generic, and won’t be able to handle specific elements. For example, a generic EMF Model Editor with the customizable property view will only be able to display standard EMF labels and icons. To overcome this problem, Papyrus offers a configurable label provider for the header: org.eclipse.papyrus.properties.provider.SelectionLabelProvider
+
+This label provider uses the selected element to find the most appropriate label provider, then dispatches the getText and getIcon calls to it. This label provider can be configured through an extension point: org.eclipse.papyrus.properties.labelprovider
+
+This extension point takes an implementation of IFilteredLabelProvider and a priority. The IFilteredLabelProvider is a label provider with an additional method: boolean accept(IStructuredSelection). For each selection, the label provider accepting the selection, and having the highest priority will be used to display a header for it. It will then be possible to define a generic label provider for all java objects, with the lowest priority; another generic label provider for all EMF Objects, and a really specific label provider for a given metamodel (with the highest priority).
+In Papyrus, we have such an example for UML. The Papyrus UML Diagrams use the GMF model, which doesn’t have icons. We wanted to have a different icon for each type of Diagram: this is not possible with a standard EMF label provider, which associates an icon to an EClass, independently of its instances’ attributes.
+
+So, we registered the standard EMF Label Provider with a medium priority, which can handle any kind of EObject, and a UML Label Provider, which can only handle UML Elements and GMF Diagrams, with a higher priority.
+
+The lower the priority number, the higher the priority actually is:
+
+* 100: Lowest priority. The standard EMF Object label provider has a priority of 100, and is called iff no other label provider can accept an EObject.
+* 50: Medium priority. The Papyrus UML Label Provider has a priority of 50.
+* 10: High priority.
+* 0: Highest priority.
+
+If no label provider matches the selection, the default JFace LabelProvider is used.
+
+=== Binding and Validation ===
+
+View Properties support JFace Databinding, which connects our UI to our model. For the validation there are two kinds of validators:
+
+* Widget validators: they check that our input is the kind of data expected by our widget before synchronizing it ( e.g IntegerEditor must have a correct integer for input)
+
+* Model validators: they check that our input verifies our model constraint, they must be instantiate in UmlModelElement#getValidator();
+
+If there are errors during the binding a control decoration is shown next to the widget. It also supports three level of severity (Ok, Warning, Error).
+
+[[File:ressource/fig13.png|Example of binding with a model validator and warning severity result]]
+
+=== Field coloration ===
+
+Properties views have fields’ coloration. If you modify a value the background of the field will be orange, when you validate a change the background will turn green for couple of seconds if the synchronization was successful, it will turn red otherwise.
+
+[[File:ressource/fig14.png|Example of a field being modified]]
+
+== GENERATION TOOL ==
+
+Editing an existing property view can be useful, but most of the time, you’ll want a brand new configuration for your own profile or meta-model. Thus, the framework provides a tool to automatically generate the initial property view, which you can then customize using the customization tool.
+The generator can create a property view configuration from either a UML Profile or an Ecore Meta-model. The wizard is available in the Papyrus category: File -> New -> Other… -> Papyrus/Property view configuration.
+
+The wizard provides two default generators:
+
+* Generate a property view from a UML Profile
+* Generate a property view from an Ecore Meta-model
+
+The source file must be located in your workspace. A default target file named will be filled with the .ctx extension (This is the extension for a property view configuration).
+
+Press next: a combo asks you which strategy to use.
+
+A basic method: all the elements from the profile or meta-model will be extracted, with no dependencies to other models.
+
+Same CTX file: you are asked to choose which models you want to extract, and will be saved in the same file
+
+Different CTX file(s): you are asked to choose which models you want to extract and they will be saved in different files, (each profile name will be the name of the generated ctx file)
+
+Press next: a table with all the elements extracted from your profile or meta-model is displayed. This table contains four columns:
+
+* Field: the name of the element or property
+* Display single: whether this property should be displayed when a single instance of this element is selected
+* Display multiple: whether this property should be displayed when more than one instance of this element is selected
+* Description: the description of the property (Most of the time, it will be N/A, as the default generators cannot extract the documentation from the source model).
+
+Press finish: two files or more files according to the chosen strategy and a folder are generated:
+
+* The *.ctx file, corresponding to your property view configuration
+* The ui/ folder, containing a set of XWT files, which contain the graphical information of your property views
+* The *FieldSelection.xmi file, which reminds the choices you’ve made about displaying each property. This file is currently unused.
+
+You can now open the *.ctx file and customize your property view.
+
+
+== DEPLOYING A PROPERTY VIEW ==
+
+Papyrus provides a simple tool to deploy a property view locally (Right click on a CTX file -> Deploy/Undeploy) \ No newline at end of file
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig1.png b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig1.png
new file mode 100644
index 00000000000..3d2d1cc8400
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig1.png
Binary files differ
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig10.png b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig10.png
new file mode 100644
index 00000000000..821f836738c
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig10.png
Binary files differ
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig11.png b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig11.png
new file mode 100644
index 00000000000..2d4b2083184
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig11.png
Binary files differ
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig12.png b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig12.png
new file mode 100644
index 00000000000..f204a909cd7
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig12.png
Binary files differ
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig13.png b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig13.png
new file mode 100644
index 00000000000..b6ae9861817
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig13.png
Binary files differ
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig14.png b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig14.png
new file mode 100644
index 00000000000..81746438e79
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig14.png
Binary files differ
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig2.png b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig2.png
new file mode 100644
index 00000000000..b5712ef6266
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig2.png
Binary files differ
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig3.png b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig3.png
new file mode 100644
index 00000000000..8f7403353cd
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig3.png
Binary files differ
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig4.png b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig4.png
new file mode 100644
index 00000000000..52c37965379
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig4.png
Binary files differ
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig5.png b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig5.png
new file mode 100644
index 00000000000..ebff4ac7ee5
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig5.png
Binary files differ
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig6.png b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig6.png
new file mode 100644
index 00000000000..806380aced8
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig6.png
Binary files differ
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig7.png b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig7.png
new file mode 100644
index 00000000000..b0968464086
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig7.png
Binary files differ
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig8.png b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig8.png
new file mode 100644
index 00000000000..f76736bca29
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig8.png
Binary files differ
diff --git a/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig9.png b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig9.png
new file mode 100644
index 00000000000..cc2a2e442a0
--- /dev/null
+++ b/doc/ViewProperties/org.eclipse.papyrus.views.properties.doc/ressource/fig9.png
Binary files differ
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/META-INF/MANIFEST.MF b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/META-INF/MANIFEST.MF
index b849cf0f5fb..3892329dd20 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/META-INF/MANIFEST.MF
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/META-INF/MANIFEST.MF
@@ -1,4 +1,9 @@
Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.customization.properties.generation,
+ org.eclipse.papyrus.customization.properties.generation.generators,
+ org.eclipse.papyrus.customization.properties.generation.layout,
+ org.eclipse.papyrus.customization.properties.generation.wizard,
+ org.eclipse.papyrus.customization.properties.generation.wizard.widget
Require-Bundle: org.eclipse.ui;bundle-version="3.6.1",
org.eclipse.osgi;bundle-version="3.6.1",
org.eclipse.core.runtime;bundle-version="3.6.0",
@@ -20,14 +25,11 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.6.1",
org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
org.eclipse.m2m.qvt.oml.project;bundle-version="3.1.0",
org.eclipse.papyrus.customization.properties;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
+ org.eclipse.jface.databinding;bundle-version="1.6.200",
org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.0.0",
org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.0.0"
-Export-Package: org.eclipse.papyrus.customization.properties.generation,
- org.eclipse.papyrus.customization.properties.generation.generators,
- org.eclipse.papyrus.customization.properties.generation.layout,
- org.eclipse.papyrus.customization.properties.generation.wizard,
- org.eclipse.papyrus.customization.properties.generation.wizard.widget
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
@@ -35,9 +37,9 @@ Bundle-ClassPath: .,
Bundle-Version: 1.0.0.qualifier
Eclipse-BuddyPolicy: dependent
Bundle-Name: %Bundle-Name
+Bundle-ManifestVersion: 2
Bundle-Activator: org.eclipse.papyrus.customization.properties.generat
ion.Activator
-Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.papyrus.customization.properties.gene
ration;singleton:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/AbstractQVTGenerator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/AbstractQVTGenerator.java
index e00c48898c4..ba1e257ae8f 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/AbstractQVTGenerator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/AbstractQVTGenerator.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Strategy improvement of generated files
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.generation.generators;
@@ -18,6 +19,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Set;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.Diagnostic;
@@ -41,7 +43,7 @@ import org.eclipse.swt.widgets.Listener;
* An Abstract generator based on QVTO transformations.
* Subclasses should specify the .qvto file and ModelExtents, as well as the
* SWT widgets allowing the user to chose the input models.
- *
+ *
* @author Camille Letavernier
*/
public abstract class AbstractQVTGenerator implements IGenerator, Listener {
@@ -58,43 +60,29 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
private Set<Listener> listeners = new HashSet<Listener>();
- public List<Context> generate(URI targetURI) {
+ private int strategy;
- URI transformationURI = getTransformationURI();
+ public List<Context> generate(List<URI> targetURI) {
- TransformationExecutor executor = new TransformationExecutor(transformationURI);
- Diagnostic diagnostic = executor.loadTransformation();
- if(diagnostic.getSeverity() != Diagnostic.OK) {
- Activator.log.warn("Cannot load the transformation : " + transformationURI);
- return generatedContexts = null;
+ switch(strategy) {
+ case 0:
+ generatedContexts = generateSameFile(targetURI);
+ break;
+ case 1:
+ generatedContexts = generateSameFile(targetURI);
+ break;
+ case 2:
+ generatedContexts = generateDifferentFile(targetURI);
+ break;
+ default:
+ generatedContexts = null;
}
+ return generatedContexts;
+ }
- List<ModelExtent> extents = getModelExtents();
-
- ExecutionContextImpl context = new ExecutionContextImpl();
- context.setConfigProperty("keepModeling", true); //$NON-NLS-1$
- context.setLog(new WriterLog(new OutputStreamWriter(System.out)));
-
- ExecutionDiagnostic result = executor.execute(context, extents.toArray(new ModelExtent[0]));
- if(result.getSeverity() == org.eclipse.emf.common.util.Diagnostic.OK) {
- List<EObject> outObjects = getOutContextExtent().getContents();
- Object objectResult = outObjects.get(0);
- if(!(objectResult instanceof Context)) {
- return null;
- }
- ResourceSet resourceSet = new ResourceSetImpl();
- Resource contextResource = resourceSet.createResource(targetURI);
- contextResource.getContents().addAll(outObjects);
- return generatedContexts = getContexts(outObjects);
- } else {
- IStatus status = BasicDiagnostic.toIStatus(result);
- Activator.log.warn(String.format("%s : %s", status.getPlugin(), status.getMessage()));
- }
- return generatedContexts = null;
- }
/**
* @return the list of in/out/inout ModelExtents (including the OutContextExtent)
@@ -120,7 +108,7 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
/**
* Loads the EObject from the given URI.
- *
+ *
* @param uri
* The URI from which the EObject is loaded
* @return
@@ -160,7 +148,7 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
/**
* Return the generated Context from a list of EObjects
- *
+ *
* @param outObjects
* The list of EObjects from which the context will be retrieved
* @return
@@ -177,4 +165,102 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
return result;
}
+
+
+ public abstract IObservableValue getObservableValue();
+
+ public void setStrategy(int strategy) {
+ this.strategy = strategy;
+ }
+
+ private List<Context> generateSameFile(List<URI> targetURI) {
+
+ URI transformationURI = getTransformationURI();
+
+ TransformationExecutor executor = new TransformationExecutor(transformationURI);
+ Diagnostic diagnostic = executor.loadTransformation();
+ if(diagnostic.getSeverity() != Diagnostic.OK) {
+ Activator.log.warn("Cannot load the transformation : " + transformationURI);
+ return generatedContexts = null;
+ }
+ List<ModelExtent> extents = getModelExtents();
+
+
+ ExecutionContextImpl context = new ExecutionContextImpl();
+ context.setConfigProperty("keepModeling", true); //$NON-NLS-1$
+ context.setLog(new WriterLog(new OutputStreamWriter(System.out)));
+
+ ExecutionDiagnostic result = executor.execute(context, extents.toArray(new ModelExtent[0]));
+
+ if(result.getSeverity() == org.eclipse.emf.common.util.Diagnostic.OK) {
+ List<EObject> outObjects = getOutContextExtent().getContents();
+ Object objectResult = outObjects.get(0);
+ if(!(objectResult instanceof Context)) {
+ return null;
+ }
+
+ ResourceSet resourceSet = new ResourceSetImpl();
+ Resource contextResource = resourceSet.createResource(targetURI.get(0));
+ contextResource.getContents().addAll(outObjects);
+
+ return generatedContexts = getContexts(outObjects);
+ } else {
+ IStatus status = BasicDiagnostic.toIStatus(result);
+ Activator.log.warn(String.format("%s : %s", status.getPlugin(), status.getMessage()));
+ }
+ return generatedContexts = null;
+ }
+
+
+
+
+ protected abstract List<ModelExtent> getModelExtents(int i);
+
+
+ private List<Context> generateDifferentFile(List<URI> targetURI) {
+
+ URI transformationURI = getTransformationURI();
+
+ TransformationExecutor executor = new TransformationExecutor(transformationURI);
+ Diagnostic diagnostic = executor.loadTransformation();
+ if(diagnostic.getSeverity() != Diagnostic.OK) {
+ Activator.log.warn("Cannot load the transformation : " + transformationURI);
+ return generatedContexts = null;
+ }
+ List<ModelExtent> extents = null;
+ ExecutionContextImpl context = new ExecutionContextImpl();
+ context.setConfigProperty("keepModeling", true); //$NON-NLS-1$
+ context.setLog(new WriterLog(new OutputStreamWriter(System.out)));
+ List<Context> temp = new LinkedList<Context>();
+
+ for(int i = 0; i < targetURI.size(); i++) {
+ extents = getModelExtents(i);
+
+
+
+ ExecutionDiagnostic result = executor.execute(context, extents.toArray(new ModelExtent[0]));
+
+ if(result.getSeverity() == org.eclipse.emf.common.util.Diagnostic.OK) {
+ List<EObject> outObjects = getOutContextExtent().getContents();
+ Object objectResult = outObjects.get(0);
+ if(!(objectResult instanceof Context)) {
+ return null;
+ }
+ ResourceSet resourceSet = new ResourceSetImpl();
+ Resource contextResource = resourceSet.createResource(targetURI.get(i));
+ contextResource.getContents().addAll(outObjects);
+ temp.addAll(getContexts(outObjects));
+
+ } else {
+ IStatus status = BasicDiagnostic.toIStatus(result);
+ Activator.log.warn(String.format("%s : %s", status.getPlugin(), status.getMessage()));
+ }
+ }
+
+ return temp;
+
+ }
+
+
+
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EcoreGenerator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EcoreGenerator.java
index 8198e5c3d07..6ce5928da4a 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EcoreGenerator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EcoreGenerator.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -8,9 +8,12 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Strategy improvement of generated files
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.generation.generators;
+import java.io.IOException;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
@@ -18,11 +21,14 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Set;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -42,16 +48,18 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
/**
- * An IGenerator to create Property view contexts from an Ecore metamodel
- * FIXME : The generator doesn't seem to keep the Metaclass inheritance
- *
+ * An IGenerator to create Property view contexts from an Ecore metamodel FIXME
+ * : The generator doesn't seem to keep the Metaclass inheritance
+ *
* @author Camille Letavernier
*/
public class EcoreGenerator extends AbstractQVTGenerator {
private FileChooser sourceFileChooser;
- private EPackage ecorePackage;
+ protected EPackage ecorePackage;
+
+ protected List<EPackage> listEPackages;
public void createControls(Composite parent) {
Composite root = new Composite(parent, SWT.NONE);
@@ -68,6 +76,9 @@ public class EcoreGenerator extends AbstractQVTGenerator {
sourceFileChooser = new FileChooser(root, false);
sourceFileChooser.setFilterExtensions(new String[]{ "ecore" }); //$NON-NLS-1$
sourceFileChooser.addListener(this);
+
+ listEPackages = new ArrayList<EPackage>();
+
}
public String getDescription() {
@@ -108,14 +119,13 @@ public class EcoreGenerator extends AbstractQVTGenerator {
/**
* Retrieve the EStructuralFeature corresponding to the given property
- *
+ *
* @param property
- * @return
- * The EStructuralFeature corresponding to the given property
+ * @return The EStructuralFeature corresponding to the given property
*/
protected EStructuralFeature getFeature(Property property) {
List<String> path = getPath(property);
- path.remove(0); //Root = EPackage
+ path.remove(0); // Root = EPackage
EPackage currentPackage = ecorePackage;
@@ -133,15 +143,17 @@ public class EcoreGenerator extends AbstractQVTGenerator {
}
/**
- * Retrieve the Classifier corresponding to the given path, in the given EPackage
- *
+ * Retrieve the Classifier corresponding to the given path, in the given
+ * EPackage
+ *
* @param path
- * The list of package and subpackages names, and the classifier name, i.e.
- * the list of segments in the classifier's qualified name
+ * The list of package and subpackages names, and the classifier
+ * name, i.e. the list of segments in the classifier's qualified
+ * name
* @param source
* The root EPackage in which the classifier should be retrieved
- * @return
- * The corresponding EClassifier, or null if it couldn't be retrieved
+ * @return The corresponding EClassifier, or null if it couldn't be
+ * retrieved
*/
protected EClassifier findClassifier(List<String> path, EPackage source) {
String qualifier = path.get(0);
@@ -159,15 +171,14 @@ public class EcoreGenerator extends AbstractQVTGenerator {
}
/**
- * Retrieve the subpackage corresponding to the given packageName, in the given
- * package
- *
+ * Retrieve the subpackage corresponding to the given packageName, in the
+ * given package
+ *
* @param currentPackage
* The EPackage in which the subpackage should be found
* @param packageName
* The name of the EPackage to find
- * @return
- * The corresponding EPackage, or null if it couldn't be found
+ * @return The corresponding EPackage, or null if it couldn't be found
*/
protected EPackage findSubPackage(EPackage currentPackage, String packageName) {
for(EPackage pack : currentPackage.getESubpackages()) {
@@ -230,23 +241,128 @@ public class EcoreGenerator extends AbstractQVTGenerator {
return URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/transforms/ecore2datacontext.qvto", true); //$NON-NLS-1$
}
+
@Override
protected List<ModelExtent> getModelExtents() {
+ LinkedList<ModelExtent> result = new LinkedList<ModelExtent>();
+ ModelExtent temp = new BasicModelExtent();
+ ModelExtent inPackage = new BasicModelExtent(Collections.singletonList(ecorePackage));
+
+
+
+ PropertiesRoot root = ConfigurationManager.getInstance().getPropertiesRoot();
+ ModelExtent inRoot = new BasicModelExtent(Collections.singletonList(root));
+ if(!listEPackages.isEmpty()) {
+ temp.setContents(listEPackages);
+ if(!listEPackages.contains(ecorePackage)) {
+ result.add(temp); //if the root package isnt selected
+ } else {
+ result.add(inPackage);
+ }
+ result.add(temp);
+
+ } else {
+ //Basic Method
+ result.add(inPackage);
+ result.add(inPackage);
+ }
+
+ result.add(inRoot);
+ result.add(getOutContextExtent());
+ return result;
+
+ }
+
+ @Override
+ public IObservableValue getObservableValue() {
+ return sourceFileChooser.getObservableValue();
+ }
+
+ public List<Object> getExternalReference() {
+ URI packageURI = URI.createPlatformResourceURI(sourceFileChooser.getFilePath(), true);
+
try {
- URI packageURI = URI.createPlatformResourceURI(sourceFileChooser.getFilePath(), true);
ecorePackage = (EPackage)loadEMFModel(packageURI);
- ModelExtent inPackage = new BasicModelExtent(Collections.singletonList(ecorePackage));
+ } catch (IOException e) {
+ // nothing
+ }
+ new ArrayList<Object>();
+ List<Object> listePackage = new ArrayList<Object>();
+ if(!listePackage.contains(ecorePackage)) {
+ listePackage.add(ecorePackage);
+ }
+ TreeIterator<EObject> tree = ecorePackage.eAllContents();
+ while(tree.hasNext()) {
+ EObject obj = tree.next();
+ if(obj instanceof EStructuralFeature) {
+ EStructuralFeature feature = (EStructuralFeature)obj;
+ EClass eClass = feature.getEContainingClass();
+ if(eClass != null) {
+ EClassifier classifier = feature.getEType();
+ EPackage targetPackage = null;
+ if(classifier != null) {
+ targetPackage = classifier.getEPackage();
+ }
+ if(targetPackage != null) {
+ if(!ecorePackage.equals(targetPackage)) {
+ if(!listePackage.contains(targetPackage)) {
+ listePackage.add(targetPackage);
+ }
+
+ }
+ }
+ }
+ }
+ if(obj instanceof EClass) {
+
+ EClass eclass = (EClass)obj;
+ List<EClass> liste = eclass.getESuperTypes();
+ for(EClass item : liste) {
+ if(!listePackage.contains(item.getEPackage())) {
+ listePackage.add(item.getEPackage());
+ }
+
+ }
+ }
+
+ }
+
+ return listePackage;
+ }
+
+ public void addCheckElement(Object obj) {
+
+ if(obj instanceof EPackage) {
+ EPackage pack = (EPackage)obj;
+ listEPackages.add(pack);
+ }
+
+ }
+
+ @Override
+ protected List<ModelExtent> getModelExtents(int i) {
+ EPackage currentPackage = listEPackages.get(i);
+ try {
+
+ ModelExtent inPackage = new BasicModelExtent(Collections.singletonList(currentPackage));
PropertiesRoot root = ConfigurationManager.getInstance().getPropertiesRoot();
ModelExtent inRoot = new BasicModelExtent(Collections.singletonList(root));
-
LinkedList<ModelExtent> result = new LinkedList<ModelExtent>();
result.add(inPackage);
+ result.add(inPackage);
result.add(inRoot);
result.add(getOutContextExtent());
+
return result;
+
} catch (Exception ex) {
return null;
+
}
+
}
+
+
+
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EditContextGenerator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EditContextGenerator.java
index a4ecb7aa90a..f78798993ee 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EditContextGenerator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EditContextGenerator.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -8,12 +8,14 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.generation.generators;
import java.util.Collection;
import java.util.List;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.emf.common.util.URI;
import org.eclipse.papyrus.customization.properties.generation.messages.Messages;
import org.eclipse.papyrus.views.properties.contexts.Context;
@@ -25,14 +27,14 @@ import org.eclipse.swt.widgets.Listener;
/**
* Incubation
- *
+ *
* An implementation of IGenerator used to re-generate a Context from an existing one
- *
+ *
* @author Camille Letavernier
*/
public class EditContextGenerator implements IGenerator {
- public List<Context> generate(URI targetURI) {
+ public List<Context> generate(List<URI> targetURI) {
// TODO Auto-generated method stub
return null;
}
@@ -89,4 +91,24 @@ public class EditContextGenerator implements IGenerator {
}
+ public IObservableValue getObservableValue() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<Object> getExternalReference() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setStrategy(int strategy) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addCheckElement(Object obj) {
+ // TODO Auto-generated method stub
+
+ }
+
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/IGenerator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/IGenerator.java
index c9cdab8dc61..081a4cbbc95 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/IGenerator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/IGenerator.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -8,11 +8,13 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Strategy improvement of generated files
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.generation.generators;
import java.util.List;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.emf.common.util.URI;
import org.eclipse.papyrus.views.properties.contexts.Context;
import org.eclipse.papyrus.views.properties.contexts.DataContextElement;
@@ -27,25 +29,25 @@ import org.eclipse.swt.widgets.Listener;
* The Generator should also implement an heuristic, which will determine
* for each Property if it should be displayed in the Property view or not,
* for both Single and Multiple selection
- *
+ *
* @author Camille Letavernier
- *
+ *
*/
public interface IGenerator {
/**
* Generates the partial context, and persists it to the given target URI
- *
+ *
* @param targetURI
* @return The generated Context
*/
- public List<Context> generate(URI targetURI);
+ public List<Context> generate(List<URI> targetURI);
/**
* Creates the controls for this Generator. The generator is responsible
* for displaying any Control useful for editing its options, and listening
* for changes on them.
- *
+ *
* @param parent
* The Composite in which the controls will be displayed
*/
@@ -53,21 +55,21 @@ public interface IGenerator {
/**
* Gets the description for this Generator
- *
+ *
* @return The description
*/
public String getDescription();
/**
* Tests if this Generator's settings are all set and valid
- *
+ *
* @return true if all options are set and valid
*/
public boolean isReady();
/**
* Gets the name for this Generator
- *
+ *
* @return The name
*/
public String getName();
@@ -75,7 +77,7 @@ public interface IGenerator {
/**
* Tests if a field should be displayed for this Property when
* exactly one instance of this property's parent element is selected.
- *
+ *
* @param property
* @return
*/
@@ -84,7 +86,7 @@ public interface IGenerator {
/**
* Tests if a field should be displayed for this Property when
* at least two instances of this property's parent element are selected.
- *
+ *
* @param property
* @return
*/
@@ -95,7 +97,7 @@ public interface IGenerator {
* exactly one instance of the given element is selected. The difference
* with {@link #isSelectedSingle(Property)} is that this method takes the inheritance
* into account, i.e. the property belongs to a Superclass of the given DataContextElement
- *
+ *
* @param property
* @param element
* @return
@@ -107,7 +109,7 @@ public interface IGenerator {
* at least two instances of the given element are selected. The difference
* with {@link #isSelectedMultiple(Property)} is that this method takes the inheritance
* into account, i.e. the property belongs to a Superclass of the given DataContextElement
- *
+ *
* @param property
* @param element
* @return
@@ -117,15 +119,24 @@ public interface IGenerator {
/**
* Adds a Change Listener to this generator. The Listener should be notified
* each time the generator's {@link #isReady()} value changes
- *
+ *
* @param listener
*/
public void addListener(Listener listener);
/**
* Removes a Change Listener from this generator.
- *
+ *
* @param listener
*/
public void removeListener(Listener listener);
+
+ public List<Object> getExternalReference();
+
+ public IObservableValue getObservableValue();
+
+ public void setStrategy(int strategy);
+
+ public void addCheckElement(Object obj);
+
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/ProfileGenerator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/ProfileGenerator.java
index 3ff740ee691..2ea5d2cc1ef 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/ProfileGenerator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/ProfileGenerator.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -8,9 +8,12 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Strategy improvement of generated files
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.generation.generators;
+import java.io.IOException;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
@@ -18,7 +21,10 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Set;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.m2m.qvt.oml.BasicModelExtent;
import org.eclipse.m2m.qvt.oml.ModelExtent;
@@ -39,20 +45,28 @@ import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.PackageImport;
import org.eclipse.uml2.uml.PrimitiveType;
import org.eclipse.uml2.uml.Profile;
/**
* An IGenerator for building Contexts from a UML Profile
- *
+ *
* @author Camille Letavernier
*/
+
+//FIXME warning if all profiles have the same name overwrite the same file
public class ProfileGenerator extends AbstractQVTGenerator {
private FileChooser sourceFileChooser;
private Profile umlProfile;
+ private List<Object> list;
+
+ private List<EObject> listEObject;
+
+
public void createControls(Composite parent) {
Composite root = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout(2, false);
@@ -68,6 +82,7 @@ public class ProfileGenerator extends AbstractQVTGenerator {
sourceFileChooser = new FileChooser(root, false);
sourceFileChooser.setFilterExtensions(new String[]{ "profile.uml" }); //$NON-NLS-1$
sourceFileChooser.addListener(this);
+ listEObject = new ArrayList<EObject>();
}
public String getDescription() {
@@ -84,51 +99,68 @@ public class ProfileGenerator extends AbstractQVTGenerator {
@Override
protected List<ModelExtent> getModelExtents() {
- try {
- URI profileURI = URI.createPlatformResourceURI(sourceFileChooser.getFilePath(), true);
- umlProfile = (Profile)loadEMFModel(profileURI);
- ModelExtent inProfile = new BasicModelExtent(Collections.singletonList(umlProfile));
-
- URI umlURI = URI.createURI("ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx", true);
- Context umlContext = (Context)loadEMFModel(umlURI);
- if(umlContext == null) {
- Activator.log.warn("Cannot find the UML Property View configuration");
+ LinkedList<ModelExtent> result = new LinkedList<ModelExtent>();
+ ModelExtent inPackage = new BasicModelExtent();
+ List<EObject> liste = new ArrayList<EObject>();
+ if(!listEObject.isEmpty()) {
+ for(EObject currentEObject : listEObject) {
+ EObject tempEObject = null;
+ try {
+ tempEObject = loadEMFModel(currentEObject.eResource().getURI());
+ liste.add(tempEObject);
+
+ } catch (IOException e) {
+ }
}
- ModelExtent inUml = new BasicModelExtent(Collections.singletonList(umlContext));
+ } else {
+ liste.add(umlProfile);
- PropertiesRoot root = ConfigurationManager.getInstance().getPropertiesRoot();
- ModelExtent inRoot = new BasicModelExtent(Collections.singletonList(root));
- LinkedList<ModelExtent> result = new LinkedList<ModelExtent>();
- result.add(inProfile);
- result.add(getOutContextExtent());
- result.add(inUml);
- result.add(inRoot);
+ }
+ inPackage.setContents(liste);
- return result;
- } catch (Exception ex) {
- Activator.log.error(ex);
+ URI umlURI = URI.createURI("ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx", true);
+ Context umlContext = null;
+ try {
+ umlContext = (Context)loadEMFModel(umlURI);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ if(umlContext == null) {
+ Activator.log.warn("Cannot find the UML Property View configuration");
}
- return null;
+ ModelExtent inUml = new BasicModelExtent(Collections.singletonList(umlContext));
+
+ PropertiesRoot root = ConfigurationManager.getInstance().getPropertiesRoot();
+ ModelExtent inRoot = new BasicModelExtent(Collections.singletonList(root));
+
+ result.add(inPackage);
+ result.add(getOutContextExtent());
+ result.add(inUml);
+ result.add(inRoot);
+
+ return result;
}
+
@Override
protected URI getTransformationURI() {
return URI.createPlatformPluginURI("org.eclipse.papyrus.customization.properties.generation/transforms/profile2datacontext.qvto", true); //$NON-NLS-1$
}
/**
- * Retrieve the Classifier corresponding to the given path, in the given Package
- *
+ * Retrieve the Classifier corresponding to the given path, in the given
+ * Package
+ *
* @param path
- * The list of package and subpackages names, and the classifier name, i.e.
- * the list of segments in the classifier qualified name
- * e.g. : SysML::Blocks::Block : ["SysML", "Blocks", "Block"]
+ * The list of package and subpackages names, and the classifier
+ * name, i.e. the list of segments in the classifier qualified
+ * name e.g. : SysML::Blocks::Block : ["SysML", "Blocks",
+ * "Block"]
* @param rootPackage
* The root Package in which the stereotype should be retrieved
- * @return
- * The corresponding Classifier, or null if it couldn't be retrieved
+ * @return The corresponding Classifier, or null if it couldn't be retrieved
*/
protected Classifier findClassifier(List<String> path, Package rootPackage) {
NamedElement element = rootPackage.getOwnedMember(path.get(0));
@@ -163,8 +195,9 @@ public class ProfileGenerator extends AbstractQVTGenerator {
}
/**
- * Retrieve the UML Property corresponding to the given Property view context Property
- *
+ * Retrieve the UML Property corresponding to the given Property view
+ * context Property
+ *
* @param property
* @return
*/
@@ -244,4 +277,85 @@ public class ProfileGenerator extends AbstractQVTGenerator {
public boolean isSelectedMultiple(Property property, DataContextElement element) {
return isSelectedMultiple(property);
}
+
+ @Override
+ public IObservableValue getObservableValue() {
+ return sourceFileChooser.getObservableValue();
+ }
+
+ public List<Object> getExternalReference() {
+ URI packageURI = URI.createPlatformResourceURI(sourceFileChooser.getFilePath(), true);
+ try {
+ umlProfile = (Profile)loadEMFModel(packageURI);
+ } catch (IOException e) {
+ //nothing
+ }
+ list = new ArrayList<Object>();
+ list.add(umlProfile);
+
+ TreeIterator<EObject> tree = umlProfile.eAllContents();
+ while(tree.hasNext()) {
+ Object obj = tree.next();
+ if(obj instanceof PackageImport) {
+ PackageImport currentPackage = (PackageImport)obj;
+ if(!list.contains(currentPackage.getImportedPackage())) {
+ list.add(currentPackage.getImportedPackage());
+ }
+ }
+
+
+ }
+
+ return list;
+ }
+
+
+ public void addCheckElement(Object obj) {
+ if(obj instanceof EObject) {
+ EObject current = (EObject)obj;
+ if(!listEObject.contains(current)) {
+ listEObject.add(current);
+ }
+ }
+
+ }
+
+
+
+
+ @Override
+ protected List<ModelExtent> getModelExtents(int i) {
+ try {
+ ModelExtent inProfile = null;
+
+ if(listEObject.get(i) instanceof Package) {
+ Package currentPackage = (Package)listEObject.get(i);
+ umlProfile = (Profile)loadEMFModel(currentPackage.eResource().getURI());
+ inProfile = new BasicModelExtent(Collections.singletonList(umlProfile));
+
+ }
+ URI umlURI = URI.createURI("ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx", true);
+ Context umlContext = (Context)loadEMFModel(umlURI);
+ if(umlContext == null) {
+ Activator.log.warn("Cannot find the UML Property View configuration");
+ }
+ ModelExtent inUml = new BasicModelExtent(Collections.singletonList(umlContext));
+
+ PropertiesRoot root = ConfigurationManager.getInstance().getPropertiesRoot();
+ ModelExtent inRoot = new BasicModelExtent(Collections.singletonList(root));
+
+ LinkedList<ModelExtent> result = new LinkedList<ModelExtent>();
+ result.add(inProfile);
+ result.add(getOutContextExtent());
+ result.add(inUml);
+ result.add(inRoot);
+
+ return result;
+ } catch (Exception ex) {
+ Activator.log.error(ex);
+ }
+
+ return null;
+
+ }
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/messages/Messages.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/messages/Messages.java
index 96309c1b6d0..588c983d528 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/messages/Messages.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/messages/Messages.java
@@ -67,8 +67,32 @@ public class Messages extends NLS {
public static String SelectFieldsPage_title;
+ public static String SelectOutputPage_0;
+
+ public static String SelectOutputPage_1;
+
+ public static String SelectOutputPage_2;
+
+ public static String SelectOutputPage_3;
+
+ public static String SelectOutputPage_4;
+
+ public static String SourceValidator_2;
+
+ public static String SourceValidator_4;
+
+ public static String SourceValidator_5;
+
+ public static String SourceValidator_6;
+
+ public static String SourceValidator_7;
+
public static String FileChooser_browseWorkspace;
+ public static String TargetValidator_2;
+
+ public static String TargetValidator_3;
+
public static String TernaryButton_defaultFalse;
public static String TernaryButton_defaultTrue;
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/messages/messages.properties b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/messages/messages.properties
index 1663dcd16d1..fc8fb26512e 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/messages/messages.properties
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/messages/messages.properties
@@ -23,7 +23,19 @@ SelectFieldsPage_displaySingle=Display single
SelectFieldsPage_field=Field
SelectFieldsPage_selectFields=Select the fields you want to be displayed in the Property view
SelectFieldsPage_title=Select fields
+SelectOutputPage_0=Output context Page
+SelectOutputPage_1= How would you like to generate your new View Property ? \n Select your strategy and your source
+SelectOutputPage_2=Basic method
+SelectOutputPage_3=Same CTX file
+SelectOutputPage_4=Different CTX files
+SourceValidator_2=Source file should be a .Ecore file
+SourceValidator_4=Source file should be a .Uml file
+SourceValidator_5=Source file does not exist in workspace
+SourceValidator_6=Source must not be blank
+SourceValidator_7=Target file should be .CTX file
FileChooser_browseWorkspace=Browse workspace...
+TargetValidator_2=Target File should be a .ctx file
+TargetValidator_3=Specify a target file
TernaryButton_defaultFalse=Default (False)
TernaryButton_defaultTrue=Default (True)
TernaryButton_false=False
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/AbstractValidator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/AbstractValidator.java
new file mode 100644
index 00000000000..b97f6d89c24
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/AbstractValidator.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * 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:
+ * Thibault Le Ouay t.leouay@sherpa-eng.com
+ *****************************************************************************/
+
+
+package org.eclipse.papyrus.customization.properties.generation.validators;
+
+import org.eclipse.core.databinding.validation.IValidator;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.papyrus.infra.widgets.Activator;
+
+public abstract class AbstractValidator implements IValidator {
+
+ protected String pluginId;
+
+ public void setPluginID(String pluginId) {
+ this.pluginId = pluginId;
+ }
+
+ protected IStatus error(String message) {
+ return new Status(IStatus.ERROR, getPluginId(), message);
+ }
+
+ public String getPluginId() {
+ if(pluginId == null) {
+ return Activator.PLUGIN_ID;
+ } else {
+ return pluginId;
+ }
+ }
+
+
+} \ No newline at end of file
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/SourceValidator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/SourceValidator.java
new file mode 100644
index 00000000000..f3676793699
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/SourceValidator.java
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ * 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:
+ * Thibault Le Ouay t.leouay@sherpa-eng.com
+ *****************************************************************************/
+
+
+package org.eclipse.papyrus.customization.properties.generation.validators;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.papyrus.customization.properties.generation.generators.EcoreGenerator;
+import org.eclipse.papyrus.customization.properties.generation.generators.IGenerator;
+import org.eclipse.papyrus.customization.properties.generation.generators.ProfileGenerator;
+import org.eclipse.papyrus.customization.properties.generation.messages.Messages;
+
+public class SourceValidator extends AbstractValidator {
+ protected IGenerator generator;
+
+ public SourceValidator(IGenerator generator) {
+ this.generator = generator;
+ }
+
+ public IStatus validate(Object value) {
+ if (value instanceof String) {
+ String s = (String) value;
+ if (!s.equals("")) { //$NON-NLS-1$
+ if (this.generator instanceof EcoreGenerator) {
+ if (!s.endsWith("ecore")) { //$NON-NLS-1$
+ return error(Messages.SourceValidator_2);
+ }
+ } else if (this.generator instanceof ProfileGenerator) {
+ if (!s.endsWith("profile.uml")) { //$NON-NLS-1$
+ return error(Messages.SourceValidator_4);
+ }
+ }
+
+ IWorkspaceRoot myWorkspaceRoot = ResourcesPlugin.getWorkspace()
+ .getRoot();
+ IFile file =null;
+ try{
+ IPath path = new Path(s);
+ file = myWorkspaceRoot.getFile(path);
+
+ }
+ catch(IllegalArgumentException ex){
+ return error(ex.getMessage());
+ }
+ if (!file.exists()) {
+ return error(Messages.SourceValidator_5);
+
+ }
+ }
+ else return error(Messages.SourceValidator_6);
+
+ return Status.OK_STATUS;
+
+ }
+ return error(Messages.SourceValidator_7);
+ }
+
+}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/TargetValidator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/TargetValidator.java
new file mode 100644
index 00000000000..e0441c2d3c5
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/TargetValidator.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * 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:
+ * Thibault Le Ouay t.leouay@sherpa-eng.com
+ *****************************************************************************/
+
+package org.eclipse.papyrus.customization.properties.generation.validators;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.papyrus.customization.properties.generation.messages.Messages;
+
+public class TargetValidator extends AbstractValidator {
+
+
+ public IStatus validate(Object value) {
+ if(value instanceof String){
+ String s = (String) value;
+ if(!s.equals("")){ //$NON-NLS-1$
+ if(!s.endsWith("ctx")){ //$NON-NLS-1$
+ return error(Messages.TargetValidator_2);
+ }
+ }
+ else return error(Messages.TargetValidator_3);
+ }
+
+ return Status.OK_STATUS;
+ }
+
+}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextMainPage.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextMainPage.java
index 8abbba298f2..fa064adc65b 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextMainPage.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextMainPage.java
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add SelectOutputPage
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.generation.wizard;
@@ -63,6 +64,7 @@ public class CreateContextMainPage extends AbstractCreateContextPage implements
public IWizardPage getNextPage() {
int selection = combo.getSelectionIndex();
getWizard().setGenerator(CreateContextWizard.contextGenerators.get(selection));
+// getWizard().generatorPage.clearTarget();
return getWizard().generatorPage;
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextWizard.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextWizard.java
index 4a08d8f2c91..4650c11218b 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextWizard.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextWizard.java
@@ -58,6 +58,8 @@ public class CreateContextWizard extends Wizard implements INewWizard {
protected CreateContextMainPage mainPage;
protected GeneratorPage generatorPage;
+
+ protected SelectOutputPage selectOutputPage;
//protected LayoutPage layout;
@@ -168,7 +170,6 @@ public class CreateContextWizard extends Wizard implements INewWizard {
try {
currentContext.eResource().save(saveOptions);
-
monitor.worked(1);
for(Tab tab : currentContext.getTabs()) {
for(Section section : tab.getSections()) {
@@ -295,6 +296,7 @@ public class CreateContextWizard extends Wizard implements INewWizard {
public void init(IWorkbench workbench, IStructuredSelection selection) {
addPage(mainPage = new CreateContextMainPage());
addPage(generatorPage = new GeneratorPage());
+ addPage(selectOutputPage = new SelectOutputPage());
addPage(selectFieldsPage = new SelectFieldsPage());
//addPage(layout = new LayoutPage());
@@ -305,6 +307,7 @@ public class CreateContextWizard extends Wizard implements INewWizard {
protected void setGenerator(IGenerator generator) {
this.generator = generator;
generatorPage.setGenerator(generator);
+ generatorPage.doBinding();
}
protected void setContexts(List<Context> contexts) {
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/GeneratorPage.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/GeneratorPage.java
index 0ef5be7dd28..620e6079ddb 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/GeneratorPage.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/GeneratorPage.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -8,14 +8,26 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Strategy improvement of generated files
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.generation.wizard;
+import org.eclipse.core.databinding.Binding;
+import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.databinding.UpdateValueStrategy;
+import org.eclipse.core.databinding.conversion.IConverter;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.observable.value.IValueChangeListener;
+import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.databinding.wizard.WizardPageSupport;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.papyrus.customization.properties.generation.generators.IGenerator;
import org.eclipse.papyrus.customization.properties.generation.layout.ILayoutGenerator;
import org.eclipse.papyrus.customization.properties.generation.messages.Messages;
+import org.eclipse.papyrus.customization.properties.generation.validators.SourceValidator;
+import org.eclipse.papyrus.customization.properties.generation.validators.TargetValidator;
import org.eclipse.papyrus.customization.properties.generation.wizard.widget.FileChooser;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
@@ -30,32 +42,55 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
/**
- * A WizardPage to display the selected generator's options, as well as the context's
- * target file. The options depend on the selected generator.
- *
+ * A WizardPage to display the selected generator's options, as well as the
+ * context's target file. The options depend on the selected generator.
+ *
* @author Camille Letavernier
*/
public class GeneratorPage extends AbstractCreateContextPage implements Listener {
- private IGenerator generator;
+ protected IGenerator generator;
private Composite root, generatorControl;
- private FileChooser targetFileChooser;
+ protected FileChooser targetFileChooser;
private CCombo layoutCombo;
+ protected IObservableValue srcTextObservable;
+
+ protected IObservableValue targetTextObservable;
+
+ protected UpdateValueStrategy srcFieldStrategy;
+
+ protected UpdateValueStrategy targetFieldStrategy;
+
+ protected SourceValidator srcValidator;
+
+ protected TargetValidator targetValidator;
+
+ protected Binding binding;
+
+ protected DataBindingContext ctx;
+
+ protected boolean next = false;
+
+ protected URI oldURI;
+
/**
* Constructor.
*/
public GeneratorPage() {
super(Messages.GeneratorPage_title);
+ ctx = new DataBindingContext();
+ srcFieldStrategy = new UpdateValueStrategy();
+ targetFieldStrategy = new UpdateValueStrategy();
}
/**
* Sets the IGenerator for this wizard, and displays its controls in the
* page.
- *
+ *
* @param generator
*/
public void setGenerator(IGenerator generator) {
@@ -66,6 +101,7 @@ public class GeneratorPage extends AbstractCreateContextPage implements Listener
this.generator = generator;
generator.createControls(generatorControl);
generatorControl.layout();
+ srcTextObservable = this.generator.getObservableValue();
root.layout();
}
@@ -94,7 +130,6 @@ public class GeneratorPage extends AbstractCreateContextPage implements Listener
generatorControl.setLayout(new FillLayout());
generatorControl.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false, 2, 1));
-
Label layoutGeneratorLabel = new Label(root, SWT.NONE);
layoutGeneratorLabel.setText(Messages.GeneratorPage_layoutGenerator);
GridData data = new GridData();
@@ -119,22 +154,150 @@ public class GeneratorPage extends AbstractCreateContextPage implements Listener
targetFileChooser = new FileChooser(root, true);
targetFileChooser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
targetFileChooser.addListener(this);
+ targetTextObservable = targetFileChooser.getObservableValue();
+ targetFileChooser.setFilterExtensions(new String[]{ "ctx" });
+ if(targetFieldStrategy != null) {
+ targetFieldStrategy.setConverter(new IConverter() {
+
+ public Object getToType() {
+
+ return String.class;
+ }
+
+ public Object getFromType() {
+ return String.class;
+ }
+
+ public String convert(Object fromObject) {
+ if(srcTextObservable != null) {
+ return (String)srcTextObservable.getValue();
+ } else if(targetFileChooser.getFilePath() != null) {
+ return targetFileChooser.getFilePath();
+
+ }
+ return "";
+ }
+ });
+ }
+ if(srcFieldStrategy != null) {
+ srcFieldStrategy.setConverter(new IConverter() {
+
+ public Object getToType() {
+ return String.class;
+ }
+
+ public Object getFromType() {
+ return String.class;
+ }
+
+ public String convert(Object fromObject) {
+
+ if(fromObject instanceof String) {
+ String stringObject = (String)fromObject;
+ if(stringObject.equals("")) {
+ return "";
+ }
+ String[] result = stringObject.split("/");
+ String filename = result[result.length - 1];
+ String[] ext = filename.split("\\.");
+ StringBuilder builder = new StringBuilder();
+
+ if(targetTextObservable != null) {
+ String s = (String)targetTextObservable.getValue();
+ if(!s.equals("")) {
+ String original[] = s.split("/");
+ builder.append("/");
+ for(int i = 1; i < original.length - 1; i++) {
+ builder.append(original[i]);
+ builder.append("/");
+
+ }
+ } else {
+ builder.append("/");
+ builder.append(result[1]);
+ builder.append("/properties/");
+ }
+ }
+
+ builder.append(ext[0]);
+ builder.append(".ctx");
+ return builder.toString();
+ }
+ return "";
+ }
+ });
+ }
+ WizardPageSupport.create(this, ctx);
+
setControl(root);
}
public void handleEvent(Event event) {
+
String filePath = targetFileChooser.getFilePath();
+
if(filePath != null) {
- getWizard().selectFieldsPage.setTargetURI(URI.createPlatformResourceURI(targetFileChooser.getFilePath(), true));
+ super.getContainer().updateButtons();
}
- super.getContainer().updateButtons();
+
+
+
}
@Override
public IWizardPage getNextPage() {
int selection = layoutCombo.getSelectionIndex();
getWizard().layoutGenerator = CreateContextWizard.layoutGenerators.get(selection);
+ oldURI = URI.createPlatformResourceURI(targetFileChooser.getFilePath(), true);
+
return super.getNextPage();
}
+
+ public void doBinding() {
+ if(srcTextObservable != null || targetTextObservable != null) {
+
+ srcValidator = new SourceValidator(generator);
+ targetValidator = new TargetValidator();
+ srcFieldStrategy.setAfterGetValidator(srcValidator);
+ srcFieldStrategy.setAfterConvertValidator(targetValidator);
+ targetFieldStrategy.setAfterGetValidator(targetValidator);
+ targetFieldStrategy.setAfterConvertValidator(srcValidator);
+ binding = ctx.bindValue(srcTextObservable, targetTextObservable, srcFieldStrategy, targetFieldStrategy);
+
+ }
+ }
+
+ @Override
+ public boolean canFlipToNextPage() {
+ binding.getValidationStatus().addValueChangeListener(new IValueChangeListener() {
+
+ public void handleValueChange(ValueChangeEvent event) {
+ IStatus status = (IStatus)event.diff.getNewValue();
+ if(status.isOK()) {
+ setNext(true);
+ } else {
+ setNext(false);
+ }
+ }
+
+ });
+
+
+ return this.next;
+ }
+
+ public void setNext(boolean next) {
+ this.next = next;
+ super.getContainer().updateButtons();
+
+
+ }
+
+
+ public void setStrategy(int strategy) {
+ this.generator.setStrategy(strategy);
+
+ }
+
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectFieldsPage.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectFieldsPage.java
index d100f1f5366..e495e6c49a6 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectFieldsPage.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectFieldsPage.java
@@ -58,7 +58,7 @@ import org.eclipse.swt.widgets.TreeItem;
*/
public class SelectFieldsPage extends AbstractCreateContextPage {
- private URI targetURI;
+ private List<URI> targetURI;
private List<Context> contexts;
@@ -69,6 +69,7 @@ public class SelectFieldsPage extends AbstractCreateContextPage {
public int fieldColumn = -1, selectionSingleColumn = -1, selectionMultipleColumn = -1, descriptionColumn = -1;
private int columnId = 0;
+
/**
* Constructor.
@@ -311,7 +312,7 @@ public class SelectFieldsPage extends AbstractCreateContextPage {
* @param uri
* The URI of the generated context
*/
- public void setTargetURI(URI uri) {
+ public void setTargetURI(List<URI> uri) {
this.targetURI = uri;
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectOutputPage.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectOutputPage.java
new file mode 100644
index 00000000000..076ee40edf9
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectOutputPage.java
@@ -0,0 +1,199 @@
+/*****************************************************************************
+ * 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:
+ * Thibault Le Ouay t.leouay@sherpa-eng.com
+ *****************************************************************************/
+
+package org.eclipse.papyrus.customization.properties.generation.wizard;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.papyrus.customization.properties.generation.messages.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.uml2.uml.Package;
+
+public class SelectOutputPage extends AbstractCreateContextPage implements Listener {
+
+ private CheckboxTableViewer viewer;
+
+ protected CCombo combo;
+
+ private Table table;
+
+ public SelectOutputPage() {
+ super(Messages.SelectOutputPage_0);
+ }
+
+ public void createControl(Composite parent) {
+
+ Composite root = new Composite(parent, SWT.NONE);
+ root.setLayout(new GridLayout(1, false));
+
+ combo = new CCombo(root, SWT.BORDER);
+ setDescription(Messages.SelectOutputPage_1);
+ combo.add(Messages.SelectOutputPage_2);
+ combo.add(Messages.SelectOutputPage_3);
+ combo.add(Messages.SelectOutputPage_4);
+ combo.setEditable(false);
+ combo.setBackground(new Color(combo.getDisplay(), 255, 255, 255));
+ combo.select(0);
+ combo.addListener(SWT.Selection, this);
+ combo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+ setControl(root);
+ viewer = new CheckboxTableViewer(root, SWT.MULTI | SWT.H_SCROLL | SWT.FILL | SWT.FULL_SELECTION | SWT.BORDER);
+ table = viewer.getTable();
+ table.setVisible(false);
+ table.setHeaderVisible(true);
+ viewer.setContentProvider(new ArrayContentProvider());
+
+ GridData gridData = new GridData();
+ gridData.verticalAlignment = GridData.FILL;
+ gridData.horizontalSpan = 1;
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.grabExcessVerticalSpace = true;
+ gridData.horizontalAlignment = GridData.FILL;
+
+ viewer.getControl().setLayoutData(gridData);
+ viewer.setLabelProvider(new ColumnLabelProvider() {
+
+ @Override
+ public String getText(Object element) {
+
+ if(element instanceof EPackage) {
+ EPackage p = (EPackage)element;
+ return "Ecore package Name : " + p.getName(); //$NON-NLS-1$
+
+ }
+ if(element instanceof Package) {
+ Package p = (Package)element;
+ return "Profile name : " + p.getName(); //$NON-NLS-1$
+ }
+ return null;
+ }
+
+ });
+ viewer.setInput(new Object());
+ viewer.setSorter(new ViewerSorter());
+ viewer.addCheckStateListener(new ICheckStateListener() {
+
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ UpdateButton();
+
+ }
+ });
+ }
+
+ public void handleEvent(Event event) {
+
+ if(combo.getSelectionIndex() != 0) {
+ table.setVisible(true);
+
+ } else {
+ table.setVisible(false);
+ }
+ canFlipToNextPage();
+ super.getContainer().updateButtons();
+ }
+
+ public void setSelectorData() {
+
+ viewer.setInput(getWizard().generator.getExternalReference());
+ }
+
+ @Override
+ public void setVisible(boolean visible) {
+ super.setVisible(visible);
+
+ if(visible) {
+ setSelectorData();
+ }
+ }
+
+ @Override
+ public IWizardPage getNextPage() {
+ int selection = combo.getSelectionIndex();
+ getWizard().selectFieldsPage.setTargetURI(getListPackage(selection));
+ getWizard().generatorPage.setStrategy(selection);
+ return getWizard().selectFieldsPage;
+ }
+
+ public List<URI> getListPackage(int selection) {
+ List<URI> list = new ArrayList<URI>();
+
+ if(selection == 0) {
+ list.add(getWizard().generatorPage.oldURI);
+
+ } else {
+ for(Object o : viewer.getCheckedElements()) {
+ if(o instanceof EPackage) {
+ EPackage p = (EPackage)o;
+ if(selection == 1) {
+ list.add(getWizard().generatorPage.oldURI);
+ } else {
+ String temp = getWizard().generatorPage.oldURI.toString();
+ temp = temp.substring(0, temp.lastIndexOf("/")); //$NON-NLS-1$
+ String result = temp + "/" + p.getName() + ".ctx"; //$NON-NLS-1$ //$NON-NLS-2$
+ list.add(URI.createURI(result, true));
+ }
+ getWizard().generator.addCheckElement(o);
+ }
+ if(o instanceof Package) {
+ Package p = (Package)o;
+ if(selection == 1) {
+ list.add(getWizard().generatorPage.oldURI);
+ } else {
+ String temp = getWizard().generatorPage.oldURI.toString();
+ temp = temp.substring(0, temp.lastIndexOf("/")); //$NON-NLS-1$
+ String result = temp + "/" + p.getName() + ".ctx"; //$NON-NLS-1$ //$NON-NLS-2$
+ list.add(URI.createURI(result, true));
+ }
+ getWizard().generator.addCheckElement(o);
+
+ }
+
+ }
+ }
+ return list;
+ }
+
+ @Override
+ public boolean canFlipToNextPage() {
+ if(combo.getSelectionIndex() != 0) {
+ if(viewer.getCheckedElements().length == 0) {
+ return false;
+ }
+ }
+ return true;
+
+ }
+
+ public void UpdateButton() {
+ canFlipToNextPage();
+ super.getContainer().updateButtons();
+ }
+}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/FileChooser.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/FileChooser.java
index abd8fcd7887..6fab3c41fe9 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/FileChooser.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/FileChooser.java
@@ -16,8 +16,11 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Set;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.resources.IFile;
import org.eclipse.emf.common.ui.dialogs.WorkspaceResourceDialog;
+import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
+import org.eclipse.jface.databinding.swt.WidgetProperties;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.papyrus.customization.properties.generation.messages.Messages;
import org.eclipse.swt.SWT;
@@ -144,5 +147,14 @@ public class FileChooser extends Composite implements SelectionListener, Listene
public void widgetDefaultSelected(SelectionEvent e) {
//Nothing
}
+
+ public IObservableValue getObservableValue(){
+ IWidgetValueProperty prop = WidgetProperties.text(SWT.Modify);
+ return prop.observeDelayed(600, text);
+ }
+ public void setText(String s){
+ text.setText(s);
+
+ }
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/transforms/ecore2datacontext.qvto b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/transforms/ecore2datacontext.qvto
index 92424c563ef..f1d2381bf05 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/transforms/ecore2datacontext.qvto
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/transforms/ecore2datacontext.qvto
@@ -4,15 +4,17 @@ modeltype PropertyEnvironment uses "http://www.eclipse.org/papyrus/properties/en
modeltype PRoot uses "http://www.eclipse.org/papyrus/properties/root";
modeltype Constraints uses "http://www.eclipse.org/papyrus/constraints/0.9";
-transformation ecore2datacontext(in ecore : Ecore, in pRoot : PRoot, out context : PropertyContext);
+transformation ecore2datacontext(in ecore : Ecore,in list: Ecore,in pRoot : PRoot, out context : PropertyContext);
main() {
ecore.rootObjects()[EPackage]->map toContext();
}
mapping EPackage::toContext() : c: Context, root:DataContextRoot when {
- self.isMainPackage() //Only transform source EPackages ; not their dependencies
+ //self.isMainPackage() //Only transform source EPackages ; not their dependencies
+self.isSelected()
}{
+ log("Package " + self.name);
c.name := self.name;
c.dataContexts := root;
c.views := self.eClassifiers->select(e | e.oclIsKindOf(EClass))->map toDataContextElement().viewSingle
@@ -57,8 +59,10 @@ abstract mapping EClassifier::toDataContextElement() : element : DataContextElem
mapping EClass::toDataContextElement() : element : DataContextElement, viewSingle : View, viewMultiple : View inherits EClassifier::toDataContextElement
when {
- self.ePackage.isMainPackage() //Only transform Classifiers from source EPackages ; not their dependencies
-}{
+ self.ePackage.isSelected()
+}
+{
+
element.properties := self.eStructuralFeatures->map toProperty();
element.supertypes := self.eSuperTypes.map toDataContextElement().element;
@@ -89,6 +93,12 @@ query EPackage::isMainPackage() : Boolean {
endif;
}
+query EPackage::isSelected() : Boolean {
+
+ return if (list.objectsOfType(EPackage)->includes(self.getRootPackage())) then true
+ else false
+ endif;
+}
mapping EClass::toConstraint(view : View) : SimpleConstraint {
name := "is" + view.name.replace(' ', '');
display := view;
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/transforms/profile2datacontext.qvto b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/transforms/profile2datacontext.qvto
index 6081fe4be4e..8e59878af64 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/transforms/profile2datacontext.qvto
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/transforms/profile2datacontext.qvto
@@ -7,7 +7,7 @@ modeltype Constraints uses "http://www.eclipse.org/papyrus/constraints/0.9";
transformation stereotype2datacontext(in profile : UML, out context : PropertyContext, in uml : PropertyContext, in pRoot : PRoot);
main() {
- profile.rootObjects()[Profile]->map toContext();
+ profile.rootObjects()[Profile].map toContext();
}
----- Context -----
@@ -16,7 +16,7 @@ mapping Package::toContext() : Context{
name := self.name;
dataContexts := self.map toDCRoot();
dependencies := uml.rootObjects()[Context];
- self.getClassifiers()->map toDCElement();
+ //self.getClassifiers().map toDCElement();
}
query Package::getRootPackage() : Package {
@@ -46,12 +46,10 @@ mapping Package::toDCPackage() : DataContextPackage disjuncts
abstract mapping Package::toAbstractDCPackage() : DataContextPackage {
name := self.name;
-
- var mappedElements := self.getClassifiers().map toDCElement();
-
- elements := mappedElements.element
+ var mappedElements := self.getClassifiers().map toDCElement().element;
+ elements := mappedElements
->union(
- self.packagedElement->select(e | e.oclIsKindOf(Package)).oclAsType(Package)->map toDataContextPackage()
+ self.packagedElement->select(e | e.oclIsKindOf(Package)).oclAsType(Package).map toDataContextPackage()
)
;
}
@@ -90,8 +88,7 @@ mapping Classifier::toDCElement() : element : DataContextElement, viewSingle : V
abstract mapping Classifier::toAbstractDCElement() : element : DataContextElement, viewSingle : View, viewMultiple : View{
element.name := self.name;
- element.package := self.package.map toDCPackage();
-
+
viewSingle.name := 'Single '+self.name;
viewSingle.automaticContext := true;
viewSingle.datacontexts := element;
@@ -108,19 +105,24 @@ abstract mapping Classifier::toAbstractDCElement() : element : DataContextElemen
}
mapping Stereotype::toDataContextElement() : element : DataContextElement, viewSingle : View, viewMultiple : View inherits Classifier::toAbstractDCElement{
- element.properties := self.attribute->select(e | e.isAttribute(self))->map toProperty();
- element.supertypes := self.generalization.target->select(e | e.isView()).oclAsType(Classifier)->map toDCElement().element->union(
- self.ownedAttribute->select(e | not e.isAttribute(self)).getDataContextElement()->asSet()
- );
+
+ element.properties := self.attribute->select(e | e.isAttribute(self)).map toProperty();
+ var superClassifiers := self.generalization.target->select(e | e.isView()).oclAsType(Classifier);
+ var tempAtt := self.ownedAttribute->select(e | not e.isAttribute(self)).getDataContextElement()->asSet();
+ if not superClassifiers->isEmpty() then
+
+ element.supertypes := self.generalization.target->select(e | e.isView()).oclAsType(Classifier).late resolve(DataContextElement)
+ else
+ element.supertypes := superClassifiers.map toDCElement().element->union(tempAtt)->asSet()
+ endif;
+
}
mapping DataType::toDataContextElement() : element : DataContextElement, viewSingle : View, viewMultiple : View inherits Classifier::toAbstractDCElement when {
self.oclIsTypeOf(DataType) -- Exclude primitive types from generation
}{
- element.properties := self.attribute->map toProperty();
- element.supertypes := self.generalization.target->select(e | e.isView()).oclAsType(Classifier)->map toDCElement().element->union(
- self.ownedAttribute->getDataContextElement()->asSet()
- );
+ element.properties := self.attribute.map toProperty();
+ element.supertypes := self.generalization.target->select(e | e.isView()).oclAsType(Classifier).map toDCElement().element
}
mapping Classifier::toConstraint(view : View) : SimpleConstraint{
@@ -168,7 +170,8 @@ query UML::Type::getType() : PropertyEnvironment::Type {
case (self.name = "String") type := PropertyEnvironment::Type::String;
case (self.name = "Integer") type := PropertyEnvironment::Type::Integer;
case (self.name = "Boolean") type := PropertyEnvironment::Type::Boolean;
- case (self.name = "Real") type := PropertyEnvironment::Type::String;
+ case (self.name = "Real") type := PropertyEnvironment::Type::Double;
+ case (self.name = "Double") type := PropertyEnvironment::Type::Double;
};
case (self.oclIsTypeOf(DataType)) type := PropertyEnvironment::Type::Reference;
};
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/CustomizationModelElement.java b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/CustomizationModelElement.java
index 0a7f2493da5..08963971b18 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/CustomizationModelElement.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/modelelement/CustomizationModelElement.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -60,7 +60,7 @@ import org.eclipse.papyrus.views.properties.ui.PropertyEditor;
* any referenceable object. Hence, this ModelElement replaces
* most EMF Content Providers by custom ones, much lighter. When such
* a content provider cannot be found, the default EMF one is used.
- *
+ *
* @author Camille Letavernier
*/
public class CustomizationModelElement extends AbstractModelElement {
@@ -71,7 +71,7 @@ public class CustomizationModelElement extends AbstractModelElement {
/**
* Constructs a new ModelElement.
- *
+ *
* @param delegate
* If this model element cannot handle a given property, it will
* delegate the call to a standard EMF ModelElement
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/META-INF/MANIFEST.MF b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/META-INF/MANIFEST.MF
index e64a66f36ef..a667a78d819 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/META-INF/MANIFEST.MF
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/META-INF/MANIFEST.MF
@@ -1,14 +1,4 @@
Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.widgets,
- org.eclipse.papyrus.infra.widgets.creation,
- org.eclipse.papyrus.infra.widgets.databinding,
- org.eclipse.papyrus.infra.widgets.editors,
- org.eclipse.papyrus.infra.widgets.messages,
- org.eclipse.papyrus.infra.widgets.providers,
- org.eclipse.papyrus.infra.widgets.selectors,
- org.eclipse.papyrus.infra.widgets.strategy,
- org.eclipse.papyrus.infra.widgets.util,
- org.eclipse.papyrus.infra.widgets.validator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.databinding.property;bundle-version="1.3.0",
@@ -22,13 +12,23 @@ Require-Bundle: org.eclipse.ui,
com.ibm.icu;bundle-version="4.4.2",
org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.0.0",
org.eclipse.papyrus.infra.core;bundle-version="1.0.0"
+Export-Package: org.eclipse.papyrus.infra.widgets,
+ org.eclipse.papyrus.infra.widgets.creation,
+ org.eclipse.papyrus.infra.widgets.databinding,
+ org.eclipse.papyrus.infra.widgets.editors,
+ org.eclipse.papyrus.infra.widgets.messages,
+ org.eclipse.papyrus.infra.widgets.providers,
+ org.eclipse.papyrus.infra.widgets.selectors,
+ org.eclipse.papyrus.infra.widgets.strategy,
+ org.eclipse.papyrus.infra.widgets.util,
+ org.eclipse.papyrus.infra.widgets.validator
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.0.0.qualifier
-Bundle-Localization: plugin
Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.infra.widgets.Activator
+Bundle-Localization: plugin
Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.widgets.Activator
Bundle-SymbolicName: org.eclipse.papyrus.infra.widgets;singleton:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractEditor.java
index 28b7d8c9ee8..5f47c36409d 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractEditor.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractEditor.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010, 2014 CEA LIST 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
@@ -8,8 +8,9 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
* Christian W. Damus (CEA) - bug 402525
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
@@ -40,10 +41,10 @@ import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
* or more controls. The label may be null.
* The controls are specified by the implementations
* of this abstract class.
- *
+ *
* @author Camille Letavernier
*/
-//FIXME: The composite widget hides access to the encapsulated widget(s).
+//FIXME: The composite widget hides access to the encapsulated widget(s).
//Thus, it is not possible to add custom listeners on the editors
//We should forward the listeners to the encapsulated (this.addListener(int, Listener) -> getMainWidget().addListener(int, Listener))
//Problem: some widgets have more than one "main widget" (e.g. EnumRadio).
@@ -74,6 +75,8 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
*/
protected String toolTipText;
+ protected DataBindingContext dbc;
+
/**
* The factory for creating all the editors with a common style
*/
@@ -85,9 +88,9 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
}
/**
- *
+ *
* Constructor. Constructs an editor without a label
- *
+ *
* @param parent
* The composite in which this editor should be created
*/
@@ -96,9 +99,9 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
}
/**
- *
+ *
* Constructor. Constructs an editor without a label
- *
+ *
* @param parent
* The composite in which this editor should be created
* @param style
@@ -109,9 +112,9 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
}
/**
- *
+ *
* Constructor. Constructs an editor with a label
- *
+ *
* @param parent
* The composite in which this editor should be created
* @param label
@@ -123,9 +126,9 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
}
/**
- *
+ *
* Constructor. Constructs an editor with a label
- *
+ *
* @param parent
* The composite in which this editor should be created
* @param style
@@ -146,7 +149,7 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
/**
* Creates the label widget with the given text
- *
+ *
* @param text
* The text to be displayed on the label
*/
@@ -172,7 +175,7 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
/**
* This method should be called by subclasses to get the default layoutData
* for a control in this editor.
- *
+ *
* @return The default layoutData for the main control
*/
protected GridData getDefaultLayoutData() {
@@ -183,7 +186,7 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
/**
* Changes the text label for this editor. This method is available
* only when the editor has been constructed with a label.
- *
+ *
* @param label
* The new text for this editor's label
*/
@@ -200,7 +203,7 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
/**
* Show or delete the Label Widget.
- *
+ *
* @param displayLabel
*/
public void setDisplayLabel(boolean displayLabel) {
@@ -217,7 +220,7 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
/**
* Adds a commit listener to this editor. A Commit event is
* fired when a modification occures on this editor.
- *
+ *
* @param listener
* The commit listener to add to this editor
*/
@@ -227,7 +230,7 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
/**
* Removes a commit listener from this editor.
- *
+ *
* @param listener
* The commit listener to remove from this editor
*/
@@ -241,22 +244,29 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
protected void commit() {
for(ICommitListener listener : commitListeners) {
listener.commit(this);
+
}
+
+
}
/**
* Gets the BindingContext associated to the editors
- *
+ *
* @return
*/
protected DataBindingContext getBindingContext() {
- return new DataBindingContext();
+ if(dbc == null) {
+ dbc = new DataBindingContext();
+ }
+ return dbc;
}
+
/**
* Sets the converters to convert data from Model to Target (Widget),
* and from Widget to Model
- *
+ *
* @param targetToModel
* @param modelToTarget
*/
@@ -277,14 +287,14 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
/**
* Marks this editor as being read-only. The value of a read-only
* editor cannot be changed by the editor itself.
- *
+ *
* @param readOnly
*/
public abstract void setReadOnly(boolean readOnly);
/**
* Tests whether this editor is read-only or not
- *
+ *
* @return
* True if the editor is read-only
*/
@@ -293,7 +303,7 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
/**
* Indicates that this editor should notify its commit listeners
* when the given control looses the Focus
- *
+ *
* @param control
* The control on which a FocusListener should be added,
* to notify the CommitListeners
@@ -301,10 +311,13 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
protected void setCommitOnFocusLost(Control control) {
control.addFocusListener(new FocusListener() {
+ @Override
public void focusGained(FocusEvent e) {
// Nothing
+
}
+ @Override
public void focusLost(FocusEvent e) {
commit();
}
@@ -319,11 +332,19 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
if(binding != null) {
binding.updateModelToTarget();
}
+
+ }
+
+ public void refreshModel() {
+ if(binding != null) {
+ binding.updateTargetToModel();
+ }
+
}
/**
* Sets the given toolTip to the label
- *
+ *
* @param text
* The new label's tooltip
*/
@@ -336,7 +357,7 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
/**
* Excludes or includes the given control from the layout
- *
+ *
* @param control
* The control to exclude or include
* @param exclude
@@ -361,40 +382,45 @@ public abstract class AbstractEditor extends Composite implements DisposeListene
}
}
- @Override
- public abstract void setToolTipText(String text);
+ @Override
public void widgetDisposed(DisposeEvent e) {
dispose();
}
+ public void changeColorField() {
+
+ }
+
+
/**
* Obtains the most appropriate operation executor for the object being edited.
- *
- * @param context the object being edited
+ *
+ * @param context
+ * the object being edited
* @return the executor to use to run operations (never {@code null})
*/
public IAtomicOperationExecutor getOperationExecutor(Object context) {
IAtomicOperationExecutor result;
if(context instanceof IAdaptable) {
result = (IAtomicOperationExecutor)((IAdaptable)context).getAdapter(IAtomicOperationExecutor.class);
- } else if (context != null) {
+ } else if(context != null) {
result = (IAtomicOperationExecutor)Platform.getAdapterManager().getAdapter(context, IAtomicOperationExecutor.class);
} else {
// We can't adapt null, of course, so we will have to settle for the default executor
result = null;
}
- if (result == null) {
+ if(result == null) {
result = IAtomicOperationExecutor.DEFAULT;
}
-
+
return result;
}
-
+
/**
* Queries the model element that I edit.
- *
+ *
* @return the contextual model element
*/
protected abstract Object getContextElement();
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractValueEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractValueEditor.java
index 150eb611907..cb4d42abfb9 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractValueEditor.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractValueEditor.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010, 2014 CEA LIST 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
@@ -8,26 +8,35 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
* Christian W. Damus (CEA) - bug 402525
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
+
import org.eclipse.core.databinding.UpdateValueStrategy;
import org.eclipse.core.databinding.conversion.IConverter;
import org.eclipse.core.databinding.observable.ChangeEvent;
import org.eclipse.core.databinding.observable.IChangeListener;
import org.eclipse.core.databinding.observable.IObserving;
import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.observable.value.IValueChangeListener;
+import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
+import org.eclipse.core.databinding.validation.IValidator;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.papyrus.infra.widgets.validator.AbstractValidator;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
/**
- * An abstract class to represent Single-value Editors.
- * Single-value editors are based on the Eclipse Databinding Framework
- * They take {@link IObservableValue}s as Input
- *
+ * An abstract class to represent Single-value Editors. Single-value editors are
+ * based on the Eclipse Databinding Framework They take {@link IObservableValue} s as Input
+ *
* @author Camille Letavernier
- *
+ *
*/
public abstract class AbstractValueEditor extends AbstractEditor {
@@ -51,6 +60,29 @@ public abstract class AbstractValueEditor extends AbstractEditor {
*/
protected UpdateValueStrategy modelToTargetStrategy;
+ /**
+ * the Validator for the target
+ */
+ protected AbstractValidator targetValidator;
+
+ /**
+ * the Validator for the model
+ */
+ protected IValidator modelValidator;
+
+ protected boolean errorBinding = false;
+
+ protected ControlDecoration controlDecoration;
+
+
+ protected final Color VALIDE = new Color(Display.getCurrent(), 153, 255, 153);
+
+ protected final Color DEFAULT = new Color(Display.getCurrent(), 255, 255, 255);
+
+ protected final Color EDIT = new Color(Display.getCurrent(), 255, 204, 153);
+
+ protected final Color ERROR = new Color(Display.getCurrent(), 255, 153, 153);
+
protected AbstractValueEditor(Composite parent) {
super(parent);
}
@@ -69,7 +101,7 @@ public abstract class AbstractValueEditor extends AbstractEditor {
/**
* Sets this editor's IObservableValue associated to the widget property
- *
+ *
* @param widgetObservable
* @param targetToModel
* the IConverter to convert data from Widget to Model
@@ -83,19 +115,23 @@ public abstract class AbstractValueEditor extends AbstractEditor {
/**
* Sets this editor's widgetObservable
- *
+ *
* @param widgetObservable
* The widget observable value
* @param commitOnChange
- * If true, CommitListeners will be notified when the widget observable changes
+ * If true, CommitListeners will be notified when the widget
+ * observable changes
*/
protected void setWidgetObservable(IObservableValue widgetObservable, boolean commitOnChange) {
this.widgetObservable = widgetObservable;
+
if(commitOnChange) {
this.widgetObservable.addChangeListener(new IChangeListener() {
+ @Override
public void handleChange(ChangeEvent event) {
commit();
+
}
});
}
@@ -103,22 +139,24 @@ public abstract class AbstractValueEditor extends AbstractEditor {
/**
* Sets this editor's IObservableValue associated to the widget property
- *
+ *
* @param widgetObservable
*/
protected void setWidgetObservable(IObservableValue widgetObservable) {
setWidgetObservable(widgetObservable, false);
+
}
/**
- * Sets this editor's IObservableValue associated to the model property,
- * and binds it to the Editor's Widget
- *
+ * Sets this editor's IObservableValue associated to the model property, and
+ * binds it to the Editor's Widget
+ *
* @param modelProperty
*/
public void setModelObservable(IObservableValue modelProperty) {
this.modelProperty = modelProperty;
doBinding();
+
}
/**
@@ -138,8 +176,9 @@ public abstract class AbstractValueEditor extends AbstractEditor {
}
/**
- * Sets the UpdateStrategies for databinding between the widget and the model
- *
+ * Sets the UpdateStrategies for databinding between the widget and the
+ * model
+ *
* @param targetToModelStrategy
* The widget to model Update strategy
* @param modelToTargetStrategy
@@ -151,11 +190,11 @@ public abstract class AbstractValueEditor extends AbstractEditor {
}
/**
- * Binds the Widget Observable to the Model observable property,
- * using the specified converters or Update strategies when available
- *
+ * Binds the Widget Observable to the Model observable property, using the
+ * specified converters or Update strategies when available
+ *
* When overriding this method, you should also override {@link #refreshValue()}
- *
+ *
* @see org.eclipse.papyrus.infra.widgets.editors.AbstractEditor#doBinding()
*/
@Override
@@ -164,22 +203,92 @@ public abstract class AbstractValueEditor extends AbstractEditor {
return;
}
- binding = getBindingContext().bindValue(widgetObservable, modelProperty, targetToModelStrategy, modelToTargetStrategy);
+ setBinding();
}
/**
- * Returns the value from the widget
- * May be used even when the Model Observable is not set
- *
- * @return
- * The current value for this editor
+ * Returns the value from the widget May be used even when the Model
+ * Observable is not set
+ *
+ * @return The current value for this editor
*/
public abstract Object getValue();
-
+
+ /**
+ * Initialize binding
+ */
+
+ private void setBinding() {
+ binding = getBindingContext().bindValue(widgetObservable, modelProperty, targetToModelStrategy, modelToTargetStrategy);
+ binding.getValidationStatus().addValueChangeListener(new IValueChangeListener() {
+
+ @Override
+ public void handleValueChange(ValueChangeEvent event) {
+ IStatus status = (IStatus)binding.getValidationStatus().getValue();
+ updateStatus(status);
+
+ if(!isReadOnly()) {
+ changeColorField();
+ }
+ }
+
+ });
+
+
+ }
+
+ public void updateStatus(IStatus status) {
+
+ }
+
+ /**
+ * Set the target to model Strategy to after get validation
+ *
+ * @param targetToModelValidator
+ */
+
+ public void setTargetAfterGetValidator(AbstractValidator targetToModelValidator) {
+ if(targetToModelValidator != null) {
+ targetToModelStrategy.setAfterGetValidator(targetToModelValidator);
+ }
+ }
+
+ /**
+ * Set the model strategy with After get validation
+ * Set the target strategy with before set validation
+ *
+ * @param modelValidator
+ */
+
+ public void setModelValidator(IValidator targetToModelValidator) {
+ if(targetToModelValidator != null) {
+ this.modelValidator = targetToModelValidator;
+ targetToModelStrategy.setBeforeSetValidator(targetToModelValidator);
+ modelToTargetStrategy.setAfterGetValidator(targetToModelValidator);
+
+ }
+ }
+
+ /**
+ * Initialize both strategies with default values
+ */
+
+ public void setStrategies() {
+ if(modelToTargetStrategy == null) {
+ modelToTargetStrategy = new UpdateValueStrategy();
+ }
+ if(targetToModelStrategy == null) {
+ targetToModelStrategy = new UpdateValueStrategy();
+ }
+
+ }
+
+
@Override
protected Object getContextElement() {
// Our observables for features of EMF objects are expected to implement IObserving because
// the observe the value of the object's feature
return (modelProperty instanceof IObserving) ? ((IObserving)modelProperty).getObserved() : null;
}
+
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanCheckbox.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanCheckbox.java
index 0d23d5bf0b3..bee68c542ec 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanCheckbox.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanCheckbox.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -8,21 +8,24 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
import org.eclipse.papyrus.infra.tools.databinding.AggregatedObservable;
import org.eclipse.papyrus.infra.widgets.databinding.GrayedCheckboxObservableValue;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
/**
* A Property Editor representing a Boolean value
* as a Checkbox.
- *
+ *
* @author Camille Letavernier
*/
public class BooleanCheckbox extends AbstractValueEditor {
@@ -31,11 +34,12 @@ public class BooleanCheckbox extends AbstractValueEditor {
private AggregatedObservable aggregated;
+
/**
- *
+ *
* Constructor. Creates a new Property Editor for a Boolean
* value, represented as a Checkbox.
- *
+ *
* @param parent
* This editor's parent composite
* @param style
@@ -46,10 +50,10 @@ public class BooleanCheckbox extends AbstractValueEditor {
}
/**
- *
+ *
* Constructor. Creates a new Property Editor for a Boolean
* value, represented as a Checkbox, with the given label
- *
+ *
* @param parent
* This editor's parent composite
* @param style
@@ -63,6 +67,11 @@ public class BooleanCheckbox extends AbstractValueEditor {
IObservableValue widgetObservable = WidgetProperties.selection().observe(checkbox);
setWidgetObservable(widgetObservable, true);
+ GridData gridData = getDefaultLayoutData();
+ checkbox.setLayoutData(gridData);
+ gridData.horizontalIndent = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth();
+
+
}
@Override
@@ -122,7 +131,7 @@ public class BooleanCheckbox extends AbstractValueEditor {
/**
* Sets this widget's value
- *
+ *
* @param selected
* Whether the checkbox should be selected or not
*/
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanCombo.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanCombo.java
index 844d75dede6..e7f8c9bb1c7 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanCombo.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanCombo.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
@@ -24,9 +25,9 @@ import org.eclipse.swt.widgets.Composite;
/**
* An editor representing a boolean value as a combo box, with
* two options (true / false)
- *
+ *
* @author Camille Letavernier
- *
+ *
*/
public class BooleanCombo extends AbstractValueEditor {
@@ -34,7 +35,7 @@ public class BooleanCombo extends AbstractValueEditor {
/**
* Constructor.
- *
+ *
* @param parent
* The Composite widget in which this editor will be displayed
*/
@@ -43,9 +44,9 @@ public class BooleanCombo extends AbstractValueEditor {
}
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
* The Composite widget in which this editor will be displayed
* @param style
@@ -63,6 +64,7 @@ public class BooleanCombo extends AbstractValueEditor {
viewer.setContentProvider(new EncapsulatedContentProvider(new AbstractStaticContentProvider() {
+ @Override
public Object[] getElements() {
return new Boolean[]{ Boolean.TRUE, Boolean.FALSE };
}
@@ -73,11 +75,12 @@ public class BooleanCombo extends AbstractValueEditor {
setWidgetObservable(ViewerProperties.singleSelection().observe(viewer));
setCommitOnFocusLost(combo);
+
}
/**
* Creates the combo viewer
- *
+ *
* @param combo
* The parent combo
* @return the combo viewer.
@@ -87,9 +90,9 @@ public class BooleanCombo extends AbstractValueEditor {
}
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
* The Composite widget in which this editor will be displayed
* @param style
@@ -100,9 +103,9 @@ public class BooleanCombo extends AbstractValueEditor {
}
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
* The Composite widget in which this editor will be displayed
* @param label
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanRadio.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanRadio.java
index 937b0a36391..4bc95b1a473 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanRadio.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanRadio.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -8,13 +8,17 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.databinding.observable.value.SelectObservableValue;
import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
@@ -22,9 +26,9 @@ import org.eclipse.swt.widgets.Composite;
/**
* A Property Editor representing a Boolean value
* as a Radio, with two options (true/false).
- *
+ *
* @author Camille Letavernier
- *
+ *
*/
public class BooleanRadio extends AbstractValueEditor {
@@ -38,11 +42,14 @@ public class BooleanRadio extends AbstractValueEditor {
*/
protected Button falseRadio;
+ private ControlDecoration controlDecoration;
+
+
/**
- *
+ *
* Constructor. Creates a new Property Editor for a Boolean
* value, represented by two radio buttons.
- *
+ *
* @param parent
* This editor's parent composite
* @param style
@@ -53,10 +60,10 @@ public class BooleanRadio extends AbstractValueEditor {
}
/**
- *
+ *
* Constructor. Creates a new Property Editor for a Boolean
* value, represented by two radio buttons.
- *
+ *
* @param parent
* This editor's parent composite
* @param style
@@ -76,12 +83,17 @@ public class BooleanRadio extends AbstractValueEditor {
falseRadio.setBackground(this.getBackground()); //For Radio buttons, we need to force the color
setWidgetObservable(getObservable(), true);
+ controlDecoration = new ControlDecoration(trueRadio, SWT.TOP | SWT.LEFT);
+ GridData gridData = new GridData();
+ trueRadio.setLayoutData(gridData);
+ falseRadio.setLayoutData(gridData);
+ gridData.horizontalIndent = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth();
}
/**
* Defines a single observable value, encapsulating the ones
* from each radio button (true / false)
- *
+ *
* @return The encapsulating observable value
*/
private IObservableValue getObservable() {
@@ -128,4 +140,5 @@ public class BooleanRadio extends AbstractValueEditor {
falseRadio.setToolTipText(text);
super.setLabelToolTipText(text);
}
+
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanToggle.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanToggle.java
index 83147753f2b..ea2b18024a1 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanToggle.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/BooleanToggle.java
@@ -8,14 +8,20 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
@@ -29,6 +35,7 @@ import org.eclipse.swt.widgets.Composite;
public class BooleanToggle extends AbstractValueEditor {
private Button toggleButton;
+ private ControlDecoration controlDecoration;
private BooleanToggle(Composite parent, int style, String label, Image image, String text) {
super(parent, SWT.NONE, label);
@@ -36,6 +43,9 @@ public class BooleanToggle extends AbstractValueEditor {
toggleButton = factory.createButton(this, null, style | SWT.TOGGLE);
setWidgetObservable(WidgetProperties.selection().observe(toggleButton));
setCommitOnFocusLost(toggleButton);
+ GridData gridData = new GridData();
+ toggleButton.setLayoutData(gridData);
+
toggleButton.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
@@ -49,6 +59,9 @@ public class BooleanToggle extends AbstractValueEditor {
setText(text);
setImage(image);
+ gridData.horizontalIndent = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth();
+
+ controlDecoration = new ControlDecoration(toggleButton, SWT.TOP | SWT.LEFT );
}
public BooleanToggle(Composite parent, int style, String label, String text) {
@@ -127,4 +140,39 @@ public class BooleanToggle extends AbstractValueEditor {
toggleButton.setSelection(isActive);
}
+ @Override
+ public void updateStatus(IStatus status) {
+ // nothing
+ switch (status.getSeverity()) {
+ case IStatus.OK:
+ controlDecoration.hide();
+ break;
+ case IStatus.WARNING:
+ FieldDecoration warning = FieldDecorationRegistry.getDefault()
+ .getFieldDecoration(FieldDecorationRegistry.DEC_WARNING);
+ controlDecoration.setImage(warning.getImage());
+ controlDecoration.showHoverText(status.getMessage());
+ controlDecoration.setDescriptionText(status.getMessage());
+ controlDecoration.show();
+ break;
+ case IStatus.ERROR:
+ FieldDecoration error = FieldDecorationRegistry.getDefault()
+ .getFieldDecoration(FieldDecorationRegistry.DEC_ERROR);
+ controlDecoration.setImage(error.getImage());
+ controlDecoration.showHoverText(status.getMessage());
+ controlDecoration.setDescriptionText(status.getMessage());
+ controlDecoration.show();
+ break;
+ default:
+ controlDecoration.hide();
+ break;
+}
+ }
+
+ @Override
+ public void changeColorField() {
+ // TODO Auto-generated method stub
+
+ }
+
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompactMultipleValueEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompactMultipleValueEditor.java
index 97e812c23f2..2b34d674c7d 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompactMultipleValueEditor.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompactMultipleValueEditor.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010, 2014 CEA LIST 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
@@ -9,7 +9,7 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 402525
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
@@ -77,9 +77,9 @@ public class CompactMultipleValueEditor extends AbstractListEditor implements IC
protected IElementSelector selector;
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
* The widget in which this editor is created
* @param style
@@ -92,9 +92,9 @@ public class CompactMultipleValueEditor extends AbstractListEditor implements IC
}
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
* The widget in which this editor is created
* @param style
@@ -111,9 +111,9 @@ public class CompactMultipleValueEditor extends AbstractListEditor implements IC
}
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
* The widget in which this editor is created
* @param style
@@ -169,7 +169,7 @@ public class CompactMultipleValueEditor extends AbstractListEditor implements IC
/**
* Sets the label provider for this editor
- *
+ *
* @param provider
* The label provider for this editor
*/
@@ -180,11 +180,12 @@ public class CompactMultipleValueEditor extends AbstractListEditor implements IC
/**
* Refreshes the Label when a change occurs on the ObservableList
- *
+ *
* @see org.eclipse.core.databinding.observable.IChangeListener#handleChange(org.eclipse.core.databinding.observable.ChangeEvent)
- *
+ *
* @param event
*/
+ @Override
public void handleChange(ChangeEvent event) {
if(modelProperty != null) {
@@ -199,7 +200,7 @@ public class CompactMultipleValueEditor extends AbstractListEditor implements IC
/**
* Creates the text for the value label of this editor
- *
+ *
* @param labels
* The labels for each selected element
* @return The concatenated label
@@ -230,6 +231,7 @@ public class CompactMultipleValueEditor extends AbstractListEditor implements IC
/**
* {@inheritDoc} Handles the event when the edit button is pressed
*/
+ @Override
public void widgetSelected(SelectionEvent e) {
dialog.setContextElement(getContextElement());
dialog.setInitialSelections(modelProperty.toArray());
@@ -256,6 +258,7 @@ public class CompactMultipleValueEditor extends AbstractListEditor implements IC
/**
* {@inheritDoc} Ignored
*/
+ @Override
public void widgetDefaultSelected(SelectionEvent e) {
// Nothing
}
@@ -281,4 +284,5 @@ public class CompactMultipleValueEditor extends AbstractListEditor implements IC
public void refreshValue() {
handleChange(null);
}
+
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/DoubleEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/DoubleEditor.java
index fbbba0f0ee9..fc67a2501de 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/DoubleEditor.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/DoubleEditor.java
@@ -8,18 +8,19 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
-import java.util.Locale;
import org.eclipse.core.databinding.conversion.IConverter;
-import org.eclipse.core.databinding.conversion.NumberToStringConverter;
-import org.eclipse.core.databinding.conversion.StringToNumberConverter;
+
import org.eclipse.papyrus.infra.widgets.Activator;
+
+import org.eclipse.papyrus.infra.widgets.validator.RealValidator;
+
import org.eclipse.swt.widgets.Composite;
-import com.ibm.icu.text.NumberFormat;
/**
* An editor representing a float value as a text box
@@ -29,7 +30,6 @@ import com.ibm.icu.text.NumberFormat;
public class DoubleEditor extends StringEditor {
private IConverter targetToModelConverter;
-
/**
*
* Constructs an Editor for a Double value. The widget is a Text field.
@@ -42,8 +42,53 @@ public class DoubleEditor extends StringEditor {
public DoubleEditor(Composite parent, int style) {
super(parent, style);
- targetToModelConverter = StringToNumberConverter.toDouble(NumberFormat.getInstance(Locale.ENGLISH), true);
- setConverters(targetToModelConverter, NumberToStringConverter.fromDouble(NumberFormat.getInstance(Locale.ENGLISH), true));
+ targetValidator = new RealValidator();
+ targetToModelConverter = new IConverter() {
+
+ public Object getFromType() {
+ return String.class;
+ }
+
+ public Object getToType() {
+ return Double.class;
+ }
+
+ public Double convert(Object fromObject) {
+ if (fromObject instanceof String) {
+ String newString = ((String) fromObject)
+ .replaceAll(" ", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ try {
+ return Double.parseDouble(newString);
+ } catch (NumberFormatException ex) {
+ Activator.log.error(ex);
+ return null;
+ }
+ }
+ return null;
+ }
+
+ };
+
+ IConverter doubleToString = new IConverter() {
+
+ public Object getFromType() {
+ return Double.class;
+ }
+
+ public Object getToType() {
+ return String.class;
+ }
+
+ public Object convert(Object fromObject) {
+ if (fromObject instanceof Double) {
+ return Double.toString((Double) fromObject);
+ }
+ return ""; //$NON-NLS-1$
+ }
+ };
+ setValidateOnDelay(true);
+ setConverters(targetToModelConverter, doubleToString);
+ setTargetAfterGetValidator(targetValidator);
}
/**
@@ -66,4 +111,6 @@ public class DoubleEditor extends StringEditor {
return null;
}
}
+
+
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/EnumRadio.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/EnumRadio.java
index a09eb8e0a63..42316306c26 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/EnumRadio.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/EnumRadio.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
@@ -16,7 +17,11 @@ import java.util.Map;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.databinding.observable.value.SelectObservableValue;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.papyrus.infra.widgets.messages.Messages;
@@ -36,9 +41,9 @@ import org.eclipse.swt.widgets.Control;
* EnumCombo.
* This Editor needs a ContentProvider describing the Enumerated values,
* and an optional label provider.
- *
+ *
* @author Camille Letavernier
- *
+ *
* @see EnumCombo
*/
public class EnumRadio extends AbstractValueEditor {
@@ -53,6 +58,8 @@ public class EnumRadio extends AbstractValueEditor {
protected int numColumns = -1;
+ private ControlDecoration controlDecoration;
+
public EnumRadio(Composite parent, int style) {
this(parent, SWT.NONE, null);
}
@@ -60,20 +67,23 @@ public class EnumRadio extends AbstractValueEditor {
public EnumRadio(Composite parent, int style, String label) {
super(parent, style, label);
buttonsArea = factory.createComposite(this);
- buttonsArea.setLayoutData(getDefaultLayoutData());
+ GridData gridData = getDefaultLayoutData();
+ buttonsArea.setLayoutData(gridData);
GridLayout layout = new GridLayout(1, true);
-
layout.marginWidth = 0;
layout.marginHeight = 0;
-
buttonsArea.setLayout(layout);
factory.createCLabel(buttonsArea, Messages.EnumRadio_NoValue);
+ controlDecoration = new ControlDecoration(buttonsArea, SWT.TOP | SWT.LEFT);
+ gridData.horizontalIndent = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth();
+
}
+
/**
* Sets the content provider for this editor. The Content provider should
* specify the values that can be set for this property
- *
+ *
* @param contentProvider
* The Content provider returning the available values for this editor
* @param labelProvider
@@ -121,7 +131,7 @@ public class EnumRadio extends AbstractValueEditor {
/**
* Sets the max number of elements per line for this editor
- *
+ *
* @param numColumns
* The max number of elements per line. May be -1 if there should
* be a single line of elements
@@ -213,7 +223,7 @@ public class EnumRadio extends AbstractValueEditor {
* Use a Map instead of content providers to define the selectable elements
* The keys are the semantic objects (contentProvider), and the values are
* the labels (labelProvider)
- *
+ *
* @param objectsAndLabels
*/
public void setEnumValues(Map<Object, String> objectsAndLabels) {
@@ -221,4 +231,31 @@ public class EnumRadio extends AbstractValueEditor {
LabelProvider labelProvider = new MapLabelProvider(objectsAndLabels);
setProviders(provider, labelProvider);
}
+
+ @Override
+ public void updateStatus(IStatus status) {
+ switch(status.getSeverity()) {
+ case IStatus.OK:
+ controlDecoration.hide();
+ break;
+ case IStatus.WARNING:
+ FieldDecoration warning = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_WARNING);
+ controlDecoration.setImage(warning.getImage());
+ controlDecoration.showHoverText(status.getMessage());
+ controlDecoration.setDescriptionText(status.getMessage());
+ controlDecoration.show();
+ break;
+ case IStatus.ERROR:
+ FieldDecoration error = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR);
+ controlDecoration.setImage(error.getImage());
+ controlDecoration.showHoverText(status.getMessage());
+ controlDecoration.setDescriptionText(status.getMessage());
+ controlDecoration.show();
+ break;
+ default:
+ controlDecoration.hide();
+ break;
+ }
+ }
+
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IntegerEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IntegerEditor.java
index 65033c479ee..55f6bc825a0 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IntegerEditor.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IntegerEditor.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -8,21 +8,21 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
import org.eclipse.core.databinding.conversion.IConverter;
-import org.eclipse.core.databinding.conversion.NumberToStringConverter;
import org.eclipse.core.databinding.conversion.StringToNumberConverter;
import org.eclipse.papyrus.infra.widgets.Activator;
+import org.eclipse.papyrus.infra.widgets.validator.IntegerValidator;
import org.eclipse.swt.widgets.Composite;
/**
- * A Property Editor representing an Integer value
- * as a text box.
- *
+ * A Property Editor representing an Integer value as a text box.
+ *
* @author Camille Letavernier
- *
+ *
*/
public class IntegerEditor extends StringEditor {
@@ -31,9 +31,10 @@ public class IntegerEditor extends StringEditor {
*/
private IConverter targetToModelConverter;
+
/**
* Constructs an editor for Integer values. The widget is a Text field.
- *
+ *
* @param parent
* The Composite in which this editor is created
* @param style
@@ -45,7 +46,7 @@ public class IntegerEditor extends StringEditor {
/**
* Constructs an editor for Integer values. The widget is a Text field.
- *
+ *
* @param parent
* The Composite in which this editor is created
* @param style
@@ -56,11 +57,70 @@ public class IntegerEditor extends StringEditor {
public IntegerEditor(Composite parent, int style, String label) {
super(parent, style, label);
- targetToModelConverter = StringToNumberConverter.toInteger(false);
+ targetValidator = new IntegerValidator();
+
+ targetToModelConverter = new IConverter() {
+
+ @Override
+ public Object getToType() {
+ return Integer.class;
+ }
+
+ @Override
+ public Object getFromType() {
+ return String.class;
+ }
+
+ @Override
+ public Integer convert(Object fromObject) {
+ if(fromObject instanceof String) {
+ String newString = ((String)fromObject).replaceAll(" ", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ try {
+ Integer i = (Integer)StringToNumberConverter.toInteger(false).convert(newString);
+ return i;
+ } catch (Exception ex) {
+
+ }
+
+ }
+
+ return null;
+ }
+ };
+
+ IConverter integerToString = new IConverter() {
+
+ @Override
+ public Object getToType() {
+ return String.class;
+ }
+
+ @Override
+ public Object getFromType() {
+ return Integer.class;
+ }
+
+ @Override
+ public Object convert(Object fromObject) {
+
+ if(fromObject instanceof Integer) {
+ return Integer.toString((Integer)fromObject);
+ }
+ errorBinding = true;
+ return ""; //$NON-NLS-1$
+ }
+
+ };
+ setValidateOnDelay(true);
+ setConverters(targetToModelConverter, integerToString);
+ setTargetAfterGetValidator(targetValidator);
- setConverters(targetToModelConverter, NumberToStringConverter.fromInteger(false));
}
+
+
+
+
/**
* {@inheritDoc}
*/
@@ -75,10 +135,12 @@ public class IntegerEditor extends StringEditor {
@Override
public Integer getValue() {
try {
+
return (Integer)targetToModelConverter.convert(super.getValue());
} catch (Exception ex) {
Activator.log.error(ex);
return null;
}
}
+
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IntegerMask.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IntegerMask.java
index a86aa1e45f0..c9b75f03230 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IntegerMask.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IntegerMask.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
@@ -164,6 +165,7 @@ public class IntegerMask extends AbstractValueEditor implements SelectionListene
super.setLabelToolTipText(text);
}
+ @Override
public void widgetSelected(final SelectionEvent e) {
Button button = (Button)e.widget;
int value = (Integer)button.getData("IntValue"); //$NON-NLS-1$
@@ -196,6 +198,7 @@ public class IntegerMask extends AbstractValueEditor implements SelectionListene
}
}
+ @Override
public void widgetDefaultSelected(final SelectionEvent e) {
// Nothing
}
@@ -204,8 +207,10 @@ public class IntegerMask extends AbstractValueEditor implements SelectionListene
return ((GridLayout)checkboxContainer.getLayout()).numColumns;
}
+ @Override
public void handleChange(final ChangeEvent event) {
refreshCheckboxes();
}
+
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IntegerSpinner.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IntegerSpinner.java
index e79ca707faa..49891b6095d 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IntegerSpinner.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IntegerSpinner.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -8,29 +8,40 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
+import java.util.Timer;
+import java.util.TimerTask;
+
import org.eclipse.core.databinding.conversion.IConverter;
import org.eclipse.core.databinding.conversion.StringToNumberConverter;
import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.FocusListener;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Spinner;
/**
* A widget for editing Integer values with a SWT Spinner
- *
+ *
* @author Camille Letavernier
- *
+ *
* @see Spinner
*/
-public class IntegerSpinner extends AbstractValueEditor implements KeyListener {
+public class IntegerSpinner extends AbstractValueEditor implements KeyListener, ModifyListener {
/**
* The SWT Spinner
@@ -42,9 +53,14 @@ public class IntegerSpinner extends AbstractValueEditor implements KeyListener {
*/
protected IConverter targetToModelConverter;
+
+ private Timer timer;
+
+ private TimerTask changeColorTask;
+
/**
* Constructor.
- *
+ *
* @param parent
* The Composite in which the editor will be created
* @param style
@@ -74,14 +90,19 @@ public class IntegerSpinner extends AbstractValueEditor implements KeyListener {
});
spinner.addKeyListener(this);
+ spinner.addModifyListener(this);
setCommitOnFocusLost(spinner);
+ GridData gridData = getDefaultLayoutData();
+ spinner.setLayoutData(gridData);
+ gridData.horizontalIndent = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth();
targetToModelConverter = StringToNumberConverter.toInteger(false);
+ controlDecoration = new ControlDecoration(spinner, SWT.LEFT | SWT.LEFT);
}
/**
* Creates the Spinner
- *
+ *
* @return the Spinner
*/
protected Spinner createSpinner() {
@@ -137,7 +158,7 @@ public class IntegerSpinner extends AbstractValueEditor implements KeyListener {
/**
* Sets the minimum value for the spinner
- *
+ *
* @param minimum
* @see Spinner#setMinimum(int)
*/
@@ -147,7 +168,7 @@ public class IntegerSpinner extends AbstractValueEditor implements KeyListener {
/**
* Sets the maximum value for the spinner
- *
+ *
* @param maximum
* @see Spinner#setMaximum(int)
*/
@@ -157,7 +178,7 @@ public class IntegerSpinner extends AbstractValueEditor implements KeyListener {
/**
* Sets the increment value for the spinner
- *
+ *
* @param increment
* @see Spinner#setIncrement(int)
*/
@@ -167,7 +188,7 @@ public class IntegerSpinner extends AbstractValueEditor implements KeyListener {
@Override
public void keyPressed(KeyEvent e) {
- //Nothing
+
}
@Override
@@ -175,6 +196,7 @@ public class IntegerSpinner extends AbstractValueEditor implements KeyListener {
if(e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
notifyChange();
}
+
}
protected void notifyChange() {
@@ -182,4 +204,125 @@ public class IntegerSpinner extends AbstractValueEditor implements KeyListener {
commit();
}
+ @Override
+ public void updateStatus(IStatus status) {
+ switch(status.getSeverity()) {
+ case IStatus.OK:
+ controlDecoration.hide();
+ break;
+ case IStatus.WARNING:
+ FieldDecoration warning = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_WARNING);
+ controlDecoration.setImage(warning.getImage());
+ controlDecoration.showHoverText(status.getMessage());
+ controlDecoration.setDescriptionText(status.getMessage());
+ controlDecoration.show();
+ break;
+ case IStatus.ERROR:
+ FieldDecoration error = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR);
+ controlDecoration.setImage(error.getImage());
+ controlDecoration.showHoverText(status.getMessage());
+ controlDecoration.setDescriptionText(status.getMessage());
+ controlDecoration.show();
+ break;
+ default:
+ controlDecoration.hide();
+ break;
+ }
+ }
+
+ @Override
+ public void changeColorField() {
+ if(timer == null) {
+ timer = new Timer(true);
+ }
+ changeColorTask = new TimerTask() {
+
+ @Override
+ public void run() {
+ IntegerSpinner.this.getDisplay().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ if(!spinner.isDisposed()) {
+ spinner.setBackground(DEFAULT);
+ spinner.update();
+ }
+ }
+
+
+ });
+ }
+ };
+ if(errorBinding) {
+ spinner.setBackground(ERROR);
+ spinner.update();
+ } else {
+
+
+ IStatus status = (IStatus)binding.getValidationStatus().getValue();
+ switch(status.getSeverity()) {
+ case IStatus.OK:
+ timer.schedule(changeColorTask, 600);
+ spinner.setBackground(VALIDE);
+ spinner.update();
+ break;
+ case IStatus.WARNING:
+ timer.schedule(changeColorTask, 600);
+ spinner.setBackground(VALIDE);
+ spinner.update();
+ break;
+ case IStatus.ERROR:
+ spinner.setBackground(ERROR);
+ spinner.update();
+ break;
+ }
+ }
+ }
+
+ @Override
+ public void dispose() {
+ if(changeColorTask != null) {
+ changeColorTask.cancel();
+ changeColorTask = null;
+ }
+ if(timer != null) {
+ timer.cancel();
+ timer = null;
+ }
+ super.dispose();
+ }
+
+ /**
+ * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
+ *
+ * @param e
+ */
+
+ @Override
+ public void modifyText(ModifyEvent e) {
+ if(modelProperty == null) {
+ return;
+ }
+ try {
+ if(modelProperty.getValue() != null) {
+ if(!isReadOnly() && !modelProperty.getValue().toString().equals(spinner.getText())) {
+
+ spinner.setBackground(EDIT);
+
+ } else {
+ spinner.setBackground(DEFAULT);
+ }
+ } else {
+ if(spinner.getText().equals("")) {
+ spinner.setBackground(DEFAULT);
+ } else {
+ spinner.setBackground(EDIT);
+ }
+ }
+ } catch (Exception ex) {
+
+ }
+ }
+
+
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleDoubleEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleDoubleEditor.java
new file mode 100644
index 00000000000..477a46413a4
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleDoubleEditor.java
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.widgets.editors;
+
+
+import org.eclipse.papyrus.infra.widgets.selectors.RealSelector;
+import org.eclipse.swt.widgets.Composite;
+
+
+public class MultipleDoubleEditor extends MultipleStringEditor {
+
+ /**
+ * Constructs an Editor for multiple double values
+ * The widget is a List, with controls to move values up/down, add values
+ * and remove values.
+ *
+ * @param parent
+ * The Composite in which this editor is created
+ * @param style
+ * The List's style
+ */
+ public MultipleDoubleEditor(Composite parent, int style) {
+ super(parent, style, new RealSelector());
+ }
+
+ /**
+ * Constructs an Editor for multiple double values
+ * The widget is a List, with controls to move values up/down, add values
+ * and remove values.
+ *
+ * @param parent
+ * The Composite in which this editor is created
+ * @param style
+ * The List's style
+ * @param label
+ * The editor's label
+ */
+ public MultipleDoubleEditor(Composite parent, int style, String label) {
+ super(parent, style, new RealSelector(), label);
+ }
+
+ /**
+ * Constructs an Editor for multiple double values
+ * The widget is a List, with controls to move values up/down, add values
+ * and remove values.
+ *
+ * @param parent
+ * The Composite in which this editor is created
+ * @param style
+ * The List's style
+ * @param ordered
+ * Indicates if the values should be ordered. If true, the up/down controls will be activated
+ * @param unique
+ * Indicates if the values should be unique.
+ * @param label
+ * The editor's label
+ */
+ public MultipleDoubleEditor(Composite parent, int style, boolean ordered, boolean unique, String label) {
+ super(parent, style, new RealSelector(), ordered, unique, label);
+ }
+
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleStringFileEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleStringFileEditor.java
index 402c13e85e0..c0fe03fa884 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleStringFileEditor.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleStringFileEditor.java
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
@@ -25,6 +26,7 @@ import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl;
import org.eclipse.papyrus.infra.widgets.Activator;
+import org.eclipse.papyrus.infra.widgets.messages.Messages;
import org.eclipse.papyrus.infra.widgets.providers.WorkspaceContentProvider;
import org.eclipse.papyrus.infra.widgets.selectors.NullSelector;
import org.eclipse.papyrus.infra.widgets.selectors.ReferenceSelector;
@@ -73,8 +75,8 @@ public class MultipleStringFileEditor extends MultipleValueEditor {
add.dispose();
edit.dispose();
- browseFileSystem = createButton(Activator.getDefault().getImageFromPlugin(browseFileSystemIcon), "Browse file system");
- browseWorkspace = createButton(Activator.getDefault().getImageFromPlugin(browseWorkspaceIcon), "Browse workspace");
+ browseFileSystem = createButton(Activator.getDefault().getImageFromPlugin(browseFileSystemIcon), Messages.MultipleStringFileEditor_0);
+ browseWorkspace = createButton(Activator.getDefault().getImageFromPlugin(browseWorkspaceIcon), Messages.MultipleStringFileEditor_1);
browseWorkspace.moveAbove(remove);
browseFileSystem.moveAbove(remove);
@@ -197,7 +199,7 @@ public class MultipleStringFileEditor extends MultipleValueEditor {
public void setFilters(String[] filterExtensions, String[] filterNames) {
if(filterExtensions.length != filterNames.length) {
//This is a simple warning. Only valid filters will be retained.
- Activator.log.warn("FilterExtensions and FilterNames do not match");
+ Activator.log.warn(Messages.MultipleStringFileEditor_2);
}
setFilterNames(getFilterLabels(filterNames, filterExtensions));
@@ -208,7 +210,7 @@ public class MultipleStringFileEditor extends MultipleValueEditor {
int size = Math.min(filterNames.length, filterExtensions.length);
String[] filters = new String[size];
for(int i = 0; i < size; i++) {
- filters[i] = filterNames[i] + " (" + filterExtensions[i] + ")";
+ filters[i] = filterNames[i] + " (" + filterExtensions[i] + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
return filters;
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueEditor.java
index 4b23273caa4..184dc57116a 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueEditor.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueEditor.java
@@ -709,4 +709,10 @@ public class MultipleValueEditor extends AbstractListEditor implements Selection
}
}
}
+
+ @Override
+ public void changeColorField() {
+ // TODO Auto-generated method stub
+
+ }
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueSelectorDialog.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueSelectorDialog.java
index cd2c84d8b5b..1483e92a927 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueSelectorDialog.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueSelectorDialog.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010, 2014 CEA LIST 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
@@ -8,8 +8,9 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
* Christian W. Damus (CEA) - bug 402525
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
@@ -50,14 +51,12 @@ import org.eclipse.ui.dialogs.SelectionDialog;
/**
* Object Chooser. Defines a standard popup for selecting
- * multiple values. If this dialog is used to select or create model
+ * multiple values. If this dialog is used to select or create model
* elements to be added to or removed from some element that is being
- * edited, then it is important to
- * {@linkplain #setContextElement(Object) set that contextual element}
- * in this dialog.
- *
+ * edited, then it is important to {@linkplain #setContextElement(Object) set that contextual element} in this dialog.
+ *
* @author Camille Letavernier
- *
+ *
* @see #setContextElement(Object)
*/
public class MultipleValueSelectorDialog extends SelectionDialog implements ISelectionChangedListener, IDoubleClickListener, IElementSelectionListener, SelectionListener {
@@ -158,7 +157,7 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
* The factory for creating new elements
*/
protected ReferenceValueFactory factory;
-
+
/**
* The model element being edited (if any), to which elements are to be added or removed.
*/
@@ -177,7 +176,7 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
/**
* Constructor.
- *
+ *
* @param parentShell
* The shell in which this dialog should be opened
* @param selector
@@ -189,7 +188,7 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
/**
* Constructor.
- *
+ *
* @param parentShell
* The shell in which this dialog should be opened
* @param selector
@@ -202,9 +201,9 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
}
/**
- *
+ *
* Constructor.
- *
+ *
* @param parentShell
* The shell in which this dialog should be opened
* @param selector
@@ -217,9 +216,9 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
}
/**
- *
+ *
* Constructor.
- *
+ *
* @param parentShell
* The shell in which this dialog should be opened
* @param selector
@@ -230,13 +229,13 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
* True if the values returned by this dialog should be unique
*/
public MultipleValueSelectorDialog(Shell parentShell, IElementSelector selector, String title, boolean unique, boolean ordered) {
- this(parentShell, selector, title, unique, ordered, MANY);
+ this(parentShell, selector, title, unique, false, MANY);
}
/**
- *
+ *
* Constructor.
- *
+ *
* @param parentShell
* The shell in which this dialog should be opened
* @param selector
@@ -313,7 +312,7 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
/**
* Creates the selector section
- *
+ *
* @param parent
* The composite in which the section is created
*/
@@ -326,7 +325,7 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
/**
* Creates the main controls section (Add, remove, Add all, remove all)
- *
+ *
* @param parent
* The composite in which the section is created
*/
@@ -363,7 +362,7 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
/**
* Creates the list displaying the currently selected elements
- *
+ *
* @param parent
* The composite in which the section is created
*/
@@ -390,7 +389,7 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
/**
* Creates the up/down controls section
- *
+ *
* @param parent
* The composite in which the section is created
*/
@@ -422,7 +421,7 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
/**
* Sets the label provider used to display the selected elements
- *
+ *
* @param labelProvider
*/
public void setLabelProvider(ILabelProvider labelProvider) {
@@ -431,12 +430,13 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
/**
* {@inheritDoc} Handles the events on one of the control buttons
- *
+ *
* @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- *
+ *
* @param e
* The event that occurred
*/
+ @Override
public void widgetSelected(SelectionEvent e) {
if(e.widget == add) {
addAction();
@@ -460,7 +460,7 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
/**
* Sets the {@link ReferenceValueFactory} for this editor. The {@link ReferenceValueFactory} is used to create
* new instances and edit existing ones.
- *
+ *
* @param factory
* The {@link ReferenceValueFactory} to be used by this editor
*/
@@ -571,7 +571,7 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
/**
* Moves an element from oldIndex to newIndex
- *
+ *
* @param list
* The list in which to move the object
* @param oldIndex
@@ -636,10 +636,11 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
/**
* Adds the specified elements to the currently selected elements (For
* "Add" and "Add all" actions)
- *
+ *
* @param elements
* The elements to be added
*/
+ @Override
public void addElements(Object[] elements) {
if(elements != null) {
allElements.addAll(Arrays.asList(elements));
@@ -665,13 +666,14 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
super.okPressed();
}
+ @Override
public void widgetDefaultSelected(SelectionEvent e) {
//Nothing (see #doubleClick())
}
/**
* Indicates if the selected values should be unique (According to Object.equals())
- *
+ *
* @param unique
*/
public void setUnique(boolean unique) {
@@ -681,7 +683,7 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
/**
* Indicates if the selected elements should be ordered
- *
+ *
* @param ordered
*/
public void setOrdered(boolean ordered) {
@@ -717,7 +719,7 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
/**
* Set the maximum number of values selected.
- *
+ *
* @param upperBound
*/
public void setUpperBound(int upperBound) {
@@ -726,23 +728,23 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
/**
* Sets the optional context of the element that is being edited, in which others will be added and removed.
- *
+ *
* @param contextElement
* the model element that is being edited
*/
public void setContextElement(Object contextElement) {
this.contextElement = contextElement;
}
-
+
/**
* Queries the optional context of the element that is being edited, in which others will be added and removed.
- *
+ *
* @return the model element that is being edited
*/
public Object getContextElement() {
return contextElement;
}
-
+
@Override
public boolean close() {
selector.removeElementSelectionListener(this);
@@ -751,19 +753,21 @@ public class MultipleValueSelectorDialog extends SelectionDialog implements ISel
/**
* {@inheritDoc}
- *
+ *
* Handles double click event on the right-panel tree viewer {@link #selectedElementsViewer}
- *
+ *
*/
+ @Override
public void doubleClick(DoubleClickEvent event) {
removeAction();
}
/**
* {@inheritDoc}
- *
+ *
* Handles selection change event on the right-panel tree viewer {@link #selectedElementsViewer}
*/
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
updateControls();
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceCombo.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceCombo.java
index 1b4bd4ffebc..9447822c6e4 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceCombo.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceCombo.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -8,11 +8,16 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
import org.eclipse.jface.viewers.ComboViewer;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -26,6 +31,7 @@ import org.eclipse.papyrus.infra.widgets.providers.UnsetObject;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@@ -34,9 +40,9 @@ import org.eclipse.swt.widgets.Composite;
* An editor representing a single reference as a Combo Box
* This Editor needs a ContentProvider and a LabelProvider,
* describing the objects that can be referred by this property
- *
+ *
* @author Camille Letavernier
- *
+ *
*/
public class ReferenceCombo extends AbstractValueEditor { //implements SelectionListener {
@@ -56,10 +62,11 @@ public class ReferenceCombo extends AbstractValueEditor { //implements Selection
protected EncapsulatedContentProvider contentProvider;
+
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
* The Composite in which this editor is diplayed
* @param style
@@ -70,9 +77,9 @@ public class ReferenceCombo extends AbstractValueEditor { //implements Selection
}
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
* The Composite in which this editor is diplayed
* @param style
@@ -98,13 +105,17 @@ public class ReferenceCombo extends AbstractValueEditor { //implements Selection
((GridLayout)getLayout()).numColumns++;
setCommitOnFocusLost(combo);
+ controlDecoration = new ControlDecoration(combo, SWT.TOP | SWT.LEFT);
+ GridData gridData = getDefaultLayoutData();
+ combo.setLayoutData(gridData);
+ gridData.horizontalIndent = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth();
}
/**
* Sets the Content and Label providers for this editor
- *
+ *
* @param contentProvider
- *
+ *
* @param labelProvider
*/
public void setProviders(IStaticContentProvider contentProvider, ILabelProvider labelProvider) {
@@ -119,7 +130,7 @@ public class ReferenceCombo extends AbstractValueEditor { //implements Selection
/**
* Sets the content provider for this combo. The Content provider should
* specify the objects that can be referred by this property
- *
+ *
* @param provider
*/
public void setContentProvider(IStaticContentProvider provider) {
@@ -153,7 +164,7 @@ public class ReferenceCombo extends AbstractValueEditor { //implements Selection
/**
* The Label provider associated to the available objects that
* can be referred by this property
- *
+ *
* @param provider
*/
public void setLabelProvider(ILabelProvider provider) {
@@ -162,7 +173,7 @@ public class ReferenceCombo extends AbstractValueEditor { //implements Selection
/**
* Retrieves the ComboViewer associated to this Editor
- *
+ *
* @return
* The ComboViewer associated to this editor
*/
@@ -192,7 +203,7 @@ public class ReferenceCombo extends AbstractValueEditor { //implements Selection
/**
* Sets the value for this widget
- *
+ *
* @param value
*/
public void setValue(Object value) {
@@ -248,7 +259,7 @@ public class ReferenceCombo extends AbstractValueEditor { //implements Selection
/**
* Changes the viewer for this editor.
* The viewer should use a CCombo
- *
+ *
* @param comboViewer
*/
public void setViewer(ComboViewer comboViewer) {
@@ -256,6 +267,35 @@ public class ReferenceCombo extends AbstractValueEditor { //implements Selection
this.combo = viewer.getCCombo();
}
+ //FIXME error avec multiplicité nulllpointerexception l285
+ @Override
+ public void updateStatus(IStatus status) {
+ switch(status.getSeverity()) {
+ case IStatus.OK:
+ controlDecoration.hide();
+ break;
+ case IStatus.WARNING:
+ FieldDecoration warning = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_WARNING);
+ controlDecoration.setImage(warning.getImage());
+ controlDecoration.showHoverText(status.getMessage());
+ controlDecoration.setDescriptionText(status.getMessage());
+ controlDecoration.show();
+ break;
+ case IStatus.ERROR:
+ FieldDecoration error = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR);
+ controlDecoration.setImage(error.getImage());
+ controlDecoration.showHoverText(status.getMessage());
+ controlDecoration.setDescriptionText(status.getMessage());
+ controlDecoration.show();
+ break;
+ default:
+ controlDecoration.hide();
+ break;
+ }
+
+
+ }
+
// protected void unsetAction() {
// viewer.setSelection(StructuredSelection.EMPTY);
// if(modelProperty != null) {
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceDialog.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceDialog.java
index 84c2234678b..41c9e48adf3 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceDialog.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceDialog.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010, 2014 CEA LIST 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
@@ -8,17 +8,24 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
* Christian W. Damus (CEA) - bug 402525
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import java.util.Timer;
+import java.util.TimerTask;
import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.window.Window;
@@ -37,6 +44,7 @@ import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
@@ -48,9 +56,9 @@ import org.eclipse.swt.widgets.Widget;
* dialog is used to edit the value. Also offers support for unsetting the
* value. This Editor needs a ContentProvider, and may use an optional
* LabelProvider, describing the objects that can be referred by this property
- *
+ *
* @author Camille Letavernier
- *
+ *
*/
public class ReferenceDialog extends AbstractValueEditor implements SelectionListener {
@@ -114,26 +122,38 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
private boolean directCreation;
/**
- * Indicates whether the widget requires a value or not.
- * If it is mandatory, it cannot delete/unset its value
+ * Indicates whether the widget requires a value or not. If it is mandatory,
+ * it cannot delete/unset its value
*/
protected boolean mandatory;
+ private ControlDecoration controlDecoration;
+
+ protected boolean error = false;
+
+ private Timer timer;
+
+ private TimerTask changeColorTask;
+
+ private boolean edit = false;
+
/**
- *
+ *
* Constructs a new ReferenceDialog in the given parent Composite. The style
* will be applied to the CLabel displaying the current value.
- *
+ *
* @param parent
* @param style
*/
public ReferenceDialog(Composite parent, int style) {
super(parent, style);
+ GridData gridData = getDefaultLayoutData();
currentValueLabel = factory.createCLabel(this, null, factory.getBorderStyle() | style);
- currentValueLabel.setLayoutData(getDefaultLayoutData());
+ currentValueLabel.setLayoutData(gridData);
currentValueLabel.addMouseListener(new MouseListener() {
+ @Override
public void mouseDoubleClick(MouseEvent e) {
editAction(); // TODO : Try to determine whether the double
// click should call the edit, create or browse
@@ -142,10 +162,12 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
// browse, try to create an instance.
}
+ @Override
public void mouseDown(MouseEvent e) {
// Nothing
}
+ @Override
public void mouseUp(MouseEvent e) {
// Nothing
}
@@ -156,6 +178,9 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
createButtons();
updateControls();
+ controlDecoration = new ControlDecoration(currentValueLabel, SWT.TOP | SWT.LEFT);
+
+ gridData.horizontalIndent = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth();
}
protected ITreeSelectorDialog createDialog(Shell shell) {
@@ -187,8 +212,8 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
}
/**
- * The action executed when the "browse" button is selected
- * Choose a value from a selection of already created objects
+ * The action executed when the "browse" button is selected Choose a value
+ * from a selection of already created objects
*/
protected void browseAction() {
setInitialSelection(Collections.singletonList(getValue()));
@@ -204,6 +229,7 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
} else {
Object value = newValue[0];
if(contentProvider instanceof IAdaptableContentProvider) {
+
value = ((IAdaptableContentProvider)contentProvider).getAdaptedValue(value);
}
setValue(value);
@@ -219,7 +245,7 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
if(valueFactory != null && valueFactory.canCreateObject()) {
final Object context = getContextElement();
getOperationExecutor(context).execute(new Runnable() {
-
+
@Override
public void run() {
Object value = valueFactory.createObject(createInstanceButton, context);
@@ -241,10 +267,12 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
* that is currently selected
*/
protected void editAction() {
+ currentValueLabel.setBackground(EDIT);
+ edit = true;
final Object currentValue = getValue();
if(currentValue != null && valueFactory != null && valueFactory.canEdit()) {
getOperationExecutor(currentValue).execute(new Runnable() {
-
+
@Override
public void run() {
Object newValue = valueFactory.edit(editInstanceButton, currentValue);
@@ -271,6 +299,7 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
protected void updateLabel() {
if(binding != null) {
binding.updateModelToTarget();
+
} else {
currentValueLabel.setImage(labelProvider.getImage(getValue()));
currentValueLabel.setText(labelProvider.getText(getValue()));
@@ -279,7 +308,7 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
/**
* Sets the Content provider for this editor
- *
+ *
* @param provider
* The content provider used to retrieve the possible values for
* this Reference
@@ -297,7 +326,7 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
* Sets the Label provider for this editor If the label provider is null, a
* default one will be used. The same label provider is used for both the
* editor's label and the selection dialog.
- *
+ *
* @param provider
* The label provider
*/
@@ -390,6 +419,7 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
updateControls();
}
+ @Override
public void widgetSelected(SelectionEvent e) {
Widget widget = e.widget;
if(widget == browseValuesButton) {
@@ -403,6 +433,7 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
}
}
+ @Override
public void widgetDefaultSelected(SelectionEvent e) {
// Nothing
}
@@ -426,7 +457,7 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
createInstanceButton.setEnabled(valueFactory != null && valueFactory.canCreateObject() && !readOnly);
}
- //Do not display unset if the value is mandatory
+ // Do not display unset if the value is mandatory
setExclusion(unsetButton, mandatory);
if(!mandatory) {
boolean enabled = !readOnly;
@@ -449,9 +480,16 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
public void setValue(Object value) {
this.value = value;
- if(modelProperty != null) {
- modelProperty.setValue(value);
+ try {
+ if(modelProperty != null) {
+ modelProperty.setValue(value);
+ error = false;
+ }
+ } catch (Exception e) {
+ error = true;
+
}
+
updateControls();
updateLabel();
commit();
@@ -468,4 +506,74 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
public void setMandatory(boolean mandatory) {
this.mandatory = mandatory;
}
+
+ @Override
+ public void updateStatus(IStatus status) {
+
+ if(error) {
+ FieldDecoration error = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR);
+ controlDecoration.setImage(error.getImage());
+ controlDecoration.showHoverText(Messages.ReferenceDialog_0);
+ controlDecoration.setDescriptionText(Messages.ReferenceDialog_1);
+ controlDecoration.show();
+ currentValueLabel.setBackground(ERROR);
+ currentValueLabel.update();
+
+
+ } else {
+ controlDecoration.hide();
+ }
+ }
+
+ @Override
+ public void changeColorField() {
+ if(!error & !edit) {
+ if(timer == null) {
+ timer = new Timer(true);
+ }
+ changeColorTask = new TimerTask() {
+
+ @Override
+ public void run() {
+ ReferenceDialog.this.getDisplay().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+
+ currentValueLabel.setBackground(DEFAULT);
+ currentValueLabel.update();
+ }
+
+
+ });
+ }
+ };
+ if(errorBinding) {
+ currentValueLabel.setBackground(ERROR);
+ currentValueLabel.update();
+ } else {
+ IStatus status = (IStatus)binding.getValidationStatus().getValue();
+ switch(status.getSeverity()) {
+ case IStatus.OK:
+ timer.schedule(changeColorTask, 600);
+ currentValueLabel.setBackground(VALIDE);
+ currentValueLabel.update();
+ break;
+ case IStatus.WARNING:
+ timer.schedule(changeColorTask, 600);
+ currentValueLabel.setBackground(VALIDE);
+ currentValueLabel.update();
+ break;
+ case IStatus.ERROR:
+ currentValueLabel.setBackground(ERROR);
+ currentValueLabel.update();
+ break;
+
+ }
+ }
+ } else {
+ currentValueLabel.setBackground(DEFAULT);
+ }
+ }
+
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringCombo.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringCombo.java
index bb98602621a..c9ffbc6cefc 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringCombo.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringCombo.java
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
@@ -83,7 +84,7 @@ public class StringCombo extends ReferenceCombo {
if(value instanceof String) {
combo.setText((String)value);
} else {
- combo.setText("");
+ combo.setText(""); //$NON-NLS-1$
}
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringEditor.java
index 70371c91632..a4328023a96 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringEditor.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringEditor.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
@@ -15,27 +16,33 @@ import java.util.Timer;
import java.util.TimerTask;
import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
import org.eclipse.papyrus.infra.widgets.databinding.TextObservableValue;
import org.eclipse.papyrus.infra.widgets.selectors.StringSelector;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Text;
/**
- * A Property Editor representing a single-line or multi-line String value
- * as a Text.
- * This editor's content is validated when the focus is lost,
- * or, if the editor is single-line, when the Carriage Return is pressed.
- * For a multi-line editor, ctrl+enter will also validate the editor's content.
- *
+ * A Property Editor representing a single-line or multi-line String value as a
+ * Text. This editor's content is validated when the focus is lost, or, if the
+ * editor is single-line, when the Carriage Return is pressed. For a multi-line
+ * editor, ctrl+enter will also validate the editor's content.
+ *
* @see SWT#MULTI
- *
+ *
* @author Camille Letavernier
*/
public class StringEditor extends AbstractValueEditor implements KeyListener, ModifyListener {
@@ -53,14 +60,17 @@ public class StringEditor extends AbstractValueEditor implements KeyListener, Mo
private TimerTask currentValidateTask;
+ private TimerTask changeColorTask;
+
private final static int DEFAULT_HEIGHT_HINT = 55;
private final static int DEFAULT_WIDTH_HINT = 100;
+
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
* The composite in which this editor should be displayed
* @param style
@@ -68,12 +78,13 @@ public class StringEditor extends AbstractValueEditor implements KeyListener, Mo
*/
public StringEditor(Composite parent, int style) {
this(parent, style, null, DEFAULT_HEIGHT_HINT, DEFAULT_WIDTH_HINT);
+
}
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
* The composite in which this editor should be displayed
* @param style
@@ -86,9 +97,9 @@ public class StringEditor extends AbstractValueEditor implements KeyListener, Mo
}
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
* The composite in which this editor should be displayed
* @param style
@@ -103,9 +114,9 @@ public class StringEditor extends AbstractValueEditor implements KeyListener, Mo
}
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
* The composite in which this editor should be displayed
* @param style
@@ -136,11 +147,16 @@ public class StringEditor extends AbstractValueEditor implements KeyListener, Mo
if(label != null) {
super.label.setLayoutData(getLabelLayoutData());
- }
+ }
text.addKeyListener(this);
-
+ text.addModifyListener(this);
setCommitOnFocusLost(text);
+ controlDecoration = new ControlDecoration(text, SWT.LEFT | SWT.TOP);
+ controlDecoration.hide();
+ data.horizontalIndent = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth();
+ pack();
+
}
@Override
@@ -157,31 +173,34 @@ public class StringEditor extends AbstractValueEditor implements KeyListener, Mo
/**
* Ignored
*/
+ @Override
public void keyPressed(KeyEvent e) {
- //Nothing
+ // Nothing
+
+
+
}
/**
- * Validates this editor when one of the following events occur :
- * - CR released
- * - Keypad CR released
- * - Ctrl + [CR | Keypad CR] released
- *
+ * Validates this editor when one of the following events occur : - CR
+ * released - Keypad CR released - Ctrl + [CR | Keypad CR] released
+ *
* @see org.eclipse.swt.events.KeyListener#keyReleased(org.eclipse.swt.events.KeyEvent)
- *
+ *
* @param e
*/
- //TODO : we should prevent the \n from being written when validating the
- //multi-line field with Ctrl + CR
+ // TODO : we should prevent the \n from being written when validating the
+ // multi-line field with Ctrl + CR
+ @Override
public void keyReleased(KeyEvent e) {
- //We listen on Carriage Return or Ctrl+ Carriage return, depending on
- //whether the editor is single- or multi-line
+ // We listen on Carriage Return or Ctrl+ Carriage return, depending on
+ // whether the editor is single- or multi-line
if(e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
- if((text.getStyle() & SWT.MULTI) == 0) { //Single-line : Enter
+ if((text.getStyle() & SWT.MULTI) == 0) { // Single-line : Enter
if(e.stateMask == SWT.NONE) {
notifyChange();
}
- } else { //Multi-line : Ctrl+Enter
+ } else { // Multi-line : Ctrl+Enter
if(e.stateMask == SWT.CTRL) {
String str = text.getText();
if(str.endsWith(StringSelector.LINE_SEPARATOR)) {
@@ -193,12 +212,15 @@ public class StringEditor extends AbstractValueEditor implements KeyListener, Mo
}
}
}
+
+
}
@Override
public void setModelObservable(IObservableValue observable) {
setWidgetObservable(new TextObservableValue(text, observable, SWT.FocusOut), true);
super.setModelObservable(observable);
+
}
/**
@@ -228,8 +250,10 @@ public class StringEditor extends AbstractValueEditor implements KeyListener, Mo
}
protected void notifyChange() {
+
text.notifyListeners(SWT.FocusOut, new Event());
commit();
+ changeColorField();
}
@Override
@@ -240,7 +264,7 @@ public class StringEditor extends AbstractValueEditor implements KeyListener, Mo
/**
* Sets the current text value for this editor
- *
+ *
* @param value
*/
public void setValue(Object value) {
@@ -252,9 +276,9 @@ public class StringEditor extends AbstractValueEditor implements KeyListener, Mo
}
/**
- * Indicates that this editor should be automatically validated after
- * a timer.
- *
+ * Indicates that this editor should be automatically validated after a
+ * timer.
+ *
* @param validateOnDelay
*/
public void setValidateOnDelay(boolean validateOnDelay) {
@@ -269,12 +293,12 @@ public class StringEditor extends AbstractValueEditor implements KeyListener, Mo
}
/**
- * Indicates that this editor should be automatically validated after
- * the given timer
- *
+ * Indicates that this editor should be automatically validated after the
+ * given timer
+ *
* @param millis
- * The delay after which the editor should be automatically validated,
- * in milliseconds. The default is 600ms
+ * The delay after which the editor should be automatically
+ * validated, in milliseconds. The default is 600ms
*/
public void setValidateOnDelay(int millis) {
this.delay = millis;
@@ -294,11 +318,16 @@ public class StringEditor extends AbstractValueEditor implements KeyListener, Mo
/**
* {@inheritDoc}
*/
+
+ @Override
public void modifyText(ModifyEvent e) {
- //SWT Thread
+
+ // SWT Thread
if(validateOnDelay) {
if(delay == 0) {
- commit(); //Direct commit on edition, to avoid creating useless threads
+ commit(); // Direct commit on edition, to avoid creating useless
+ // threads
+
return;
}
cancelCurrentTask();
@@ -309,13 +338,15 @@ public class StringEditor extends AbstractValueEditor implements KeyListener, Mo
currentValidateTask = new TimerTask() {
- //Timer thread
+ // Timer thread
@Override
public void run() {
StringEditor.this.getDisplay().syncExec(new Runnable() {
- //SWT Thread
+ // SWT Thread
+ @Override
public void run() {
+
commit();
}
});
@@ -323,11 +354,44 @@ public class StringEditor extends AbstractValueEditor implements KeyListener, Mo
};
timer.schedule(currentValidateTask, delay);
}
+ if(targetValidator != null) {
+ IStatus status = targetValidator.validate(text.getText());
+ updateStatus(status);
+ }
+ if(modelValidator != null) {
+ IStatus status = modelValidator.validate(text.getText());
+ updateStatus(status);
+ if(binding == null) {
+ update();
+ }
+ }
+
+ try {
+ if(modelProperty.getValue() != null) {
+ if(!isReadOnly() && !modelProperty.getValue().toString().equals(text.getText())) {
+
+ text.setBackground(EDIT);
+
+ } else {
+ text.setBackground(DEFAULT);
+ }
+ } else {
+ if(text.getText().equals("")) {
+ text.setBackground(DEFAULT);
+ } else {
+ text.setBackground(EDIT);
+ }
+ }
+ } catch (Exception ex) {
+
+ }
+
}
@Override
public void dispose() {
cancelCurrentTask();
+ cancelChangeColorTask();
if(timer != null) {
timer.cancel();
timer = null;
@@ -338,4 +402,109 @@ public class StringEditor extends AbstractValueEditor implements KeyListener, Mo
public Text getText() {
return text;
}
+
+ @Override
+ public void updateStatus(IStatus status) {
+ switch(status.getSeverity()) {
+ case IStatus.OK:
+ controlDecoration.hide();
+ break;
+ case IStatus.WARNING:
+ FieldDecoration warning = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_WARNING);
+ controlDecoration.setImage(warning.getImage());
+ controlDecoration.showHoverText(status.getMessage());
+ controlDecoration.setDescriptionText(status.getMessage());
+ controlDecoration.show();
+ break;
+ case IStatus.ERROR:
+ FieldDecoration error = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR);
+ controlDecoration.setImage(error.getImage());
+ controlDecoration.showHoverText(status.getMessage());
+ controlDecoration.setDescriptionText(status.getMessage());
+ controlDecoration.show();
+ break;
+ default:
+ controlDecoration.hide();
+ break;
+ }
+
+ }
+
+ @Override
+ public void changeColorField() {
+ if(binding != null) {
+
+ if(timer == null) {
+ timer = new Timer(true);
+ }
+ changeColorTask = new TimerTask() {
+
+ @Override
+ public void run() {
+ StringEditor.this.getDisplay().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+
+ text.setBackground(DEFAULT);
+ text.update();
+ }
+
+
+ });
+ }
+ };
+ if(errorBinding) {
+ text.setBackground(ERROR);
+ text.update();
+ } else {
+ IStatus status = (IStatus)binding.getValidationStatus().getValue();
+ switch(status.getSeverity()) {
+ case IStatus.OK:
+ timer.schedule(changeColorTask, 600);
+ text.setBackground(VALIDE);
+ text.update();
+ break;
+ case IStatus.WARNING:
+ timer.schedule(changeColorTask, 600);
+ text.setBackground(VALIDE);
+ text.update();
+ break;
+ case IStatus.ERROR:
+ text.setBackground(ERROR);
+ text.update();
+ break;
+
+ }
+ }
+ }
+ }
+
+ @Override
+ protected void setCommitOnFocusLost(Control control) {
+ control.addFocusListener(new FocusListener() {
+
+ @Override
+ public void focusGained(FocusEvent e) {
+ // Nothing
+
+ }
+
+ @Override
+ public void focusLost(FocusEvent e) {
+
+ commit();
+
+ }
+
+ });
+ }
+
+ private void cancelChangeColorTask() {
+ if(changeColorTask != null) {
+ changeColorTask.cancel();
+ changeColorTask = null;
+ }
+ }
+
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringFileSelector.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringFileSelector.java
index 08c441d6177..81d58eb4591 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringFileSelector.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringFileSelector.java
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
@@ -71,7 +72,7 @@ public class StringFileSelector extends StringEditor {
browse.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
- File file = getFile(text.getText());
+ File file = FileUtil.getFile(text.getText());
FileDialog dialog = new FileDialog(getShell());
if(labelText != null) {
@@ -105,7 +106,7 @@ public class StringFileSelector extends StringEditor {
ILabelProvider labelProvider = labelProviderService.getLabelProvider();
- IFile currentFile = getIFile(text.getText());
+ IFile currentFile = FileUtil.getIFile(text.getText());
TreeSelectorDialog dialog = new TreeSelectorDialog(getShell());
if(labelText != null) {
@@ -165,19 +166,11 @@ public class StringFileSelector extends StringEditor {
text.setText(path);
notifyChange();
}
-
- protected IFile getIFile(String path){
- return FileUtil.getIFile(path);
- }
-
- protected File getFile(String path){
- return FileUtil.getFile(path);
- }
public void setFilters(String[] filterExtensions, String[] filterNames) {
if(filterExtensions.length != filterNames.length) {
//This is a simple warning. Only valid filters will be retained.
- Activator.log.warn("FilterExtensions and FilterNames do not match");
+ Activator.log.warn(Messages.StringFileSelector_0);
}
setFilterNames(getFilterLabels(filterNames, filterExtensions));
@@ -188,7 +181,7 @@ public class StringFileSelector extends StringEditor {
int size = Math.min(filterNames.length, filterExtensions.length);
String[] filters = new String[size];
for(int i = 0; i < size; i++) {
- filters[i] = filterNames[i] + " (" + filterExtensions[i] + ")";
+ filters[i] = filterNames[i] + " (" + filterExtensions[i] + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
return filters;
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringLabel.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringLabel.java
index ccdf266b377..98c9d5edfb9 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringLabel.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringLabel.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* 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
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
@@ -23,7 +24,7 @@ import org.eclipse.swt.widgets.Composite;
/**
* A Read only widget to display Strings as a CLabel.
* May also be used to display an Object with an ILabelProvider
- *
+ *
* @author Camille Letavernier
*/
public class StringLabel extends AbstractValueEditor implements IChangeListener {
@@ -36,7 +37,7 @@ public class StringLabel extends AbstractValueEditor implements IChangeListener
/**
* Constructor.
- *
+ *
* @param parent
* The Composite widget in which this editor is created
* @param style
@@ -60,7 +61,7 @@ public class StringLabel extends AbstractValueEditor implements IChangeListener
/**
* Sets the label provider for this editor. Useful when the value is not a
* String
- *
+ *
* @param labelProvider
* The Label provider used to display the current value
*/
@@ -139,6 +140,7 @@ public class StringLabel extends AbstractValueEditor implements IChangeListener
super.setLabelToolTipText(text);
}
+ @Override
public void handleChange(final ChangeEvent event) {
updateLabel();
}
@@ -155,4 +157,5 @@ public class StringLabel extends AbstractValueEditor implements IChangeListener
public void refreshValue() {
updateLabel();
}
+
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringMask.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringMask.java
index 669eec3b37d..9a6ea71e58f 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringMask.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringMask.java
@@ -208,4 +208,15 @@ public class StringMask extends AbstractListEditor implements SelectionListener,
refreshCheckboxes();
}
+ /**
+ * @see org.eclipse.papyrus.infra.widgets.editors.AbstractEditor#changeColorField()
+ *
+ */
+
+ @Override
+ public void changeColorField() {
+ // TODO Auto-generated method stub
+
+ }
+
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/UnlimitedNaturalEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/UnlimitedNaturalEditor.java
new file mode 100644
index 00000000000..b9b21f7a480
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/UnlimitedNaturalEditor.java
@@ -0,0 +1,119 @@
+package org.eclipse.papyrus.infra.widgets.editors;
+
+import org.eclipse.core.databinding.conversion.IConverter;
+import org.eclipse.core.databinding.conversion.StringToNumberConverter;
+
+import org.eclipse.papyrus.infra.widgets.Activator;
+import org.eclipse.papyrus.infra.widgets.validator.UnlimitedNaturalValidator;
+
+import org.eclipse.swt.widgets.Composite;
+
+public class UnlimitedNaturalEditor extends StringEditor {
+ /**
+ * The IConverter for converting data from the widget to the model
+ */
+ private IConverter targetToModelConverter;
+
+ /**
+ * Constructs an editor for Integer values. The widget is a Text field.
+ *
+ * @param parent
+ * The Composite in which this editor is created
+ * @param style
+ * The Text's style
+ */
+ public UnlimitedNaturalEditor(Composite parent, int style) {
+ this(parent, style, null);}
+
+ /**
+ * Constructs an editor for Integer values. The widget is a Text field.
+ *
+ * @param parent
+ * The Composite in which this editor is created
+ * @param style
+ * The Text's style
+ * @param label
+ * The editor's label
+ */
+ public UnlimitedNaturalEditor(Composite parent, int style, String label) {
+ super(parent, style, label);
+
+ targetValidator = new UnlimitedNaturalValidator();
+
+ targetToModelConverter = new IConverter() {
+
+ public Object getToType() {
+ return Integer.class;
+ }
+
+ public Object getFromType() {
+ return String.class;
+ }
+
+ public Integer convert(Object fromObject) {
+ if (fromObject instanceof String){
+ String newString = ((String)fromObject).replaceAll(" ", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ if(newString.equals("*")) return -1; //$NON-NLS-1$
+ return (Integer)StringToNumberConverter.toInteger(false).convert(newString);
+ }
+ return 0;
+ }
+ };
+
+ IConverter integerToString = new IConverter() {
+
+ public Object getToType() {
+ return String.class;
+ }
+
+ public Object getFromType() {
+ return Integer.class;
+ }
+
+ public Object convert(Object fromObject) {
+ if (fromObject instanceof Integer){
+ if(((Integer) fromObject).intValue()==-1){
+ return "*"; //$NON-NLS-1$
+ }
+ return Integer.toString((Integer)fromObject);
+ }
+ return ""; //$NON-NLS-1$
+ }
+ };
+ setValidateOnDelay(true);
+
+ setConverters(targetToModelConverter, integerToString);
+ setTargetAfterGetValidator(targetValidator);
+
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Object getEditableType() {
+ return Integer.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Integer getValue() {
+ try {
+
+ return (Integer)targetToModelConverter.convert(super.getValue());
+ } catch (Exception ex) {
+ Activator.log.error(ex);
+ return null;
+ }
+ }
+
+
+
+
+}
+
+
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/Messages.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/Messages.java
index 82dcdde6ce7..693a5408cad 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/Messages.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/Messages.java
@@ -31,6 +31,12 @@ public class Messages extends NLS {
public static String UnlimitedNaturalInputValidator_NotAnUnlimitedNaturalMessage;
+ public static String MultipleStringFileEditor_0;
+
+ public static String MultipleStringFileEditor_1;
+
+ public static String MultipleStringFileEditor_2;
+
/** The Multiple value editor_ add elements. */
public static String MultipleValueEditor_AddElements;
@@ -65,6 +71,10 @@ public class Messages extends NLS {
/** The Multiple value selector dialog_ remove all elements. */
public static String MultipleValueSelectorDialog_RemoveAllElements;
+ public static String ReferenceDialog_0;
+
+ public static String ReferenceDialog_1;
+
public static String ReferenceDialog_CreateANewObject;
public static String ReferenceDialog_editOperation;
@@ -97,8 +107,12 @@ public class Messages extends NLS {
public static String IntegerMask_ErrorTooManyValues;
+ public static String ProviderBasedBrowseStrategy_0;
+
public static String StringEditionFactory_EnterANewValue;
+ public static String StringFileSelector_0;
+
public static String StringFileSelector_Browse;
public static String StringFileSelector_BrowseWorkspace;
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/messages.properties b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/messages.properties
index a9fbdf92c68..bb2ded2540c 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/messages.properties
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/messages.properties
@@ -16,6 +16,9 @@ BooleanInputValidator_NotABoolean=The actual entry is not a Boolean.
IntegerInputValidator_NotAnIntegerMessage=The actual entry is not an Integer.
RealInputValidator_NotaRealMessage=The actual entry is not a Real.
UnlimitedNaturalInputValidator_NotAnUnlimitedNaturalMessage=The actual entry is not an UnlimitedNatural. An UnlimitedNatural must be either -1, * or >= 0
+MultipleStringFileEditor_0=Browse file system
+MultipleStringFileEditor_1=Browse workspace
+MultipleStringFileEditor_2=FilterExtensions and FilterNames do not match
MultipleValueEditor_AddElements=Add elements
MultipleValueEditor_addOperation=Add {0}
MultipleValueEditor_editOperation=Edit {0}
@@ -28,6 +31,8 @@ MultipleValueSelectorDialog_AddSelectedElements=Add selected elements
MultipleValueSelectorDialog_RemoveAllElements=Remove all elements
MultipleValueSelectorDialog_CreateNewElement=Create a new element
MultipleValueSelectorDialog_DeleteNewElement=Deletes a newly created element
+ReferenceDialog_0=An error occured while setting the value.
+ReferenceDialog_1=An error occured while setting the value.
ReferenceDialog_CreateANewObject=Create a new object
ReferenceDialog_editOperation=Edit {0}
ReferenceDialog_EditTheCurrentValue=Edit the current value
@@ -41,6 +46,8 @@ EnumRadio_NoValue=There is no value to select
FlattenableRestrictedFilteredContentProvider_AllPossibleContentsMessage=Show all possible values
FlattenableRestrictedFilteredContentProvider_FlatViewMessage=Flat View
StringEditionFactory_EnterANewValue=Enter the new value
+StringFileSelector_0=FilterExtensions and FilterNames do not match
StringFileSelector_Browse=Browse
StringFileSelector_BrowseWorkspace=Browse workspace
IntegerMask_ErrorTooManyValues=The mask-based integer editor cannot be used with more than 32 values
+ProviderBasedBrowseStrategy_0=The provider has not been initialized
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/providers/FileExtensions.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/providers/FileExtensions.java
index faeeb5d58f4..8f026fff3ad 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/providers/FileExtensions.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/providers/FileExtensions.java
@@ -33,15 +33,15 @@ public class FileExtensions {
public static final Map<String, String> allFilesExtensions = new LinkedHashMap<String, String>();
static {
- umlExtensions.put("*.uml", "UML (*.uml)");
- umlExtensions.put("*.profile.uml", "UML Profiles (*.profile.uml)");
+ umlExtensions.put("*.uml", "UML (*.uml)"); //$NON-NLS-1$ //$NON-NLS-2$
+ umlExtensions.put("*.profile.uml", "UML Profiles (*.profile.uml)"); //$NON-NLS-1$ //$NON-NLS-2$
- umlProfileExtensions.put("*.profile.uml", "UML Profiles (*.profile.uml)");
- umlProfileExtensions.put("*.uml", "UML (*.uml)");
+ umlProfileExtensions.put("*.profile.uml", "UML Profiles (*.profile.uml)"); //$NON-NLS-1$ //$NON-NLS-2$
+ umlProfileExtensions.put("*.uml", "UML (*.uml)"); //$NON-NLS-1$ //$NON-NLS-2$
- cssStylesheetsExtension.put("*.css", "CSS Stylesheets (*.css)");
+ cssStylesheetsExtension.put("*.css", "CSS Stylesheets (*.css)"); //$NON-NLS-1$ //$NON-NLS-2$
- allFilesExtensions.put("*", "All (*)");
+ allFilesExtensions.put("*", "All (*)"); //$NON-NLS-1$ //$NON-NLS-2$
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/validator/UnlimitedNaturalValidator.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/validator/UnlimitedNaturalValidator.java
index a09fe8cbb6a..441e326f9a4 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/validator/UnlimitedNaturalValidator.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/validator/UnlimitedNaturalValidator.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -31,7 +31,7 @@ public class UnlimitedNaturalValidator extends AbstractValidator {
/**
* @see org.eclipse.jface.dialogs.IInputValidator#isValid(java.lang.String)
- *
+ *
* @param newText
* @return <code>null</code> if the newText is valid an error message when newText is
* invalid
@@ -42,7 +42,7 @@ public class UnlimitedNaturalValidator extends AbstractValidator {
}
boolean isValid = true;
try {
- Integer myUnlimitedNatural = new Integer(newText);
+ Integer myUnlimitedNatural = Integer.valueOf(newText);
if(myUnlimitedNatural < -1) {
isValid = false;
}
@@ -57,11 +57,12 @@ public class UnlimitedNaturalValidator extends AbstractValidator {
}
/**
- *
+ *
* @param newValue
* @return {@link Status#OK_STATUS} if the newValue is valid and {@link IStatus#ERROR} when newValue is
* invalid
*/
+ @Override
public IStatus validate(Object newValue) {
if(newValue instanceof Integer) {
int value = (Integer)newValue;
@@ -74,7 +75,7 @@ public class UnlimitedNaturalValidator extends AbstractValidator {
String newText = (String)newValue;
if(INFINITE_STAR.equals(newText) || INFINITE_MINUS_ONE.equals(newText)) {
- return null;
+ return Status.OK_STATUS;
}
boolean isValid = true;
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/Environment.xmi b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/Environment.xmi
index 1e985da8f06..6092a5ba1cf 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/Environment.xmi
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/Environment.xmi
@@ -37,11 +37,8 @@
name="Stereotype Appearance Factory"
factoryClass="org.eclipse.papyrus.uml.properties.modelelement.StereotypeAppearanceFactory"/>
<modelElementFactories
- name="Applied Comments Factory"
+ name="Applied Comments Model Element Factory"
factoryClass="org.eclipse.papyrus.uml.properties.modelelement.CommentModelElementFactory"/>
- <modelElementFactories
- name="Profile definitions"
- factoryClass="org.eclipse.papyrus.uml.properties.modelelement.ProfileDefinitionModelElementFactory"/>
<propertyEditorTypes
label="ExpressionEditor"
widgetClass="ExpressionEditor"
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleLiteralUnlimitedNatural.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleLiteralUnlimitedNatural.xwt
index 9ea1b01e476..2d382ce6321 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleLiteralUnlimitedNatural.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleLiteralUnlimitedNatural.xwt
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns="http://www.eclipse.org/xwt/presentation"
- xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout">
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"
+ xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout">
<Composite.layout>
<ppel:PropertiesLayout></ppel:PropertiesLayout>
</Composite.layout>
@@ -10,7 +11,7 @@
<ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
</Composite.layout>
<ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
- <ppe:IntegerEditor input="{Binding}"
- property="UML:LiteralUnlimitedNatural:value"></ppe:IntegerEditor>
+ <ppe:UnlimitedNaturalEditor input="{Binding}"
+ property="UML:LiteralInteger:value"></ppe:UnlimitedNaturalEditor>
</Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleRealLiteral.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleRealLiteral.xwt
index 91801ce9a2e..89c6b58a81a 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleRealLiteral.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleRealLiteral.xwt
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout">
+<Composite
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation">
<Composite.layout>
<ppel:PropertiesLayout></ppel:PropertiesLayout>
</Composite.layout>
<ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
- <ppe:FloatEditor input="{Binding}" property="UML:LiteralReal:value"></ppe:FloatEditor>
+ <ppe:DoubleEditor input="{Binding}" property="UML:LiteralReal:value"></ppe:DoubleEditor>
</Composite> \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/datatype/StructuredDataTypeObservableValue.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/datatype/StructuredDataTypeObservableValue.java
index 807c643d227..f3b07f86025 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/datatype/StructuredDataTypeObservableValue.java
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/datatype/StructuredDataTypeObservableValue.java
@@ -56,6 +56,7 @@ public class StructuredDataTypeObservableValue extends PapyrusObservableValue im
@Override
protected void doSetValue(Object value) { //value = dataType instance
super.doSetValue(value); //TODO : type réel de value ? compatibilité des types ?
+
}
public Object getAdapter(Class adapter) {
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java
index cef0f90eb28..9d55be029ab 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java
@@ -24,6 +24,7 @@ import java.util.Set;
import org.eclipse.core.databinding.observable.IObservable;
import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.validation.IValidator;
import org.eclipse.emf.databinding.EMFProperties;
import org.eclipse.emf.databinding.FeaturePath;
import org.eclipse.emf.ecore.EClass;
@@ -279,5 +280,16 @@ public class UMLModelElement extends EMFModelElement {
//Transition
ownedRuleSubsets.add(UMLPackage.eINSTANCE.getTransition_Guard());
}
+
+ public IValidator getValidator(String propertyPath){
+ EStructuralFeature feature = getFeature(propertyPath);
+ if(feature == UMLPackage.eINSTANCE.getNamedElement_Name()){
+
+ return new org.eclipse.papyrus.uml.tools.databinding.NamedElementValidator(source);
+ }
+
+ //TODO improve if our model add his own constraint
+ return null;
+ }
}
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/DynamicBodyEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/DynamicBodyEditor.java
index db64ee91caf..0a22d739a83 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/DynamicBodyEditor.java
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/DynamicBodyEditor.java
@@ -8,12 +8,14 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.uml.properties.widgets;
import java.util.HashSet;
import java.util.Set;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.papyrus.infra.widgets.editors.AbstractValueEditor;
import org.eclipse.papyrus.uml.properties.expression.ExpressionList.Expression;
import org.eclipse.papyrus.uml.properties.preferences.LanguageRegistry;
@@ -195,4 +197,16 @@ public class DynamicBodyEditor extends AbstractValueEditor implements Listener {
currentEditor.setContext(context);
}
}
+
+ @Override
+ public void updateStatus(IStatus status) {
+ // TODO Auto-generated method stub
+ }
+
+
+ @Override
+ public void changeColorField() {
+ // TODO Auto-generated method stub
+
+ }
}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/AbstractUMLValidator.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/AbstractUMLValidator.java
new file mode 100644
index 00000000000..7132731577c
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/AbstractUMLValidator.java
@@ -0,0 +1,31 @@
+package org.eclipse.papyrus.uml.tools.databinding;
+
+import org.eclipse.core.databinding.validation.IValidator;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.papyrus.uml.tools.Activator;
+
+public abstract class AbstractUMLValidator implements IValidator{
+
+
+ protected String pluginId;
+
+
+ protected IStatus error(String message) {
+ return new Status(IStatus.ERROR, getPluginId(), message);
+ }
+
+ public String getPluginId() {
+ if(pluginId == null) {
+ return Activator.PLUGIN_ID;
+ } else {
+ return pluginId;
+ }
+ }
+
+ protected IStatus warning(String message) {
+ return new Status(IStatus.WARNING, getPluginId(), message);
+ }
+
+
+}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/NamedElementValidator.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/NamedElementValidator.java
new file mode 100644
index 00000000000..21e127fc5ad
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/NamedElementValidator.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * 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:
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.tools.databinding;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Namespace;
+
+
+public class NamedElementValidator extends AbstractUMLValidator {
+
+ private EObject source;
+
+ public NamedElementValidator() {
+ //nothing
+
+ }
+
+ public NamedElementValidator(EObject source) {
+ if(source != null) {
+ this.source = source;
+ } else {
+ this.source = null;
+ }
+ }
+
+ public IStatus validate(Object value) {
+ boolean status = true;
+ String string = null;
+ if(value instanceof String) {
+
+ string = (String)value;
+ }
+ if(this.source instanceof NamedElement) {
+
+
+ Namespace ns = ((NamedElement)this.source).getNamespace();
+ if(ns != null) {
+ EList<NamedElement> listElement = ns.getMembers();
+ for(NamedElement namedElement : listElement) {
+ if(namedElement.getName().equals(string) && (this.source != namedElement)) {
+ return warning("Same name in namespace");
+
+ }
+ }
+ }
+
+
+
+
+
+ if(status) {
+ return Status.OK_STATUS;
+ }
+ }
+ return Status.CANCEL_STATUS;
+ }
+}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/PapyrusObservableValue.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/PapyrusObservableValue.java
index f00376471b2..257cb87b64c 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/PapyrusObservableValue.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/PapyrusObservableValue.java
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.uml.tools.databinding;
@@ -72,9 +73,16 @@ public class PapyrusObservableValue extends EMFObservableValue implements Aggreg
}
@Override
- protected void doSetValue(Object value) {
- Command emfCommand = getCommand(value);
- domain.getCommandStack().execute(emfCommand);
+ protected void doSetValue (Object value) {
+
+ try{
+ Command emfCommand = getCommand(value);
+ domain.getCommandStack().execute(emfCommand);
+ }
+ catch(Exception ex){
+ //
+ }
+// throw new IllegalArgumentException("an error occured");
}
/**
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/META-INF/MANIFEST.MF b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/META-INF/MANIFEST.MF
index b4a51598a31..f47bda7fae1 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/META-INF/MANIFEST.MF
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/META-INF/MANIFEST.MF
@@ -1,4 +1,4 @@
-Manifest-Version: 1.0
+Manifest-Version: 1.0
Export-Package: org.eclipse.papyrus.views.properties.contexts,
org.eclipse.papyrus.views.properties.contexts.impl,
org.eclipse.papyrus.views.properties.contexts.util,
@@ -18,7 +18,6 @@ Bundle-Version: 1.0.0.qualifier
Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.views.properties.model;single
- ton:=true
+Bundle-SymbolicName: org.eclipse.papyrus.views.properties.model;singleton:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/Model/Properties.ecore b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/Model/Properties.ecore
index cc31fe00b8b..017ab06dada 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/Model/Properties.ecore
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/Model/Properties.ecore
@@ -47,6 +47,7 @@
<eLiterals name="Integer" value="2"/>
<eLiterals name="Reference" value="3" literal="Reference"/>
<eLiterals name="Enumeration" value="4"/>
+ <eLiterals name="Double" value="5" literal="Double"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="StandardWidgetType" eSuperTypes="#//environment/WidgetType"/>
<eClassifiers xsi:type="ecore:EClass" name="Namespace">
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/contexts/impl/ContextsFactoryImpl.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/contexts/impl/ContextsFactoryImpl.java
index 4fd9a1a3b88..319e7d93f2f 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/contexts/impl/ContextsFactoryImpl.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/contexts/impl/ContextsFactoryImpl.java
@@ -17,6 +17,7 @@ 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.views.properties.contexts.*;
import org.eclipse.papyrus.views.properties.contexts.Context;
import org.eclipse.papyrus.views.properties.contexts.ContextsFactory;
import org.eclipse.papyrus.views.properties.contexts.ContextsPackage;
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/contexts/util/ContextsAdapterFactory.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/contexts/util/ContextsAdapterFactory.java
index 8258dc83003..7232147500c 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/contexts/util/ContextsAdapterFactory.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/contexts/util/ContextsAdapterFactory.java
@@ -12,6 +12,7 @@ import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.EModelElement;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.infra.constraints.DisplayUnit;
+import org.eclipse.papyrus.views.properties.contexts.*;
import org.eclipse.papyrus.views.properties.contexts.Context;
import org.eclipse.papyrus.views.properties.contexts.ContextsPackage;
import org.eclipse.papyrus.views.properties.contexts.DataContextElement;
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/contexts/util/ContextsSwitch.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/contexts/util/ContextsSwitch.java
index fb7634e5ab4..36f6758437e 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/contexts/util/ContextsSwitch.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/contexts/util/ContextsSwitch.java
@@ -11,6 +11,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
import org.eclipse.papyrus.infra.constraints.DisplayUnit;
+import org.eclipse.papyrus.views.properties.contexts.*;
import org.eclipse.papyrus.views.properties.contexts.Context;
import org.eclipse.papyrus.views.properties.contexts.ContextsPackage;
import org.eclipse.papyrus.views.properties.contexts.DataContextElement;
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/Type.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/Type.java
index f7916191dbb..872732b2d10 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/Type.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/Type.java
@@ -70,7 +70,15 @@ public enum Type implements Enumerator {
* @generated
* @ordered
*/
- ENUMERATION(4, "Enumeration", "Enumeration");
+ ENUMERATION(4, "Enumeration", "Enumeration"), /**
+ * The '<em><b>Double</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #DOUBLE_VALUE
+ * @generated
+ * @ordered
+ */
+ DOUBLE(5, "Double", "Double");
/**
* The '<em><b>String</b></em>' literal value.
@@ -148,6 +156,21 @@ public enum Type implements Enumerator {
public static final int ENUMERATION_VALUE = 4;
/**
+ * The '<em><b>Double</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Double</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #DOUBLE
+ * @model name="Double"
+ * @generated
+ * @ordered
+ */
+ public static final int DOUBLE_VALUE = 5;
+
+ /**
* An array of all the '<em><b>Type</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -160,6 +183,7 @@ public enum Type implements Enumerator {
INTEGER,
REFERENCE,
ENUMERATION,
+ DOUBLE,
};
/**
@@ -215,6 +239,7 @@ public enum Type implements Enumerator {
case INTEGER_VALUE: return INTEGER;
case REFERENCE_VALUE: return REFERENCE;
case ENUMERATION_VALUE: return ENUMERATION;
+ case DOUBLE_VALUE: return DOUBLE;
}
return null;
}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/impl/EnvironmentFactoryImpl.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/impl/EnvironmentFactoryImpl.java
index 535975caafd..d8f43af72fc 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/impl/EnvironmentFactoryImpl.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/impl/EnvironmentFactoryImpl.java
@@ -12,6 +12,7 @@ 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.views.properties.environment.*;
import org.eclipse.papyrus.views.properties.environment.CompositeWidgetType;
import org.eclipse.papyrus.views.properties.environment.Environment;
import org.eclipse.papyrus.views.properties.environment.EnvironmentFactory;
@@ -40,7 +41,7 @@ public class EnvironmentFactoryImpl extends EFactoryImpl implements EnvironmentF
*/
public static EnvironmentFactory init() {
try {
- EnvironmentFactory theEnvironmentFactory = (EnvironmentFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/properties/environment/0.9");
+ EnvironmentFactory theEnvironmentFactory = (EnvironmentFactory)EPackage.Registry.INSTANCE.getEFactory(EnvironmentPackage.eNS_URI);
if (theEnvironmentFactory != null) {
return theEnvironmentFactory;
}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/impl/EnvironmentPackageImpl.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/impl/EnvironmentPackageImpl.java
index 7f2f1f78295..609a9c08b1b 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/impl/EnvironmentPackageImpl.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/impl/EnvironmentPackageImpl.java
@@ -604,6 +604,7 @@ public class EnvironmentPackageImpl extends EPackageImpl implements EnvironmentP
addEEnumLiteral(typeEEnum, Type.INTEGER);
addEEnumLiteral(typeEEnum, Type.REFERENCE);
addEEnumLiteral(typeEEnum, Type.ENUMERATION);
+ addEEnumLiteral(typeEEnum, Type.DOUBLE);
// Create resource
createResource(eNS_URI);
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/util/EnvironmentAdapterFactory.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/util/EnvironmentAdapterFactory.java
index d3de17b2f90..f32f035f1e7 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/util/EnvironmentAdapterFactory.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/util/EnvironmentAdapterFactory.java
@@ -11,6 +11,7 @@ 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.constraints.environment.ConstraintEnvironment;
+import org.eclipse.papyrus.views.properties.environment.*;
import org.eclipse.papyrus.views.properties.environment.CompositeWidgetType;
import org.eclipse.papyrus.views.properties.environment.Environment;
import org.eclipse.papyrus.views.properties.environment.EnvironmentPackage;
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/util/EnvironmentSwitch.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/util/EnvironmentSwitch.java
index 8236e6b5ec8..5bd37901e88 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/util/EnvironmentSwitch.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/environment/util/EnvironmentSwitch.java
@@ -10,6 +10,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
import org.eclipse.papyrus.infra.constraints.environment.ConstraintEnvironment;
+import org.eclipse.papyrus.views.properties.environment.*;
import org.eclipse.papyrus.views.properties.environment.CompositeWidgetType;
import org.eclipse.papyrus.views.properties.environment.Environment;
import org.eclipse.papyrus.views.properties.environment.EnvironmentPackage;
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/ui/impl/UiFactoryImpl.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/ui/impl/UiFactoryImpl.java
index fdaed50cf42..0ed3d528912 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/ui/impl/UiFactoryImpl.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/ui/impl/UiFactoryImpl.java
@@ -11,6 +11,7 @@ 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.views.properties.ui.*;
import org.eclipse.papyrus.views.properties.ui.CompositeWidget;
import org.eclipse.papyrus.views.properties.ui.Element;
import org.eclipse.papyrus.views.properties.ui.Layout;
@@ -37,7 +38,7 @@ public class UiFactoryImpl extends EFactoryImpl implements UiFactory {
*/
public static UiFactory init() {
try {
- UiFactory theUiFactory = (UiFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/properties/ui/0.9");
+ UiFactory theUiFactory = (UiFactory)EPackage.Registry.INSTANCE.getEFactory(UiPackage.eNS_URI);
if (theUiFactory != null) {
return theUiFactory;
}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/ui/util/UiAdapterFactory.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/ui/util/UiAdapterFactory.java
index f4a53f4d82d..24261737a77 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/ui/util/UiAdapterFactory.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/ui/util/UiAdapterFactory.java
@@ -10,6 +10,7 @@ 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.views.properties.ui.*;
import org.eclipse.papyrus.views.properties.ui.CompositeWidget;
import org.eclipse.papyrus.views.properties.ui.Element;
import org.eclipse.papyrus.views.properties.ui.Layout;
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/ui/util/UiSwitch.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/ui/util/UiSwitch.java
index 6a91e966592..d7bb044174f 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/ui/util/UiSwitch.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model/src-gen/org/eclipse/papyrus/views/properties/ui/util/UiSwitch.java
@@ -9,6 +9,7 @@ package org.eclipse.papyrus.views.properties.ui.util;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.papyrus.views.properties.ui.*;
import org.eclipse.papyrus.views.properties.ui.CompositeWidget;
import org.eclipse.papyrus.views.properties.ui.Element;
import org.eclipse.papyrus.views.properties.ui.Layout;
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/model/Environment.xmi b/plugins/views/properties/org.eclipse.papyrus.views.properties/model/Environment.xmi
index 24138ff3bcd..b311164df1a 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties/model/Environment.xmi
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/model/Environment.xmi
@@ -1,211 +1,55 @@
<?xml version="1.0" encoding="ASCII"?>
-<environment:Environment
- xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:environment="http://www.eclipse.org/papyrus/properties/environment/0.9">
- <constraintTypes
- label="EMF Instance Of (Deprecated)"
- constraintClass="org.eclipse.papyrus.infra.constraints.constraints.EMFInstanceOfConstraint"/>
- <constraintTypes
- label="True Constraint (Deprecated)"
- constraintClass="org.eclipse.papyrus.infra.constraints.constraints.TrueConstraint"/>
- <constraintTypes
- label="EMF Query (Deprecated)"
- constraintClass="org.eclipse.papyrus.infra.constraints.constraints.EMFQueryConstraint"/>
- <constraintTypes
- label="Java Instance Of (Deprecated)"
- constraintClass="org.eclipse.papyrus.infra.constraints.constraints.JavaInstanceOf"/>
- <constraintTypes
- label="Java Query (Deprecated)"
- constraintClass="org.eclipse.papyrus.infra.constraints.constraints.JavaQueryConstraint"/>
- <modelElementFactories
- name="EMF Factory"
- factoryClass="org.eclipse.papyrus.views.properties.modelelement.EMFModelElementFactory"/>
- <modelElementFactories
- name="Annotation Factory"
- factoryClass="org.eclipse.papyrus.views.properties.modelelement.AnnotationModelElementFactory"/>
- <modelElementFactories
- name="Basic preferences Factory"
- factoryClass="org.eclipse.papyrus.views.properties.modelelement.PreferencesModelElementFactory"/>
- <widgetTypes
- label="Label"
- widgetClass="Label"/>
- <widgetTypes
- label="Text"
- widgetClass="Text"/>
- <widgetTypes
- label="Button"
- widgetClass="Button"/>
- <propertyEditorTypes
- label="StringEditor"
- widgetClass="StringEditor"
- namespace="//@namespaces.3"/>
- <propertyEditorTypes
- label="StringMultiline"
- widgetClass="StringMultiline"
- namespace="//@namespaces.3"/>
- <propertyEditorTypes
- label="StringLabel (Read-only)"
- widgetClass="StringLabel"
- namespace="//@namespaces.3"/>
- <propertyEditorTypes
- label="StringCombo"
- widgetClass="StringCombo"
- namespace="//@namespaces.3"/>
- <propertyEditorTypes
- label="FileSelector"
- widgetClass="StringFileSelector"
- namespace="//@namespaces.3"/>
- <propertyEditorTypes
- label="BooleanCombo"
- widgetClass="BooleanCombo"
- namespace="//@namespaces.3"
- type="Boolean"/>
- <propertyEditorTypes
- label="BooleanCheckbox"
- widgetClass="BooleanCheckbox"
- namespace="//@namespaces.3"
- type="Boolean"/>
- <propertyEditorTypes
- label="BooleanRadio"
- widgetClass="BooleanRadio"
- namespace="//@namespaces.3"
- type="Boolean"/>
- <propertyEditorTypes
- label="BooleanToggle"
- widgetClass="BooleanToggle"
- namespace="//@namespaces.3"
- type="Boolean"/>
- <propertyEditorTypes
- label="IntegerEditor"
- widgetClass="IntegerEditor"
- namespace="//@namespaces.3"
- type="Integer"/>
- <propertyEditorTypes
- label="IntegerSpinner"
- widgetClass="IntegerSpinner"
- namespace="//@namespaces.3"
- type="Integer"/>
- <propertyEditorTypes
- label="EnumCombo"
- widgetClass="EnumCombo"
- namespace="//@namespaces.3"
- type="Enumeration"/>
- <propertyEditorTypes
- label="EnumRadio (No preview)"
- widgetClass="EnumRadio"
- namespace="//@namespaces.3"
- type="Enumeration"/>
- <propertyEditorTypes
- label="ReferenceCombo"
- widgetClass="ReferenceCombo"
- namespace="//@namespaces.3"
- type="Reference"/>
- <propertyEditorTypes
- label="ReferenceDialog"
- widgetClass="ReferenceDialog"
- namespace="//@namespaces.3"
- type="Reference"/>
- <propertyEditorTypes
- label="ViewEditor"
- widgetClass="ViewEditor"
- namespace="//@namespaces.3"
- type="Reference"
- multiplicity="-1"/>
- <propertyEditorTypes
- label="ReferenceLabel (Read-only)"
- widgetClass="ReferenceLabel"
- namespace="//@namespaces.3"
- type="Reference"/>
- <propertyEditorTypes
- label="MultiReference"
- widgetClass="MultiReference"
- namespace="//@namespaces.3"
- type="Reference"
- multiplicity="-1"/>
- <propertyEditorTypes
- label="MultiReferenceWithPropertyView"
- widgetClass="MultiReferencePropertyEditorWithPropertyView"
- namespace="//@namespaces.3"
- type="Reference"
- multiplicity="-1"/>
- <propertyEditorTypes
- label="MultiString"
- widgetClass="MultiString"
- namespace="//@namespaces.3"
- multiplicity="-1"/>
- <propertyEditorTypes
- label="MultipleFileEditor"
- widgetClass="MultiStringFile"
- namespace="//@namespaces.3"
- multiplicity="-1"/>
- <propertyEditorTypes
- label="MultiInteger"
- widgetClass="MultiInteger"
- namespace="//@namespaces.3"
- type="Integer"
- multiplicity="-1"/>
- <propertyEditorTypes
- label="InvalidWidget"
- widgetClass="InvalidWidget"
- namespace="//@namespaces.3"/>
- <propertyEditorTypes
- label="StringMultiline with References"
- widgetClass="StringMultilineWithReferences"
- namespace="//@namespaces.3"/>
- <propertyEditorTypes
- label="FloatEditor"
- widgetClass="FloatEditor"
- namespace="//@namespaces.3"/>
- <propertyEditorTypes
- label="File Selector - EMF URI Format"
- widgetClass="XWTStringFileSelectorEMF"
- namespace="//@namespaces.3"/>
- <compositeWidgetTypes
- label="Composite"
- widgetClass="Composite"/>
- <compositeWidgetTypes
- label="Group"
- widgetClass="Group"/>
- <layoutTypes
- label="GridLayout"
- widgetClass="GridLayout"/>
- <layoutTypes
- label="FillLayout"
- widgetClass="FillLayout"/>
- <layoutTypes
- label="RowLayout"
- widgetClass="RowLayout"/>
- <layoutTypes
- label="PropertiesLayout"
- widgetClass="PropertiesLayout"
- namespace="//@namespaces.4"/>
- <namespaces
- prefix=""
- name=""
- value="http://www.eclipse.org/xwt/presentation"/>
- <namespaces
- prefix=""
- name="x"
- value="http://www.eclipse.org/xwt"/>
- <namespaces
- name="j"
- value="java.lang"/>
- <namespaces
- name="ppe"
- value="org.eclipse.papyrus.views.properties.widgets"/>
- <namespaces
- name="ppel"
- value="org.eclipse.papyrus.views.properties.widgets.layout"/>
- <namespaces
- name="ppec"
- value="org.eclipse.papyrus.views.properties.creation"/>
- <miscClasses
- label="EMF object factory"
- class="EcorePropertyEditorFactory"
- namespace="//@namespaces.5"/>
- <miscClasses
- label="Property view Edition factory"
- class="PropertyEditorFactory"
- namespace="//@namespaces.5"/>
+<environment:Environment xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:environment="http://www.eclipse.org/papyrus/properties/environment/0.9">
+ <constraintTypes label="EMF Instance Of (Deprecated)" constraintClass="org.eclipse.papyrus.infra.constraints.constraints.EMFInstanceOfConstraint"/>
+ <constraintTypes label="True Constraint (Deprecated)" constraintClass="org.eclipse.papyrus.infra.constraints.constraints.TrueConstraint"/>
+ <constraintTypes label="EMF Query (Deprecated)" constraintClass="org.eclipse.papyrus.infra.constraints.constraints.EMFQueryConstraint"/>
+ <constraintTypes label="Java Instance Of (Deprecated)" constraintClass="org.eclipse.papyrus.infra.constraints.constraints.JavaInstanceOf"/>
+ <constraintTypes label="Java Query (Deprecated)" constraintClass="org.eclipse.papyrus.infra.constraints.constraints.JavaQueryConstraint"/>
+ <modelElementFactories name="EMF Factory" factoryClass="org.eclipse.papyrus.views.properties.modelelement.EMFModelElementFactory"/>
+ <modelElementFactories name="Annotation Factory" factoryClass="org.eclipse.papyrus.views.properties.modelelement.AnnotationModelElementFactory"/>
+ <modelElementFactories name="Basic preferences Factory" factoryClass="org.eclipse.papyrus.views.properties.modelelement.PreferencesModelElementFactory"/>
+ <widgetTypes label="Label" widgetClass="Label"/>
+ <widgetTypes label="Text" widgetClass="Text"/>
+ <widgetTypes label="Button" widgetClass="Button"/>
+ <propertyEditorTypes label="StringEditor" widgetClass="StringEditor" namespace="//@namespaces.3"/>
+ <propertyEditorTypes label="StringMultiline" widgetClass="StringMultiline" namespace="//@namespaces.3"/>
+ <propertyEditorTypes label="StringLabel (Read-only)" widgetClass="StringLabel" namespace="//@namespaces.3"/>
+ <propertyEditorTypes label="StringCombo" widgetClass="StringCombo" namespace="//@namespaces.3"/>
+ <propertyEditorTypes label="FileSelector" widgetClass="StringFileSelector" namespace="//@namespaces.3"/>
+ <propertyEditorTypes label="BooleanCombo" widgetClass="BooleanCombo" namespace="//@namespaces.3" type="Boolean"/>
+ <propertyEditorTypes label="BooleanCheckbox" widgetClass="BooleanCheckbox" namespace="//@namespaces.3" type="Boolean"/>
+ <propertyEditorTypes label="BooleanRadio" widgetClass="BooleanRadio" namespace="//@namespaces.3" type="Boolean"/>
+ <propertyEditorTypes label="BooleanToggle" widgetClass="BooleanToggle" namespace="//@namespaces.3" type="Boolean"/>
+ <propertyEditorTypes label="IntegerEditor" widgetClass="IntegerEditor" namespace="//@namespaces.3" type="Integer"/>
+ <propertyEditorTypes label="IntegerSpinner" widgetClass="IntegerSpinner" namespace="//@namespaces.3" type="Integer"/>
+ <propertyEditorTypes label="EnumCombo" widgetClass="EnumCombo" namespace="//@namespaces.3" type="Enumeration"/>
+ <propertyEditorTypes label="EnumRadio (No preview)" widgetClass="EnumRadio" namespace="//@namespaces.3" type="Enumeration"/>
+ <propertyEditorTypes label="ReferenceCombo" widgetClass="ReferenceCombo" namespace="//@namespaces.3" type="Reference"/>
+ <propertyEditorTypes label="ReferenceDialog" widgetClass="ReferenceDialog" namespace="//@namespaces.3" type="Reference"/>
+ <propertyEditorTypes label="ViewEditor" widgetClass="ViewEditor" namespace="//@namespaces.3" type="Reference" multiplicity="-1"/>
+ <propertyEditorTypes label="ReferenceLabel (Read-only)" widgetClass="ReferenceLabel" namespace="//@namespaces.3" type="Reference"/>
+ <propertyEditorTypes label="MultiReference" widgetClass="MultiReference" namespace="//@namespaces.3" type="Reference" multiplicity="-1"/>
+ <propertyEditorTypes label="MultiReferenceWithPropertyView" widgetClass="MultiReferencePropertyEditorWithPropertyView" namespace="//@namespaces.3" type="Reference" multiplicity="-1"/>
+ <propertyEditorTypes label="MultiString" widgetClass="MultiString" namespace="//@namespaces.3" multiplicity="-1"/>
+ <propertyEditorTypes label="MultipleFileEditor" widgetClass="MultiStringFile" namespace="//@namespaces.3" multiplicity="-1"/>
+ <propertyEditorTypes label="MultiInteger" widgetClass="MultiInteger" namespace="//@namespaces.3" type="Integer" multiplicity="-1"/>
+ <propertyEditorTypes label="InvalidWidget" widgetClass="InvalidWidget" namespace="//@namespaces.3"/>
+ <propertyEditorTypes label="StringMultiline with References" widgetClass="StringMultilineWithReferences" namespace="//@namespaces.3"/>
+ <propertyEditorTypes label="FloatEditor" widgetClass="FloatEditor" namespace="//@namespaces.3"/>
+ <propertyEditorTypes label="DoubleEditor" widgetClass="DoubleEditor" namespace="//@namespaces.3"/>
+ <propertyEditorTypes label="UnlimitedNaturalEditor" widgetClass="UnlimitedNaturalEditor" namespace="//@namespaces.3"/>
+ <compositeWidgetTypes label="Composite" widgetClass="Composite"/>
+ <compositeWidgetTypes label="Group" widgetClass="Group"/>
+ <layoutTypes label="GridLayout" widgetClass="GridLayout"/>
+ <layoutTypes label="FillLayout" widgetClass="FillLayout"/>
+ <layoutTypes label="RowLayout" widgetClass="RowLayout"/>
+ <layoutTypes label="PropertiesLayout" widgetClass="PropertiesLayout" namespace="//@namespaces.4"/>
+ <namespaces prefix="" name="" value="http://www.eclipse.org/xwt/presentation"/>
+ <namespaces prefix="" name="x" value="http://www.eclipse.org/xwt"/>
+ <namespaces name="j" value="java.lang"/>
+ <namespaces name="ppe" value="org.eclipse.papyrus.views.properties.widgets"/>
+ <namespaces name="ppel" value="org.eclipse.papyrus.views.properties.widgets.layout"/>
+ <namespaces name="ppec" value="org.eclipse.papyrus.views.properties.creation"/>
+ <miscClasses label="EMF object factory" class="EcorePropertyEditorFactory" namespace="//@namespaces.5"/>
+ <miscClasses label="Property view Edition factory" class="PropertyEditorFactory" namespace="//@namespaces.5"/>
</environment:Environment>
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AbstractModelElement.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AbstractModelElement.java
index c5d0a8f1628..a69f51490b8 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AbstractModelElement.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AbstractModelElement.java
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.views.properties.modelelement;
@@ -15,6 +16,7 @@ import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.databinding.observable.IObservable;
+import org.eclipse.core.databinding.validation.IValidator;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
import org.eclipse.papyrus.infra.widgets.providers.EmptyContentProvider;
@@ -36,6 +38,7 @@ public abstract class AbstractModelElement implements ModelElement {
private final Map<String, IObservable> observables = new HashMap<String, IObservable>();
+
/**
* Constructor.
*/
@@ -119,5 +122,11 @@ public abstract class AbstractModelElement implements ModelElement {
}
observables.clear();
}
+
+ public IValidator getValidator(String propertyPath){
+ return null;
+ }
+
+
}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/DataSource.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/DataSource.java
index a8915d88f19..362835a029d 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/DataSource.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/DataSource.java
@@ -8,6 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.views.properties.modelelement;
@@ -19,6 +20,7 @@ import java.util.Set;
import org.eclipse.core.databinding.observable.ChangeEvent;
import org.eclipse.core.databinding.observable.IChangeListener;
import org.eclipse.core.databinding.observable.IObservable;
+import org.eclipse.core.databinding.validation.IValidator;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
@@ -344,4 +346,16 @@ public class DataSource implements IChangeListener {
}
elements.clear();
}
+ /**
+ * return the IValidator for a property path
+ * @param propertyPath
+ * @return
+ */
+ public IValidator getValidator(String propertyPath){
+ ModelElement element = getModelElement(propertyPath);
+ if(element == null) {
+ return null;
+ }
+ return element.getValidator(getLocalPropertyPath(propertyPath));
+ }
}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/ModelElement.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/ModelElement.java
index 26e09fae540..8c8d28b3c5e 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/ModelElement.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/ModelElement.java
@@ -8,10 +8,12 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.views.properties.modelelement;
import org.eclipse.core.databinding.observable.IObservable;
+import org.eclipse.core.databinding.validation.IValidator;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
@@ -155,4 +157,12 @@ public interface ModelElement {
* All created IObservable will be disposed
*/
public void dispose();
+
+
+ /**
+ * return the Validator of a given String propertyPath
+ * @param propertyPath
+ * @return
+ */
+ public IValidator getValidator(String propertyPath);
}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/runtime/ConfigurationManager.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/runtime/ConfigurationManager.java
index 154f36814fa..d24eff37223 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/runtime/ConfigurationManager.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/runtime/ConfigurationManager.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010, 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
@@ -74,14 +74,14 @@ import org.eclipse.swt.widgets.Display;
/**
* Central class of the Property View framework. It lists the available environments and contexts,
* and is responsible for Enabling or Disabling contexts programmatically.
- *
+ *
* All {@link Context}s should have unique names.
- *
+ *
* @see ContextExtensionPoint
* @see EnvironmentExtensionPoint
* @see Preferences
* @see ConfigurationManager#instance
- *
+ *
* @author Camille Letavernier
*/
public class ConfigurationManager {
@@ -314,7 +314,7 @@ public class ConfigurationManager {
/**
* Refresh the given Context. This method should be called when a model is edited
* at runtime, to re-load it from persistent storage.
- *
+ *
* @param context
* A Context model to re-load
*/
@@ -356,11 +356,11 @@ public class ConfigurationManager {
/**
* Tests if a Context is enabled.
- *
+ *
* @param context
* @return
* true if the given context is enabled.
- *
+ *
* @see Preferences
*/
public boolean isApplied(Context context) {
@@ -420,7 +420,7 @@ public class ConfigurationManager {
* Retrieves the ContextDescriptor associated to the specified context.
* If a matching descriptor cannot be found, a new Descriptor is created
* in the preferences.
- *
+ *
* @param context
* @return
*/
@@ -446,7 +446,7 @@ public class ConfigurationManager {
/**
* Adds a context via its URI. The URI should represent a valid Context model.
* The model is loaded in the ConfigurationManager's resourceSet.
- *
+ *
* @param uri
* The context's URI
* @throws IOException
@@ -468,7 +468,7 @@ public class ConfigurationManager {
/**
* Adds a context via its URI. The URI should represent a valid Context model.
* The model is loaded in the ConfigurationManager's resourceSet.
- *
+ *
* @param uri
* The context's URI
* @throws IOException
@@ -484,12 +484,12 @@ public class ConfigurationManager {
* However, you can still call this method when creating a Context at runtime, programmatically
* (Wizards, ...)
* All {@link Context} should have unique names
- *
+ *
* @param context
* The new context to register
* @param apply
* Whether the context should be enabled or not
- *
+ *
* @see ConfigurationManager#addContext(URI)
*/
public void addContext(Context context, boolean apply) {
@@ -500,7 +500,7 @@ public class ConfigurationManager {
* Recalculates the cached preference descriptor prototype of the specified {@code context}.
* This ensures that if the {@code context} becomes unavailable, we will still know locally
* in this workspace what its prototype is.
- *
+ *
* @param context
* a context
*/
@@ -525,12 +525,12 @@ public class ConfigurationManager {
* However, you can still call this method when creating a Context at runtime, programmatically
* (Wizards, ...)
* All {@link Context} should have unique names
- *
+ *
* @param context
* The new context to register
* @param apply
* Whether the context should be enabled or not
- *
+ *
* @see ConfigurationManager#addContext(URI)
*/
public void addContext(Context context, boolean apply, boolean isCustomizable) {
@@ -572,7 +572,7 @@ public class ConfigurationManager {
/**
* Disable a Context.
- *
+ *
* @param context
* The Context to disable
* @param update
@@ -612,7 +612,7 @@ public class ConfigurationManager {
/**
* Enables a Context
- *
+ *
* @param context
* The Context to enable
* @param update
@@ -620,7 +620,7 @@ public class ConfigurationManager {
* modification
* If false, you should call manually {@link #update()} to refresh
* the constraint engine
- *
+ *
* @see #disableContext(Context, boolean)
*/
public void enableContext(Context context, boolean update) {
@@ -651,7 +651,7 @@ public class ConfigurationManager {
* Tests if a Context is a plugin context. plugin contexts
* are registered through {@link ContextExtensionPoint} and are
* read-only.
- *
+ *
* @param context
* @return
* True if the context comes from a plugin, and is thus read-only
@@ -665,7 +665,7 @@ public class ConfigurationManager {
/**
* Queries whether the specified {@code context} is a proxy for a missing context. That is a
* context that is expected to exist but is (temporarily) unavailable.
- *
+ *
* @param context
* a context
* @return whether it represents a missing context
@@ -676,7 +676,7 @@ public class ConfigurationManager {
/**
* Loads a Context from the given URI. The model is loaded in the {@link ConfigurationManager}'s resourceSet
- *
+ *
* @param uri
* The URI from which the Context is loaded
* @return
@@ -694,7 +694,7 @@ public class ConfigurationManager {
/**
* Adds a new Environment from the given URI.
- *
+ *
* @param uri
* The URI from which the Environment is retrieved.
* @throws IOException
@@ -716,7 +716,7 @@ public class ConfigurationManager {
/**
* Returns the context from the given context name
- *
+ *
* @param contextName
* The name of the context to retrieve
* @return
@@ -746,9 +746,9 @@ public class ConfigurationManager {
/**
* Returns all the known contexts, even if they are not applied
* To get only applied contexts, see {@link #getEnabledContexts()}
- *
+ *
* @return All known contexts
- *
+ *
* @see PropertiesRoot#getContexts()
*/
public Collection<Context> getContexts() {
@@ -757,9 +757,9 @@ public class ConfigurationManager {
/**
* Returns all the known customizable contexts.
- *
+ *
* @return All known contexts
- *
+ *
* @see PropertiesRoot#getContexts()
* @see {@link #getEnabledContexts()}
*/
@@ -776,7 +776,7 @@ public class ConfigurationManager {
/**
* Obtains proxies (not the EMF kind) for all contexts that the system knows about
* but are currently unavailable.
- *
+ *
* @return the current collection of missing contexts
*/
public Collection<Context> getMissingContexts() {
@@ -860,8 +860,11 @@ public class ConfigurationManager {
case STRING:
propertyEditorName = multiple ? "MultiString" : "StringEditor"; //$NON-NLS-1$ //$NON-NLS-2$
break;
+ case DOUBLE:
+ propertyEditorName = multiple ? "MultiDouble" : "DoubleEditor"; //$NON-NLS-1$ //$NON-NLS-2$
}
+
if(propertyEditorName == null) {
return null;
}
@@ -871,7 +874,7 @@ public class ConfigurationManager {
/**
* Returns the default XWT namespaces
- *
+ *
* @return the default XWT namespaces
*/
public Set<Namespace> getBaseNamespaces() {
@@ -912,7 +915,7 @@ public class ConfigurationManager {
* Disable, then unregisters a Context. The Context won't be available anymore in the framework
* (not even in the Preferences page). This method <strong>won't</strong> delete the context's files
* on the file system.
- *
+ *
* @param context
* The context to delete
*/
@@ -924,7 +927,7 @@ public class ConfigurationManager {
* Disable, then unregisters a Context. The Context won't be available anymore in the framework
* (not even in the Preferences page). This method <strong>won't</strong> delete the context's files
* on the file system.
- *
+ *
* @param context
* The context to delete
* @param updateEngine
@@ -980,7 +983,7 @@ public class ConfigurationManager {
/**
* Retrieves the Property object associated to the propertyPath in the given context
- *
+ *
* @param propertyPath
* @param context
* @return
@@ -1027,7 +1030,7 @@ public class ConfigurationManager {
* Checks the conflicts between all applied configurations
* A Conflict may occur when two sections have the same ID : they can't
* be displayed at the same time
- *
+ *
* @return
* The list of conflicts
*/
@@ -1066,7 +1069,7 @@ public class ConfigurationManager {
/**
* Returns the ResourceSet associated to the ConfigurationManager,
* ie. the ResourceSet containing all Environments and Contexts
- *
+ *
* @return
*/
public ResourceSet getResourceSet() {
@@ -1085,8 +1088,8 @@ public class ConfigurationManager {
return customizableContexts.get(propertyViewConfiguration);
}
- //Default value for isCustomizable is true. However, if the context is
- //not stored in customizableContexts, then it's an error. We should
+ //Default value for isCustomizable is true. However, if the context is
+ //not stored in customizableContexts, then it's an error. We should
//disable customization tools for this one...
return false;
}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/AbstractPropertyEditor.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/AbstractPropertyEditor.java
index 55bf938b168..b87ff2cdeef 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/AbstractPropertyEditor.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/AbstractPropertyEditor.java
@@ -8,14 +8,17 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Add binding implementation
*****************************************************************************/
package org.eclipse.papyrus.views.properties.widgets;
+import org.eclipse.core.databinding.conversion.IConverter;
import org.eclipse.core.databinding.observable.ChangeEvent;
import org.eclipse.core.databinding.observable.IChangeListener;
import org.eclipse.core.databinding.observable.IObservable;
import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.validation.IValidator;
import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor;
import org.eclipse.papyrus.infra.widgets.editors.AbstractListEditor;
import org.eclipse.papyrus.infra.widgets.editors.AbstractValueEditor;
@@ -30,6 +33,7 @@ import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.widgets.Control;
+
/**
* An Abstract class to factorize code for PropertyEditors. PropertyEditors are
* <strong>not</strong> required to extend this class, but could benefit from
@@ -75,6 +79,10 @@ public abstract class AbstractPropertyEditor implements IChangeListener, Customi
*/
protected IObservableValue observableValue;
+
+ protected IValidator modelValidator;
+
+ protected IConverter targetToModelConverter;
/**
* Indicates if the editor's label should be displayed
*/
@@ -186,7 +194,20 @@ public abstract class AbstractPropertyEditor implements IChangeListener, Customi
IObservableValue inputObservableValue = getInputObservableValue();
if(inputObservableValue != null) {
+ valueEditor.setStrategies();
+
+
+
+ IValidator modelVal = getValidator();
+ if(modelVal!=null){
+
+ valueEditor.setModelValidator(modelVal);
+ }
valueEditor.setModelObservable(inputObservableValue);
+
+
+
+
}
}
@@ -221,9 +242,12 @@ public abstract class AbstractPropertyEditor implements IChangeListener, Customi
public final void handleChange(ChangeEvent event) {
//Handle the "forceRefresh" behavior when the input DataSource sends a ChangeEvent
AbstractEditor editor = getEditor();
- if(editor != null) {
+ if(editor != null ) {
editor.refreshValue();
- }
+ }
+
+
+
}
/**
@@ -312,6 +336,7 @@ public abstract class AbstractPropertyEditor implements IChangeListener, Customi
protected void updateDescription() {
String description = ""; //$NON-NLS-1$
Property property = getModelProperty();
+
if(property != null) {
description = property.getDescription();
}
@@ -324,6 +349,7 @@ public abstract class AbstractPropertyEditor implements IChangeListener, Customi
description = getLocalPropertyPath() + ": " + description;
}
+
updateDescription(description);
}
@@ -335,6 +361,7 @@ public abstract class AbstractPropertyEditor implements IChangeListener, Customi
if(valueEditor != null) {
valueEditor.setToolTipText(description);
} else if(listEditor != null) {
+
listEditor.setToolTipText(description);
}
}
@@ -349,6 +376,7 @@ public abstract class AbstractPropertyEditor implements IChangeListener, Customi
return null;
}
Context context = getContext();
+
return ConfigurationManager.getInstance().getProperty(propertyPath, context);
}
@@ -521,4 +549,23 @@ public abstract class AbstractPropertyEditor implements IChangeListener, Customi
}
return valueEditor;
}
+
+ /**
+ * @return the IValidator for this property editor
+ */
+
+ public IValidator getValidator(){
+ if(modelValidator==null){
+ try{
+ modelValidator = input.getValidator(propertyPath);
+ }
+ catch(Exception ex){
+ Activator.log.error("Cannot find a valid Validator for " + propertyPath, ex); //$NON-NLS-1$
+
+ }
+ }
+
+ return modelValidator;
+ }
+
}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/DoubleEditor.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/DoubleEditor.java
new file mode 100644
index 00000000000..4b695cf9d16
--- /dev/null
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/DoubleEditor.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * 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:
+ * Camille Letavernier (camille.letavernier@cea.fr) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.widgets;
+
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * A PropertyEditor for editing Doubles through a Text field
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.DoubleEditor
+ *
+ * @author Camille Letavernier
+ */
+public class DoubleEditor extends AbstractPropertyEditor {
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The composite in which the widget will be displayed
+ * @param style
+ * The style for the widget
+ */
+ public DoubleEditor(Composite parent, int style) {
+ super(new org.eclipse.papyrus.infra.widgets.editors.DoubleEditor(parent, style));
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/MultiDouble.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/MultiDouble.java
new file mode 100644
index 00000000000..47b0e17a04e
--- /dev/null
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/MultiDouble.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.widgets;
+
+
+
+import org.eclipse.papyrus.infra.widgets.editors.ICommitListener;
+import org.eclipse.papyrus.infra.widgets.editors.MultipleDoubleEditor;
+import org.eclipse.swt.widgets.Composite;
+
+public class MultiDouble extends AbstractPropertyEditor {
+
+ /**
+ * The MultipleDoubleEditor widget
+ */
+ protected MultipleDoubleEditor editor;
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The composite in which the widget will be displayed
+ * @param style
+ * The style for the widget
+ */
+ public MultiDouble(Composite parent, int style) {
+ editor = createMultipleDoubleEditor(parent, style);
+ super.setEditor(editor);
+ }
+
+ /**
+ * Creates the multiple double editor.
+ *
+ * @param parent
+ * The composite in which the widget will be displayed
+ * @param style
+ * The style for the widget
+ * @return the multiple double editor.
+ */
+ protected MultipleDoubleEditor createMultipleDoubleEditor(Composite parent, int style) {
+ return new MultipleDoubleEditor(parent, style);
+ }
+
+ @Override
+ protected void doBinding() {
+ editor.setOrdered(input.isOrdered(propertyPath));
+ editor.setUnique(input.isUnique(propertyPath));
+
+ if(getInputObservableList() instanceof ICommitListener) {
+ editor.addCommitListener((ICommitListener)getInputObservableList());
+ }
+
+ super.doBinding();
+ }
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/MultiReferenceEditorWithPropertyView.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/MultiReferenceEditorWithPropertyView.java
index 4ecdc462e35..f17b2f773c4 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/MultiReferenceEditorWithPropertyView.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/MultiReferenceEditorWithPropertyView.java
@@ -159,4 +159,10 @@ public class MultiReferenceEditorWithPropertyView extends AbstractListEditor imp
public void addCommitListener(ICommitListener commitListener) {
multiReferenceEditor.addCommitListener(commitListener);
}
+
+ @Override
+ public void changeColorField() {
+ // TODO Auto-generated method stub
+
+ }
}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/StringFileSelectorEMF.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/StringFileSelectorEMF.java
index 0e156e5861f..df063b14e17 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/StringFileSelectorEMF.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/StringFileSelectorEMF.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2014 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
@@ -45,12 +45,12 @@ public class StringFileSelectorEMF extends StringFileSelector {
notifyChange();
}
- @Override
+ // @Override
protected IFile getIFile(String path) {
return EMFFileUtil.getIFile(path);
}
- @Override
+ // @Override
protected File getFile(String path) {
return EMFFileUtil.getFile(path);
}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/UnlimitedNaturalEditor.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/UnlimitedNaturalEditor.java
new file mode 100644
index 00000000000..cc441838bc0
--- /dev/null
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/UnlimitedNaturalEditor.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * 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:
+ * Thibault Le Ouay t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.views.properties.widgets;
+
+import org.eclipse.swt.widgets.Composite;
+
+public class UnlimitedNaturalEditor extends AbstractPropertyEditor {
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The composite in which the widget will be displayed
+ * @param style
+ * The style for the widget
+ */
+ public UnlimitedNaturalEditor(Composite parent, int style) {
+ super(new org.eclipse.papyrus.infra.widgets.editors.UnlimitedNaturalEditor(parent, style));
+ }
+}
+
+
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/xwt/XWTSection.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/xwt/XWTSection.java
index f7d2905fb20..7d7366f525e 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/xwt/XWTSection.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/xwt/XWTSection.java
@@ -144,14 +144,12 @@ public class XWTSection extends AbstractPropertySection implements IChangeListen
hide();
return;
}
-
- self.setRedraw(false);
+
if(refresh) {
display.refreshSection(self, section, source);
} else {
display.createSection(self, section, source);
}
- self.setRedraw(true);
}
private void hide() {
diff --git a/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/META-INF/MANIFEST.MF
index 92ddbf63699..fecf01bac4e 100644
--- a/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/META-INF/MANIFEST.MF
@@ -13,7 +13,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.core.resources;bundle-version="3.8.0",
org.eclipse.papyrus.junit.utils;bundle-version="1.0.0",
org.eclipse.uml2.uml;bundle-version="4.0.0",
- org.junit;bundle-version="4.10.0"
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.core.databinding;bundle-version="1.4.1"
Export-Package: org.eclipse.papyrus.customization.properties.tests,
org.eclipse.papyrus.customization.properties.tests.qvt
Bundle-Vendor: Eclipse Modeling Project
@@ -23,7 +24,5 @@ Bundle-Name: Properties view customization Tests (Incubation)
Bundle-ManifestVersion: 2
Bundle-Activator: org.eclipse.papyrus.customization.properties.tests.A
ctivator
-Bundle-SymbolicName: org.eclipse.papyrus.customization.properties.test
- s
+Bundle-SymbolicName: org.eclipse.papyrus.customization.properties.tests
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/org.eclipse.papyrus.customization.properties.tests.launch b/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/org.eclipse.papyrus.customization.properties.tests.launch
index 0caf3584e76..09eb4aa2140 100644
--- a/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/org.eclipse.papyrus.customization.properties.tests.launch
+++ b/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/org.eclipse.papyrus.customization.properties.tests.launch
@@ -23,16 +23,17 @@
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.customization.properties.tests.AllTests"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.customization.properties.tests"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms1024m -Xmx4096m -XX:PermSize=256M -XX:MaxPermSize=512M"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms1024m -Xmx256m -XX:PermSize=256M -XX:MaxPermSize=512M"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
-<stringAttribute key="selected_target_plugins" value="ch.qos.logback.classic@default:default,ch.qos.logback.core@default:default,ch.qos.logback.slf4j@default:false,com.cea.papyrus.fuml.gen@default:default,com.google.gerrit.common@default:default,com.google.gerrit.prettify@default:default,com.google.gerrit.reviewdb@default:default,com.google.gson@default:default,com.google.guava*10.0.1.v201203051515@default:default,com.google.guava*11.0.1@default:default,com.google.gwt.servlet@default:default,com.google.gwtjsonrpc@default:default,com.google.gwtorm@default:default,com.google.inject.assistedinject@default:false,com.google.inject.multibindings@default:false,com.google.inject@default:default,com.ibm.icu@default:default,com.jcraft.jsch@default:default,com.mountainminds.eclemma.core@default:default,com.mountainminds.eclemma.doc@default:default,com.mountainminds.eclemma.ui@default:default,com.ning.async-http-client@default:default,com.sun.el@default:default,com.sun.syndication@default:default,com.sun.xml.bind@default:default,de.cau.cs.kieler.core.kgraph@default:default,de.cau.cs.kieler.core.ui@default:default,de.cau.cs.kieler.core@default:default,de.cau.cs.kieler.kiml.gmf@default:default,de.cau.cs.kieler.kiml.service@default:default,de.cau.cs.kieler.kiml.ui@default:default,de.cau.cs.kieler.kiml@default:default,de.cau.cs.kieler.klay.force@default:default,de.cau.cs.kieler.klay.layered@default:default,javax.activation@default:default,javax.annotation@default:default,javax.el@default:default,javax.inject@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.xml.bind@default:default,javax.xml.stream@default:default,javax.xml@default:default,lpg.runtime.java@default:default,metrics@default:default,net.sf.jautodoc.velocity@default:default,net.sf.jautodoc@default:default,net.sourceforge.nattable.core@default:default,org.antlr.runtime*3.0.0.v200803061811@default:default,org.antlr.runtime*3.2.0.v201101311130@default:default,org.apache.ant@default:default,org.apache.batik.bridge@default:default,org.apache.batik.css@default:default,org.apache.batik.dom.svg@default:default,org.apache.batik.dom@default:default,org.apache.batik.ext.awt@default:default,org.apache.batik.parser@default:default,org.apache.batik.pdf@default:default,org.apache.batik.svggen@default:default,org.apache.batik.transcoder@default:default,org.apache.batik.util.gui@default:default,org.apache.batik.util@default:default,org.apache.batik.xml@default:default,org.apache.commons.cli@default:default,org.apache.commons.codec@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.io@default:default,org.apache.commons.jxpath@default:default,org.apache.commons.lang3@default:default,org.apache.commons.lang@default:default,org.apache.commons.logging@default:default,org.apache.commons.math@default:default,org.apache.commons.pool@default:default,org.apache.commons.primitives@default:default,org.apache.derby@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.apache.httpcomponents.httpclient@default:default,org.apache.httpcomponents.httpcore@default:default,org.apache.jasper.glassfish@default:default,org.apache.log4j@default:default,org.apache.lucene*2.9.1.v201101211721@default:default,org.apache.lucene*3.5.0.v20120319-2345@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core*2.9.1.v201101211721@default:default,org.apache.lucene.core*3.5.0.v20120319-2345@default:default,org.apache.lucene.highlighter@default:default,org.apache.lucene.memory@default:default,org.apache.lucene.misc*2.9.1.v20100421-0704@default:default,org.apache.lucene.misc*3.5.0.v20120319-2345@default:default,org.apache.lucene.queries*2.9.1.v20100421-0704@default:default,org.apache.lucene.queries*3.5.0.v20120319-2345@default:default,org.apache.lucene.snowball@default:default,org.apache.lucene.spellchecker@default:default,org.apache.ws.commons.util@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.apache.xmlrpc@default:default,org.eclipse.acceleo.common.ui@default:default,org.eclipse.acceleo.common@default:default,org.eclipse.acceleo.compatibility.ui@default:default,org.eclipse.acceleo.compatibility@default:default,org.eclipse.acceleo.doc@default:default,org.eclipse.acceleo.engine@default:default,org.eclipse.acceleo.examples@default:default,org.eclipse.acceleo.ide.ui@default:default,org.eclipse.acceleo.model.edit@default:default,org.eclipse.acceleo.model@default:default,org.eclipse.acceleo.parser@default:default,org.eclipse.acceleo.profiler.edit@default:default,org.eclipse.acceleo.profiler.editor@default:default,org.eclipse.acceleo.profiler@default:default,org.eclipse.acceleo.traceability.model@default:default,org.eclipse.acceleo.traceability@default:default,org.eclipse.acceleo.ui.capabilities@default:default,org.eclipse.acceleo.ui.interpreter@default:default,org.eclipse.ant.core@default:default,org.eclipse.ant.launching@default:default,org.eclipse.ant.ui@default:default,org.eclipse.b3.aggregator.edit@default:default,org.eclipse.b3.aggregator.editor@default:default,org.eclipse.b3.aggregator.engine.maven@default:default,org.eclipse.b3.aggregator.engine@default:default,org.eclipse.b3.aggregator.legacy.ui@default:default,org.eclipse.b3.aggregator.legacy@default:default,org.eclipse.b3.aggregator@default:default,org.eclipse.b3.cli@default:default,org.eclipse.b3.p2.edit@default:default,org.eclipse.b3.p2.maven@default:default,org.eclipse.b3.p2@default:default,org.eclipse.b3.util@default:default,org.eclipse.buckminster.osgi.filter@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare.win32@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.externaltools@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.cvs@default:default,org.eclipse.debug.core@default:default,org.eclipse.debug.ui@default:default,org.eclipse.dltk.console.ui@default:default,org.eclipse.dltk.console@default:default,org.eclipse.dltk.core.index.sql.h2@default:default,org.eclipse.dltk.core.index.sql@default:default,org.eclipse.dltk.core.index@default:default,org.eclipse.dltk.core.manipulation@default:default,org.eclipse.dltk.core@default:default,org.eclipse.dltk.debug.ui@default:default,org.eclipse.dltk.debug@default:default,org.eclipse.dltk.formatter@default:default,org.eclipse.dltk.launching@default:default,org.eclipse.dltk.logconsole.ui@default:default,org.eclipse.dltk.logconsole@default:default,org.eclipse.dltk.testing@default:default,org.eclipse.dltk.ui@default:default,org.eclipse.dltk.validators.core@default:default,org.eclipse.dltk.validators.externalchecker@default:default,org.eclipse.dltk.validators.ui@default:default,org.eclipse.dltk@default:default,org.eclipse.draw2d.doc.isv@default:default,org.eclipse.draw2d@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.ecf.discovery@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.discovery@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.provider.jmdns@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.egit.core@default:default,org.eclipse.egit.doc@default:default,org.eclipse.egit.import@default:default,org.eclipse.egit.mylyn.ui@default:default,org.eclipse.egit.ui@default:default,org.eclipse.egit@default:default,org.eclipse.emf.ant@default:default,org.eclipse.emf.cheatsheets@default:default,org.eclipse.emf.codegen.ecore.ui@default:default,org.eclipse.emf.codegen.ecore@default:default,org.eclipse.emf.codegen.ui@default:default,org.eclipse.emf.codegen@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.compare.diff.edit@default:default,org.eclipse.emf.compare.diff@default:default,org.eclipse.emf.compare.match@default:default,org.eclipse.emf.compare.ui@default:default,org.eclipse.emf.compare@default:default,org.eclipse.emf.converter@default:default,org.eclipse.emf.databinding.edit@default:default,org.eclipse.emf.databinding@default:default,org.eclipse.emf.doc@default:default,org.eclipse.emf.ecore.change.edit@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.editor@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.emf.example.installer@default:default,org.eclipse.emf.exporter@default:default,org.eclipse.emf.facet.aggregate.doc@default:default,org.eclipse.emf.facet.capabilities@default:default,org.eclipse.emf.facet.common.core@default:default,org.eclipse.emf.facet.common.sdk.core@default:default,org.eclipse.emf.facet.common.sdk.ui@default:default,org.eclipse.emf.facet.common.ui@default:default,org.eclipse.emf.facet.custom.core@default:default,org.eclipse.emf.facet.custom.doc@default:default,org.eclipse.emf.facet.custom.metamodel.edit@default:default,org.eclipse.emf.facet.custom.metamodel@default:default,org.eclipse.emf.facet.custom.sdk.core@default:default,org.eclipse.emf.facet.custom.ui@default:default,org.eclipse.emf.facet.dev.core@default:default,org.eclipse.emf.facet.dev.ui@default:default,org.eclipse.emf.facet.doc@default:default,org.eclipse.emf.facet.ecore@default:default,org.eclipse.emf.facet.efacet.catalog@default:default,org.eclipse.emf.facet.efacet.core@default:default,org.eclipse.emf.facet.efacet.doc@default:default,org.eclipse.emf.facet.efacet.edit@default:default,org.eclipse.emf.facet.efacet.editor@default:default,org.eclipse.emf.facet.efacet.metamodel.edit@default:default,org.eclipse.emf.facet.efacet.metamodel@default:default,org.eclipse.emf.facet.efacet.ui@default:default,org.eclipse.emf.facet.efacet@default:default,org.eclipse.emf.facet.infra.browser.custom.core@default:default,org.eclipse.emf.facet.infra.browser.custom.edit@default:default,org.eclipse.emf.facet.infra.browser.custom.editor@default:default,org.eclipse.emf.facet.infra.browser.custom.examples.uml@default:default,org.eclipse.emf.facet.infra.browser.custom.ui@default:default,org.eclipse.emf.facet.infra.browser.custom@default:default,org.eclipse.emf.facet.infra.browser.doc@default:default,org.eclipse.emf.facet.infra.browser.uicore.examples.cnf@default:default,org.eclipse.emf.facet.infra.browser.uicore@default:default,org.eclipse.emf.facet.infra.browser@default:default,org.eclipse.emf.facet.infra.common.core@default:default,org.eclipse.emf.facet.infra.common.ui@default:default,org.eclipse.emf.facet.infra.facet.core@default:default,org.eclipse.emf.facet.infra.facet.edit@default:default,org.eclipse.emf.facet.infra.facet.editor@default:default,org.eclipse.emf.facet.infra.facet.ui@default:default,org.eclipse.emf.facet.infra.facet@default:default,org.eclipse.emf.facet.infra.query.core@default:default,org.eclipse.emf.facet.infra.query.edit@default:default,org.eclipse.emf.facet.infra.query.editor@default:default,org.eclipse.emf.facet.infra.query.ui@default:default,org.eclipse.emf.facet.infra.query@default:default,org.eclipse.emf.facet.query.java.core@default:default,org.eclipse.emf.facet.query.java.metamodel@default:default,org.eclipse.emf.facet.query.java.ui@default:default,org.eclipse.emf.facet.query.java@default:default,org.eclipse.emf.facet.releng.tools@default:default,org.eclipse.emf.facet.util.core@default:default,org.eclipse.emf.facet.util.emf.catalog@default:default,org.eclipse.emf.facet.util.emf.core@default:default,org.eclipse.emf.facet.util.emf.doc@default:default,org.eclipse.emf.facet.util.emf.ui@default:default,org.eclipse.emf.facet.util.ui@default:default,org.eclipse.emf.facet.widgets.celleditors.ecore.tests.samplemm@default:default,org.eclipse.emf.facet.widgets.celleditors.ecore@default:default,org.eclipse.emf.facet.widgets.celleditors.edit@default:default,org.eclipse.emf.facet.widgets.celleditors.editor@default:default,org.eclipse.emf.facet.widgets.celleditors@default:default,org.eclipse.emf.facet.widgets.nattable.doc@default:default,org.eclipse.emf.facet.widgets.nattable.examples.ecore@default:default,org.eclipse.emf.facet.widgets.nattable.instance.edit@default:default,org.eclipse.emf.facet.widgets.nattable.instance@default:default,org.eclipse.emf.facet.widgets.nattable.tableconfiguration.edit@default:default,org.eclipse.emf.facet.widgets.nattable.tableconfiguration.editor@default:default,org.eclipse.emf.facet.widgets.nattable.tableconfiguration@default:default,org.eclipse.emf.facet.widgets.nattable@default:default,org.eclipse.emf.facet.widgets.table.doc@default:default,org.eclipse.emf.facet.widgets.table.metamodel.edit@default:default,org.eclipse.emf.facet.widgets.table.metamodel@default:default,org.eclipse.emf.facet.widgets@default:default,org.eclipse.emf.generic.editor@default:default,org.eclipse.emf.importer.ecore@default:default,org.eclipse.emf.importer.java@default:default,org.eclipse.emf.importer.rose@default:default,org.eclipse.emf.importer@default:default,org.eclipse.emf.mapping.ecore.editor@default:default,org.eclipse.emf.mapping.ecore2ecore.editor@default:default,org.eclipse.emf.mapping.ecore2ecore@default:default,org.eclipse.emf.mapping.ecore2xml.ui@default:default,org.eclipse.emf.mapping.ecore2xml@default:default,org.eclipse.emf.mapping.ecore@default:default,org.eclipse.emf.mapping.ui@default:default,org.eclipse.emf.mapping@default:default,org.eclipse.emf.mwe.core@default:default,org.eclipse.emf.mwe.ui@default:default,org.eclipse.emf.mwe.utils@default:default,org.eclipse.emf.mwe2.language.ui@default:default,org.eclipse.emf.mwe2.language@default:default,org.eclipse.emf.mwe2.launch@default:default,org.eclipse.emf.mwe2.lib@default:default,org.eclipse.emf.mwe2.runtime@default:default,org.eclipse.emf.transaction.doc@default:default,org.eclipse.emf.transaction.examples@default:default,org.eclipse.emf.transaction.ui@default:default,org.eclipse.emf.transaction@default:default,org.eclipse.emf.validation.doc@default:default,org.eclipse.emf.validation.examples@default:default,org.eclipse.emf.validation.ocl@default:default,org.eclipse.emf.validation.ui.ide@default:default,org.eclipse.emf.validation.ui@default:default,org.eclipse.emf.validation@default:default,org.eclipse.emf.workspace.doc@default:default,org.eclipse.emf.workspace.ui@default:default,org.eclipse.emf.workspace@default:default,org.eclipse.emf@default:default,org.eclipse.epp.mpc.core@default:default,org.eclipse.epp.mpc.help.ui@default:default,org.eclipse.epp.mpc.ui@default:default,org.eclipse.epp.package.rcp@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.console@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.launcher.win32.win32.x86_64@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.discovery.compatibility@default:default,org.eclipse.equinox.p2.discovery@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.publisher.eclipse@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.transport.ecf@default:default,org.eclipse.equinox.p2.ui.discovery@default:default,org.eclipse.equinox.p2.ui.importexport@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.gef.doc.isv@default:default,org.eclipse.gef.examples.ui.pde@default:default,org.eclipse.gef@default:default,org.eclipse.gmf.bridge.trace@default:default,org.eclipse.gmf.bridge.ui.dashboard@default:default,org.eclipse.gmf.bridge.ui@default:default,org.eclipse.gmf.bridge@default:default,org.eclipse.gmf.codegen.edit@default:default,org.eclipse.gmf.codegen.ui@default:default,org.eclipse.gmf.codegen@default:default,org.eclipse.gmf.common@default:default,org.eclipse.gmf.ecore.editor@default:default,org.eclipse.gmf.examples.runtime.ui.pde@default:default,org.eclipse.gmf.graphdef.codegen.ui@default:default,org.eclipse.gmf.graphdef.codegen@default:default,org.eclipse.gmf.graphdef.edit@default:default,org.eclipse.gmf.graphdef@default:default,org.eclipse.gmf.map.edit@default:default,org.eclipse.gmf.map@default:default,org.eclipse.gmf.runtime.common.core@default:default,org.eclipse.gmf.runtime.common.ui.action.ide@default:default,org.eclipse.gmf.runtime.common.ui.action@default:default,org.eclipse.gmf.runtime.common.ui.printing.win32@default:false,org.eclipse.gmf.runtime.common.ui.printing@default:default,org.eclipse.gmf.runtime.common.ui.services.action@default:default,org.eclipse.gmf.runtime.common.ui.services.dnd.ide@default:default,org.eclipse.gmf.runtime.common.ui.services.dnd@default:default,org.eclipse.gmf.runtime.common.ui.services.properties@default:default,org.eclipse.gmf.runtime.common.ui.services@default:default,org.eclipse.gmf.runtime.common.ui@default:default,org.eclipse.gmf.runtime.diagram.core@default:default,org.eclipse.gmf.runtime.diagram.ui.actions@default:default,org.eclipse.gmf.runtime.diagram.ui.dnd@default:default,org.eclipse.gmf.runtime.diagram.ui.geoshapes@default:default,org.eclipse.gmf.runtime.diagram.ui.printing.render@default:default,org.eclipse.gmf.runtime.diagram.ui.printing@default:default,org.eclipse.gmf.runtime.diagram.ui.properties@default:default,org.eclipse.gmf.runtime.diagram.ui.providers.ide@default:default,org.eclipse.gmf.runtime.diagram.ui.providers@default:default,org.eclipse.gmf.runtime.diagram.ui.render@default:default,org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide@default:default,org.eclipse.gmf.runtime.diagram.ui.resources.editor@default:default,org.eclipse.gmf.runtime.diagram.ui@default:default,org.eclipse.gmf.runtime.draw2d.ui.render.awt@default:default,org.eclipse.gmf.runtime.draw2d.ui.render@default:default,org.eclipse.gmf.runtime.draw2d.ui@default:default,org.eclipse.gmf.runtime.emf.clipboard.core@default:default,org.eclipse.gmf.runtime.emf.commands.core@default:default,org.eclipse.gmf.runtime.emf.core@default:default,org.eclipse.gmf.runtime.emf.type.core@default:default,org.eclipse.gmf.runtime.emf.type.ui@default:default,org.eclipse.gmf.runtime.emf.ui.properties@default:default,org.eclipse.gmf.runtime.emf.ui@default:default,org.eclipse.gmf.runtime.gef.ui@default:default,org.eclipse.gmf.runtime.notation.edit@default:default,org.eclipse.gmf.runtime.notation.providers@default:default,org.eclipse.gmf.runtime.notation.sdk@default:default,org.eclipse.gmf.runtime.notation@default:default,org.eclipse.gmf.runtime.sdk@default:default,org.eclipse.gmf.tooldef.edit@default:default,org.eclipse.gmf.tooldef@default:default,org.eclipse.gmf.tooling@default:default,org.eclipse.gmf.validate@default:default,org.eclipse.gmf.xpand.editor@default:default,org.eclipse.gmf.xpand.qvtlibrary@default:default,org.eclipse.gmf.xpand@default:default,org.eclipse.gmf@default:default,org.eclipse.gmt.modisco.examples@default:default,org.eclipse.gmt.modisco.infra.browser.custom.core@default:default,org.eclipse.gmt.modisco.infra.browser.custom.editor@default:default,org.eclipse.gmt.modisco.infra.browser.custom.examples.java.jdk@default:default,org.eclipse.gmt.modisco.infra.browser.custom.examples.uml@default:default,org.eclipse.gmt.modisco.infra.browser.custom.ui@default:default,org.eclipse.gmt.modisco.infra.browser.custom@default:default,org.eclipse.gmt.modisco.infra.browser.uicore.examples.cnf@default:default,org.eclipse.gmt.modisco.infra.browser.uicore@default:default,org.eclipse.gmt.modisco.infra.browser@default:default,org.eclipse.gmt.modisco.infra.capabilities@default:default,org.eclipse.gmt.modisco.infra.common.cdo@default:default,org.eclipse.gmt.modisco.infra.common.core@default:default,org.eclipse.gmt.modisco.infra.common.ui@default:default,org.eclipse.gmt.modisco.infra.discoverymanager@default:default,org.eclipse.gmt.modisco.infra.facet.core@default:default,org.eclipse.gmt.modisco.infra.facet.edit@default:default,org.eclipse.gmt.modisco.infra.facet.editor@default:default,org.eclipse.gmt.modisco.infra.facet.ui@default:default,org.eclipse.gmt.modisco.infra.facet@default:default,org.eclipse.gmt.modisco.infra.query.core@default:default,org.eclipse.gmt.modisco.infra.query.edit@default:default,org.eclipse.gmt.modisco.infra.query.editor@default:default,org.eclipse.gmt.modisco.infra.query.jxpath@default:default,org.eclipse.gmt.modisco.infra.query.ui@default:default,org.eclipse.gmt.modisco.infra.query@default:default,org.eclipse.gmt.modisco.java.browser.customization@default:default,org.eclipse.gmt.modisco.java.cdo@default:default,org.eclipse.gmt.modisco.java.discoverer.cdo@default:default,org.eclipse.gmt.modisco.java.discoverer@default:default,org.eclipse.gmt.modisco.java.generation@default:default,org.eclipse.gmt.modisco.java.queries@default:default,org.eclipse.gmt.modisco.java@default:default,org.eclipse.gmt.modisco.kdm.browser.extension@default:default,org.eclipse.gmt.modisco.kdm.source.discoverer@default:default,org.eclipse.gmt.modisco.kdm.uml2converter@default:default,org.eclipse.gmt.modisco.omg.kdm@default:default,org.eclipse.gmt.modisco.omg.smm@default:default,org.eclipse.gmt.modisco.tool.metricsvisualizationbuilder@default:default,org.eclipse.gmt.modisco.workflow.mwe@default:default,org.eclipse.gmt.modisco.workflow@default:default,org.eclipse.gmt.modisco.xml.browser.customization@default:default,org.eclipse.gmt.modisco.xml.discoverer@default:default,org.eclipse.gmt.modisco.xml@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help.webapp@default:default,org.eclipse.help@default:default,org.eclipse.jdt.annotation@default:default,org.eclipse.jdt.apt.core@default:default,org.eclipse.jdt.apt.pluggable.core@default:default,org.eclipse.jdt.apt.ui@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.jdt.core@default:default,org.eclipse.jdt.debug.ui@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.jdt.doc.isv@default:default,org.eclipse.jdt.doc.user@default:default,org.eclipse.jdt.junit.core@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.jdt.junit4.runtime@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.jdt@default:default,org.eclipse.jem.util@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.jmx@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jetty.webapp@default:default,org.eclipse.jetty.xml@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.jgit@default:default,org.eclipse.jsch.core@default:default,org.eclipse.jsch.ui@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.m2e.archetype.common@default:default,org.eclipse.m2e.core.ui@default:default,org.eclipse.m2e.core@default:default,org.eclipse.m2e.discovery@default:default,org.eclipse.m2e.editor.xml@default:default,org.eclipse.m2e.editor@default:default,org.eclipse.m2e.jdt@default:default,org.eclipse.m2e.launching@default:default,org.eclipse.m2e.lifecyclemapping.defaults@default:default,org.eclipse.m2e.logback.appender@default:false,org.eclipse.m2e.logback.configuration@default:default,org.eclipse.m2e.maven.indexer@default:default,org.eclipse.m2e.maven.runtime@default:default,org.eclipse.m2e.model.edit@default:default,org.eclipse.m2e.refactoring@default:default,org.eclipse.m2e.scm@default:default,org.eclipse.m2m.atl.adt.debug@default:default,org.eclipse.m2m.atl.adt.editor@default:default,org.eclipse.m2m.atl.adt.ui@default:default,org.eclipse.m2m.atl.adt@default:default,org.eclipse.m2m.atl.cheatsheets@default:default,org.eclipse.m2m.atl.common@default:default,org.eclipse.m2m.atl.core.ant@default:default,org.eclipse.m2m.atl.core.emf@default:default,org.eclipse.m2m.atl.core.ui.vm@default:default,org.eclipse.m2m.atl.core.ui@default:default,org.eclipse.m2m.atl.core@default:default,org.eclipse.m2m.atl.debug.core@default:default,org.eclipse.m2m.atl.doc@default:default,org.eclipse.m2m.atl.drivers.emf4atl@default:default,org.eclipse.m2m.atl.drivers.uml24atl@default:default,org.eclipse.m2m.atl.dsls@default:default,org.eclipse.m2m.atl.engine.emfvm.launch@default:default,org.eclipse.m2m.atl.engine.emfvm@default:default,org.eclipse.m2m.atl.engine.vm@default:default,org.eclipse.m2m.atl.engine@default:default,org.eclipse.m2m.atl.examples@default:default,org.eclipse.m2m.atl.profiler.core@default:default,org.eclipse.m2m.atl.profiler.emfvm@default:default,org.eclipse.m2m.atl.profiler.exportmodel.editor@default:default,org.eclipse.m2m.atl.profiler.exportmodel@default:default,org.eclipse.m2m.atl.profiler.model@default:default,org.eclipse.m2m.atl.profiler.ui@default:default,org.eclipse.m2m.atl.profiler.vm@default:default,org.eclipse.m2m.atl@default:default,org.eclipse.m2m.qvt.oml.common.ui@default:default,org.eclipse.m2m.qvt.oml.common@default:default,org.eclipse.m2m.qvt.oml.cst.parser@default:default,org.eclipse.m2m.qvt.oml.debug.core@default:default,org.eclipse.m2m.qvt.oml.debug.ui@default:default,org.eclipse.m2m.qvt.oml.doc@default:default,org.eclipse.m2m.qvt.oml.ecore.imperativeocl@default:default,org.eclipse.m2m.qvt.oml.editor.ui@default:default,org.eclipse.m2m.qvt.oml.emf.util.ui@default:default,org.eclipse.m2m.qvt.oml.emf.util@default:default,org.eclipse.m2m.qvt.oml.ocl@default:default,org.eclipse.m2m.qvt.oml.project@default:default,org.eclipse.m2m.qvt.oml.runtime.ui@default:default,org.eclipse.m2m.qvt.oml.runtime@default:default,org.eclipse.m2m.qvt.oml.samples@default:default,org.eclipse.m2m.qvt.oml.trace.edit@default:default,org.eclipse.m2m.qvt.oml.ui@default:default,org.eclipse.m2m.qvt.oml@default:default,org.eclipse.mat.api@default:default,org.eclipse.mat.dtfj@default:default,org.eclipse.mat.hprof@default:default,org.eclipse.mat.ibmdumps@default:default,org.eclipse.mat.jdt@default:default,org.eclipse.mat.jruby.resolver@default:default,org.eclipse.mat.parser@default:default,org.eclipse.mat.report@default:default,org.eclipse.mat.ui.help@default:default,org.eclipse.mat.ui@default:default,org.eclipse.modisco.doc@default:default,org.eclipse.modisco.infra.discovery.core@default:default,org.eclipse.modisco.infra.discovery.ui@default:default,org.eclipse.modisco.infra.discovery@default:default,org.eclipse.modisco.infra.omg.doc@default:default,org.eclipse.modisco.infrastructure.doc@default:default,org.eclipse.modisco.java.composition.browser.customization@default:default,org.eclipse.modisco.java.composition.discoverer.ui@default:default,org.eclipse.modisco.java.composition.discoverer@default:default,org.eclipse.modisco.java.composition.ui@default:default,org.eclipse.modisco.java.composition@default:default,org.eclipse.modisco.java.discoverer.cdo@default:default,org.eclipse.modisco.java.discoverer.ui@default:default,org.eclipse.modisco.java.discoverer@default:default,org.eclipse.modisco.java.doc@default:default,org.eclipse.modisco.jee.doc@default:default,org.eclipse.modisco.jee.ejbjar.discoverer.ui@default:default,org.eclipse.modisco.jee.ejbjar.discoverer@default:default,org.eclipse.modisco.jee.ejbjar@default:default,org.eclipse.modisco.jee.facet@default:default,org.eclipse.modisco.jee.jsp.browser.customization@default:default,org.eclipse.modisco.jee.jsp.discoverer.ui@default:default,org.eclipse.modisco.jee.jsp.discoverer@default:default,org.eclipse.modisco.jee.jsp.generation@default:default,org.eclipse.modisco.jee.jsp@default:default,org.eclipse.modisco.jee.queries@default:default,org.eclipse.modisco.jee.webapp.discoverer.ui@default:default,org.eclipse.modisco.jee.webapp.discoverer@default:default,org.eclipse.modisco.jee.webapp@default:default,org.eclipse.modisco.jee@default:default,org.eclipse.modisco.kdm.source.discoverer.ui@default:default,org.eclipse.modisco.kdm.source.discoverer@default:default,org.eclipse.modisco.kdm.source.extension.ui.browser@default:default,org.eclipse.modisco.kdm.source.extension.ui@default:default,org.eclipse.modisco.kdm.source.extension@default:default,org.eclipse.modisco.kdm.uml2converter.ui@default:default,org.eclipse.modisco.kdm.uml2converter@default:default,org.eclipse.modisco.omg.gastm@default:default,org.eclipse.modisco.omg.smm@default:default,org.eclipse.modisco.util.atl.core@default:default,org.eclipse.modisco.workflow.core@default:default,org.eclipse.modisco.workflow.ui@default:default,org.eclipse.modisco.workflow@default:default,org.eclipse.modisco.xml.discoverer.ui@default:default,org.eclipse.modisco.xml.discoverer@default:default,org.eclipse.modisco.xml.doc@default:default,org.eclipse.mylyn.bugzilla.core@default:default,org.eclipse.mylyn.bugzilla.ide@default:default,org.eclipse.mylyn.bugzilla.ui@default:default,org.eclipse.mylyn.builds.core@default:default,org.eclipse.mylyn.builds.ui@default:default,org.eclipse.mylyn.commons.core@default:default,org.eclipse.mylyn.commons.identity.core@default:default,org.eclipse.mylyn.commons.identity@default:default,org.eclipse.mylyn.commons.net@default:default,org.eclipse.mylyn.commons.notifications.core@default:default,org.eclipse.mylyn.commons.notifications.feed@default:default,org.eclipse.mylyn.commons.notifications.ui@default:default,org.eclipse.mylyn.commons.notifications@default:default,org.eclipse.mylyn.commons.repositories.core@default:default,org.eclipse.mylyn.commons.repositories.http.core@default:default,org.eclipse.mylyn.commons.repositories.ui@default:default,org.eclipse.mylyn.commons.repositories@default:default,org.eclipse.mylyn.commons.screenshots@default:default,org.eclipse.mylyn.commons.team@default:default,org.eclipse.mylyn.commons.ui@default:default,org.eclipse.mylyn.commons.workbench@default:default,org.eclipse.mylyn.commons.xmlrpc@default:default,org.eclipse.mylyn.context.core@default:default,org.eclipse.mylyn.context.tasks.ui@default:default,org.eclipse.mylyn.context.ui@default:default,org.eclipse.mylyn.discovery.core@default:default,org.eclipse.mylyn.discovery.ui@default:default,org.eclipse.mylyn.gerrit.core@default:default,org.eclipse.mylyn.gerrit.ui@default:default,org.eclipse.mylyn.git.core@default:default,org.eclipse.mylyn.git.ui@default:default,org.eclipse.mylyn.help.ui@default:default,org.eclipse.mylyn.hudson.core@default:default,org.eclipse.mylyn.hudson.ui@default:default,org.eclipse.mylyn.ide.ant@default:default,org.eclipse.mylyn.ide.ui@default:default,org.eclipse.mylyn.java.tasks@default:default,org.eclipse.mylyn.java.ui@default:default,org.eclipse.mylyn.monitor.core@default:default,org.eclipse.mylyn.monitor.ui@default:default,org.eclipse.mylyn.pde.ui@default:default,org.eclipse.mylyn.resources.ui@default:default,org.eclipse.mylyn.reviews.core@default:default,org.eclipse.mylyn.reviews.ui@default:default,org.eclipse.mylyn.tasks.bugs@default:default,org.eclipse.mylyn.tasks.core@default:default,org.eclipse.mylyn.tasks.index.core@default:default,org.eclipse.mylyn.tasks.index.ui@default:default,org.eclipse.mylyn.tasks.search@default:default,org.eclipse.mylyn.tasks.ui@default:default,org.eclipse.mylyn.team.cvs@default:default,org.eclipse.mylyn.team.ui@default:default,org.eclipse.mylyn.versions.core@default:default,org.eclipse.mylyn.versions.ui@default:default,org.eclipse.mylyn.wikitext.confluence.core@default:default,org.eclipse.mylyn.wikitext.confluence.ui@default:default,org.eclipse.mylyn.wikitext.core@default:default,org.eclipse.mylyn.wikitext.help.ui@default:default,org.eclipse.mylyn.wikitext.mediawiki.core@default:default,org.eclipse.mylyn.wikitext.mediawiki.ui@default:default,org.eclipse.mylyn.wikitext.tasks.ui@default:default,org.eclipse.mylyn.wikitext.textile.core@default:default,org.eclipse.mylyn.wikitext.textile.ui@default:default,org.eclipse.mylyn.wikitext.tracwiki.core@default:default,org.eclipse.mylyn.wikitext.tracwiki.ui@default:default,org.eclipse.mylyn.wikitext.twiki.core@default:default,org.eclipse.mylyn.wikitext.twiki.ui@default:default,org.eclipse.mylyn.wikitext.ui@default:default,org.eclipse.net4j.db@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default,org.eclipse.ocl.common.ui@default:default,org.eclipse.ocl.common@default:default,org.eclipse.ocl.doc@default:default,org.eclipse.ocl.ecore.edit@default:default,org.eclipse.ocl.ecore@default:default,org.eclipse.ocl.edit@default:default,org.eclipse.ocl.examples.codegen@default:default,org.eclipse.ocl.examples.common@default:default,org.eclipse.ocl.examples.domain@default:default,org.eclipse.ocl.examples.eventmanager@default:default,org.eclipse.ocl.examples.impactanalyzer.ui@default:default,org.eclipse.ocl.examples.impactanalyzer.util@default:default,org.eclipse.ocl.examples.impactanalyzer@default:default,org.eclipse.ocl.examples.interpreter@default:default,org.eclipse.ocl.examples.library@default:default,org.eclipse.ocl.examples.modelregistry.edit@default:default,org.eclipse.ocl.examples.modelregistry.editor@default:default,org.eclipse.ocl.examples.modelregistry.ui@default:default,org.eclipse.ocl.examples.modelregistry@default:default,org.eclipse.ocl.examples.pivot@default:default,org.eclipse.ocl.examples.ui@default:default,org.eclipse.ocl.examples.xtext.base@default:default,org.eclipse.ocl.examples.xtext.completeocl.ui@default:default,org.eclipse.ocl.examples.xtext.completeocl@default:default,org.eclipse.ocl.examples.xtext.console@default:default,org.eclipse.ocl.examples.xtext.essentialocl.ui@default:default,org.eclipse.ocl.examples.xtext.essentialocl@default:default,org.eclipse.ocl.examples.xtext.markup.ui@default:default,org.eclipse.ocl.examples.xtext.markup@default:default,org.eclipse.ocl.examples.xtext.oclinecore.ui@default:default,org.eclipse.ocl.examples.xtext.oclinecore@default:default,org.eclipse.ocl.examples.xtext.oclstdlib.ui@default:default,org.eclipse.ocl.examples.xtext.oclstdlib@default:default,org.eclipse.ocl.examples@default:default,org.eclipse.ocl.ui@default:default,org.eclipse.ocl.uml.edit@default:default,org.eclipse.ocl.uml.ui@default:default,org.eclipse.ocl.uml@default:default,org.eclipse.ocl@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.pde.api.tools.ui@default:default,org.eclipse.pde.api.tools@default:default,org.eclipse.pde.build@default:default,org.eclipse.pde.core@default:default,org.eclipse.pde.doc.user@default:default,org.eclipse.pde.ds.core@default:default,org.eclipse.pde.ds.ui@default:default,org.eclipse.pde.junit.runtime@default:default,org.eclipse.pde.launching@default:default,org.eclipse.pde.runtime@default:default,org.eclipse.pde.ua.core@default:default,org.eclipse.pde.ua.ui@default:default,org.eclipse.pde.ui.templates@default:default,org.eclipse.pde.ui@default:default,org.eclipse.pde@default:default,org.eclipse.php.core.parser@default:default,org.eclipse.php.core@default:default,org.eclipse.php.debug.core@default:default,org.eclipse.php.debug.daemon@default:default,org.eclipse.php.debug.ui@default:default,org.eclipse.php.help@default:default,org.eclipse.php.server.core@default:default,org.eclipse.php.server.ui@default:default,org.eclipse.php.ui@default:default,org.eclipse.php@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.platform@default:default,org.eclipse.rap.help@default:default,org.eclipse.rap.ui.intro@default:default,org.eclipse.rap.ui.launch.rwt@default:default,org.eclipse.rap.ui.launch@default:default,org.eclipse.rap.ui.templates@default:default,org.eclipse.rcp@default:default,org.eclipse.recommenders.aether@default:default,org.eclipse.recommenders.completion.rcp.calls@default:default,org.eclipse.recommenders.completion.rcp.chain@default:default,org.eclipse.recommenders.completion.rcp.e38@default:false,org.eclipse.recommenders.completion.rcp.overrides@default:default,org.eclipse.recommenders.completion.rcp.subwords@default:default,org.eclipse.recommenders.completion.rcp.templates@default:default,org.eclipse.recommenders.completion.rcp@default:default,org.eclipse.recommenders.doc@default:default,org.eclipse.recommenders.extdoc.rcp@default:default,org.eclipse.recommenders.extdoc@default:default,org.eclipse.recommenders.injection@default:default,org.eclipse.recommenders.jayes.serialization@default:default,org.eclipse.recommenders.jayes@default:default,org.eclipse.recommenders.rcp@default:default,org.eclipse.recommenders.utils.rcp@default:default,org.eclipse.recommenders.utils@default:default,org.eclipse.sdk@default:default,org.eclipse.search@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.cvs.core@default:default,org.eclipse.team.cvs.ssh2@default:default,org.eclipse.team.cvs.ui@default:default,org.eclipse.team.svn.core@default:default,org.eclipse.team.svn.ui@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.browser@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.console@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.externaltools@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.trace@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.uml2.codegen.ecore.ui@default:default,org.eclipse.uml2.codegen.ecore@default:default,org.eclipse.uml2.common.edit@default:default,org.eclipse.uml2.common@default:default,org.eclipse.uml2.doc@default:default,org.eclipse.uml2.examples.uml.ui@default:default,org.eclipse.uml2.examples@default:default,org.eclipse.uml2.types@default:default,org.eclipse.uml2.uml.ecore.exporter@default:default,org.eclipse.uml2.uml.ecore.importer@default:default,org.eclipse.uml2.uml.edit@default:default,org.eclipse.uml2.uml.editor@default:default,org.eclipse.uml2.uml.profile.l2@default:default,org.eclipse.uml2.uml.profile.l3@default:default,org.eclipse.uml2.uml.resources@default:default,org.eclipse.uml2.uml@default:default,org.eclipse.uml2@default:default,org.eclipse.update.configurator@3:true,org.eclipse.viatra2.core2@default:default,org.eclipse.viatra2.editor.text@default:default,org.eclipse.viatra2.editor@default:default,org.eclipse.viatra2.emf.importer.generic.exporter@default:default,org.eclipse.viatra2.emf.importer.generic@default:default,org.eclipse.viatra2.emf.incquery.codegen.gtasm@default:default,org.eclipse.viatra2.emf.incquery.codegen.patternmatcher@default:default,org.eclipse.viatra2.emf.incquery.codegen.term@default:default,org.eclipse.viatra2.emf.incquery.core@default:default,org.eclipse.viatra2.emf.incquery.gui@default:default,org.eclipse.viatra2.emf.incquery.model.edit@default:default,org.eclipse.viatra2.emf.incquery.model.editor@default:default,org.eclipse.viatra2.emf.incquery.model@default:default,org.eclipse.viatra2.emf.incquery.runtime@default:default,org.eclipse.viatra2.gtasm.interpreter.impl@default:default,org.eclipse.viatra2.gtasm.interpreter.term@default:default,org.eclipse.viatra2.gtasm.interpreter@default:default,org.eclipse.viatra2.gtasm.model.edit@default:default,org.eclipse.viatra2.gtasm.model@default:default,org.eclipse.viatra2.gtasm.patternmatcher.impl@default:default,org.eclipse.viatra2.gtasm.patternmatcher.incremental.rete@default:default,org.eclipse.viatra2.gtasm.patternmatcher.incremental@default:default,org.eclipse.viatra2.gtasm.patternmatcher@default:default,org.eclipse.viatra2.gtasm.support@default:default,org.eclipse.viatra2.gtasm.trigger@default:default,org.eclipse.viatra2.gtasm.typing.model@default:default,org.eclipse.viatra2.gui@default:default,org.eclipse.viatra2.help.wiki@default:default,org.eclipse.viatra2.help@default:default,org.eclipse.viatra2.imports.uml2.galileo@default:default,org.eclipse.viatra2.imports.vtml@default:default,org.eclipse.viatra2.loaders.vtcl_lpgparser@default:default,org.eclipse.viatra2.natives.strings@default:default,org.eclipse.wb.core.databinding@default:default,org.eclipse.wb.core.lib@default:default,org.eclipse.wb.core.ui@default:default,org.eclipse.wb.core@default:default,org.eclipse.wb.discovery.core@default:default,org.eclipse.wb.discovery.ui@default:default,org.eclipse.wb.layout.group@default:default,org.eclipse.wb.os.win32@default:default,org.eclipse.wb.os@default:default,org.eclipse.wb.rcp.databinding.emf@default:default,org.eclipse.wb.rcp.databinding@default:default,org.eclipse.wb.rcp.nebula@default:default,org.eclipse.wb.rcp.swing2swt@default:default,org.eclipse.wb.rcp@default:default,org.eclipse.wb.runtime.lib@default:default,org.eclipse.wb.runtime@default:default,org.eclipse.wb.swt.widgets.baseline@default:default,org.eclipse.wb.swt@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.wst.common.frameworks.ui@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.wst.common.infopop@default:default,org.eclipse.wst.common.modulecore.ui@default:default,org.eclipse.wst.common.modulecore@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.wst.common.snippets@default:default,org.eclipse.wst.common.ui@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.wst.css.core@default:default,org.eclipse.wst.css.ui@default:default,org.eclipse.wst.dtd.core@default:default,org.eclipse.wst.dtd.ui.infopop@default:default,org.eclipse.wst.dtd.ui@default:default,org.eclipse.wst.dtdeditor.doc.user@default:default,org.eclipse.wst.html.core@default:default,org.eclipse.wst.html.ui@default:default,org.eclipse.wst.internet.cache@default:default,org.eclipse.wst.jsdt.core@default:default,org.eclipse.wst.jsdt.manipulation@default:default,org.eclipse.wst.jsdt.ui@default:default,org.eclipse.wst.jsdt.web.core@default:default,org.eclipse.wst.jsdt.web.ui@default:default,org.eclipse.wst.server.core@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.sse.doc.user@default:default,org.eclipse.wst.sse.ui.infopop@default:default,org.eclipse.wst.sse.ui@default:default,org.eclipse.wst.standard.schemas@default:default,org.eclipse.wst.validation.infopop@default:default,org.eclipse.wst.validation.ui@default:default,org.eclipse.wst.validation@default:default,org.eclipse.wst.web@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.wst.xml.ui.infopop@default:default,org.eclipse.wst.xml.ui@default:default,org.eclipse.wst.xmleditor.doc.user@default:default,org.eclipse.wst.xsd.core@default:default,org.eclipse.wst.xsd.ui@default:default,org.eclipse.wst.xsdeditor.doc.user@default:default,org.eclipse.xpand.activities@default:default,org.eclipse.xpand.doc@default:default,org.eclipse.xpand.examples@default:default,org.eclipse.xpand.incremental@default:default,org.eclipse.xpand.ui@default:default,org.eclipse.xpand@default:default,org.eclipse.xsd.edit@default:default,org.eclipse.xsd@default:default,org.eclipse.xtend.check.ui@default:default,org.eclipse.xtend.core@default:default,org.eclipse.xtend.doc@default:default,org.eclipse.xtend.examples@default:default,org.eclipse.xtend.ide@default:default,org.eclipse.xtend.lib@default:default,org.eclipse.xtend.profiler@default:default,org.eclipse.xtend.shared.ui@default:default,org.eclipse.xtend.typesystem.emf.ui@default:default,org.eclipse.xtend.typesystem.emf@default:default,org.eclipse.xtend.typesystem.uml2.ui@default:default,org.eclipse.xtend.typesystem.uml2@default:default,org.eclipse.xtend.typesystem.xsd.ui@default:default,org.eclipse.xtend.typesystem.xsd@default:default,org.eclipse.xtend.ui@default:default,org.eclipse.xtend.util.stdlib@default:default,org.eclipse.xtend2.lib@default:default,org.eclipse.xtend@default:default,org.eclipse.xtext.activities@default:default,org.eclipse.xtext.builder@default:default,org.eclipse.xtext.common.types.edit@default:default,org.eclipse.xtext.common.types.shared.jdt38@default:false,org.eclipse.xtext.common.types.shared@default:default,org.eclipse.xtext.common.types.ui@default:default,org.eclipse.xtext.common.types@default:default,org.eclipse.xtext.doc@default:default,org.eclipse.xtext.ecore@default:default,org.eclipse.xtext.generator@default:default,org.eclipse.xtext.gmf.glue@default:default,org.eclipse.xtext.junit4@default:default,org.eclipse.xtext.junit@default:default,org.eclipse.xtext.logging@default:false,org.eclipse.xtext.purexbase.ui@default:default,org.eclipse.xtext.purexbase@default:default,org.eclipse.xtext.smap@default:default,org.eclipse.xtext.ui.codetemplates.ui@default:default,org.eclipse.xtext.ui.codetemplates@default:default,org.eclipse.xtext.ui.ecore@default:default,org.eclipse.xtext.ui.junit@default:default,org.eclipse.xtext.ui.shared@default:default,org.eclipse.xtext.ui@default:default,org.eclipse.xtext.util@default:default,org.eclipse.xtext.xbase.junit@default:default,org.eclipse.xtext.xbase.lib@default:default,org.eclipse.xtext.xbase.ui@default:default,org.eclipse.xtext.xbase@default:default,org.eclipse.xtext.xtend@default:default,org.eclipse.xtext.xtext.ui.examples@default:default,org.eclipse.xtext.xtext.ui.graph@default:default,org.eclipse.xtext.xtext.ui@default:default,org.eclipse.xtext@default:default,org.eclipse.zest.core@default:default,org.eclipse.zest.layouts@default:default,org.h2@default:default,org.hamcrest.core@default:default,org.jacoco.agent@default:default,org.jacoco.core@default:default,org.jacoco.report@default:default,org.jboss.netty@default:default,org.jdom@default:default,org.jsoup@default:default,org.junit*3.8.2.v3_8_2_v20100427-1100@default:default,org.junit*4.10.0.v4_10_0_v20120426-0900@default:default,org.junit4@default:default,org.kohsuke.args4j@default:default,org.mortbay.jetty.util@default:default,org.objectweb.asm@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.slf4j.api@default:default,org.slf4j.jcl@default:default,org.tigris.subversion.clientadapter.javahl.win64@default:false,org.tigris.subversion.clientadapter.javahl@default:default,org.tigris.subversion.clientadapter@default:default,org.tigris.subversion.subclipse.core@default:default,org.tigris.subversion.subclipse.doc@default:default,org.tigris.subversion.subclipse.tools.usage@default:default,org.tigris.subversion.subclipse.ui@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil*1.0.0.v200806040011@default:default,org.w3c.dom.smil*1.0.1.v200903091627@default:default,org.w3c.dom.svg@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="garbage_collector@default:default,metrics@default:default,org.eclipse.epf.common.html@default:default,org.eclipse.epf.common.ui@default:default,org.eclipse.epf.common.win32.win32.x86_64@default:default,org.eclipse.epf.common@default:default,org.eclipse.epf.richtext@default:default,org.eclipse.papyrus.codegen@default:default,org.eclipse.papyrus.customization.palette.properties@default:default,org.eclipse.papyrus.customization.palette@default:default,org.eclipse.papyrus.customization.paletteconfiguration@default:default,org.eclipse.papyrus.customization.properties.generation@default:default,org.eclipse.papyrus.customization.properties.model.xwt@default:default,org.eclipse.papyrus.customization.properties.tests@default:default,org.eclipse.papyrus.customization.properties@default:default,org.eclipse.papyrus.customization@default:default,org.eclipse.papyrus.def@default:default,org.eclipse.papyrus.dev.java.utils@default:default,org.eclipse.papyrus.diagramdev.modelexplorer@default:default,org.eclipse.papyrus.diagramtemplate.doc@default:default,org.eclipse.papyrus.diagramtemplate.edit@default:default,org.eclipse.papyrus.diagramtemplate.editor@default:default,org.eclipse.papyrus.diagramtemplate@default:default,org.eclipse.papyrus.doc@default:default,org.eclipse.papyrus.documentation.plugin@default:default,org.eclipse.papyrus.domaincodegen.ui@default:default,org.eclipse.papyrus.domaincontextcodegen.edit@default:default,org.eclipse.papyrus.domaincontextcodegen.editor@default:default,org.eclipse.papyrus.domaincontextcodegen@default:default,org.eclipse.papyrus.eclipse.project.editors@default:default,org.eclipse.papyrus.editor.perspectiveconfiguration@default:default,org.eclipse.papyrus.editor@default:default,org.eclipse.papyrus.emf.commandstack@default:default,org.eclipse.papyrus.example.text.instance@default:default,org.eclipse.papyrus.example.uml.comment.editor.newresource@default:default,org.eclipse.papyrus.extensionpoints.editors@default:default,org.eclipse.papyrus.gmfgenextension@default:default,org.eclipse.papyrus.infra.constraints.edit@default:default,org.eclipse.papyrus.infra.constraints.editor@default:default,org.eclipse.papyrus.infra.constraints@default:default,org.eclipse.papyrus.infra.core.log@default:default,org.eclipse.papyrus.infra.core.sasheditor.di@default:default,org.eclipse.papyrus.infra.core.sasheditor@default:default,org.eclipse.papyrus.infra.core@default:default,org.eclipse.papyrus.infra.discovery.ui.menu@default:default,org.eclipse.papyrus.infra.discovery.ui@default:default,org.eclipse.papyrus.infra.discovery@default:default,org.eclipse.papyrus.infra.emf.appearance@default:default,org.eclipse.papyrus.infra.emf.diagram.common@default:default,org.eclipse.papyrus.infra.emf.editor@default:default,org.eclipse.papyrus.infra.emf.embeddededitor@default:default,org.eclipse.papyrus.infra.emf.newchild@default:default,org.eclipse.papyrus.infra.emf.readonly@default:default,org.eclipse.papyrus.infra.emf@default:default,org.eclipse.papyrus.infra.export@default:default,org.eclipse.papyrus.infra.extendedtypes.emf@default:default,org.eclipse.papyrus.infra.extendedtypes@default:default,org.eclipse.papyrus.infra.gmfdiag.commands@default:default,org.eclipse.papyrus.infra.gmfdiag.common@default:default,org.eclipse.papyrus.infra.gmfdiag.css.configuration@default:default,org.eclipse.papyrus.infra.gmfdiag.css.model@default:default,org.eclipse.papyrus.infra.gmfdiag.css.palette@default:default,org.eclipse.papyrus.infra.gmfdiag.css.properties@default:default,org.eclipse.papyrus.infra.gmfdiag.css.theme@default:default,org.eclipse.papyrus.infra.gmfdiag.css.xtext.ui@default:default,org.eclipse.papyrus.infra.gmfdiag.css.xtext@default:default,org.eclipse.papyrus.infra.gmfdiag.css@default:default,org.eclipse.papyrus.infra.gmfdiag.dnd@default:default,org.eclipse.papyrus.infra.gmfdiag.modelexplorer@default:default,org.eclipse.papyrus.infra.gmfdiag.navigation@default:default,org.eclipse.papyrus.infra.gmfdiag.outline@default:default,org.eclipse.papyrus.infra.gmfdiag.preferences@default:default,org.eclipse.papyrus.infra.gmfdiag.properties@default:default,org.eclipse.papyrus.infra.gmfdiag.widgets@default:default,org.eclipse.papyrus.infra.hyperlink@default:default,org.eclipse.papyrus.infra.onefile@default:default,org.eclipse.papyrus.infra.queries.core.configuration.edit@default:default,org.eclipse.papyrus.infra.queries.core.configuration@default:default,org.eclipse.papyrus.infra.queries.core@default:default,org.eclipse.papyrus.infra.services.controlmode.history@default:default,org.eclipse.papyrus.infra.services.controlmode@default:default,org.eclipse.papyrus.infra.services.decoration@default:default,org.eclipse.papyrus.infra.services.edit@default:default,org.eclipse.papyrus.infra.services.markerlistener@default:default,org.eclipse.papyrus.infra.services.resourceloading.preferences@default:default,org.eclipse.papyrus.infra.services.resourceloading@default:default,org.eclipse.papyrus.infra.services.validation@default:default,org.eclipse.papyrus.infra.table.common@default:default,org.eclipse.papyrus.infra.table.instance@default:default,org.eclipse.papyrus.infra.table.menu@default:default,org.eclipse.papyrus.infra.table.modelexplorer@default:default,org.eclipse.papyrus.infra.table.properties@default:default,org.eclipse.papyrus.infra.tools@default:default,org.eclipse.papyrus.infra.ui.resources@default:default,org.eclipse.papyrus.infra.widgets.toolbox@default:default,org.eclipse.papyrus.infra.widgets@default:default,org.eclipse.papyrus.junit.utils@default:default,org.eclipse.papyrus.migration.properties.model@default:default,org.eclipse.papyrus.outline.emftree@default:default,org.eclipse.papyrus.sysml.diagram.blockdefinition@default:default,org.eclipse.papyrus.sysml.diagram.common@default:default,org.eclipse.papyrus.sysml.diagram.internalblock@default:default,org.eclipse.papyrus.sysml.diagram.requirement@default:default,org.eclipse.papyrus.sysml.diagram.ui@default:default,org.eclipse.papyrus.sysml.edit@default:default,org.eclipse.papyrus.sysml.facets@default:default,org.eclipse.papyrus.sysml.modelexplorer@default:default,org.eclipse.papyrus.sysml.properties@default:default,org.eclipse.papyrus.sysml.service.types@default:default,org.eclipse.papyrus.sysml.table.allocation@default:default,org.eclipse.papyrus.sysml.table.requirement@default:default,org.eclipse.papyrus.sysml@default:default,org.eclipse.papyrus.team.svn@default:default,org.eclipse.papyrus.uml.alf.ui@default:default,org.eclipse.papyrus.uml.alf@default:default,org.eclipse.papyrus.uml.appearance@default:default,org.eclipse.papyrus.uml.commands@default:default,org.eclipse.papyrus.uml.controlmode.profile@default:default,org.eclipse.papyrus.uml.diagram.activity@default:default,org.eclipse.papyrus.uml.diagram.clazz@default:default,org.eclipse.papyrus.uml.diagram.common.groups@default:default,org.eclipse.papyrus.uml.diagram.common.palette.customaction@default:default,org.eclipse.papyrus.uml.diagram.common@default:default,org.eclipse.papyrus.uml.diagram.communication@default:default,org.eclipse.papyrus.uml.diagram.component@default:default,org.eclipse.papyrus.uml.diagram.composite@default:default,org.eclipse.papyrus.uml.diagram.deployment@default:default,org.eclipse.papyrus.uml.diagram.dnd@default:default,org.eclipse.papyrus.uml.diagram.emftree@default:default,org.eclipse.papyrus.uml.diagram.icons@default:default,org.eclipse.papyrus.uml.diagram.menu@default:default,org.eclipse.papyrus.uml.diagram.modelexplorer@default:default,org.eclipse.papyrus.uml.diagram.navigation@default:default,org.eclipse.papyrus.uml.diagram.package@default:default,org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit@default:default,org.eclipse.papyrus.uml.diagram.paletteconfiguration@default:default,org.eclipse.papyrus.uml.diagram.profile@default:default,org.eclipse.papyrus.uml.diagram.sequence@default:default,org.eclipse.papyrus.uml.diagram.statemachine@default:default,org.eclipse.papyrus.uml.diagram.usecase@default:default,org.eclipse.papyrus.uml.diagram.wizards@default:default,org.eclipse.papyrus.uml.documentation.profile@default:default,org.eclipse.papyrus.uml.documentation@default:default,org.eclipse.papyrus.uml.extensionpoints@default:default,org.eclipse.papyrus.uml.icons@default:default,org.eclipse.papyrus.uml.import@default:default,org.eclipse.papyrus.uml.modelexplorer.widgets@default:default,org.eclipse.papyrus.uml.modelexplorer@default:default,org.eclipse.papyrus.uml.oclconstraintevaluation@default:default,org.eclipse.papyrus.uml.pastemanager@default:default,org.eclipse.papyrus.uml.perspective@default:default,org.eclipse.papyrus.uml.profile@default:default,org.eclipse.papyrus.uml.properties.tabbedproperties.comments@default:default,org.eclipse.papyrus.uml.properties@default:default,org.eclipse.papyrus.uml.resourceloading.profile@default:default,org.eclipse.papyrus.uml.service.types@default:default,org.eclipse.papyrus.uml.standard.edit@default:default,org.eclipse.papyrus.uml.standard@default:default,org.eclipse.papyrus.uml.table.default@default:default,org.eclipse.papyrus.uml.table.widgets.celleditors@default:default,org.eclipse.papyrus.uml.templaterepository@default:default,org.eclipse.papyrus.uml.textedit.collaborationuse.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.collaborationuse.xtext@default:default,org.eclipse.papyrus.uml.textedit.common.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.common.xtext@default:default,org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext@default:default,org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext@default:default,org.eclipse.papyrus.uml.textedit.message.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.message.xtext@default:default,org.eclipse.papyrus.uml.textedit.parameter.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.parameter.xtext@default:default,org.eclipse.papyrus.uml.textedit.property.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.property.xtext@default:default,org.eclipse.papyrus.uml.textedit.state.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.state.xtext@default:default,org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext@default:default,org.eclipse.papyrus.uml.textedit.transition.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.transition.xtext@default:default,org.eclipse.papyrus.uml.tools.extendedtypes@default:default,org.eclipse.papyrus.uml.tools.utils@default:default,org.eclipse.papyrus.uml.tools@default:default,org.eclipse.papyrus.uml.ui.perspectiveconfiguration@default:default,org.eclipse.papyrus.views.documentation.view.papyrus@default:default,org.eclipse.papyrus.views.documentation.view@default:default,org.eclipse.papyrus.views.documentation@default:default,org.eclipse.papyrus.views.modelexplorer.resourceloading@default:default,org.eclipse.papyrus.views.modelexplorer.widgets@default:default,org.eclipse.papyrus.views.modelexplorer@default:default,org.eclipse.papyrus.views.properties.model.edit@default:default,org.eclipse.papyrus.views.properties.model.editor@default:default,org.eclipse.papyrus.views.properties.model@default:default,org.eclipse.papyrus.views.properties@default:default,org.eclipse.papyrus.xwt@default:default,org.eclipse.xtext.gmf.glue@default:default,skip_error_log@default:default"/>
+<stringAttribute key="selected_target_plugins" value="com.google.guava*10.0.1.v201203051515@default:default,com.google.inject@default:default,com.ibm.icu@default:default,com.jcraft.jsch@default:default,com.sun.el@default:default,com.sun.syndication@default:default,javax.annotation@default:default,javax.el@default:default,javax.inject@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.xml@default:default,lpg.runtime.java@default:default,net.sourceforge.nattable.core@default:default,org.antlr.runtime@default:default,org.apache.ant@default:default,org.apache.batik.bridge@default:default,org.apache.batik.css@default:default,org.apache.batik.dom.svg@default:default,org.apache.batik.dom@default:default,org.apache.batik.ext.awt@default:default,org.apache.batik.parser@default:default,org.apache.batik.pdf@default:default,org.apache.batik.svggen@default:default,org.apache.batik.transcoder@default:default,org.apache.batik.util.gui@default:default,org.apache.batik.util@default:default,org.apache.batik.xml@default:default,org.apache.commons.cli@default:default,org.apache.commons.codec@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.io@default:default,org.apache.commons.lang@default:default,org.apache.commons.logging@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.apache.httpcomponents.httpclient@default:default,org.apache.httpcomponents.httpcore@default:default,org.apache.jasper.glassfish@default:default,org.apache.log4j@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.apache.ws.commons.util@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.apache.xmlrpc@default:default,org.eclipse.ant.core@default:default,org.eclipse.ant.launching@default:default,org.eclipse.ant.ui@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare.win32@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.externaltools@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.debug.core@default:default,org.eclipse.debug.ui@default:default,org.eclipse.draw2d.doc.isv@default:default,org.eclipse.draw2d@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.egit.core@default:default,org.eclipse.egit.doc@default:default,org.eclipse.egit.ui@default:default,org.eclipse.egit@default:default,org.eclipse.emf.ant@default:default,org.eclipse.emf.cheatsheets@default:default,org.eclipse.emf.codegen.ecore.ui@default:default,org.eclipse.emf.codegen.ecore@default:default,org.eclipse.emf.codegen.ui@default:default,org.eclipse.emf.codegen@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.compare@default:default,org.eclipse.emf.converter@default:default,org.eclipse.emf.databinding.edit@default:default,org.eclipse.emf.databinding@default:default,org.eclipse.emf.doc@default:default,org.eclipse.emf.ecore.change.edit@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.editor@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.emf.example.installer@default:default,org.eclipse.emf.exporter@default:default,org.eclipse.emf.facet.common.core@default:default,org.eclipse.emf.facet.common.ui@default:default,org.eclipse.emf.facet.custom.core@default:default,org.eclipse.emf.facet.custom.metamodel@default:default,org.eclipse.emf.facet.custom.ui@default:default,org.eclipse.emf.facet.efacet.catalog@default:default,org.eclipse.emf.facet.efacet.core@default:default,org.eclipse.emf.facet.efacet.metamodel@default:default,org.eclipse.emf.facet.efacet.ui@default:default,org.eclipse.emf.facet.efacet@default:default,org.eclipse.emf.facet.infra.browser.custom.core@default:default,org.eclipse.emf.facet.infra.browser.custom.edit@default:default,org.eclipse.emf.facet.infra.browser.custom.ui@default:default,org.eclipse.emf.facet.infra.browser.custom@default:default,org.eclipse.emf.facet.infra.browser.uicore@default:default,org.eclipse.emf.facet.infra.browser@default:default,org.eclipse.emf.facet.infra.common.core@default:default,org.eclipse.emf.facet.infra.common.ui@default:default,org.eclipse.emf.facet.infra.facet.core@default:default,org.eclipse.emf.facet.infra.facet.edit@default:default,org.eclipse.emf.facet.infra.facet.editor@default:default,org.eclipse.emf.facet.infra.facet.ui@default:default,org.eclipse.emf.facet.infra.facet@default:default,org.eclipse.emf.facet.infra.query.core@default:default,org.eclipse.emf.facet.infra.query.edit@default:default,org.eclipse.emf.facet.infra.query.editor@default:default,org.eclipse.emf.facet.infra.query.ui@default:default,org.eclipse.emf.facet.infra.query@default:default,org.eclipse.emf.facet.query.java.core@default:default,org.eclipse.emf.facet.query.java.metamodel@default:default,org.eclipse.emf.facet.query.java@default:default,org.eclipse.emf.facet.util.core@default:default,org.eclipse.emf.facet.util.emf.catalog@default:default,org.eclipse.emf.facet.util.emf.core@default:default,org.eclipse.emf.facet.util.emf.ui@default:default,org.eclipse.emf.facet.util.ui@default:default,org.eclipse.emf.facet.widgets.celleditors.ecore@default:default,org.eclipse.emf.facet.widgets.celleditors.edit@default:default,org.eclipse.emf.facet.widgets.celleditors@default:default,org.eclipse.emf.facet.widgets.nattable.instance.edit@default:default,org.eclipse.emf.facet.widgets.nattable.instance@default:default,org.eclipse.emf.facet.widgets.nattable.tableconfiguration.edit@default:default,org.eclipse.emf.facet.widgets.nattable.tableconfiguration@default:default,org.eclipse.emf.facet.widgets.nattable@default:default,org.eclipse.emf.facet.widgets.table.metamodel@default:default,org.eclipse.emf.facet.widgets@default:default,org.eclipse.emf.importer.ecore@default:default,org.eclipse.emf.importer.java@default:default,org.eclipse.emf.importer.rose@default:default,org.eclipse.emf.importer@default:default,org.eclipse.emf.mapping.ecore.editor@default:default,org.eclipse.emf.mapping.ecore2ecore.editor@default:default,org.eclipse.emf.mapping.ecore2ecore@default:default,org.eclipse.emf.mapping.ecore2xml.ui@default:default,org.eclipse.emf.mapping.ecore2xml@default:default,org.eclipse.emf.mapping.ecore@default:default,org.eclipse.emf.mapping.ui@default:default,org.eclipse.emf.mapping@default:default,org.eclipse.emf.mwe.core@default:default,org.eclipse.emf.mwe.ui@default:default,org.eclipse.emf.mwe.utils@default:default,org.eclipse.emf.mwe2.language.ui@default:default,org.eclipse.emf.mwe2.language@default:default,org.eclipse.emf.mwe2.launch@default:default,org.eclipse.emf.mwe2.lib@default:default,org.eclipse.emf.mwe2.runtime@default:default,org.eclipse.emf.transaction.doc@default:default,org.eclipse.emf.transaction.examples@default:default,org.eclipse.emf.transaction.ui@default:default,org.eclipse.emf.transaction@default:default,org.eclipse.emf.validation.doc@default:default,org.eclipse.emf.validation.examples@default:default,org.eclipse.emf.validation.ocl@default:default,org.eclipse.emf.validation.ui.ide@default:default,org.eclipse.emf.validation.ui@default:default,org.eclipse.emf.validation@default:default,org.eclipse.emf.workspace.doc@default:default,org.eclipse.emf.workspace.ui@default:default,org.eclipse.emf.workspace@default:default,org.eclipse.emf@default:default,org.eclipse.epp.mpc.core@default:default,org.eclipse.epp.mpc.help.ui@default:default,org.eclipse.epp.mpc.ui@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.console@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.discovery.compatibility@default:default,org.eclipse.equinox.p2.discovery@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.publisher.eclipse@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.transport.ecf@default:default,org.eclipse.equinox.p2.ui.discovery@default:default,org.eclipse.equinox.p2.ui.importexport@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.gef.doc.isv@default:default,org.eclipse.gef.examples.ui.pde@default:default,org.eclipse.gef@default:default,org.eclipse.gmf.bridge.trace@default:default,org.eclipse.gmf.bridge.ui.dashboard@default:default,org.eclipse.gmf.bridge.ui@default:default,org.eclipse.gmf.bridge@default:default,org.eclipse.gmf.codegen.edit@default:default,org.eclipse.gmf.codegen.ui@default:default,org.eclipse.gmf.codegen@default:default,org.eclipse.gmf.common@default:default,org.eclipse.gmf.ecore.editor@default:default,org.eclipse.gmf.examples.runtime.ui.pde@default:default,org.eclipse.gmf.graphdef.codegen.ui@default:default,org.eclipse.gmf.graphdef.codegen@default:default,org.eclipse.gmf.graphdef.edit@default:default,org.eclipse.gmf.graphdef@default:default,org.eclipse.gmf.map.edit@default:default,org.eclipse.gmf.map@default:default,org.eclipse.gmf.runtime.common.core@default:default,org.eclipse.gmf.runtime.common.ui.action.ide@default:default,org.eclipse.gmf.runtime.common.ui.action@default:default,org.eclipse.gmf.runtime.common.ui.printing.win32@default:false,org.eclipse.gmf.runtime.common.ui.printing@default:default,org.eclipse.gmf.runtime.common.ui.services.action@default:default,org.eclipse.gmf.runtime.common.ui.services.dnd.ide@default:default,org.eclipse.gmf.runtime.common.ui.services.dnd@default:default,org.eclipse.gmf.runtime.common.ui.services.properties@default:default,org.eclipse.gmf.runtime.common.ui.services@default:default,org.eclipse.gmf.runtime.common.ui@default:default,org.eclipse.gmf.runtime.diagram.core@default:default,org.eclipse.gmf.runtime.diagram.ui.actions@default:default,org.eclipse.gmf.runtime.diagram.ui.dnd@default:default,org.eclipse.gmf.runtime.diagram.ui.geoshapes@default:default,org.eclipse.gmf.runtime.diagram.ui.printing.render@default:default,org.eclipse.gmf.runtime.diagram.ui.printing@default:default,org.eclipse.gmf.runtime.diagram.ui.properties@default:default,org.eclipse.gmf.runtime.diagram.ui.providers.ide@default:default,org.eclipse.gmf.runtime.diagram.ui.providers@default:default,org.eclipse.gmf.runtime.diagram.ui.render@default:default,org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide@default:default,org.eclipse.gmf.runtime.diagram.ui.resources.editor@default:default,org.eclipse.gmf.runtime.diagram.ui@default:default,org.eclipse.gmf.runtime.draw2d.ui.render.awt@default:default,org.eclipse.gmf.runtime.draw2d.ui.render@default:default,org.eclipse.gmf.runtime.draw2d.ui@default:default,org.eclipse.gmf.runtime.emf.clipboard.core@default:default,org.eclipse.gmf.runtime.emf.commands.core@default:default,org.eclipse.gmf.runtime.emf.core@default:default,org.eclipse.gmf.runtime.emf.type.core@default:default,org.eclipse.gmf.runtime.emf.type.ui@default:default,org.eclipse.gmf.runtime.emf.ui.properties@default:default,org.eclipse.gmf.runtime.emf.ui@default:default,org.eclipse.gmf.runtime.gef.ui@default:default,org.eclipse.gmf.runtime.notation.edit@default:default,org.eclipse.gmf.runtime.notation.providers@default:default,org.eclipse.gmf.runtime.notation.sdk@default:default,org.eclipse.gmf.runtime.notation@default:default,org.eclipse.gmf.runtime.sdk@default:default,org.eclipse.gmf.tooldef.edit@default:default,org.eclipse.gmf.tooldef@default:default,org.eclipse.gmf.tooling@default:default,org.eclipse.gmf.validate@default:default,org.eclipse.gmf.xpand.editor@default:default,org.eclipse.gmf.xpand.qvtlibrary@default:default,org.eclipse.gmf.xpand@default:default,org.eclipse.gmf@default:default,org.eclipse.gmt.modisco.infra.common.core@default:default,org.eclipse.gmt.modisco.infra.common.ui@default:default,org.eclipse.gmt.modisco.infra.discoverymanager@default:default,org.eclipse.gmt.modisco.xml.discoverer@default:default,org.eclipse.gmt.modisco.xml@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help.webapp@default:default,org.eclipse.help@default:default,org.eclipse.jdt.annotation@default:default,org.eclipse.jdt.apt.core@default:default,org.eclipse.jdt.apt.pluggable.core@default:default,org.eclipse.jdt.apt.ui@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.jdt.core@default:default,org.eclipse.jdt.debug.ui@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.jdt.doc.user@default:default,org.eclipse.jdt.junit.core@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.jdt.junit4.runtime@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.jdt@default:default,org.eclipse.jem.util@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.jgit@default:default,org.eclipse.jsch.core@default:default,org.eclipse.jsch.ui@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.m2m.qvt.oml.common.ui@default:default,org.eclipse.m2m.qvt.oml.common@default:default,org.eclipse.m2m.qvt.oml.cst.parser@default:default,org.eclipse.m2m.qvt.oml.debug.core@default:default,org.eclipse.m2m.qvt.oml.debug.ui@default:default,org.eclipse.m2m.qvt.oml.doc@default:default,org.eclipse.m2m.qvt.oml.ecore.imperativeocl@default:default,org.eclipse.m2m.qvt.oml.editor.ui@default:default,org.eclipse.m2m.qvt.oml.emf.util.ui@default:default,org.eclipse.m2m.qvt.oml.emf.util@default:default,org.eclipse.m2m.qvt.oml.ocl@default:default,org.eclipse.m2m.qvt.oml.project@default:default,org.eclipse.m2m.qvt.oml.runtime.ui@default:default,org.eclipse.m2m.qvt.oml.runtime@default:default,org.eclipse.m2m.qvt.oml.samples@default:default,org.eclipse.m2m.qvt.oml.trace.edit@default:default,org.eclipse.m2m.qvt.oml.ui@default:default,org.eclipse.m2m.qvt.oml@default:default,org.eclipse.modisco.infra.discovery.core@default:default,org.eclipse.modisco.infra.discovery.ui@default:default,org.eclipse.modisco.infra.discovery@default:default,org.eclipse.modisco.xml.discoverer@default:default,org.eclipse.mylyn.bugzilla.core@default:default,org.eclipse.mylyn.bugzilla.ui@default:default,org.eclipse.mylyn.commons.core@default:default,org.eclipse.mylyn.commons.identity.core@default:default,org.eclipse.mylyn.commons.net@default:default,org.eclipse.mylyn.commons.notifications.core@default:default,org.eclipse.mylyn.commons.notifications.feed@default:default,org.eclipse.mylyn.commons.notifications.ui@default:default,org.eclipse.mylyn.commons.repositories.core@default:default,org.eclipse.mylyn.commons.repositories.ui@default:default,org.eclipse.mylyn.commons.screenshots@default:default,org.eclipse.mylyn.commons.ui@default:default,org.eclipse.mylyn.commons.workbench@default:default,org.eclipse.mylyn.commons.xmlrpc@default:default,org.eclipse.mylyn.context.core@default:default,org.eclipse.mylyn.context.ui@default:default,org.eclipse.mylyn.discovery.core@default:default,org.eclipse.mylyn.discovery.ui@default:default,org.eclipse.mylyn.git.core@default:default,org.eclipse.mylyn.git.ui@default:default,org.eclipse.mylyn.monitor.core@default:default,org.eclipse.mylyn.monitor.ui@default:default,org.eclipse.mylyn.tasks.core@default:default,org.eclipse.mylyn.tasks.index.core@default:default,org.eclipse.mylyn.tasks.index.ui@default:default,org.eclipse.mylyn.tasks.search@default:default,org.eclipse.mylyn.tasks.ui@default:default,org.eclipse.mylyn.versions.core@default:default,org.eclipse.mylyn.versions.ui@default:default,org.eclipse.mylyn.wikitext.confluence.core@default:default,org.eclipse.mylyn.wikitext.confluence.ui@default:default,org.eclipse.mylyn.wikitext.core@default:default,org.eclipse.mylyn.wikitext.help.ui@default:default,org.eclipse.mylyn.wikitext.mediawiki.core@default:default,org.eclipse.mylyn.wikitext.mediawiki.ui@default:default,org.eclipse.mylyn.wikitext.tasks.ui@default:default,org.eclipse.mylyn.wikitext.textile.core@default:default,org.eclipse.mylyn.wikitext.textile.ui@default:default,org.eclipse.mylyn.wikitext.tracwiki.core@default:default,org.eclipse.mylyn.wikitext.tracwiki.ui@default:default,org.eclipse.mylyn.wikitext.twiki.core@default:default,org.eclipse.mylyn.wikitext.twiki.ui@default:default,org.eclipse.mylyn.wikitext.ui@default:default,org.eclipse.ocl.common.ui@default:default,org.eclipse.ocl.common@default:default,org.eclipse.ocl.ecore@default:default,org.eclipse.ocl.examples.common@default:default,org.eclipse.ocl.examples.domain@default:default,org.eclipse.ocl.examples.library@default:default,org.eclipse.ocl.examples.pivot@default:default,org.eclipse.ocl.examples.xtext.base@default:default,org.eclipse.ocl.examples.xtext.console@default:default,org.eclipse.ocl.examples.xtext.essentialocl.ui@default:default,org.eclipse.ocl.examples.xtext.essentialocl@default:default,org.eclipse.ocl.examples.xtext.markup.ui@default:default,org.eclipse.ocl.examples.xtext.markup@default:default,org.eclipse.ocl.uml@default:default,org.eclipse.ocl@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.pde.api.tools.ui@default:default,org.eclipse.pde.api.tools@default:default,org.eclipse.pde.build@default:default,org.eclipse.pde.core@default:default,org.eclipse.pde.doc.user@default:default,org.eclipse.pde.ds.core@default:default,org.eclipse.pde.ds.ui@default:default,org.eclipse.pde.junit.runtime@default:default,org.eclipse.pde.launching@default:default,org.eclipse.pde.runtime@default:default,org.eclipse.pde.ua.core@default:default,org.eclipse.pde.ua.ui@default:default,org.eclipse.pde.ui.templates@default:default,org.eclipse.pde.ui@default:default,org.eclipse.pde@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.platform@default:default,org.eclipse.rcp@default:default,org.eclipse.search@default:default,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.svn.core@default:default,org.eclipse.team.svn.ui@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.browser@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.console@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.externaltools@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.trace@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.uml2.codegen.ecore.ui@default:default,org.eclipse.uml2.codegen.ecore@default:default,org.eclipse.uml2.common.edit@default:default,org.eclipse.uml2.common@default:default,org.eclipse.uml2.doc@default:default,org.eclipse.uml2.examples.uml.ui@default:default,org.eclipse.uml2.examples@default:default,org.eclipse.uml2.types@default:default,org.eclipse.uml2.uml.ecore.exporter@default:default,org.eclipse.uml2.uml.ecore.importer@default:default,org.eclipse.uml2.uml.edit@default:default,org.eclipse.uml2.uml.editor@default:default,org.eclipse.uml2.uml.profile.l2@default:default,org.eclipse.uml2.uml.profile.l3@default:default,org.eclipse.uml2.uml.resources@default:default,org.eclipse.uml2.uml@default:default,org.eclipse.uml2@default:default,org.eclipse.update.configurator@3:true,org.eclipse.wst.common.core@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.wst.common.frameworks.ui@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.wst.common.infopop@default:default,org.eclipse.wst.common.modulecore.ui@default:default,org.eclipse.wst.common.modulecore@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.wst.common.snippets@default:default,org.eclipse.wst.common.ui@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.wst.dtd.core@default:default,org.eclipse.wst.dtd.ui.infopop@default:default,org.eclipse.wst.dtd.ui@default:default,org.eclipse.wst.dtdeditor.doc.user@default:default,org.eclipse.wst.internet.cache@default:default,org.eclipse.wst.server.core@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.sse.doc.user@default:default,org.eclipse.wst.sse.ui.infopop@default:default,org.eclipse.wst.sse.ui@default:default,org.eclipse.wst.standard.schemas@default:default,org.eclipse.wst.validation.infopop@default:default,org.eclipse.wst.validation.ui@default:default,org.eclipse.wst.validation@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.wst.xml.ui.infopop@default:default,org.eclipse.wst.xml.ui@default:default,org.eclipse.wst.xmleditor.doc.user@default:default,org.eclipse.wst.xsd.core@default:default,org.eclipse.wst.xsd.ui@default:default,org.eclipse.wst.xsdeditor.doc.user@default:default,org.eclipse.xpand.activities@default:default,org.eclipse.xpand.ui@default:default,org.eclipse.xpand@default:default,org.eclipse.xsd.edit@default:default,org.eclipse.xsd@default:default,org.eclipse.xtend.check.ui@default:default,org.eclipse.xtend.core@default:default,org.eclipse.xtend.ide@default:default,org.eclipse.xtend.lib@default:default,org.eclipse.xtend.profiler@default:default,org.eclipse.xtend.shared.ui@default:default,org.eclipse.xtend.typesystem.emf.ui@default:default,org.eclipse.xtend.typesystem.emf@default:default,org.eclipse.xtend.typesystem.uml2.ui@default:default,org.eclipse.xtend.typesystem.uml2@default:default,org.eclipse.xtend.typesystem.xsd.ui@default:default,org.eclipse.xtend.typesystem.xsd@default:default,org.eclipse.xtend.ui@default:default,org.eclipse.xtend.util.stdlib@default:default,org.eclipse.xtend@default:default,org.eclipse.xtext.activities@default:default,org.eclipse.xtext.builder@default:default,org.eclipse.xtext.common.types.edit@default:default,org.eclipse.xtext.common.types.shared.jdt38@default:false,org.eclipse.xtext.common.types.shared@default:default,org.eclipse.xtext.common.types.ui@default:default,org.eclipse.xtext.common.types@default:default,org.eclipse.xtext.doc@default:default,org.eclipse.xtext.ecore@default:default,org.eclipse.xtext.generator@default:default,org.eclipse.xtext.junit4@default:default,org.eclipse.xtext.junit@default:default,org.eclipse.xtext.logging@default:false,org.eclipse.xtext.purexbase.ui@default:default,org.eclipse.xtext.purexbase@default:default,org.eclipse.xtext.smap@default:default,org.eclipse.xtext.ui.codetemplates.ui@default:default,org.eclipse.xtext.ui.codetemplates@default:default,org.eclipse.xtext.ui.ecore@default:default,org.eclipse.xtext.ui.junit@default:default,org.eclipse.xtext.ui.shared@default:default,org.eclipse.xtext.ui@default:default,org.eclipse.xtext.util@default:default,org.eclipse.xtext.xbase.junit@default:default,org.eclipse.xtext.xbase.lib@default:default,org.eclipse.xtext.xbase.ui@default:default,org.eclipse.xtext.xbase@default:default,org.eclipse.xtext.xtext.ui.graph@default:default,org.eclipse.xtext.xtext.ui@default:default,org.eclipse.xtext@default:default,org.hamcrest.core@default:default,org.jdom@default:default,org.jsoup@default:default,org.junit*3.8.2.v3_8_2_v20100427-1100@default:default,org.objectweb.asm@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil*1.0.0.v200806040011@default:default,org.w3c.dom.smil*1.0.1.v200903091627@default:default,org.w3c.dom.svg@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.papyrus.customization.properties.generation@default:default,org.eclipse.papyrus.customization.properties.tests@default:default,org.eclipse.papyrus.infra.widgets@default:default,org.eclipse.papyrus.junit.utils@default:default,org.eclipse.papyrus.uml.properties@default:default,org.eclipse.papyrus.uml.tools@default:default,org.eclipse.papyrus.views.properties@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
diff --git a/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/resources/profile/model3.profile.di b/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/resources/profile/model3.profile.di
index a5de4f0839d..db51c0f9812 100644
--- a/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/resources/profile/model3.profile.di
+++ b/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/resources/profile/model3.profile.di
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ASCII"?>
+<?xml version="1.0" encoding="UTF-8"?>
<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
<pageList>
<availablePage>
diff --git a/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/resources/profile/model3.profile.notation b/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/resources/profile/model3.profile.notation
index 0e4deeb57d0..0dba8ee24fc 100644
--- a/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/resources/profile/model3.profile.notation
+++ b/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/resources/profile/model3.profile.notation
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_URvJoMD9EeGp8LlPJ4gYgw" type="PapyrusUMLProfileDiagram" name="NewDiagram" measurementUnit="Pixel">
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:l2="http://www.eclipse.org/uml2/4.0.0/UML/Profile/L2" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_URvJoMD9EeGp8LlPJ4gYgw" type="PapyrusUMLProfileDiagram" name="NewDiagram" measurementUnit="Pixel">
<children xmi:type="notation:Shape" xmi:id="_Vi9g8MD9EeGp8LlPJ4gYgw" type="1026">
<children xmi:type="notation:DecorationNode" xmi:id="_Vi9g8sD9EeGp8LlPJ4gYgw" type="1034"/>
<children xmi:type="notation:BasicCompartment" xmi:id="_Vi9g88D9EeGp8LlPJ4gYgw" type="1071">
@@ -20,6 +20,10 @@
<styles xmi:type="notation:FilteringStyle" xmi:id="_Vi9g-8D9EeGp8LlPJ4gYgw"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_Vi9g_MD9EeGp8LlPJ4gYgw"/>
</children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_7PMfoGZQEeOCkJtHBIGqgQ" visible="false" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_7PMfoWZQEeOCkJtHBIGqgQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7PMfomZQEeOCkJtHBIGqgQ"/>
+ </children>
<element xmi:type="uml:Stereotype" href="model3.profile.uml#_Vi0XAMD9EeGp8LlPJ4gYgw"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_Vi9g8cD9EeGp8LlPJ4gYgw" x="755" y="170"/>
</children>
@@ -43,6 +47,10 @@
<styles xmi:type="notation:FilteringStyle" xmi:id="_VvKw-8D9EeGp8LlPJ4gYgw"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_VvKw_MD9EeGp8LlPJ4gYgw"/>
</children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_7TxdoGZQEeOCkJtHBIGqgQ" visible="false" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_7TxdoWZQEeOCkJtHBIGqgQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7TxdomZQEeOCkJtHBIGqgQ"/>
+ </children>
<element xmi:type="uml:Stereotype" href="model3.profile.uml#_VvA_8MD9EeGp8LlPJ4gYgw"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_VvKw8cD9EeGp8LlPJ4gYgw" x="540" y="170"/>
</children>
@@ -66,6 +74,10 @@
<styles xmi:type="notation:FilteringStyle" xmi:id="_WCgju8D9EeGp8LlPJ4gYgw"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_WCgjvMD9EeGp8LlPJ4gYgw"/>
</children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_7T0g8GZQEeOCkJtHBIGqgQ" visible="false" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_7T0g8WZQEeOCkJtHBIGqgQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7T0g8mZQEeOCkJtHBIGqgQ"/>
+ </children>
<element xmi:type="uml:Stereotype" href="model3.profile.uml#_WCWysMD9EeGp8LlPJ4gYgw"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_WCgjscD9EeGp8LlPJ4gYgw" x="165" y="170"/>
</children>
@@ -93,6 +105,10 @@
<styles xmi:type="notation:FilteringStyle" xmi:id="_WCzeq8D9EeGp8LlPJ4gYgw"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_WCzerMD9EeGp8LlPJ4gYgw"/>
</children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_7T29MGZQEeOCkJtHBIGqgQ" visible="false" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_7T29MWZQEeOCkJtHBIGqgQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7T29MmZQEeOCkJtHBIGqgQ"/>
+ </children>
<element xmi:type="uml:Stereotype" href="model3.profile.uml#_WCptoMD9EeGp8LlPJ4gYgw"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_WCzeocD9EeGp8LlPJ4gYgw" x="95" y="370"/>
</children>
@@ -120,6 +136,10 @@
<styles xmi:type="notation:FilteringStyle" xmi:id="_WDGZm8D9EeGp8LlPJ4gYgw"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_WDGZnMD9EeGp8LlPJ4gYgw"/>
</children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_7T5ZcGZQEeOCkJtHBIGqgQ" visible="false" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_7T5ZcWZQEeOCkJtHBIGqgQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7T5ZcmZQEeOCkJtHBIGqgQ"/>
+ </children>
<element xmi:type="uml:Stereotype" href="model3.profile.uml#_WC9PoMD9EeGp8LlPJ4gYgw"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_WDGZkcD9EeGp8LlPJ4gYgw" x="310" y="370"/>
</children>
@@ -151,6 +171,10 @@
<styles xmi:type="notation:FilteringStyle" xmi:id="_WDZUi8D9EeGp8LlPJ4gYgw"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_WDZUjMD9EeGp8LlPJ4gYgw"/>
</children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_7T71sGZQEeOCkJtHBIGqgQ" visible="false" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_7T71sWZQEeOCkJtHBIGqgQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7T71smZQEeOCkJtHBIGqgQ"/>
+ </children>
<element xmi:type="uml:Stereotype" href="model3.profile.uml#_WDQKkMD9EeGp8LlPJ4gYgw"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_WDZUgcD9EeGp8LlPJ4gYgw" x="310" y="170"/>
</children>
@@ -163,6 +187,15 @@
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_YOWwNcD9EeGp8LlPJ4gYgw" key="StereotypePropertyLocation" value="Compartment"/>
</eAnnotations>
<children xmi:type="notation:DecorationNode" xmi:id="_YOM_MsD9EeGp8LlPJ4gYgw" type="1084"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_7ULGQGZQEeOCkJtHBIGqgQ" visible="false" type="AppliedStereotypeCompartement">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_7ULGQWZQEeOCkJtHBIGqgQ" showTitle="true"/>
+ <element xmi:type="l2:Metaclass" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_ShU5IKtKEeGF4uwJob34Mw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7ULGQmZQEeOCkJtHBIGqgQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_7ULtUGZQEeOCkJtHBIGqgQ" visible="false" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_7ULtUWZQEeOCkJtHBIGqgQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7ULtUmZQEeOCkJtHBIGqgQ"/>
+ </children>
<element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Activity"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_YOM_M8D9EeGp8LlPJ4gYgw" x="155" y="60"/>
</children>
@@ -175,6 +208,15 @@
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_YOWwP8D9EeGp8LlPJ4gYgw" key="StereotypePropertyLocation" value="Compartment"/>
</eAnnotations>
<children xmi:type="notation:DecorationNode" xmi:id="_YOWwOMD9EeGp8LlPJ4gYgw" type="1084"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_7UOwoGZQEeOCkJtHBIGqgQ" visible="false" type="AppliedStereotypeCompartement">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_7UOwoWZQEeOCkJtHBIGqgQ" showTitle="true"/>
+ <element xmi:type="l2:Metaclass" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_Sh6H8KtKEeGF4uwJob34Mw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7UOwomZQEeOCkJtHBIGqgQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_7UOwo2ZQEeOCkJtHBIGqgQ" visible="false" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_7UOwpGZQEeOCkJtHBIGqgQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7UOwpWZQEeOCkJtHBIGqgQ"/>
+ </children>
<element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_YOWwOcD9EeGp8LlPJ4gYgw" x="420" y="55"/>
</children>
@@ -187,6 +229,15 @@
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_YOf6JsD9EeGp8LlPJ4gYgw" key="StereotypePropertyLocation" value="Compartment"/>
</eAnnotations>
<children xmi:type="notation:DecorationNode" xmi:id="_YOWwQsD9EeGp8LlPJ4gYgw" type="1084"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_7URz8GZQEeOCkJtHBIGqgQ" visible="false" type="AppliedStereotypeCompartement">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_7URz8WZQEeOCkJtHBIGqgQ" showTitle="true"/>
+ <element xmi:type="l2:Metaclass" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_SievsKtKEeGF4uwJob34Mw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7URz8mZQEeOCkJtHBIGqgQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_7URz82ZQEeOCkJtHBIGqgQ" visible="false" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_7URz9GZQEeOCkJtHBIGqgQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7URz9WZQEeOCkJtHBIGqgQ"/>
+ </children>
<element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Comment"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_YOf6IMD9EeGp8LlPJ4gYgw" x="655" y="60"/>
</children>
@@ -236,7 +287,7 @@
</children>
<styles xmi:type="notation:FontStyle" xmi:id="_bXpcYsD9EeGp8LlPJ4gYgw"/>
<element xmi:type="uml:Generalization" href="model3.profile.uml#_bXpcYMD9EeGp8LlPJ4gYgw"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bXpcY8D9EeGp8LlPJ4gYgw" points="[50, -50, -197, 194]$[227, -238, -20, 6]"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bXpcY8D9EeGp8LlPJ4gYgw" points="[0, -50, 216, 141]$[0, -115, 216, 76]$[-166, -115, 50, 76]$[-166, -150, 50, 41]"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bXymUMD9EeGp8LlPJ4gYgw" id="(0.2,0.59)"/>
</edges>
<edges xmi:type="notation:Connector" xmi:id="_b0XNkcD9EeGp8LlPJ4gYgw" type="4002" source="_WDGZkMD9EeGp8LlPJ4gYgw" target="_WDZUgMD9EeGp8LlPJ4gYgw">
@@ -245,7 +296,7 @@
</children>
<styles xmi:type="notation:FontStyle" xmi:id="_b0XNksD9EeGp8LlPJ4gYgw"/>
<element xmi:type="uml:Generalization" href="model3.profile.uml#_b0XNkMD9EeGp8LlPJ4gYgw"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_b0XNk8D9EeGp8LlPJ4gYgw" points="[-50, -2, 541, 9]$[-598, -61, -7, -50]"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_b0XNk8D9EeGp8LlPJ4gYgw" points="[0, -50, 0, 147]$[0, -110, 0, 87]$[0, -144, 0, 53]"/>
</edges>
<edges xmi:type="notation:Connector" xmi:id="_ciLV0MD9EeGp8LlPJ4gYgw" type="1013" source="_WDZUgMD9EeGp8LlPJ4gYgw" target="_YOWwNsD9EeGp8LlPJ4gYgw" routing="Tree">
<styles xmi:type="notation:FontStyle" xmi:id="_ciLV0cD9EeGp8LlPJ4gYgw"/>
diff --git a/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/resources/profile/model3.profile.uml b/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/resources/profile/model3.profile.uml
index f406a86244e..7f61cf16282 100644
--- a/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/resources/profile/model3.profile.uml
+++ b/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/resources/profile/model3.profile.uml
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<uml:Profile xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_URIssMD9EeGp8LlPJ4gYgw" name="profile" metaclassReference="_YN6EQMD9EeGp8LlPJ4gYgw _YN6EQcD9EeGp8LlPJ4gYgw _YN6EQsD9EeGp8LlPJ4gYgw">
- <eAnnotations xmi:id="_deInwcD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_deInwcD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML">
<contents xmi:type="ecore:EPackage" xmi:id="_sWINYcEWEeGmd-DVx7z1xw" name="profile" nsURI="http:///schemas/profile/_sWINYMEWEeGmd-DVx7z1xw/3" nsPrefix="profile">
<eClassifiers xmi:type="ecore:EClass" xmi:id="_sWINYsEWEeGmd-DVx7z1xw" name="Stereotype1">
- <eAnnotations xmi:id="_sWINY8EWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Vi0XAMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_sWINY8EWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Vi0XAMD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_sWINZMEWEeGmd-DVx7z1xw" name="base_Comment" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Comment"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_sWINZsEWEeGmd-DVx7z1xw" name="Stereotype2">
- <eAnnotations xmi:id="_sWINZ8EWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_VvA_8MD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_sWINZ8EWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_VvA_8MD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_sWINaMEWEeGmd-DVx7z1xw" name="base_Comment" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Comment"/>
</eStructuralFeatures>
@@ -18,25 +18,25 @@
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_sWINbMEWEeGmd-DVx7z1xw" name="Stereotype3">
- <eAnnotations xmi:id="_sWINbcEWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WCWysMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_sWINbcEWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WCWysMD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_sWINbsEWEeGmd-DVx7z1xw" name="base_Activity" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Activity"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_sWINcMEWEeGmd-DVx7z1xw" name="Stereotype4" eSuperTypes="_sWINbMEWEeGmd-DVx7z1xw">
- <eAnnotations xmi:id="_sWINccEWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WCptoMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_sWINccEWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WCptoMD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_sWINcsEWEeGmd-DVx7z1xw" name="Property1" ordered="false" lowerBound="1"/>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_sWINdMEWEeGmd-DVx7z1xw" name="Stereotype5" eSuperTypes="_sWINbMEWEeGmd-DVx7z1xw _sWINe8EWEeGmd-DVx7z1xw">
- <eAnnotations xmi:id="_sWINdcEWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WC9PoMD9EeGp8LlPJ4gYgw"/>
- <eAnnotations xmi:id="_sWINdsEWEeGmd-DVx7z1xw" source="duplicates">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_sWINdcEWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WC9PoMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_sWINdsEWEeGmd-DVx7z1xw" source="duplicates">
<contents xmi:type="ecore:EAttribute" xmi:id="_sWINd8EWEeGmd-DVx7z1xw" name="Property1" ordered="false" lowerBound="1">
- <eAnnotations xmi:id="_sWINeMEWEeGmd-DVx7z1xw" source="redefines" references="_sWINf8EWEeGmd-DVx7z1xw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_sWINeMEWEeGmd-DVx7z1xw" source="redefines" references="_sWINf8EWEeGmd-DVx7z1xw"/>
</contents>
</eAnnotations>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_sWINe8EWEeGmd-DVx7z1xw" name="Stereotype6">
- <eAnnotations xmi:id="_sWINfMEWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WDQKkMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_sWINfMEWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WDQKkMD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_sWINfcEWEeGmd-DVx7z1xw" name="base_Class" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
</eStructuralFeatures>
@@ -46,13 +46,13 @@
</contents>
<contents xmi:type="ecore:EPackage" xmi:id="_k9d9wcEWEeGmd-DVx7z1xw" name="profile" nsURI="http:///schemas/profile/_k9d9wMEWEeGmd-DVx7z1xw/2" nsPrefix="profile">
<eClassifiers xmi:type="ecore:EClass" xmi:id="_k9d9wsEWEeGmd-DVx7z1xw" name="Stereotype1">
- <eAnnotations xmi:id="_k9d9w8EWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Vi0XAMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k9d9w8EWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Vi0XAMD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_k9d9xMEWEeGmd-DVx7z1xw" name="base_Comment" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Comment"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_k9d9xsEWEeGmd-DVx7z1xw" name="Stereotype2">
- <eAnnotations xmi:id="_k9d9x8EWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_VvA_8MD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k9d9x8EWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_VvA_8MD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_k9d9yMEWEeGmd-DVx7z1xw" name="base_Comment" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Comment"/>
</eStructuralFeatures>
@@ -61,25 +61,25 @@
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_k9d9zMEWEeGmd-DVx7z1xw" name="Stereotype3">
- <eAnnotations xmi:id="_k9d9zcEWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WCWysMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k9d9zcEWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WCWysMD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_k9d9zsEWEeGmd-DVx7z1xw" name="base_Activity" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Activity"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_k9d90MEWEeGmd-DVx7z1xw" name="Stereotype4" eSuperTypes="_k9d9zMEWEeGmd-DVx7z1xw">
- <eAnnotations xmi:id="_k9d90cEWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WCptoMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k9d90cEWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WCptoMD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_k9d90sEWEeGmd-DVx7z1xw" name="Property1" ordered="false" lowerBound="1"/>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_k9d91MEWEeGmd-DVx7z1xw" name="Stereotype5" eSuperTypes="_k9d9zMEWEeGmd-DVx7z1xw _k9d928EWEeGmd-DVx7z1xw">
- <eAnnotations xmi:id="_k9d91cEWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WC9PoMD9EeGp8LlPJ4gYgw"/>
- <eAnnotations xmi:id="_k9d91sEWEeGmd-DVx7z1xw" source="duplicates">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k9d91cEWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WC9PoMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k9d91sEWEeGmd-DVx7z1xw" source="duplicates">
<contents xmi:type="ecore:EAttribute" xmi:id="_k9d918EWEeGmd-DVx7z1xw" name="Property1" ordered="false" lowerBound="1">
- <eAnnotations xmi:id="_k9d92MEWEeGmd-DVx7z1xw" source="redefines" references="_k9d938EWEeGmd-DVx7z1xw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k9d92MEWEeGmd-DVx7z1xw" source="redefines" references="_k9d938EWEeGmd-DVx7z1xw"/>
</contents>
</eAnnotations>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_k9d928EWEeGmd-DVx7z1xw" name="Stereotype6">
- <eAnnotations xmi:id="_k9d93MEWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WDQKkMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k9d93MEWEeGmd-DVx7z1xw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WDQKkMD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_k9d93cEWEeGmd-DVx7z1xw" name="base_Class" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
</eStructuralFeatures>
@@ -89,13 +89,13 @@
</contents>
<contents xmi:type="ecore:EPackage" xmi:id="_nX6wUcD9EeGp8LlPJ4gYgw" name="profile" nsURI="http:///schemas/profile/_nX6wUMD9EeGp8LlPJ4gYgw/1" nsPrefix="profile">
<eClassifiers xmi:type="ecore:EClass" xmi:id="_nX6wUsD9EeGp8LlPJ4gYgw" name="Stereotype1">
- <eAnnotations xmi:id="_nX6wU8D9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Vi0XAMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_nX6wU8D9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Vi0XAMD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_nX6wVMD9EeGp8LlPJ4gYgw" name="base_Comment" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Comment"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_nX6wVsD9EeGp8LlPJ4gYgw" name="Stereotype2">
- <eAnnotations xmi:id="_nX6wV8D9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_VvA_8MD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_nX6wV8D9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_VvA_8MD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_nX6wWMD9EeGp8LlPJ4gYgw" name="base_Comment" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Comment"/>
</eStructuralFeatures>
@@ -104,25 +104,25 @@
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_nX6wXMD9EeGp8LlPJ4gYgw" name="Stereotype3">
- <eAnnotations xmi:id="_nX6wXcD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WCWysMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_nX6wXcD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WCWysMD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_nX6wXsD9EeGp8LlPJ4gYgw" name="base_Activity" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Activity"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_nX6wYMD9EeGp8LlPJ4gYgw" name="Stereotype4" eSuperTypes="_nX6wXMD9EeGp8LlPJ4gYgw">
- <eAnnotations xmi:id="_nX6wYcD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WCptoMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_nX6wYcD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WCptoMD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_nX6wYsD9EeGp8LlPJ4gYgw" name="Property1" ordered="false" lowerBound="1"/>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_nX6wZMD9EeGp8LlPJ4gYgw" name="Stereotype5" eSuperTypes="_nX6wXMD9EeGp8LlPJ4gYgw _nX6wa8D9EeGp8LlPJ4gYgw">
- <eAnnotations xmi:id="_nX6wZcD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WC9PoMD9EeGp8LlPJ4gYgw"/>
- <eAnnotations xmi:id="_nX6wZsD9EeGp8LlPJ4gYgw" source="duplicates">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_nX6wZcD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WC9PoMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_nX6wZsD9EeGp8LlPJ4gYgw" source="duplicates">
<contents xmi:type="ecore:EAttribute" xmi:id="_nX6wZ8D9EeGp8LlPJ4gYgw" name="Property1" ordered="false" lowerBound="1">
- <eAnnotations xmi:id="_nX6waMD9EeGp8LlPJ4gYgw" source="redefines" references="_nX6wb8D9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_nX6waMD9EeGp8LlPJ4gYgw" source="redefines" references="_nX6wb8D9EeGp8LlPJ4gYgw"/>
</contents>
</eAnnotations>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_nX6wa8D9EeGp8LlPJ4gYgw" name="Stereotype6">
- <eAnnotations xmi:id="_nX6wbMD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WDQKkMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_nX6wbMD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WDQKkMD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_nX6wbcD9EeGp8LlPJ4gYgw" name="base_Class" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
</eStructuralFeatures>
@@ -131,21 +131,21 @@
</eClassifiers>
</contents>
<contents xmi:type="ecore:EPackage" xmi:id="_deInwsD9EeGp8LlPJ4gYgw" name="profile" nsURI="http:///schemas/profile/_deInwMD9EeGp8LlPJ4gYgw/0" nsPrefix="profile">
- <eAnnotations xmi:id="_deSYw8D9EeGp8LlPJ4gYgw" source="PapyrusVersion">
- <details xmi:id="_deSYxMD9EeGp8LlPJ4gYgw" key="Version" value="0.0.1"/>
- <details xmi:id="_deSYxcD9EeGp8LlPJ4gYgw" key="Comment" value=""/>
- <details xmi:id="_deSYxsD9EeGp8LlPJ4gYgw" key="Copyright" value=""/>
- <details xmi:id="_deSYx8D9EeGp8LlPJ4gYgw" key="Date" value="2012-06-28"/>
- <details xmi:id="_deSYyMD9EeGp8LlPJ4gYgw" key="Author" value=""/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_deSYw8D9EeGp8LlPJ4gYgw" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_deSYxMD9EeGp8LlPJ4gYgw" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_deSYxcD9EeGp8LlPJ4gYgw" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_deSYxsD9EeGp8LlPJ4gYgw" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_deSYx8D9EeGp8LlPJ4gYgw" key="Date" value="2012-06-28"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_deSYyMD9EeGp8LlPJ4gYgw" key="Author" value=""/>
</eAnnotations>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_deInw8D9EeGp8LlPJ4gYgw" name="Stereotype1">
- <eAnnotations xmi:id="_deInxMD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Vi0XAMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_deInxMD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Vi0XAMD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_deInxcD9EeGp8LlPJ4gYgw" name="base_Comment" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Comment"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_deInx8D9EeGp8LlPJ4gYgw" name="Stereotype2">
- <eAnnotations xmi:id="_deInyMD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_VvA_8MD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_deInyMD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_VvA_8MD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_deInycD9EeGp8LlPJ4gYgw" name="base_Comment" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Comment"/>
</eStructuralFeatures>
@@ -154,67 +154,67 @@
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_deInzcD9EeGp8LlPJ4gYgw" name="Stereotype3">
- <eAnnotations xmi:id="_deInzsD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WCWysMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_deInzsD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WCWysMD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_deInz8D9EeGp8LlPJ4gYgw" name="base_Activity" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Activity"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_deIn0cD9EeGp8LlPJ4gYgw" name="Stereotype4" eSuperTypes="_deInzcD9EeGp8LlPJ4gYgw">
- <eAnnotations xmi:id="_deIn0sD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WCptoMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_deIn0sD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WCptoMD9EeGp8LlPJ4gYgw"/>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_deIn1MD9EeGp8LlPJ4gYgw" name="Stereotype5" eSuperTypes="_deInzcD9EeGp8LlPJ4gYgw _deIn2MD9EeGp8LlPJ4gYgw">
- <eAnnotations xmi:id="_deIn1cD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WC9PoMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_deIn1cD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WC9PoMD9EeGp8LlPJ4gYgw"/>
</eClassifiers>
<eClassifiers xmi:type="ecore:EClass" xmi:id="_deIn2MD9EeGp8LlPJ4gYgw" name="Stereotype6">
- <eAnnotations xmi:id="_deIn2cD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WDQKkMD9EeGp8LlPJ4gYgw"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_deIn2cD9EeGp8LlPJ4gYgw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WDQKkMD9EeGp8LlPJ4gYgw"/>
<eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_deIn2sD9EeGp8LlPJ4gYgw" name="base_Class" ordered="false" lowerBound="1">
<eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
</eStructuralFeatures>
</eClassifiers>
</contents>
</eAnnotations>
- <elementImport xmi:id="_YN6EQMD9EeGp8LlPJ4gYgw" alias="Activity">
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_YN6EQMD9EeGp8LlPJ4gYgw" alias="Activity">
<importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Activity"/>
</elementImport>
- <elementImport xmi:id="_YN6EQcD9EeGp8LlPJ4gYgw" alias="Class">
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_YN6EQcD9EeGp8LlPJ4gYgw" alias="Class">
<importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
</elementImport>
- <elementImport xmi:id="_YN6EQsD9EeGp8LlPJ4gYgw" alias="Comment">
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_YN6EQsD9EeGp8LlPJ4gYgw" alias="Comment">
<importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Comment"/>
</elementImport>
<packagedElement xmi:type="uml:Stereotype" xmi:id="_Vi0XAMD9EeGp8LlPJ4gYgw" name="Stereotype1">
- <ownedAttribute xmi:id="_Z3_AcMD9EeGp8LlPJ4gYgw" name="base_Comment" association="_Z3_AccD9EeGp8LlPJ4gYgw">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_Z3_AcMD9EeGp8LlPJ4gYgw" name="base_Comment" association="_Z3_AccD9EeGp8LlPJ4gYgw">
<type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Comment"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Stereotype" xmi:id="_VvA_8MD9EeGp8LlPJ4gYgw" name="Stereotype2">
- <ownedAttribute xmi:id="_aKuWQMD9EeGp8LlPJ4gYgw" name="base_Comment" association="_aKuWQcD9EeGp8LlPJ4gYgw">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_aKuWQMD9EeGp8LlPJ4gYgw" name="base_Comment" association="_aKuWQcD9EeGp8LlPJ4gYgw">
<type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Comment"/>
</ownedAttribute>
- <ownedAttribute xmi:id="_adeTIMD9EeGp8LlPJ4gYgw" name="base_Class" association="_adeTIcD9EeGp8LlPJ4gYgw">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_adeTIMD9EeGp8LlPJ4gYgw" name="base_Class" association="_adeTIcD9EeGp8LlPJ4gYgw">
<type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Stereotype" xmi:id="_WCWysMD9EeGp8LlPJ4gYgw" name="Stereotype3">
- <ownedAttribute xmi:id="_aw924MD9EeGp8LlPJ4gYgw" name="base_Activity" association="_aw924cD9EeGp8LlPJ4gYgw">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_aw924MD9EeGp8LlPJ4gYgw" name="base_Activity" association="_aw924cD9EeGp8LlPJ4gYgw">
<type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Activity"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Stereotype" xmi:id="_WCptoMD9EeGp8LlPJ4gYgw" name="Stereotype4">
- <generalization xmi:id="_bG1ZMMD9EeGp8LlPJ4gYgw" general="_WCWysMD9EeGp8LlPJ4gYgw"/>
- <ownedAttribute xmi:id="_nAQeQMD9EeGp8LlPJ4gYgw" name="Property1"/>
+ <generalization xmi:type="uml:Generalization" xmi:id="_bG1ZMMD9EeGp8LlPJ4gYgw" general="_WCWysMD9EeGp8LlPJ4gYgw"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_nAQeQMD9EeGp8LlPJ4gYgw" name="Property1"/>
</packagedElement>
<packagedElement xmi:type="uml:Stereotype" xmi:id="_WC9PoMD9EeGp8LlPJ4gYgw" name="Stereotype5">
- <generalization xmi:id="_bXpcYMD9EeGp8LlPJ4gYgw" general="_WCWysMD9EeGp8LlPJ4gYgw"/>
- <generalization xmi:id="_b0XNkMD9EeGp8LlPJ4gYgw" general="_WDQKkMD9EeGp8LlPJ4gYgw"/>
- <ownedAttribute xmi:id="_myH7oMD9EeGp8LlPJ4gYgw" name="Property1"/>
+ <generalization xmi:type="uml:Generalization" xmi:id="_bXpcYMD9EeGp8LlPJ4gYgw" general="_WCWysMD9EeGp8LlPJ4gYgw"/>
+ <generalization xmi:type="uml:Generalization" xmi:id="_b0XNkMD9EeGp8LlPJ4gYgw" general="_WDQKkMD9EeGp8LlPJ4gYgw"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_myH7oMD9EeGp8LlPJ4gYgw" name="Property1"/>
</packagedElement>
<packagedElement xmi:type="uml:Stereotype" xmi:id="_WDQKkMD9EeGp8LlPJ4gYgw" name="Stereotype6">
- <ownedAttribute xmi:id="_ciCL4MD9EeGp8LlPJ4gYgw" name="base_Class" association="_ciCL4cD9EeGp8LlPJ4gYgw">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_ciCL4MD9EeGp8LlPJ4gYgw" name="base_Class" association="_ciCL4cD9EeGp8LlPJ4gYgw">
<type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
</ownedAttribute>
- <ownedAttribute xmi:id="_lV4nIMD9EeGp8LlPJ4gYgw" name="Property1"/>
- <ownedAttribute xmi:id="_maLVsMD9EeGp8LlPJ4gYgw" name="Property2"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_lV4nIMD9EeGp8LlPJ4gYgw" name="Property1"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_maLVsMD9EeGp8LlPJ4gYgw" name="Property2"/>
</packagedElement>
<packagedElement xmi:type="uml:Extension" xmi:id="_Z3_AccD9EeGp8LlPJ4gYgw" name="E_Stereotype1_Comment1" memberEnd="_Z3_AcsD9EeGp8LlPJ4gYgw _Z3_AcMD9EeGp8LlPJ4gYgw">
<ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_Z3_AcsD9EeGp8LlPJ4gYgw" name="extension_Stereotype1" type="_Vi0XAMD9EeGp8LlPJ4gYgw" aggregation="composite" association="_Z3_AccD9EeGp8LlPJ4gYgw"/>
diff --git a/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/src/org/eclipse/papyrus/customization/properties/tests/qvt/TransformationsTests.java b/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/src/org/eclipse/papyrus/customization/properties/tests/qvt/TransformationsTests.java
index d7b08984e1c..086f580aeb9 100644
--- a/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/src/org/eclipse/papyrus/customization/properties/tests/qvt/TransformationsTests.java
+++ b/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/src/org/eclipse/papyrus/customization/properties/tests/qvt/TransformationsTests.java
@@ -12,6 +12,7 @@
package org.eclipse.papyrus.customization.properties.tests.qvt;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
@@ -23,14 +24,11 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.m2m.qvt.oml.BasicModelExtent;
import org.eclipse.m2m.qvt.oml.ModelExtent;
import org.eclipse.papyrus.customization.properties.generation.generators.EcoreGenerator;
import org.eclipse.papyrus.customization.properties.generation.generators.IGenerator;
import org.eclipse.papyrus.customization.properties.generation.generators.ProfileGenerator;
-import org.eclipse.papyrus.customization.properties.model.xwt.resource.XWTResource;
import org.eclipse.papyrus.customization.properties.tests.Activator;
import org.eclipse.papyrus.junit.utils.ProjectUtils;
import org.eclipse.papyrus.views.properties.contexts.Context;
@@ -68,26 +66,26 @@ public class TransformationsTests {
targetProject.delete(true, new NullProgressMonitor());
}
- @Test
- public void handleXWTFileFromResource() {
- //From an XWT Resource
- Resource xwtResource = new XWTResource(xwtModelUri);
- try {
- xwtResource.load(null);
- } catch (IOException ex) {
- Activator.log.error(ex);
- Assert.fail("Cannot load the XWT Resource");
- }
- checkContents(xwtResource);
- }
+ // @Test
+ // public void handleXWTFileFromResource() {
+ // //From an XWT Resource
+ // Resource xwtResource = new XWTResource(xwtModelUri);
+ // try {
+ // xwtResource.load(null);
+ // } catch (IOException ex) {
+ // Activator.log.error(ex);
+ // Assert.fail("Cannot load the XWT Resource");
+ // }
+ // checkContents(xwtResource);
+ // }
- @Test
- public void handleXWTFileFromResourceSet() {
- //From a generic ResourceSet
- ResourceSet resourceSet = new ResourceSetImpl();
- Resource xwtResource = resourceSet.getResource(xwtModelUri, true);
- checkContents(xwtResource);
- }
+ // @Test
+ // public void handleXWTFileFromResourceSet() {
+ // //From a generic ResourceSet
+ // ResourceSet resourceSet = new ResourceSetImpl();
+ // Resource xwtResource = resourceSet.getResource(xwtModelUri, true);
+ // checkContents(xwtResource);
+ // }
//Briefly check the resource contents
private void checkContents(Resource xwtResource) {
@@ -118,25 +116,40 @@ public class TransformationsTests {
@Override
protected List<ModelExtent> getModelExtents() {
try {
- EPackage ecorePackage = (EPackage)loadEMFModel(packageURI);
- ModelExtent inPackage = new BasicModelExtent(Collections.singletonList(ecorePackage));
+ ecorePackage = (EPackage)loadEMFModel(packageURI);
+ } catch (IOException e) {
+ // nothing
+ }
+ LinkedList<ModelExtent> result = new LinkedList<ModelExtent>();
+ ModelExtent temp = new BasicModelExtent();
+ ModelExtent inPackage = new BasicModelExtent(Collections.singletonList(ecorePackage));
- PropertiesRoot root = ConfigurationManager.getInstance().getPropertiesRoot();
- ModelExtent inRoot = new BasicModelExtent(Collections.singletonList(root));
- LinkedList<ModelExtent> result = new LinkedList<ModelExtent>();
- result.add(inPackage);
- result.add(inRoot);
- result.add(getOutContextExtent());
- return result;
- } catch (Exception ex) {
- return null;
- }
+
+ PropertiesRoot root = ConfigurationManager.getInstance().getPropertiesRoot();
+ ModelExtent inRoot = new BasicModelExtent(Collections.singletonList(root));
+
+ //Basic Method
+ result.add(inPackage);
+ result.add(inPackage);
+
+
+ result.add(inRoot);
+ result.add(getOutContextExtent());
+ return result;
}
};
URI targetURI = URI.createPlatformResourceURI(targetProject.getName() + "/properties/Ecore/EcoreProperties.ctx", false);
- List<Context> generatedContexts = generator.generate(targetURI);
+
+ ArrayList<URI> listURI = new ArrayList<URI>();
+ listURI.add(targetURI);
+ // List<Object> listObject = generator.getExternalReference();
+ // for(Object p: listObject){
+ // generator.addCheckElement(p);
+ // }
+ List<Context> generatedContexts = generator.generate(listURI);
+
Assert.assertNotNull(generatedContexts);
Assert.assertEquals(1, generatedContexts.size());
@@ -145,7 +158,7 @@ public class TransformationsTests {
Assert.assertEquals(1, context.getDataContexts().size()); //Only one DataContextRoot
Assert.assertEquals(3, context.getDataContexts().get(0).getElements().size()); //3 DataContextElements
- //Assert.assertEquals(6, context.getViews().size());
+ Assert.assertEquals(6, context.getViews().size());
//int numberOfSections = checkGeneratedContents(context);
//Assert.assertEquals(6, numberOfSections);
@@ -191,57 +204,62 @@ public class TransformationsTests {
};
URI targetURI = URI.createPlatformResourceURI(targetProject.getName() + "/properties/Profile/ProfileProperties.ctx", false);
- List<Context> generatedContexts = generator.generate(targetURI);
+ generator.setStrategy(0);
+ ArrayList<URI> listURI = new ArrayList<URI>();
+ listURI.add(targetURI);
+ List<Context> generatedContexts = generator.generate(listURI);
+
Assert.assertNotNull(generatedContexts);
Assert.assertEquals(1, generatedContexts.size());
Context context = generatedContexts.get(0);
Assert.assertEquals(1, context.getDependencies().size());
Assert.assertEquals("UML", context.getDependencies().get(0).getName());
-
Assert.assertEquals(1, context.getDataContexts().size()); //Only one DataContextRoot
+ Assert.assertEquals(12, context.getViews().size()); //12 view for 6 elements
+ // Assert.assertEquals(6, generatedContexts.get(0).getDataContexts().get(0).getElements().size());
Assert.assertEquals(6, context.getDataContexts().get(0).getElements().size()); //6 DataContextElements
+
//Check that all 12 sections have an associated CompositeWidget (xwt file)
- //int numberOfSections = checkGeneratedContents(context);
+ // int numberOfSections = checkGeneratedContents(context);
- //Assert.assertEquals(12, numberOfSections);
+ // Assert.assertEquals(12, numberOfSections);
}
//FIXME: This test is disabled, because we haven't generated the views yet.
//We need to run the full wizard ; not only the IGenerator (Which only generates the Context model)
//The wizard isn't built to be used programmatically
-
- // private int checkGeneratedContents(Context context) {
- // int numberOfSections = 0;
//
- // ResourceSet loadingResourceSet = new ResourceSetImpl();
- //
- // for(Tab tab : context.getTabs()) {
- // for(Section section : tab.getSections()) {
- // //There is a CompositeWidget
- // Assert.assertNotNull(section.getWidget());
- //
- // Resource widgetResource = section.getWidget().eResource();
- // URI widgetURI = widgetResource.getURI();
- //
- // //The CompositeWidget is located in its own *.xwt resource
- // Assert.assertTrue(widgetURI.lastSegment().endsWith(".xwt"));
- //
- // //The Resource is serialized to the XWT Format (Not XMI)
- // Assert.assertTrue(widgetResource instanceof XWTResource);
- //
- // //The XWT Resource can be unserialized
- // Resource xwtResource = loadingResourceSet.getResource(widgetURI, true);
- // Assert.assertTrue(xwtResource instanceof XWTResource);
- // Assert.assertEquals(1, xwtResource.getContents().size());
- // Assert.assertTrue(xwtResource.getContents().get(0) instanceof CompositeWidget);
- //
- // numberOfSections++;
+ // private int checkGeneratedContents(Context context) {
+ // int numberOfSections = 0;
+ //
+ // ResourceSet loadingResourceSet = new ResourceSetImpl();
+ // for(Tab tab : context.getTabs()) {
+ // for(Section section : tab.getSections()) {
+ // //There is a CompositeWidget
+ // Assert.assertNotNull(section.getWidget());
+ //
+ // Resource widgetResource = section.getWidget().eResource();
+ // URI widgetURI = widgetResource.getURI();
+ //
+ // //The CompositeWidget is located in its own *.xwt resource
+ // Assert.assertTrue(widgetURI.lastSegment().endsWith(".xwt"));
+ //
+ // //The Resource is serialized to the XWT Format (Not XMI)
+ // Assert.assertTrue(widgetResource instanceof XWTResource);
+ //
+ // //The XWT Resource can be unserialized
+ // Resource xwtResource = loadingResourceSet.getResource(widgetURI, true);
+ // Assert.assertTrue(xwtResource instanceof XWTResource);
+ // Assert.assertEquals(1, xwtResource.getContents().size());
+ // Assert.assertTrue(xwtResource.getContents().get(0) instanceof CompositeWidget);
+ //
+ // numberOfSections++;
+ // }
// }
+ //
+ // return numberOfSections;
// }
- //
- // return numberOfSections;
- // }
}

Back to the top