diff options
| author | Mélanie Bats | 2016-09-28 13:46:37 +0000 |
|---|---|---|
| committer | Pierre-Charles David | 2016-10-03 07:36:59 +0000 |
| commit | efcc0bf9b38c585822a878eec3a3f7a865f22d09 (patch) | |
| tree | 20bc8a008883dcba90e55d9f20427dfe091c7abd | |
| parent | bfe4d497c5317f4a411d0543849916c051e40d49 (diff) | |
| download | org.eclipse.sirius-efcc0bf9b38c585822a878eec3a3f7a865f22d09.tar.gz org.eclipse.sirius-efcc0bf9b38c585822a878eec3a3f7a865f22d09.tar.xz org.eclipse.sirius-efcc0bf9b38c585822a878eec3a3f7a865f22d09.zip | |
[496058] Add the all semantic elements to the default rules
When the user clicks on an element all the semantic elements properties
are visible. The main semantic element is represented by the first tab
and the other additional semantic elements below one per tab.
Bug: 496058
Change-Id: I81d943440ebfdb6674b0658f2a2688896012498b
Signed-off-by: Mélanie Bats <melanie.bats@obeo.fr>
3 files changed, 14 insertions, 3 deletions
diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign index 7794841f87..47a0a3cd0f 100644 --- a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" name="PropertiesTests" version="11.0.0.201601261200"> +<description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" name="PropertiesTests" version="11.0.0.201609021200"> <ownedViewpoints name="PropertiesTests"> <ownedRepresentations xsi:type="description_1:DiagramDescription" name="Diagram" domainClass="propertiestests.TestRoot" enablePopupBars="true"> <metamodel href="http://www.eclipse.org/sirius/tests/properties/1.0.0#/"/> <defaultLayer name="Default"> - <nodeMappings name="TestElement" domainClass="propertiestests.TestElement"> + <nodeMappings name="TestElement" semanticElements="aql:self.references" domainClass="propertiestests.TestElement"> <style xsi:type="style:SquareDescription" labelExpression="feature:stringAttribute" sizeComputationExpression="10" labelPosition="node" resizeKind="NSEW"> <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> diff --git a/plugins/org.eclipse.sirius.ui.properties/model/properties.odesign b/plugins/org.eclipse.sirius.ui.properties/model/properties.odesign index 1f56227a0f..7bf8ffe26d 100644 --- a/plugins/org.eclipse.sirius.ui.properties/model/properties.odesign +++ b/plugins/org.eclipse.sirius.ui.properties/model/properties.odesign @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="ASCII"?> <properties:ViewExtensionDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:properties="http://www.eclipse.org/sirius/properties/1.0.0" xmlns:properties-ext-widgets-reference="http://www.eclipse.org/sirius/properties/1.0.0/ext/widgets/reference" xmlns:tool="http://www.eclipse.org/sirius/description/tool/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/tool/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description/tool" identifier="org.eclipse.sirius.ui.properties"> - <pages identifier="org.eclipse.sirius.ui.properties.defaultpage" labelExpression="General" groups="//@groups.0"/> + <pages identifier="org.eclipse.sirius.ui.properties.defaultpage" labelExpression="aql:self.eefViewText()" semanticCandidateExpression="aql:input.getAllSemanticElements()" groups="//@groups.0"/> <groups identifier="org.eclipse.sirius.ui.properties.defaultgroup" labelExpression="aql:self.eefViewCategory()" semanticCandidateExpression="aql:self.eefViewCategories()" preconditionExpression=""> <controls xsi:type="properties:DynamicMappingFor" iterator="eStructuralFeature" iterableExpression="aql:self.eefViewEStructuralFeatures()"> <ifs predicateExpression="aql:(eStructuralFeature.eType.instanceTypeName = 'java.lang.String' or eStructuralFeature.eType.instanceTypeName = 'int' or eStructuralFeature.eType.instanceTypeName = 'java.lang.Integer' or eStructuralFeature.eType.instanceTypeName = 'double' or eStructuralFeature.eType.instanceTypeName = 'java.lang.Double' or eStructuralFeature.eType.instanceTypeName = 'char' or eStructuralFeature.eType.instanceTypeName = 'java.lang.Character' or eStructuralFeature.eType.instanceTypeName = 'short' or eStructuralFeature.eType.instanceTypeName = 'java.lang.Short' or eStructuralFeature.eType.instanceTypeName = 'long' or eStructuralFeature.eType.instanceTypeName = 'java.lang.Long' or eStructuralFeature.eType.instanceTypeName = 'float' or eStructuralFeature.eType.instanceTypeName = 'java.lang.Float' or eStructuralFeature.eType.instanceTypeName = 'java.util.Date') and not(eStructuralFeature.many) and not self.eefViewMultiline(eStructuralFeature)"> diff --git a/plugins/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/SiriusToolServices.java b/plugins/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/SiriusToolServices.java index d8fcbb6ff8..fd47377ce4 100644 --- a/plugins/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/SiriusToolServices.java +++ b/plugins/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/SiriusToolServices.java @@ -396,6 +396,17 @@ public class SiriusToolServices { } /** + * Returns all the semantic elements for the given input descriptor. + * + * @param sid + * The input descriptor + * @return The semantic element for the given input descriptor + */ + public Collection<EObject> getAllSemanticElements(SiriusInputDescriptor sid) { + return sid.getAllSemanticElements(); + } + + /** * Returns the original selection for the given input descriptor. * * @param sid |
