Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2011-05-11 11:45:49 +0000
committervlorenzo2011-05-11 11:45:49 +0000
commitd778849ded3fad0a0e19408c20dcfe4df08a8d65 (patch)
tree28028ac66480c99d873f4ee7926f8bc23e2de31d /incoming
parent7457ec0abcb42c38ddde4da1d1fba1cf39c7d9c1 (diff)
downloadorg.eclipse.papyrus-d778849ded3fad0a0e19408c20dcfe4df08a8d65.tar.gz
org.eclipse.papyrus-d778849ded3fad0a0e19408c20dcfe4df08a8d65.tar.xz
org.eclipse.papyrus-d778849ded3fad0a0e19408c20dcfe4df08a8d65.zip
NEW - bug 335332: [Property View] Papyrus shall provide an extensible property view runtime
https://bugs.eclipse.org/bugs/show_bug.cgi?id=335332
Diffstat (limited to 'incoming')
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/Model/Customization.ctx150
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/Model/ui/SingleView.xwt31
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/build.properties3
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/UIEditor.java16
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/ViewFilter.java16
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/actions/ToggleDataContextAction.java10
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/actions/TogglePreviewAction.java5
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/actions/TogglePreviewState.java9
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/preview/Preview.java8
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/modelelement/GenericPropertyModelElementFactory.java2
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/perspective/CustomizationPerspectiveFactory.java6
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/preferences/CustomizationPreferencePage.java49
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/preferences/CustomizationPreferencesInitializer.java6
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/providers/ConstraintDescriptorContentProvider.java13
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/providers/DataContextElementContentProvider.java12
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/query/ShowContextQuery.java6
-rw-r--r--incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/ui/CustomizationDialog.java221
17 files changed, 366 insertions, 197 deletions
diff --git a/incoming/org.eclipse.papyrus.properties.customization/Model/Customization.ctx b/incoming/org.eclipse.papyrus.properties.customization/Model/Customization.ctx
index 51739e36bb3..e26f8cce2ed 100644
--- a/incoming/org.eclipse.papyrus.properties.customization/Model/Customization.ctx
+++ b/incoming/org.eclipse.papyrus.properties.customization/Model/Customization.ctx
@@ -200,7 +200,7 @@
<widget href="ui/MultipleUnknownComponent.xwt#/"/>
</sections>
<sections name="GroupAttributes" sectionFile="ui/GroupAttributes.xwt">
- <constraints name="isGroup">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isGroup">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.2"/>
<properties xsi:type="contexts:ReferenceProperty" name="query">
<value href="custom.querySet#isGroup"/>
@@ -209,7 +209,7 @@
<widget href="ui/GroupAttributes.xwt#/"/>
</sections>
<sections name="EcoreInstanceOf" sectionFile="ui/EcoreInstanceOf.xwt">
- <constraints name="isEcoreInstanceOf">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isEcoreInstanceOf">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.2"/>
<properties xsi:type="contexts:ReferenceProperty" name="query">
<value href="custom.querySet#isEcoreInstanceOf"/>
@@ -218,7 +218,7 @@
<widget href="ui/EcoreInstanceOf.xwt#/"/>
</sections>
<sections name="UMLInstanceOf" sectionFile="ui/UMLInstanceOf.xwt">
- <constraints name="isUMLInstanceOf">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isUMLInstanceOf">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.2"/>
<properties xsi:type="contexts:ReferenceProperty" name="query">
<value href="custom.querySet#isUmlInstanceOf"/>
@@ -227,7 +227,7 @@
<widget href="ui/UMLInstanceOf.xwt#/"/>
</sections>
<sections name="OCLQuery" sectionFile="ui/OCLQuery.xwt">
- <constraints name="isOCLQueryConstraint">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isOCLQueryConstraint">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.2"/>
<properties xsi:type="contexts:ReferenceProperty" name="query">
<value href="custom.querySet#isOclQuery"/>
@@ -236,7 +236,7 @@
<widget href="ui/OCLQuery.xwt#/"/>
</sections>
<sections name="Stereotype" sectionFile="ui/Stereotype.xwt">
- <constraints name="isStereotypeConstraint">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isStereotypeConstraint">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.2"/>
<properties xsi:type="contexts:ReferenceProperty" name="query">
<value href="custom.querySet#isStereotype"/>
@@ -245,7 +245,7 @@
<widget href="ui/Stereotype.xwt#/"/>
</sections>
<sections name="GridLayout" sectionFile="ui/GridLayout.xwt">
- <constraints name="isGridLayout">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isGridLayout">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.2"/>
<properties xsi:type="contexts:ReferenceProperty" name="query">
<value href="custom.querySet#isGridLayout"/>
@@ -254,7 +254,7 @@
<widget href="ui/GridLayout.xwt#/"/>
</sections>
<sections name="Label" sectionFile="ui/Label.xwt">
- <constraints name="isSWTLabel">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSWTLabel">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.2"/>
<properties xsi:type="contexts:ReferenceProperty" name="query">
<value href="custom.querySet#isLabel"/>
@@ -263,7 +263,7 @@
<widget href="ui/Label.xwt#/"/>
</sections>
<sections name="Single ToggleButton" sectionFile="ui/Single ToggleButton.xwt">
- <constraints name="isSingleToggleButton">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleToggleButton">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.2"/>
<properties xsi:type="contexts:ReferenceProperty" name="query">
<value href="custom.querySet#isToggleButton"/>
@@ -272,7 +272,7 @@
<widget href="ui/Single ToggleButton.xwt#/"/>
</sections>
<sections name="SingleFileSelector" sectionFile="ui/SingleFileSelector.xwt">
- <constraints name="isSingleFileSelector">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleFileSelector">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.2"/>
<properties xsi:type="contexts:ReferenceProperty" name="query">
<value href="custom.querySet#isFileSelector"/>
@@ -282,462 +282,462 @@
</sections>
</tabs>
<views name="Single Environment" sections="//@tabs.0/@sections.0" automaticContext="true">
- <constraints name="isSingleEnvironment">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleEnvironment">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="Environment"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment"/>
</constraints>
</views>
<views name="Multiple Environment" sections="//@tabs.0/@sections.1" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleEnvironment">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleEnvironment">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="Environment"/>
</constraints>
</views>
<views name="Single WidgetType" sections="//@tabs.0/@sections.2" automaticContext="true">
- <constraints name="isSingleWidgetType">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleWidgetType">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="WidgetType"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment"/>
</constraints>
</views>
<views name="Multiple WidgetType" sections="//@tabs.0/@sections.3" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleWidgetType">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleWidgetType">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="WidgetType"/>
</constraints>
</views>
<views name="Single PropertyEditorType" sections="//@tabs.0/@sections.4" automaticContext="true">
- <constraints name="isSinglePropertyEditorType">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSinglePropertyEditorType">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="PropertyEditorType"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment"/>
</constraints>
</views>
<views name="Multiple PropertyEditorType" sections="//@tabs.0/@sections.5" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultiplePropertyEditorType">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultiplePropertyEditorType">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="PropertyEditorType"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment"/>
</constraints>
</views>
<views name="Single CompositeWidgetType" sections="//@tabs.0/@sections.6" automaticContext="true">
- <constraints name="isSingleCompositeWidgetType">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleCompositeWidgetType">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="CompositeWidgetType"/>
</constraints>
</views>
<views name="Multiple CompositeWidgetType" sections="//@tabs.0/@sections.7" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleCompositeWidgetType">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleCompositeWidgetType">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="CompositeWidgetType"/>
</constraints>
</views>
<views name="Single LayoutType" sections="//@tabs.0/@sections.8" automaticContext="true">
- <constraints name="isSingleLayoutType">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleLayoutType">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="LayoutType"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment"/>
</constraints>
</views>
<views name="Multiple LayoutType" sections="//@tabs.0/@sections.9" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleLayoutType">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleLayoutType">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="LayoutType"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment"/>
</constraints>
</views>
<views name="Single ConstraintType" sections="//@tabs.0/@sections.10" automaticContext="true">
- <constraints name="isSingleConstraintType">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleConstraintType">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="ConstraintType"/>
</constraints>
</views>
<views name="Multiple ConstraintType" sections="//@tabs.0/@sections.11" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleConstraintType">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleConstraintType">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="ConstraintType"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment"/>
</constraints>
</views>
<views name="Single ModelElementFactoryDescriptor" sections="//@tabs.0/@sections.12" automaticContext="true">
- <constraints name="isSingleModelElementFactoryDescriptor">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleModelElementFactoryDescriptor">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="ModelElementFactoryDescriptor"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment"/>
</constraints>
</views>
<views name="Multiple ModelElementFactoryDescriptor" sections="//@tabs.0/@sections.13" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleModelElementFactoryDescriptor">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleModelElementFactoryDescriptor">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="ModelElementFactoryDescriptor"/>
</constraints>
</views>
<views name="Single StandardWidgetType" sections="//@tabs.0/@sections.14" automaticContext="true">
- <constraints name="isSingleStandardWidgetType">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleStandardWidgetType">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="StandardWidgetType"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment"/>
</constraints>
</views>
<views name="Multiple StandardWidgetType" sections="//@tabs.0/@sections.15" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleStandardWidgetType">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleStandardWidgetType">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="StandardWidgetType"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment"/>
</constraints>
</views>
<views name="Single Context" sections="//@tabs.0/@sections.16" automaticContext="true">
- <constraints name="isSingleContext">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleContext">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="Context"/>
</constraints>
</views>
<views name="Multiple Context" sections="//@tabs.0/@sections.17" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleContext">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleContext">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="Context"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
</constraints>
</views>
<views name="Single DisplayUnit" sections="//@tabs.0/@sections.18" automaticContext="true">
- <constraints name="isSingleDisplayUnit">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleDisplayUnit">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="DisplayUnit"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
</constraints>
</views>
<views name="Multiple DisplayUnit" sections="//@tabs.0/@sections.19" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleDisplayUnit">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleDisplayUnit">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="DisplayUnit"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
</constraints>
</views>
<views name="Single View" sections="//@tabs.0/@sections.20" automaticContext="true">
- <constraints name="isSingleView">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleView">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="View"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
</constraints>
</views>
<views name="Multiple View" sections="//@tabs.0/@sections.21" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleView">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleView">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="View"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
</constraints>
</views>
<views name="Single Tab" sections="//@tabs.0/@sections.22" automaticContext="true">
- <constraints name="isSingleTab">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleTab">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="Tab"/>
</constraints>
</views>
<views name="Multiple Tab" sections="//@tabs.0/@sections.23" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleTab">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleTab">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="Tab"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
</constraints>
</views>
<views name="Single Section" sections="//@tabs.0/@sections.24" automaticContext="true">
- <constraints name="isSingleSection">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleSection">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="Section"/>
</constraints>
</views>
<views name="Multiple Section" sections="//@tabs.0/@sections.25" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleSection">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleSection">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="Section"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
</constraints>
</views>
<views name="Single DataContextElement" sections="//@tabs.0/@sections.26" automaticContext="true">
- <constraints name="isSingleDataContextElement">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleDataContextElement">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="DataContextElement"/>
</constraints>
</views>
<views name="Multiple DataContextElement" sections="//@tabs.0/@sections.27" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleDataContextElement">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleDataContextElement">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="DataContextElement"/>
</constraints>
</views>
<views name="Single Property" sections="//@tabs.0/@sections.28" automaticContext="true">
- <constraints name="isSingleProperty">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleProperty">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="Property"/>
</constraints>
</views>
<views name="Multiple Property" sections="//@tabs.0/@sections.29" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleProperty">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleProperty">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="Property"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
</constraints>
</views>
<views name="Single UnknownProperty" sections="//@tabs.0/@sections.30" automaticContext="true">
- <constraints name="isSingleUnknownProperty">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleUnknownProperty">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="UnknownProperty"/>
</constraints>
</views>
<views name="Multiple UnknownProperty" sections="//@tabs.0/@sections.31" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleUnknownProperty">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleUnknownProperty">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="UnknownProperty"/>
</constraints>
</views>
<views name="Single DataContextPackage" sections="//@tabs.0/@sections.32" automaticContext="true">
- <constraints name="isSingleDataContextPackage">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleDataContextPackage">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="DataContextPackage"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
</constraints>
</views>
<views name="Multiple DataContextPackage" sections="//@tabs.0/@sections.33" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleDataContextPackage">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleDataContextPackage">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="DataContextPackage"/>
</constraints>
</views>
<views name="Single DataContextRoot" sections="//@tabs.0/@sections.34" automaticContext="true">
- <constraints name="isSingleDataContextRoot">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleDataContextRoot">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="DataContextRoot"/>
</constraints>
</views>
<views name="Multiple DataContextRoot" sections="//@tabs.0/@sections.35" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleDataContextRoot">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleDataContextRoot">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="DataContextRoot"/>
</constraints>
</views>
<views name="Single ConstraintDescriptor" sections="//@tabs.0/@sections.36 //@tabs.0/@sections.67 //@tabs.0/@sections.68 //@tabs.0/@sections.69 //@tabs.0/@sections.70" automaticContext="true">
- <constraints name="isSingleConstraintDescriptor">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleConstraintDescriptor">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="ConstraintDescriptor"/>
</constraints>
</views>
<views name="Multiple ConstraintDescriptor" sections="//@tabs.0/@sections.37" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleConstraintDescriptor">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleConstraintDescriptor">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="ConstraintDescriptor"/>
</constraints>
</views>
<views name="Single ConfigProperty" sections="//@tabs.0/@sections.38" automaticContext="true">
- <constraints name="isSingleConfigProperty">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleConfigProperty">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="ConfigProperty"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
</constraints>
</views>
<views name="Multiple ConfigProperty" sections="//@tabs.0/@sections.39" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleConfigProperty">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleConfigProperty">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="ConfigProperty"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
</constraints>
</views>
<views name="Single ValueProperty" sections="//@tabs.0/@sections.40" automaticContext="true">
- <constraints name="isSingleValueProperty">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleValueProperty">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="ValueProperty"/>
</constraints>
</views>
<views name="Multiple ValueProperty" sections="//@tabs.0/@sections.41" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleValueProperty">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleValueProperty">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="ValueProperty"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
</constraints>
</views>
<views name="Single ReferenceProperty" sections="//@tabs.0/@sections.42" automaticContext="true">
- <constraints name="isSingleReferenceProperty">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleReferenceProperty">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="ReferenceProperty"/>
</constraints>
</views>
<views name="Multiple ReferenceProperty" sections="//@tabs.0/@sections.43" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleReferenceProperty">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleReferenceProperty">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="ReferenceProperty"/>
</constraints>
</views>
<views name="Single Element" sections="//@tabs.0/@sections.44" automaticContext="true">
- <constraints name="isSingleElement">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleElement">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="Element"/>
</constraints>
</views>
<views name="Multiple Element" sections="//@tabs.0/@sections.45" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleElement">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleElement">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="Element"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
</constraints>
</views>
<views name="Single UIComponent" sections="//@tabs.0/@sections.46" automaticContext="true">
- <constraints name="isSingleUIComponent">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleUIComponent">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="UIComponent"/>
</constraints>
</views>
<views name="Multiple UIComponent" sections="//@tabs.0/@sections.47" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleUIComponent">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleUIComponent">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="UIComponent"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
</constraints>
</views>
<views name="Single Widget" sections="//@tabs.0/@sections.48" automaticContext="true">
- <constraints name="isSingleWidget">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleWidget">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="Widget"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
</constraints>
</views>
<views name="Multiple Widget" sections="//@tabs.0/@sections.49" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleWidget">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleWidget">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="Widget"/>
</constraints>
</views>
<views name="Single StandardWidget" sections="//@tabs.0/@sections.50 //@tabs.0/@sections.72" automaticContext="true">
- <constraints name="isSingleStandardWidget">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleStandardWidget">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="StandardWidget"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
</constraints>
</views>
<views name="Multiple StandardWidget" sections="//@tabs.0/@sections.51" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleStandardWidget">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleStandardWidget">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="StandardWidget"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
</constraints>
</views>
<views name="Single PropertyEditor" sections="//@tabs.0/@sections.52 //@tabs.0/@sections.73 //@tabs.0/@sections.74" automaticContext="true">
- <constraints name="isSinglePropertyEditor">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSinglePropertyEditor">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="PropertyEditor"/>
</constraints>
</views>
<views name="Multiple PropertyEditor" sections="//@tabs.0/@sections.53" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultiplePropertyEditor">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultiplePropertyEditor">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="PropertyEditor"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
</constraints>
</views>
<views name="Single CompositeWidget" sections="//@tabs.0/@sections.54 //@tabs.0/@sections.66" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isSingleCompositeWidget">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleCompositeWidget">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="CompositeWidget"/>
</constraints>
</views>
<views name="Multiple CompositeWidget" sections="//@tabs.0/@sections.55" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleCompositeWidget">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleCompositeWidget">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="CompositeWidget"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
</constraints>
</views>
<views name="Single Layout" sections="//@tabs.0/@sections.56 //@tabs.0/@sections.71" automaticContext="true">
- <constraints name="isSingleLayout">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleLayout">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="Layout"/>
</constraints>
</views>
<views name="Multiple Layout" sections="//@tabs.0/@sections.57" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleLayout">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleLayout">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="Layout"/>
</constraints>
</views>
<views name="Single WidgetAttribute" sections="//@tabs.0/@sections.58" automaticContext="true">
- <constraints name="isSingleWidgetAttribute">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleWidgetAttribute">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="WidgetAttribute"/>
</constraints>
</views>
<views name="Multiple WidgetAttribute" sections="//@tabs.0/@sections.59" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleWidgetAttribute">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleWidgetAttribute">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="WidgetAttribute"/>
</constraints>
</views>
<views name="Single ValueAttribute" sections="//@tabs.0/@sections.60" automaticContext="true">
- <constraints name="isSingleValueAttribute">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleValueAttribute">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="ValueAttribute"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
</constraints>
</views>
<views name="Multiple ValueAttribute" sections="//@tabs.0/@sections.61" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleValueAttribute">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleValueAttribute">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="ValueAttribute"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
</constraints>
</views>
<views name="Single ReferenceAttribute" sections="//@tabs.0/@sections.62" automaticContext="true">
- <constraints name="isSingleReferenceAttribute">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleReferenceAttribute">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="ReferenceAttribute"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
</constraints>
</views>
<views name="Multiple ReferenceAttribute" sections="//@tabs.0/@sections.63" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleReferenceAttribute">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleReferenceAttribute">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="ReferenceAttribute"/>
</constraints>
</views>
<views name="Single UnknownComponent" sections="//@tabs.0/@sections.64" automaticContext="true">
- <constraints name="isSingleUnknownComponent">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isSingleUnknownComponent">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="UnknownComponent"/>
</constraints>
</views>
<views name="Multiple UnknownComponent" sections="//@tabs.0/@sections.65" elementMultiplicity="-1" automaticContext="true">
- <constraints name="isMultipleUnknownComponent">
+ <constraints xsi:type="contexts:SimpleConstraint" name="isMultipleUnknownComponent">
<constraintType href="pathmap://PPEResources/Environment.xmi#//@constraintTypes.0"/>
<properties xsi:type="contexts:ValueProperty" name="className" value="UnknownComponent"/>
<properties xsi:type="contexts:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui"/>
diff --git a/incoming/org.eclipse.papyrus.properties.customization/Model/ui/SingleView.xwt b/incoming/org.eclipse.papyrus.properties.customization/Model/ui/SingleView.xwt
index fb1f785609a..760c1612544 100644
--- a/incoming/org.eclipse.papyrus.properties.customization/Model/ui/SingleView.xwt
+++ b/incoming/org.eclipse.papyrus.properties.customization/Model/ui/SingleView.xwt
@@ -1,2 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets" xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout" xmlns:ppec="clr-namespace:org.eclipse.papyrus.properties.creation" xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="properties:contexts:View:name"></ppe:StringEditor></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout></Composite.layout><ppe:IntegerEditor input="{Binding}" property="properties:contexts:View:elementMultiplicity"></ppe:IntegerEditor></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:MultiReference input="{Binding}" property="properties:contexts:DisplayUnit:constraints"><ppe:MultiReference.factory><ppec:EcorePropertyEditorFactory nsUri="http://www.eclipse.org/papyrus/properties/contexts" className="ConstraintDescriptor"></ppec:EcorePropertyEditorFactory></ppe:MultiReference.factory></ppe:MultiReference></Composite></Composite> \ No newline at end of file
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.properties.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.properties.widgets.layout"
+ xmlns:ppec="clr-namespace:org.eclipse.papyrus.properties.creation"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}"
+ property="properties:contexts:View:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:IntegerEditor input="{Binding}"
+ property="properties:contexts:View:elementMultiplicity"></ppe:IntegerEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}"
+ property="properties:contexts:DisplayUnit:constraints">
+ </ppe:MultiReference>
+ </Composite>
+</Composite> \ No newline at end of file
diff --git a/incoming/org.eclipse.papyrus.properties.customization/build.properties b/incoming/org.eclipse.papyrus.properties.customization/build.properties
index e9fda2059be..cf1a674eda8 100644
--- a/incoming/org.eclipse.papyrus.properties.customization/build.properties
+++ b/incoming/org.eclipse.papyrus.properties.customization/build.properties
@@ -3,10 +3,9 @@ bin.includes = .,\
plugin.xml,\
META-INF/,\
about.html,\
- OSGI-INF/,\
icons/,\
Query/,\
UICustom/,\
Model/,\
- OSGI-INF/l10n/bundle.properties
+ OSGI-INF/
source.. = src/
diff --git a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/UIEditor.java b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/UIEditor.java
index 7b6d24031c1..76f5aa8258d 100644
--- a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/UIEditor.java
+++ b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/UIEditor.java
@@ -315,8 +315,9 @@ public class UIEditor extends EcoreEditor implements ITabbedPropertySheetPageCon
@Override
public IPropertySheetPage getPropertySheetPage() {
- if(iPropertySheetPage == null)
+ if(iPropertySheetPage == null) {
iPropertySheetPage = new TabbedPropertySheetPage(this);
+ }
return iPropertySheetPage;
}
@@ -324,12 +325,22 @@ public class UIEditor extends EcoreEditor implements ITabbedPropertySheetPageCon
return "CustomizationPropertyView"; //$NON-NLS-1$
}
+ /**
+ * Registers a Preview to this Editor
+ *
+ * @param preview
+ */
public void addPreview(Preview preview) {
previews.add(preview);
selectionViewer.addSelectionChangedListener(preview);
preview.selectionChanged(new SelectionChangedEvent(this, this.currentViewer.getSelection()));
}
+ /**
+ * Unregisters a Preview from this editor
+ *
+ * @param preview
+ */
public void removePreview(Preview preview) {
previews.remove(preview);
selectionViewer.removeSelectionChangedListener(preview);
@@ -341,8 +352,9 @@ public class UIEditor extends EcoreEditor implements ITabbedPropertySheetPageCon
selectionViewer.removeSelectionChangedListener(preview);
}
previews.clear();
- if(iPropertySheetPage != null)
+ if(iPropertySheetPage != null) {
iPropertySheetPage.dispose();
+ }
super.dispose();
}
diff --git a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/ViewFilter.java b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/ViewFilter.java
index 118476a510d..7ce726e46ba 100644
--- a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/ViewFilter.java
+++ b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/ViewFilter.java
@@ -20,19 +20,31 @@ import org.eclipse.papyrus.properties.contexts.DataContextPackage;
import org.eclipse.papyrus.properties.contexts.View;
import org.eclipse.ui.internal.misc.StringMatcher;
-
+/**
+ * A Filter for the UIEditor. The Filter can match Views and DataContextElements
+ * An object is matched if it directly matches the filter, or if one of its parents
+ * match it, or if one of his children (at any level) match it.
+ *
+ * @author Camille Letavernier
+ */
public class ViewFilter extends ViewerFilter {
private StringMatcher matcher;
+ /**
+ * Sets the pattern for this filter
+ *
+ * @param pattern
+ */
public void setPattern(String pattern) {
matcher = new StringMatcher("*" + pattern + "*", true, false); //$NON-NLS-1$ //$NON-NLS-2$
}
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
- if(matcher == null)
+ if(matcher == null) {
return true;
+ }
if(element instanceof IAdaptable) {
EObject eObject = (EObject)((IAdaptable)element).getAdapter(EObject.class);
diff --git a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/actions/ToggleDataContextAction.java b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/actions/ToggleDataContextAction.java
index e793a6edd44..00088f4ed67 100644
--- a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/actions/ToggleDataContextAction.java
+++ b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/actions/ToggleDataContextAction.java
@@ -19,9 +19,17 @@ import org.eclipse.papyrus.properties.customization.editor.UIEditor;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
-
+/**
+ * An action to toggle the display of the DataContextElements in the UIEditor
+ *
+ * @author Camille Letavernier
+ *
+ */
public class ToggleDataContextAction extends AbstractHandler {
+ /**
+ * Indicates if the DataContextElements should be displayed
+ */
public static boolean showDataContext = false;
public Object execute(ExecutionEvent event) throws ExecutionException {
diff --git a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/actions/TogglePreviewAction.java b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/actions/TogglePreviewAction.java
index 668eb49cf1a..9682f70932e 100644
--- a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/actions/TogglePreviewAction.java
+++ b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/actions/TogglePreviewAction.java
@@ -21,6 +21,11 @@ import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.ViewPart;
+/**
+ * An action to toggle the UIEditor Preview
+ *
+ * @author Camille Letavernier
+ */
public class TogglePreviewAction extends AbstractHandler {
public Object execute(ExecutionEvent event) throws ExecutionException {
diff --git a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/actions/TogglePreviewState.java b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/actions/TogglePreviewState.java
index b58cdced121..b05e707de7f 100644
--- a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/actions/TogglePreviewState.java
+++ b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/actions/TogglePreviewState.java
@@ -19,7 +19,14 @@ import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
-
+/**
+ * A State to determine if the Preview view is opened in the current perspective
+ * The State should listen on the workbench an update itself when the perspective
+ * changes, or when the preview is opened or closed
+ *
+ * @FIXME : the state is not correctly retrieved
+ * @author Camille Letavernier
+ */
public class TogglePreviewState extends State implements IWindowListener, IPartListener {
private boolean isPreviewOpen;
diff --git a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/preview/Preview.java b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/preview/Preview.java
index 41557924f38..b1c0d8bb57a 100644
--- a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/preview/Preview.java
+++ b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/editor/preview/Preview.java
@@ -205,6 +205,11 @@ public class Preview extends ViewPart implements ISelectionChangedListener, IPar
displayView();
}
+ /**
+ * Sets the current Editor
+ *
+ * @param editor
+ */
public void setEditor(UIEditor editor) {
editor.addPreview(this);
currentEditors.add(editor);
@@ -236,8 +241,9 @@ public class Preview extends ViewPart implements ISelectionChangedListener, IPar
path = path.append("/preview/"); //$NON-NLS-1$
try {
File previewDirectory = path.toFile();
- if(!previewDirectory.exists())
+ if(!previewDirectory.exists()) {
previewDirectory.mkdirs();
+ }
File xwtFile = path.append(section.getSectionFile()).toFile();
diff --git a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/modelelement/GenericPropertyModelElementFactory.java b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/modelelement/GenericPropertyModelElementFactory.java
index 09981ef9817..58e44b87c0d 100644
--- a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/modelelement/GenericPropertyModelElementFactory.java
+++ b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/modelelement/GenericPropertyModelElementFactory.java
@@ -46,7 +46,7 @@ public class GenericPropertyModelElementFactory implements ModelElementFactory {
EClass valueProperty = ContextsPackage.eINSTANCE.getValueProperty();
EClass referenceProperty = ContextsPackage.eINSTANCE.getReferenceProperty();
- EStructuralFeature attributes = ContextsPackage.eINSTANCE.getConstraintDescriptor_Properties();
+ EStructuralFeature attributes = ContextsPackage.eINSTANCE.getSimpleConstraint_Properties();
return new GenericAttributeModelElement(source, domain, attributes, ContextsFactory.eINSTANCE, valueProperty, referenceProperty);
}
diff --git a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/perspective/CustomizationPerspectiveFactory.java b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/perspective/CustomizationPerspectiveFactory.java
index 41e19a81aab..dabd8d57080 100644
--- a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/perspective/CustomizationPerspectiveFactory.java
+++ b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/perspective/CustomizationPerspectiveFactory.java
@@ -15,7 +15,11 @@ import org.eclipse.papyrus.properties.customization.Activator;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
-
+/**
+ * A Factory for instantiating the Customization perspective
+ *
+ * @author Camille Letavernier
+ */
public class CustomizationPerspectiveFactory implements IPerspectiveFactory {
private final static String PROPERTIES = "org.eclipse.ui.views.PropertySheet"; //$NON-NLS-1$
diff --git a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/preferences/CustomizationPreferencePage.java b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/preferences/CustomizationPreferencePage.java
index 2df42e263f7..8d0d0696126 100644
--- a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/preferences/CustomizationPreferencePage.java
+++ b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/preferences/CustomizationPreferencePage.java
@@ -30,24 +30,60 @@ import org.eclipse.papyrus.properties.customization.messages.Messages;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
-
+/**
+ * This page handles preferences for dialog boxes
+ *
+ * @author Camille Letavernier
+ */
public class CustomizationPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+ /**
+ *
+ */
public final static String OPEN_CUSTOMIZATION_PERSPECTIVE = "openCustomizationPerspective"; //$NON-NLS-1$
+ /**
+ *
+ */
public final static String ASK_FOR_CONFIRMATION = "askForConfirmation"; //$NON-NLS-1$
+ /**
+ *
+ * Constructor.
+ *
+ */
public CustomizationPreferencePage() {
}
+ /**
+ *
+ * Constructor.
+ *
+ * @param style
+ */
public CustomizationPreferencePage(int style) {
super(style);
}
+ /**
+ *
+ * Constructor.
+ *
+ * @param title
+ * @param style
+ */
public CustomizationPreferencePage(String title, int style) {
super(title, style);
}
+ /**
+ *
+ * Constructor.
+ *
+ * @param title
+ * @param image
+ * @param style
+ */
public CustomizationPreferencePage(String title, ImageDescriptor image, int style) {
super(title, image, style);
}
@@ -63,10 +99,21 @@ public class CustomizationPreferencePage extends FieldEditorPreferencePage imple
addField(new BooleanFieldEditor(ASK_FOR_CONFIRMATION, Messages.CustomizationPreferencePage_AskForConfirmation, getFieldEditorParent()));
}
+ /**
+ * Indicates if the customization perspective should be opened
+ *
+ * @return true if the customization perspective should be opened
+ */
public static boolean openCustomizationPerspective() {
return Activator.getDefault().getPreferenceStore().getBoolean(OPEN_CUSTOMIZATION_PERSPECTIVE);
}
+ /**
+ * Indicates if a dialog should ask the user for a confirmation before opening
+ * the customization perspective
+ *
+ * @return true if a user confirmation is needed
+ */
public static boolean askForConfirmation() {
return Activator.getDefault().getPreferenceStore().getBoolean(ASK_FOR_CONFIRMATION);
}
diff --git a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/preferences/CustomizationPreferencesInitializer.java b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/preferences/CustomizationPreferencesInitializer.java
index abd79e58af8..26adcecd67e 100644
--- a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/preferences/CustomizationPreferencesInitializer.java
+++ b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/preferences/CustomizationPreferencesInitializer.java
@@ -15,7 +15,11 @@ import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.papyrus.properties.customization.Activator;
-
+/**
+ * The initializer for @see {@link CustomizationPreferencePage}
+ *
+ * @author Camille Letavernier
+ */
public class CustomizationPreferencesInitializer extends AbstractPreferenceInitializer {
@Override
diff --git a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/providers/ConstraintDescriptorContentProvider.java b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/providers/ConstraintDescriptorContentProvider.java
index 912fbabe2b7..dbd0b6d1ad6 100644
--- a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/providers/ConstraintDescriptorContentProvider.java
+++ b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/providers/ConstraintDescriptorContentProvider.java
@@ -21,8 +21,21 @@ import org.eclipse.papyrus.properties.contexts.Section;
import org.eclipse.papyrus.properties.contexts.Tab;
import org.eclipse.papyrus.properties.contexts.View;
+/**
+ * A ContentProvider for retrieving the available ConstraintDescriptors
+ *
+ *
+ * @author Camille Letavernier
+ */
public class ConstraintDescriptorContentProvider extends AbstractContextualContentProvider {
+ /**
+ *
+ * Constructor.
+ *
+ * @param source
+ * The source Object used to retrieve the available ConstraintDescriptors
+ */
public ConstraintDescriptorContentProvider(EObject source) {
super(source);
}
diff --git a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/providers/DataContextElementContentProvider.java b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/providers/DataContextElementContentProvider.java
index f2aad2bee1d..bf89bd3eaa1 100644
--- a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/providers/DataContextElementContentProvider.java
+++ b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/providers/DataContextElementContentProvider.java
@@ -27,11 +27,21 @@ import org.eclipse.papyrus.properties.contexts.DataContextPackage;
import org.eclipse.papyrus.properties.contexts.DataContextRoot;
import org.eclipse.papyrus.widgets.providers.AbstractStaticContentProvider;
-
+/**
+ * A ContentProvider for retrieving the available DataContextElements
+ *
+ * @author Camille Letavernier
+ */
public class DataContextElementContentProvider extends AbstractStaticContentProvider {
private List<DataContextElement> elements;
+ /**
+ *
+ * Constructor.
+ *
+ * @param element
+ */
public DataContextElementContentProvider(DataContextElement element) {
Context context = findContext(element);
Set<Context> allContexts = new HashSet<Context>();
diff --git a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/query/ShowContextQuery.java b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/query/ShowContextQuery.java
index 823edf35c9c..0bf924cddee 100644
--- a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/query/ShowContextQuery.java
+++ b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/query/ShowContextQuery.java
@@ -17,7 +17,11 @@ import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
import org.eclipse.papyrus.properties.contexts.Context;
import org.eclipse.papyrus.properties.customization.editor.actions.ToggleDataContextAction;
-
+/**
+ * A Query to test if the DataContextElements should be displayed in the UIEditor
+ *
+ * @author Camille Letavernier
+ */
public class ShowContextQuery implements IJavaModelQuery<Context, Boolean> {
public Boolean evaluate(Context context, ParameterValueList parameters) throws ModelQueryExecutionException {
diff --git a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/ui/CustomizationDialog.java b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/ui/CustomizationDialog.java
index dd952cfc007..8a40545edc8 100644
--- a/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/ui/CustomizationDialog.java
+++ b/incoming/org.eclipse.papyrus.properties.customization/src/org/eclipse/papyrus/properties/customization/ui/CustomizationDialog.java
@@ -48,7 +48,7 @@ import org.eclipse.swt.widgets.Shell;
*
* @author Camille Letavernier
*/
-public class CustomizationDialog extends TrayDialog {
+public class CustomizationDialog extends TrayDialog implements SelectionListener {
private List availableContexts;
@@ -67,7 +67,7 @@ public class CustomizationDialog extends TrayDialog {
* @param shell
* The shell in which the dialog will be opened
*/
- public CustomizationDialog(Shell shell) {
+ public CustomizationDialog(final Shell shell) {
super(shell);
}
@@ -95,15 +95,16 @@ public class CustomizationDialog extends TrayDialog {
availableContextsViewer.setLabelProvider(new LabelProvider() {
@Override
- public String getText(Object element) {
+ public String getText(final Object element) {
if(element != null && element instanceof Context) {
Context context = (Context)element;
- return context.getName() + (ConfigurationManager.instance.isPlugin(context) ? Messages.CustomizationDialog_plugin : ""); //$NON-NLS-2$ //$NON-NLS-1$
+ return context.getName() + (ConfigurationManager.instance.isPlugin(context) ? Messages.CustomizationDialog_plugin : ""); //$NON-NLS-1$
}
return super.getText(element);
}
});
availableContextsViewer.setInput(contexts);
+ availableContexts.addSelectionListener(this);
Composite controls = new Composite(contents, SWT.NONE);
controls.setLayout(new FillLayout(SWT.VERTICAL));
@@ -112,121 +113,23 @@ public class CustomizationDialog extends TrayDialog {
copyContext.setText(Messages.CustomizationDialog_copy);
copyContext.setToolTipText(Messages.CustomizationDialog_createNewCopyByCopy);
copyContext.setEnabled(false);
- copyContext.addSelectionListener(new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- CopyContextAction action = new CopyContextAction();
- IStructuredSelection selection = (IStructuredSelection)availableContextsViewer.getSelection();
- if(selection.isEmpty())
- return;
-
- Object element = selection.getFirstElement();
- if(element instanceof Context) {
- Context sourceContext = (Context)element;
- try {
-
- InputDialog dialog = new InputDialog(getShell(), Messages.CustomizationDialog_enterConfigurationName, Messages.CustomizationDialog_enterConfigurationName, Messages.CustomizationDialog_copyOf + sourceContext.getName(), new IInputValidator() {
-
- public String isValid(String newText) {
- if(newText.trim().equals("")) { //$NON-NLS-1$
- return Messages.CustomizationDialog_configurationNameNotEmpty;
- }
- if(ConfigurationManager.instance.getContext(newText) != null) {
- return Messages.CustomizationDialog_configurationWithSameNameExists;
- }
- return null;
- }
-
- });
- dialog.setTitle(Messages.CustomizationDialog_configurationName);
- int result = dialog.open();
- if(result == Window.OK) {
- String targetName = dialog.getText();
- action.copy(sourceContext, targetName, false);
- availableContextsViewer.setInput(ConfigurationManager.instance.getContexts());
- }
- } catch (IOException ex) {
- Activator.log.error(ex);
- }
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- //Nothing
- }
-
- });
+ copyContext.addSelectionListener(this);
editContext = new Button(controls, SWT.PUSH);
editContext.setText(Messages.CustomizationDialog_edit);
editContext.setToolTipText(Messages.CustomizationDialog_editSelectedContext);
editContext.setEnabled(false);
- editContext.addSelectionListener(new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- EditContextAction action = new EditContextAction();
- IStructuredSelection selection = (IStructuredSelection)availableContextsViewer.getSelection();
- if(selection.isEmpty())
- return;
-
- Object element = selection.getFirstElement();
- if(element instanceof Context) {
- Context sourceContext = (Context)element;
- try {
- action.openEditor(sourceContext);
- close();
- } catch (Exception ex) {
- Activator.log.error("An error occured while initializing the customization editor", ex); //$NON-NLS-1$
- return;
- }
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- //Nothing
- }
-
- });
+ editContext.addSelectionListener(this);
removeContext = new Button(controls, SWT.PUSH);
removeContext.setText(Messages.CustomizationDialog_delete);
removeContext.setToolTipText(Messages.CustomizationDialog_removeSelectedContext);
removeContext.setEnabled(false);
- removeContext.addSelectionListener(new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- RemoveContextAction action = new RemoveContextAction();
- IStructuredSelection selection = (IStructuredSelection)availableContextsViewer.getSelection();
- if(selection.isEmpty())
- return;
-
- Object element = selection.getFirstElement();
- if(element instanceof Context) {
- Context sourceContext = (Context)element;
- if(ConfigurationManager.instance.isPlugin(sourceContext)) {
- Activator.log.warn(Messages.CustomizationDialog_cannotDeletePluginContext);
- //Plugin context cannot be deleted
- return;
- }
-
- MessageDialog dialog = new MessageDialog(getShell(), Messages.CustomizationDialog_deleteContext, null, Messages.CustomizationDialog_deleteContextConfirmation1 + sourceContext.getName() + Messages.CustomizationDialog_deleteContextConfirmation2, MessageDialog.CONFIRM, new String[]{ Messages.CustomizationDialog_yes, Messages.CustomizationDialog_no, Messages.CustomizationDialog_cancel }, 2);
- int result = dialog.open();
- if(result == 0) { //0 is "Yes" (It is *not* the same 0 as Window.OK)
- action.removeContext(sourceContext);
- availableContextsViewer.setInput(ConfigurationManager.instance.getContexts());
- }
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- //Nothing
- }
-
- });
+ removeContext.addSelectionListener(this);
availableContextsViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
+ public void selectionChanged(final SelectionChangedEvent event) {
IStructuredSelection selection = (IStructuredSelection)event.getSelection();
boolean activate = false;
@@ -251,6 +154,89 @@ public class CustomizationDialog extends TrayDialog {
getShell().pack();
}
+ protected void editAction() {
+ EditContextAction action = new EditContextAction();
+ IStructuredSelection selection = (IStructuredSelection)availableContextsViewer.getSelection();
+ if(selection.isEmpty()) {
+ return;
+ }
+
+ Object element = selection.getFirstElement();
+ if(element instanceof Context) {
+ Context sourceContext = (Context)element;
+ try {
+ action.openEditor(sourceContext);
+ close();
+ } catch (Exception ex) {
+ Activator.log.error("An error occured while initializing the customization editor", ex); //$NON-NLS-1$
+ return;
+ }
+ }
+ }
+
+ protected void copyAction() {
+ CopyContextAction action = new CopyContextAction();
+ IStructuredSelection selection = (IStructuredSelection)availableContextsViewer.getSelection();
+ if(selection.isEmpty()) {
+ return;
+ }
+
+ Object element = selection.getFirstElement();
+ if(element instanceof Context) {
+ Context sourceContext = (Context)element;
+ try {
+
+ InputDialog dialog = new InputDialog(getShell(), Messages.CustomizationDialog_enterConfigurationName, Messages.CustomizationDialog_enterConfigurationName, Messages.CustomizationDialog_copyOf + sourceContext.getName(), new IInputValidator() {
+
+ public String isValid(final String newText) {
+ if(newText.trim().equals("")) { //$NON-NLS-1$
+ return Messages.CustomizationDialog_configurationNameNotEmpty;
+ }
+ if(ConfigurationManager.instance.getContext(newText) != null) {
+ return Messages.CustomizationDialog_configurationWithSameNameExists;
+ }
+ return null;
+ }
+
+ });
+ dialog.setTitle(Messages.CustomizationDialog_configurationName);
+ int result = dialog.open();
+ if(result == Window.OK) {
+ String targetName = dialog.getText();
+ action.copy(sourceContext, targetName, false);
+ availableContextsViewer.setInput(ConfigurationManager.instance.getContexts());
+ }
+ } catch (IOException ex) {
+ Activator.log.error(ex);
+ }
+ }
+ }
+
+ protected void deleteAction() {
+ RemoveContextAction action = new RemoveContextAction();
+ IStructuredSelection selection = (IStructuredSelection)availableContextsViewer.getSelection();
+ if(selection.isEmpty()) {
+ return;
+ }
+
+ Object element = selection.getFirstElement();
+ if(element instanceof Context) {
+ Context sourceContext = (Context)element;
+ if(ConfigurationManager.instance.isPlugin(sourceContext)) {
+ Activator.log.warn(Messages.CustomizationDialog_cannotDeletePluginContext);
+ //Plugin context cannot be deleted
+ return;
+ }
+
+ MessageDialog dialog = new MessageDialog(getShell(), Messages.CustomizationDialog_deleteContext, null, Messages.CustomizationDialog_deleteContextConfirmation1 + sourceContext.getName() + Messages.CustomizationDialog_deleteContextConfirmation2, MessageDialog.CONFIRM, new String[]{ Messages.CustomizationDialog_yes, Messages.CustomizationDialog_no, Messages.CustomizationDialog_cancel }, 2);
+ int result = dialog.open();
+ if(result == 0) { //0 is "Yes" (It is *not* the same 0 as Window.OK)
+ action.removeContext(sourceContext);
+ availableContextsViewer.setInput(ConfigurationManager.instance.getContexts());
+ }
+ }
+ }
+
@Override
protected int getShellStyle() {
return super.getShellStyle() | SWT.RESIZE;
@@ -262,4 +248,27 @@ public class CustomizationDialog extends TrayDialog {
}
+ public void widgetSelected(final SelectionEvent e) {
+ if(e.widget == editContext) {
+ editAction();
+ } else if(e.widget == removeContext) {
+ deleteAction();
+ } else if(e.widget == copyContext) {
+ copyAction();
+ }
+ }
+
+ public void widgetDefaultSelected(final SelectionEvent e) {
+ if(e.widget == availableContexts) {
+ IStructuredSelection selection = (IStructuredSelection)availableContextsViewer.getSelection();
+ if(!selection.isEmpty()) {
+ Context context = (Context)selection.getFirstElement();
+ if(ConfigurationManager.instance.isPlugin(context)) {
+ copyAction();
+ } else {
+ editAction();
+ }
+ }
+ }
+ }
}

Back to the top