diff options
| author | Stéphane Bégaudeau | 2016-04-05 08:04:07 +0000 |
|---|---|---|
| committer | Pierre-Charles David | 2016-04-20 08:08:35 +0000 |
| commit | d1f7c6e6c67a3fef4750b05e3d30787f9fba88ef (patch) | |
| tree | 06fa6bc49eeffba2d4b540f46a6d415e9e71ad47 | |
| parent | 094df8768a5219d949711937864187cc8508b64b (diff) | |
| download | org.eclipse.sirius-d1f7c6e6c67a3fef4750b05e3d30787f9fba88ef.tar.gz org.eclipse.sirius-d1f7c6e6c67a3fef4750b05e3d30787f9fba88ef.tar.xz org.eclipse.sirius-d1f7c6e6c67a3fef4750b05e3d30787f9fba88ef.zip | |
[482528] Add support for layout
Bug: 482528
Change-Id: I62feff925171c930055cd2e93ed362df79a51931
Signed-off-by: Stéphane Bégaudeau <stephane.begaudeau@obeo.fr>
52 files changed, 3376 insertions, 764 deletions
diff --git a/incubation/org.eclipse.sirius.editor.properties/help/contexts.xml b/incubation/org.eclipse.sirius.editor.properties/help/contexts.xml index a3a68f00c5..034cc060cf 100644 --- a/incubation/org.eclipse.sirius.editor.properties/help/contexts.xml +++ b/incubation/org.eclipse.sirius.editor.properties/help/contexts.xml @@ -69,6 +69,17 @@ </description> </context> + <context id="ControlDescription"> + <description> + + + + <!-- Start of user code ControlDescription description --> + + <!-- End of user code ControlDescription description --> + + </description> + </context> <context id="ContainerDescription"> <description> @@ -80,6 +91,39 @@ </description> </context> + <context id="LayoutDescription"> + <description> + + + + <!-- Start of user code LayoutDescription description --> + + <!-- End of user code LayoutDescription description --> + + </description> + </context> + <context id="FillLayoutDescription"> + <description> + + + + <!-- Start of user code FillLayoutDescription description --> + + <!-- End of user code FillLayoutDescription description --> + + </description> + </context> + <context id="GridLayoutDescription"> + <description> + + + + <!-- Start of user code GridLayoutDescription description --> + + <!-- End of user code GridLayoutDescription description --> + + </description> + </context> <context id="WidgetDescription"> <description> diff --git a/incubation/org.eclipse.sirius.editor.properties/plugin.xml b/incubation/org.eclipse.sirius.editor.properties/plugin.xml index 18ca68288a..e6650eb7ad 100644 --- a/incubation/org.eclipse.sirius.editor.properties/plugin.xml +++ b/incubation/org.eclipse.sirius.editor.properties/plugin.xml @@ -315,23 +315,37 @@ class="org.eclipse.sirius.properties.editor.properties.sections.properties.widgetdescription.WidgetDescriptionLabelExpressionPropertySection" id="properties.section.widgetDescription.LabelExpression" filter="org.eclipse.sirius.properties.editor.properties.filters.properties.widgetdescription.WidgetDescriptionLabelExpressionFilter" - afterSection="properties.section.widgetDescription.Identifier" tab="viewpoint.tab.general"> <input type="org.eclipse.sirius.properties.WidgetDescription"/> </propertySection> <propertySection - class="org.eclipse.sirius.properties.editor.properties.sections.properties.widgetdescription.WidgetDescriptionIdentifierPropertySection" - id="properties.section.widgetDescription.Identifier" - filter="org.eclipse.sirius.properties.editor.properties.filters.properties.widgetdescription.WidgetDescriptionIdentifierFilter" + class="org.eclipse.sirius.properties.editor.properties.sections.properties.gridlayoutdescription.GridLayoutDescriptionMakeColumnsWithEqualWidthPropertySection" + id="properties.section.gridLayoutDescription.MakeColumnsWithEqualWidth" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.gridlayoutdescription.GridLayoutDescriptionMakeColumnsWithEqualWidthFilter" + afterSection="properties.section.gridLayoutDescription.NumberOfColumns" tab="viewpoint.tab.general"> - <input type="org.eclipse.sirius.properties.WidgetDescription"/> + <input type="org.eclipse.sirius.properties.GridLayoutDescription"/> + </propertySection> + <propertySection + class="org.eclipse.sirius.properties.editor.properties.sections.properties.gridlayoutdescription.GridLayoutDescriptionNumberOfColumnsPropertySection" + id="properties.section.gridLayoutDescription.NumberOfColumns" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.gridlayoutdescription.GridLayoutDescriptionNumberOfColumnsFilter" + tab="viewpoint.tab.general"> + <input type="org.eclipse.sirius.properties.GridLayoutDescription"/> + </propertySection> + <propertySection + class="org.eclipse.sirius.properties.editor.properties.sections.properties.filllayoutdescription.FillLayoutDescriptionOrientationPropertySection" + id="properties.section.fillLayoutDescription.Orientation" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.filllayoutdescription.FillLayoutDescriptionOrientationFilter" + tab="viewpoint.tab.general"> + <input type="org.eclipse.sirius.properties.FillLayoutDescription"/> </propertySection> <propertySection - class="org.eclipse.sirius.properties.editor.properties.sections.properties.containerdescription.ContainerDescriptionIdentifierPropertySection" - id="properties.section.containerDescription.Identifier" - filter="org.eclipse.sirius.properties.editor.properties.filters.properties.containerdescription.ContainerDescriptionIdentifierFilter" + class="org.eclipse.sirius.properties.editor.properties.sections.properties.controldescription.ControlDescriptionIdentifierPropertySection" + id="properties.section.controlDescription.Identifier" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.controldescription.ControlDescriptionIdentifierFilter" tab="viewpoint.tab.general"> - <input type="org.eclipse.sirius.properties.ContainerDescription"/> + <input type="org.eclipse.sirius.properties.ControlDescription"/> </propertySection> <propertySection class="org.eclipse.sirius.properties.editor.properties.sections.properties.groupdescription.GroupDescriptionPreconditionExpressionPropertySection" diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/containerdescription/ContainerDescriptionIdentifierFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/controldescription/ControlDescriptionIdentifierFilter.java index f8c8a8b5e1..1d16f962ca 100644 --- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/containerdescription/ContainerDescriptionIdentifierFilter.java +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/controldescription/ControlDescriptionIdentifierFilter.java @@ -7,7 +7,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.eclipse.sirius.properties.editor.properties.filters.properties.containerdescription; +package org.eclipse.sirius.properties.editor.properties.filters.properties.controldescription; // Start of user code specific imports @@ -20,14 +20,14 @@ import org.eclipse.sirius.properties.PropertiesPackage; /** * A filter for the identifier property section. */ -public class ContainerDescriptionIdentifierFilter extends ViewpointPropertyFilter { +public class ControlDescriptionIdentifierFilter extends ViewpointPropertyFilter { /** * {@inheritDoc} */ @Override protected EStructuralFeature getFeature() { - return PropertiesPackage.eINSTANCE.getContainerDescription_Identifier(); + return PropertiesPackage.eINSTANCE.getControlDescription_Identifier(); } /** @@ -35,7 +35,7 @@ public class ContainerDescriptionIdentifierFilter extends ViewpointPropertyFilte */ @Override protected boolean isRightInputType(Object arg0) { - return arg0 instanceof org.eclipse.sirius.properties.ContainerDescription; + return arg0 instanceof org.eclipse.sirius.properties.ControlDescription; } // Start of user code user methods diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/widgetdescription/WidgetDescriptionIdentifierFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/filllayoutdescription/FillLayoutDescriptionOrientationFilter.java index fdfdfa5b4c..2eb9ea1c13 100644 --- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/widgetdescription/WidgetDescriptionIdentifierFilter.java +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/filllayoutdescription/FillLayoutDescriptionOrientationFilter.java @@ -7,7 +7,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.eclipse.sirius.properties.editor.properties.filters.properties.widgetdescription; +package org.eclipse.sirius.properties.editor.properties.filters.properties.filllayoutdescription; // Start of user code specific imports @@ -18,16 +18,16 @@ import org.eclipse.sirius.properties.PropertiesPackage; // End of user code specific imports /** - * A filter for the identifier property section. + * A filter for the orientation property section. */ -public class WidgetDescriptionIdentifierFilter extends ViewpointPropertyFilter { +public class FillLayoutDescriptionOrientationFilter extends ViewpointPropertyFilter { /** * {@inheritDoc} */ @Override protected EStructuralFeature getFeature() { - return PropertiesPackage.eINSTANCE.getWidgetDescription_Identifier(); + return PropertiesPackage.eINSTANCE.getFillLayoutDescription_Orientation(); } /** @@ -35,7 +35,7 @@ public class WidgetDescriptionIdentifierFilter extends ViewpointPropertyFilter { */ @Override protected boolean isRightInputType(Object arg0) { - return arg0 instanceof org.eclipse.sirius.properties.WidgetDescription; + return arg0 instanceof org.eclipse.sirius.properties.FillLayoutDescription; } // Start of user code user methods diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/gridlayoutdescription/GridLayoutDescriptionMakeColumnsWithEqualWidthFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/gridlayoutdescription/GridLayoutDescriptionMakeColumnsWithEqualWidthFilter.java new file mode 100644 index 0000000000..42a41ca571 --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/gridlayoutdescription/GridLayoutDescriptionMakeColumnsWithEqualWidthFilter.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.properties.editor.properties.filters.properties.gridlayoutdescription; + +// Start of user code specific imports + +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.sirius.editor.properties.filters.common.ViewpointPropertyFilter; +import org.eclipse.sirius.properties.PropertiesPackage; + +// End of user code specific imports + +/** + * A filter for the makeColumnsWithEqualWidth property section. + */ +public class GridLayoutDescriptionMakeColumnsWithEqualWidthFilter extends ViewpointPropertyFilter { + + /** + * {@inheritDoc} + */ + @Override + protected EStructuralFeature getFeature() { + return PropertiesPackage.eINSTANCE.getGridLayoutDescription_MakeColumnsWithEqualWidth(); + } + + /** + * {@inheritDoc} + */ + @Override + protected boolean isRightInputType(Object arg0) { + return arg0 instanceof org.eclipse.sirius.properties.GridLayoutDescription; + } + + // Start of user code user methods + + // End of user code user methods + +} diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/gridlayoutdescription/GridLayoutDescriptionNumberOfColumnsFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/gridlayoutdescription/GridLayoutDescriptionNumberOfColumnsFilter.java new file mode 100644 index 0000000000..1f8cffe645 --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/gridlayoutdescription/GridLayoutDescriptionNumberOfColumnsFilter.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.properties.editor.properties.filters.properties.gridlayoutdescription; + +// Start of user code specific imports + +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.sirius.editor.properties.filters.common.ViewpointPropertyFilter; +import org.eclipse.sirius.properties.PropertiesPackage; + +// End of user code specific imports + +/** + * A filter for the numberOfColumns property section. + */ +public class GridLayoutDescriptionNumberOfColumnsFilter extends ViewpointPropertyFilter { + + /** + * {@inheritDoc} + */ + @Override + protected EStructuralFeature getFeature() { + return PropertiesPackage.eINSTANCE.getGridLayoutDescription_NumberOfColumns(); + } + + /** + * {@inheritDoc} + */ + @Override + protected boolean isRightInputType(Object arg0) { + return arg0 instanceof org.eclipse.sirius.properties.GridLayoutDescription; + } + + // Start of user code user methods + + // End of user code user methods + +} diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/widgetdescription/WidgetDescriptionIdentifierPropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/controldescription/ControlDescriptionIdentifierPropertySection.java index d4e7b42075..d19820c560 100644 --- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/widgetdescription/WidgetDescriptionIdentifierPropertySection.java +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/controldescription/ControlDescriptionIdentifierPropertySection.java @@ -7,7 +7,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.eclipse.sirius.properties.editor.properties.sections.properties.widgetdescription; +package org.eclipse.sirius.properties.editor.properties.sections.properties.controldescription; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.sirius.editor.editorPlugin.SiriusEditor; @@ -19,9 +19,9 @@ import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; // End of user code imports /** - * A section for the identifier property of a WidgetDescription object. + * A section for the identifier property of a ControlDescription object. */ -public class WidgetDescriptionIdentifierPropertySection extends AbstractTextPropertySection { +public class ControlDescriptionIdentifierPropertySection extends AbstractTextPropertySection { /** * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextPropertySection#getDefaultLabelText() @@ -49,7 +49,7 @@ public class WidgetDescriptionIdentifierPropertySection extends AbstractTextProp */ @Override public EAttribute getFeature() { - return PropertiesPackage.eINSTANCE.getWidgetDescription_Identifier(); + return PropertiesPackage.eINSTANCE.getControlDescription_Identifier(); } /** diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/filllayoutdescription/FillLayoutDescriptionOrientationPropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/filllayoutdescription/FillLayoutDescriptionOrientationPropertySection.java new file mode 100644 index 0000000000..2ab76ecc8e --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/filllayoutdescription/FillLayoutDescriptionOrientationPropertySection.java @@ -0,0 +1,90 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.properties.editor.properties.sections.properties.filllayoutdescription; + +// Start of user code imports + +import java.util.List; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.sirius.editor.properties.sections.common.AbstractRadioButtonPropertySection; +import org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION; +import org.eclipse.sirius.properties.PropertiesPackage; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; + +// End of user code imports + +/** + * A section for the orientation property of a FillLayoutDescription object. + */ +public class FillLayoutDescriptionOrientationPropertySection extends AbstractRadioButtonPropertySection { + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractRadioButtonPropertySection#getDefaultLabelText() + */ + @Override + protected String getDefaultLabelText() { + return "Orientation"; //$NON-NLS-1$ + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractRadioButtonPropertySection#getLabelText() + */ + @Override + protected String getLabelText() { + String labelText; + labelText = super.getLabelText() + ":"; //$NON-NLS-1$ + // Start of user code get label text + + // End of user code get label text + return labelText; + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractRadioButtonPropertySection#getFeature() + */ + @Override + protected EAttribute getFeature() { + return PropertiesPackage.eINSTANCE.getFillLayoutDescription_Orientation(); + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractRadioButtonPropertySection#getFeatureValue(int) + */ + @Override + protected Object getFeatureValue(int index) { + return getChoiceOfValues().get(index); + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractRadioButtonPropertySection#isEqual(int) + */ + @Override + protected boolean isEqual(int index) { + return getChoiceOfValues().get(index).equals(eObject.eGet(getFeature())); + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractRadioButtonPropertySection#getEnumerationFeatureValues() + */ + @Override + protected List<?> getChoiceOfValues() { + return FILL_LAYOUT_ORIENTATION.VALUES; + } + + /** + * {@inheritDoc} + */ + @Override + public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { + super.createControls(parent, tabbedPropertySheetPage); + + } +} diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/containerdescription/ContainerDescriptionIdentifierPropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/gridlayoutdescription/GridLayoutDescriptionMakeColumnsWithEqualWidthPropertySection.java index ced35f9b88..2cf8c8da3f 100644 --- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/containerdescription/ContainerDescriptionIdentifierPropertySection.java +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/gridlayoutdescription/GridLayoutDescriptionMakeColumnsWithEqualWidthPropertySection.java @@ -7,10 +7,9 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.eclipse.sirius.properties.editor.properties.sections.properties.containerdescription; +package org.eclipse.sirius.properties.editor.properties.sections.properties.gridlayoutdescription; import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.sirius.editor.editorPlugin.SiriusEditor; import org.eclipse.sirius.editor.properties.sections.common.AbstractTextPropertySection; import org.eclipse.sirius.properties.PropertiesPackage; import org.eclipse.swt.widgets.Composite; @@ -19,16 +18,17 @@ import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; // End of user code imports /** - * A section for the identifier property of a ContainerDescription object. + * A section for the makeColumnsWithEqualWidth property of a + * GridLayoutDescription object. */ -public class ContainerDescriptionIdentifierPropertySection extends AbstractTextPropertySection { +public class GridLayoutDescriptionMakeColumnsWithEqualWidthPropertySection extends AbstractTextPropertySection { /** * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextPropertySection#getDefaultLabelText() */ @Override protected String getDefaultLabelText() { - return "Identifier"; //$NON-NLS-1$ + return "MakeColumnsWithEqualWidth"; //$NON-NLS-1$ } /** @@ -37,7 +37,7 @@ public class ContainerDescriptionIdentifierPropertySection extends AbstractTextP @Override protected String getLabelText() { String labelText; - labelText = super.getLabelText() + "*:"; //$NON-NLS-1$ + labelText = super.getLabelText() + ":"; //$NON-NLS-1$ // Start of user code get label text // End of user code get label text @@ -49,7 +49,7 @@ public class ContainerDescriptionIdentifierPropertySection extends AbstractTextP */ @Override public EAttribute getFeature() { - return PropertiesPackage.eINSTANCE.getContainerDescription_Identifier(); + return PropertiesPackage.eINSTANCE.getGridLayoutDescription_MakeColumnsWithEqualWidth(); } /** @@ -75,8 +75,6 @@ public class ContainerDescriptionIdentifierPropertySection extends AbstractTextP public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { super.createControls(parent, tabbedPropertySheetPage); - nameLabel.setFont(SiriusEditor.getFontRegistry().get("required")); - // Start of user code create controls // End of user code create controls diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/gridlayoutdescription/GridLayoutDescriptionNumberOfColumnsPropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/gridlayoutdescription/GridLayoutDescriptionNumberOfColumnsPropertySection.java new file mode 100644 index 0000000000..74a2d513ae --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/gridlayoutdescription/GridLayoutDescriptionNumberOfColumnsPropertySection.java @@ -0,0 +1,94 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.properties.editor.properties.sections.properties.gridlayoutdescription; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.sirius.editor.properties.sections.common.AbstractTextPropertySection; +import org.eclipse.sirius.properties.PropertiesPackage; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; + +// End of user code imports + +/** + * A section for the numberOfColumns property of a GridLayoutDescription object. + */ +public class GridLayoutDescriptionNumberOfColumnsPropertySection extends AbstractTextPropertySection { + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextPropertySection#getDefaultLabelText() + */ + @Override + protected String getDefaultLabelText() { + return "NumberOfColumns"; //$NON-NLS-1$ + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextPropertySection#getLabelText() + */ + @Override + protected String getLabelText() { + String labelText; + labelText = super.getLabelText() + ":"; //$NON-NLS-1$ + // Start of user code get label text + + // End of user code get label text + return labelText; + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextPropertySection#getFeature() + */ + @Override + public EAttribute getFeature() { + return PropertiesPackage.eINSTANCE.getGridLayoutDescription_NumberOfColumns(); + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextPropertySection#getFeatureValue(String) + */ + @Override + protected Object getFeatureValue(String newText) { + return newText; + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextPropertySection#isEqual(String) + */ + @Override + protected boolean isEqual(String newText) { + return getFeatureAsText().equals(newText); + } + + /** + * {@inheritDoc} + */ + @Override + public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { + super.createControls(parent, tabbedPropertySheetPage); + + // Start of user code create controls + + // End of user code create controls + + } + + /** + * {@inheritDoc} + */ + @Override + protected String getPropertyDescription() { + return ""; + } + + // Start of user code user operations + + // End of user code user operations +} diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/FillLayoutDescription.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/FillLayoutDescription.gif Binary files differnew file mode 100644 index 0000000000..e4b530eca1 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/FillLayoutDescription.gif diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/GridLayoutDescription.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/GridLayoutDescription.gif Binary files differnew file mode 100644 index 0000000000..cb1755a712 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/GridLayoutDescription.gif diff --git a/incubation/org.eclipse.sirius.properties.edit/plugin.properties b/incubation/org.eclipse.sirius.properties.edit/plugin.properties index 7e1bcde432..9a5781a7b7 100644 --- a/incubation/org.eclipse.sirius.properties.edit/plugin.properties +++ b/incubation/org.eclipse.sirius.properties.edit/plugin.properties @@ -201,3 +201,16 @@ _UI_CustomWidgetConditionalStyle_type = Custom Widget Conditional Style _UI_CustomDescription_style_feature = Style _UI_CustomDescription_conditionalStyles_feature = Conditional Styles _UI_CustomWidgetConditionalStyle_style_feature = Style +_UI_ControlDescription_type = Control Description +_UI_GroupDescription_controls_feature = Controls +_UI_ControlDescription_identifier_feature = Identifier +_UI_ContainerDescription_controls_feature = Controls +_UI_LayoutDescription_type = Layout Description +_UI_FillLayoutDescription_type = Fill Layout Description +_UI_GridLayoutDescription_type = Grid Layout Description +_UI_ContainerDescription_layout_feature = Layout +_UI_FillLayoutDescription_orientation_feature = Orientation +_UI_GridLayoutDescription_numberOfColumns_feature = Number Of Columns +_UI_GridLayoutDescription_makeColumnsWithEqualWidth_feature = Make Columns With Equal Width +_UI_FILL_LAYOUT_ORIENTATION_VERTICAL_literal = VERTICAL +_UI_FILL_LAYOUT_ORIENTATION_HORIZONTAL_literal = HORIZONTAL diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ContainerDescriptionItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ContainerDescriptionItemProvider.java index 39fd3993f7..e3df120420 100644 --- a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ContainerDescriptionItemProvider.java +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ContainerDescriptionItemProvider.java @@ -16,17 +16,8 @@ import java.util.List; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; import org.eclipse.emf.edit.provider.ViewerNotification; import org.eclipse.sirius.properties.ContainerDescription; import org.eclipse.sirius.properties.PropertiesFactory; @@ -39,8 +30,7 @@ import org.eclipse.sirius.properties.PropertiesPackage; * * @generated */ -public class ContainerDescriptionItemProvider extends ItemProviderAdapter - implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { +public class ContainerDescriptionItemProvider extends ControlDescriptionItemProvider { /** * This constructs an instance from a factory and a notifier. <!-- * begin-user-doc --> <!-- end-user-doc --> @@ -62,25 +52,11 @@ public class ContainerDescriptionItemProvider extends ItemProviderAdapter if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); - addIdentifierPropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the Identifier feature. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected void addIdentifierPropertyDescriptor(Object object) { - itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ContainerDescription_identifier_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ContainerDescription_identifier_feature", "_UI_ContainerDescription_type"), - PropertiesPackage.Literals.CONTAINER_DESCRIPTION__IDENTIFIER, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); - } - - /** * This specifies how to implement {@link #getChildren} and is used to * deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, @@ -94,8 +70,8 @@ public class ContainerDescriptionItemProvider extends ItemProviderAdapter public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); - childrenFeatures.add(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__WIDGETS); - childrenFeatures.add(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS); + childrenFeatures.add(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS); + childrenFeatures.add(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__LAYOUT); } return childrenFeatures; } @@ -150,11 +126,8 @@ public class ContainerDescriptionItemProvider extends ItemProviderAdapter updateChildren(notification); switch (notification.getFeatureID(ContainerDescription.class)) { - case PropertiesPackage.CONTAINER_DESCRIPTION__IDENTIFIER: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - case PropertiesPackage.CONTAINER_DESCRIPTION__WIDGETS: - case PropertiesPackage.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS: + case PropertiesPackage.CONTAINER_DESCRIPTION__CONTROLS: + case PropertiesPackage.CONTAINER_DESCRIPTION__LAYOUT: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } @@ -172,38 +145,33 @@ public class ContainerDescriptionItemProvider extends ItemProviderAdapter protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__WIDGETS, PropertiesFactory.eINSTANCE.createTextDescription())); + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createContainerDescription())); - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__WIDGETS, PropertiesFactory.eINSTANCE.createButtonDescription())); + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createTextDescription())); - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__WIDGETS, PropertiesFactory.eINSTANCE.createLabelDescription())); + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createButtonDescription())); - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__WIDGETS, PropertiesFactory.eINSTANCE.createCheckboxDescription())); + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createLabelDescription())); - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__WIDGETS, PropertiesFactory.eINSTANCE.createSelectDescription())); + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createCheckboxDescription())); - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__WIDGETS, PropertiesFactory.eINSTANCE.createTextAreaDescription())); + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createSelectDescription())); - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__WIDGETS, PropertiesFactory.eINSTANCE.createRadioDescription())); + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createDynamicMappingFor())); - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__WIDGETS, PropertiesFactory.eINSTANCE.createSingleReferenceDescription())); + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createTextAreaDescription())); - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__WIDGETS, PropertiesFactory.eINSTANCE.createMultipleReferencesDescription())); + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createRadioDescription())); - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__WIDGETS, PropertiesFactory.eINSTANCE.createCustomDescription())); + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createSingleReferenceDescription())); - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS, PropertiesFactory.eINSTANCE.createDynamicMappingFor())); - } + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createMultipleReferencesDescription())); - /** - * Return the resource locator for this item provider's resources. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public ResourceLocator getResourceLocator() { - return PropertiesEditPlugin.INSTANCE; + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createCustomDescription())); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__LAYOUT, PropertiesFactory.eINSTANCE.createFillLayoutDescription())); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__LAYOUT, PropertiesFactory.eINSTANCE.createGridLayoutDescription())); } } diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ControlDescriptionItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ControlDescriptionItemProvider.java new file mode 100644 index 0000000000..3242202356 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ControlDescriptionItemProvider.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + * + */ +package org.eclipse.sirius.properties.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.sirius.properties.ControlDescription; +import org.eclipse.sirius.properties.PropertiesPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.properties.ControlDescription} object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class ControlDescriptionItemProvider extends ItemProviderAdapter + implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ControlDescriptionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addIdentifierPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Identifier feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addIdentifierPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_ControlDescription_identifier_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ControlDescription_identifier_feature", "_UI_ControlDescription_type"), + PropertiesPackage.Literals.CONTROL_DESCRIPTION__IDENTIFIER, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ControlDescription) object).getIdentifier(); + return label == null || label.length() == 0 ? getString("_UI_ControlDescription_type") : getString("_UI_ControlDescription_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ControlDescription.class)) { + case PropertiesPackage.CONTROL_DESCRIPTION__IDENTIFIER: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return PropertiesEditPlugin.INSTANCE; + } + +} diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingForItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingForItemProvider.java index ab5f633987..861af397fb 100644 --- a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingForItemProvider.java +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingForItemProvider.java @@ -16,17 +16,10 @@ import java.util.List; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; import org.eclipse.emf.edit.provider.ViewerNotification; import org.eclipse.sirius.properties.DynamicMappingFor; import org.eclipse.sirius.properties.PropertiesFactory; @@ -39,8 +32,7 @@ import org.eclipse.sirius.properties.PropertiesPackage; * * @generated */ -public class DynamicMappingForItemProvider extends ItemProviderAdapter - implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { +public class DynamicMappingForItemProvider extends ControlDescriptionItemProvider { /** * This constructs an instance from a factory and a notifier. <!-- * begin-user-doc --> <!-- end-user-doc --> @@ -145,7 +137,7 @@ public class DynamicMappingForItemProvider extends ItemProviderAdapter */ @Override public String getText(Object object) { - String label = ((DynamicMappingFor) object).getIterator(); + String label = ((DynamicMappingFor) object).getIdentifier(); return label == null || label.length() == 0 ? getString("_UI_DynamicMappingFor_type") : getString("_UI_DynamicMappingFor_type") + " " + label; } @@ -187,15 +179,4 @@ public class DynamicMappingForItemProvider extends ItemProviderAdapter newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_FOR__IFS, PropertiesFactory.eINSTANCE.createDynamicMappingIf())); } - /** - * Return the resource locator for this item provider's resources. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public ResourceLocator getResourceLocator() { - return PropertiesEditPlugin.INSTANCE; - } - } diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/FillLayoutDescriptionItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/FillLayoutDescriptionItemProvider.java new file mode 100644 index 0000000000..64f95d6e57 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/FillLayoutDescriptionItemProvider.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + * + */ +package org.eclipse.sirius.properties.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION; +import org.eclipse.sirius.properties.FillLayoutDescription; +import org.eclipse.sirius.properties.PropertiesPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.properties.FillLayoutDescription} object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class FillLayoutDescriptionItemProvider extends LayoutDescriptionItemProvider { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public FillLayoutDescriptionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addOrientationPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Orientation feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addOrientationPropertyDescriptor(Object object) { + itemPropertyDescriptors.add( + createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FillLayoutDescription_orientation_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_FillLayoutDescription_orientation_feature", "_UI_FillLayoutDescription_type"), + PropertiesPackage.Literals.FILL_LAYOUT_DESCRIPTION__ORIENTATION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This returns FillLayoutDescription.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/FillLayoutDescription")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + FILL_LAYOUT_ORIENTATION labelValue = ((FillLayoutDescription) object).getOrientation(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_FillLayoutDescription_type") : getString("_UI_FillLayoutDescription_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(FillLayoutDescription.class)) { + case PropertiesPackage.FILL_LAYOUT_DESCRIPTION__ORIENTATION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GridLayoutDescriptionItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GridLayoutDescriptionItemProvider.java new file mode 100644 index 0000000000..dde2a0a426 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GridLayoutDescriptionItemProvider.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + * + */ +package org.eclipse.sirius.properties.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.sirius.properties.GridLayoutDescription; +import org.eclipse.sirius.properties.PropertiesPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.properties.GridLayoutDescription} object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class GridLayoutDescriptionItemProvider extends LayoutDescriptionItemProvider { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public GridLayoutDescriptionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addNumberOfColumnsPropertyDescriptor(object); + addMakeColumnsWithEqualWidthPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Number Of Columns feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addNumberOfColumnsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add( + createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GridLayoutDescription_numberOfColumns_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_GridLayoutDescription_numberOfColumns_feature", "_UI_GridLayoutDescription_type"), + PropertiesPackage.Literals.GRID_LAYOUT_DESCRIPTION__NUMBER_OF_COLUMNS, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Make Columns With Equal Width + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addMakeColumnsWithEqualWidthPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_GridLayoutDescription_makeColumnsWithEqualWidth_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_GridLayoutDescription_makeColumnsWithEqualWidth_feature", "_UI_GridLayoutDescription_type"), + PropertiesPackage.Literals.GRID_LAYOUT_DESCRIPTION__MAKE_COLUMNS_WITH_EQUAL_WIDTH, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + } + + /** + * This returns GridLayoutDescription.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/GridLayoutDescription")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + GridLayoutDescription gridLayoutDescription = (GridLayoutDescription) object; + return getString("_UI_GridLayoutDescription_type") + " " + gridLayoutDescription.getNumberOfColumns(); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(GridLayoutDescription.class)) { + case PropertiesPackage.GRID_LAYOUT_DESCRIPTION__NUMBER_OF_COLUMNS: + case PropertiesPackage.GRID_LAYOUT_DESCRIPTION__MAKE_COLUMNS_WITH_EQUAL_WIDTH: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupDescriptionItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupDescriptionItemProvider.java index 84acdad087..40234ff000 100644 --- a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupDescriptionItemProvider.java +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/GroupDescriptionItemProvider.java @@ -147,7 +147,7 @@ public class GroupDescriptionItemProvider extends ItemProviderAdapter public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); - childrenFeatures.add(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTAINER); + childrenFeatures.add(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTROLS); childrenFeatures.add(PropertiesPackage.Literals.GROUP_DESCRIPTION__VALIDATION_SET); } return childrenFeatures; @@ -210,7 +210,7 @@ public class GroupDescriptionItemProvider extends ItemProviderAdapter case PropertiesPackage.GROUP_DESCRIPTION__PRECONDITION_EXPRESSION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; - case PropertiesPackage.GROUP_DESCRIPTION__CONTAINER: + case PropertiesPackage.GROUP_DESCRIPTION__CONTROLS: case PropertiesPackage.GROUP_DESCRIPTION__VALIDATION_SET: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; @@ -229,7 +229,29 @@ public class GroupDescriptionItemProvider extends ItemProviderAdapter protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTAINER, PropertiesFactory.eINSTANCE.createContainerDescription())); + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createContainerDescription())); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createTextDescription())); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createButtonDescription())); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createLabelDescription())); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createCheckboxDescription())); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createSelectDescription())); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createDynamicMappingFor())); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createTextAreaDescription())); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createRadioDescription())); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createSingleReferenceDescription())); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createMultipleReferencesDescription())); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createCustomDescription())); newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__VALIDATION_SET, PropertiesFactory.eINSTANCE.createGroupValidationSetDescription())); } diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/LayoutDescriptionItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/LayoutDescriptionItemProvider.java new file mode 100644 index 0000000000..29e29bd5d4 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/LayoutDescriptionItemProvider.java @@ -0,0 +1,110 @@ +/** + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + * + */ +package org.eclipse.sirius.properties.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.properties.LayoutDescription} object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class LayoutDescriptionItemProvider extends ItemProviderAdapter + implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public LayoutDescriptionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_LayoutDescription_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return PropertiesEditPlugin.INSTANCE; + } + +} diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/PropertiesItemProviderAdapterFactory.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/PropertiesItemProviderAdapterFactory.java index 35cf1a3942..6c2c72883e 100644 --- a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/PropertiesItemProviderAdapterFactory.java +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/PropertiesItemProviderAdapterFactory.java @@ -171,6 +171,31 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto /** * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.properties.PropertyValidationRule} instances. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected PropertyValidationRuleItemProvider propertyValidationRuleItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.properties.PropertyValidationRule}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createPropertyValidationRuleAdapter() { + if (propertyValidationRuleItemProvider == null) { + propertyValidationRuleItemProvider = new PropertyValidationRuleItemProvider(this); + } + + return propertyValidationRuleItemProvider; + } + + /** + * This keeps track of the one adapter used for all * {@link org.eclipse.sirius.properties.GroupDescription} instances. <!-- * begin-user-doc --> <!-- end-user-doc --> * @@ -221,52 +246,77 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto /** * This keeps track of the one adapter used for all - * {@link org.eclipse.sirius.properties.PropertyValidationRule} instances. + * {@link org.eclipse.sirius.properties.ContainerDescription} instances. * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - protected PropertyValidationRuleItemProvider propertyValidationRuleItemProvider; + protected ContainerDescriptionItemProvider containerDescriptionItemProvider; /** * This creates an adapter for a - * {@link org.eclipse.sirius.properties.PropertyValidationRule}. <!-- + * {@link org.eclipse.sirius.properties.ContainerDescription}. <!-- * begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override - public Adapter createPropertyValidationRuleAdapter() { - if (propertyValidationRuleItemProvider == null) { - propertyValidationRuleItemProvider = new PropertyValidationRuleItemProvider(this); + public Adapter createContainerDescriptionAdapter() { + if (containerDescriptionItemProvider == null) { + containerDescriptionItemProvider = new ContainerDescriptionItemProvider(this); } - return propertyValidationRuleItemProvider; + return containerDescriptionItemProvider; } /** * This keeps track of the one adapter used for all - * {@link org.eclipse.sirius.properties.ContainerDescription} instances. + * {@link org.eclipse.sirius.properties.FillLayoutDescription} instances. * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - protected ContainerDescriptionItemProvider containerDescriptionItemProvider; + protected FillLayoutDescriptionItemProvider fillLayoutDescriptionItemProvider; /** * This creates an adapter for a - * {@link org.eclipse.sirius.properties.ContainerDescription}. <!-- + * {@link org.eclipse.sirius.properties.FillLayoutDescription}. <!-- * begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override - public Adapter createContainerDescriptionAdapter() { - if (containerDescriptionItemProvider == null) { - containerDescriptionItemProvider = new ContainerDescriptionItemProvider(this); + public Adapter createFillLayoutDescriptionAdapter() { + if (fillLayoutDescriptionItemProvider == null) { + fillLayoutDescriptionItemProvider = new FillLayoutDescriptionItemProvider(this); } - return containerDescriptionItemProvider; + return fillLayoutDescriptionItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.properties.GridLayoutDescription} instances. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected GridLayoutDescriptionItemProvider gridLayoutDescriptionItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.properties.GridLayoutDescription}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createGridLayoutDescriptionAdapter() { + if (gridLayoutDescriptionItemProvider == null) { + gridLayoutDescriptionItemProvider = new GridLayoutDescriptionItemProvider(this); + } + + return gridLayoutDescriptionItemProvider; } /** @@ -1144,6 +1194,12 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto if (containerDescriptionItemProvider != null) { containerDescriptionItemProvider.dispose(); } + if (fillLayoutDescriptionItemProvider != null) { + fillLayoutDescriptionItemProvider.dispose(); + } + if (gridLayoutDescriptionItemProvider != null) { + gridLayoutDescriptionItemProvider.dispose(); + } if (textDescriptionItemProvider != null) { textDescriptionItemProvider.dispose(); } diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/RadioDescriptionItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/RadioDescriptionItemProvider.java index 2533d9dd64..9ef484ca32 100644 --- a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/RadioDescriptionItemProvider.java +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/RadioDescriptionItemProvider.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2015 Obeo. + * Copyright (c) 2016 Obeo. * 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 diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/WidgetDescriptionItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/WidgetDescriptionItemProvider.java index e39c0864e9..0e040fe76a 100644 --- a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/WidgetDescriptionItemProvider.java +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/WidgetDescriptionItemProvider.java @@ -16,16 +16,9 @@ import java.util.List; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; import org.eclipse.emf.edit.provider.ViewerNotification; import org.eclipse.sirius.properties.PropertiesPackage; import org.eclipse.sirius.properties.WidgetDescription; @@ -37,8 +30,7 @@ import org.eclipse.sirius.properties.WidgetDescription; * * @generated */ -public class WidgetDescriptionItemProvider extends ItemProviderAdapter - implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { +public class WidgetDescriptionItemProvider extends ControlDescriptionItemProvider { /** * This constructs an instance from a factory and a notifier. <!-- * begin-user-doc --> <!-- end-user-doc --> @@ -60,7 +52,6 @@ public class WidgetDescriptionItemProvider extends ItemProviderAdapter if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); - addIdentifierPropertyDescriptor(object); addLabelExpressionPropertyDescriptor(object); addHelpExpressionPropertyDescriptor(object); } @@ -68,18 +59,6 @@ public class WidgetDescriptionItemProvider extends ItemProviderAdapter } /** - * This adds a property descriptor for the Identifier feature. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected void addIdentifierPropertyDescriptor(Object object) { - itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_WidgetDescription_identifier_feature"), getString("_UI_PropertyDescriptor_description", "_UI_WidgetDescription_identifier_feature", "_UI_WidgetDescription_type"), - PropertiesPackage.Literals.WIDGET_DESCRIPTION__IDENTIFIER, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); - } - - /** * This adds a property descriptor for the Label Expression feature. <!-- * begin-user-doc --> <!-- end-user-doc --> * @@ -130,7 +109,6 @@ public class WidgetDescriptionItemProvider extends ItemProviderAdapter updateChildren(notification); switch (notification.getFeatureID(WidgetDescription.class)) { - case PropertiesPackage.WIDGET_DESCRIPTION__IDENTIFIER: case PropertiesPackage.WIDGET_DESCRIPTION__LABEL_EXPRESSION: case PropertiesPackage.WIDGET_DESCRIPTION__HELP_EXPRESSION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); @@ -151,15 +129,4 @@ public class WidgetDescriptionItemProvider extends ItemProviderAdapter super.collectNewChildDescriptors(newChildDescriptors, object); } - /** - * Return the resource locator for this item provider's resources. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public ResourceLocator getResourceLocator() { - return PropertiesEditPlugin.INSTANCE; - } - } diff --git a/incubation/org.eclipse.sirius.properties/model/properties.ecore b/incubation/org.eclipse.sirius.properties/model/properties.ecore index 4125b7c7f8..07ca4be00b 100644 --- a/incubation/org.eclipse.sirius.properties/model/properties.ecore +++ b/incubation/org.eclipse.sirius.properties/model/properties.ecore @@ -44,8 +44,8 @@ eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="preconditionExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="container" eType="#//ContainerDescription" - containment="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="controls" upperBound="-1" + eType="#//ControlDescription" containment="true"/> <eStructuralFeatures xsi:type="ecore:EReference" name="validationSet" eType="#//GroupValidationSetDescription" containment="true"/> </eClassifiers> @@ -56,17 +56,31 @@ <eStructuralFeatures xsi:type="ecore:EReference" name="propertyValidationRules" upperBound="-1" eType="#//PropertyValidationRule" containment="true"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ContainerDescription"> + <eClassifiers xsi:type="ecore:EClass" name="ControlDescription" abstract="true"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="identifier" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="widgets" upperBound="-1" - eType="#//WidgetDescription" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="dynamicMappings" upperBound="-1" - eType="#//DynamicMappingFor" containment="true"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="WidgetDescription" abstract="true"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="identifier" lowerBound="1" - eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eClassifiers xsi:type="ecore:EClass" name="ContainerDescription" eSuperTypes="#//ControlDescription"> + <eStructuralFeatures xsi:type="ecore:EReference" name="controls" upperBound="-1" + eType="#//ControlDescription" containment="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="layout" eType="#//LayoutDescription" + containment="true"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="LayoutDescription" abstract="true"/> + <eClassifiers xsi:type="ecore:EClass" name="FillLayoutDescription" eSuperTypes="#//LayoutDescription"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="orientation" eType="#//FILL_LAYOUT_ORIENTATION"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="GridLayoutDescription" eSuperTypes="#//LayoutDescription"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="numberOfColumns" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EInt" + defaultValueLiteral="1"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="makeColumnsWithEqualWidth" + eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="FILL_LAYOUT_ORIENTATION"> + <eLiterals name="VERTICAL" literal="VERTICAL"/> + <eLiterals name="HORIZONTAL" literal="HORIZONTAL"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="WidgetDescription" abstract="true" eSuperTypes="#//ControlDescription"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="labelExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="helpExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> </eClassifiers> @@ -140,7 +154,7 @@ <eStructuralFeatures xsi:type="ecore:EReference" name="conditionalStyles" upperBound="-1" eType="#//SelectWidgetConditionalStyle" containment="true"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="DynamicMappingFor"> + <eClassifiers xsi:type="ecore:EClass" name="DynamicMappingFor" eSuperTypes="#//ControlDescription"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="iterator" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="domainClassExpression" diff --git a/incubation/org.eclipse.sirius.properties/model/properties.genmodel b/incubation/org.eclipse.sirius.properties/model/properties.genmodel index e23ccd3c43..e9bc4412d6 100644 --- a/incubation/org.eclipse.sirius.properties/model/properties.genmodel +++ b/incubation/org.eclipse.sirius.properties/model/properties.genmodel @@ -12,6 +12,10 @@ <foreignModel>properties.ecore</foreignModel> <genPackages prefix="Properties" basePackage="org.eclipse.sirius" disposableProviderFactory="true" childCreationExtenders="true" ecorePackage="properties.ecore#/"> + <genEnums typeSafeEnumCompatible="false" ecoreEnum="properties.ecore#//FILL_LAYOUT_ORIENTATION"> + <genEnumLiterals ecoreEnumLiteral="properties.ecore#//FILL_LAYOUT_ORIENTATION/VERTICAL"/> + <genEnumLiterals ecoreEnumLiteral="properties.ecore#//FILL_LAYOUT_ORIENTATION/HORIZONTAL"/> + </genEnums> <genClasses ecoreClass="properties.ecore#//ViewExtensionDescription"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//ViewExtensionDescription/identifier"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference properties.ecore#//ViewExtensionDescription/metamodels"/> @@ -40,20 +44,29 @@ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//GroupDescription/domainClass"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//GroupDescription/semanticCandidateExpression"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//GroupDescription/preconditionExpression"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//GroupDescription/container"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//GroupDescription/controls"/> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//GroupDescription/validationSet"/> </genClasses> <genClasses ecoreClass="properties.ecore#//GroupValidationSetDescription"> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//GroupValidationSetDescription/semanticValidationRules"/> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//GroupValidationSetDescription/propertyValidationRules"/> </genClasses> + <genClasses image="false" ecoreClass="properties.ecore#//ControlDescription"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//ControlDescription/identifier"/> + </genClasses> <genClasses ecoreClass="properties.ecore#//ContainerDescription"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//ContainerDescription/identifier"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//ContainerDescription/widgets"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//ContainerDescription/dynamicMappings"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//ContainerDescription/controls"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//ContainerDescription/layout"/> + </genClasses> + <genClasses image="false" ecoreClass="properties.ecore#//LayoutDescription"/> + <genClasses ecoreClass="properties.ecore#//FillLayoutDescription"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//FillLayoutDescription/orientation"/> + </genClasses> + <genClasses ecoreClass="properties.ecore#//GridLayoutDescription"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//GridLayoutDescription/numberOfColumns"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//GridLayoutDescription/makeColumnsWithEqualWidth"/> </genClasses> <genClasses image="false" ecoreClass="properties.ecore#//WidgetDescription"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//WidgetDescription/identifier"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//WidgetDescription/labelExpression"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//WidgetDescription/helpExpression"/> </genClasses> diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ContainerDescription.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ContainerDescription.java index 6d7453aecb..0c6af8d15c 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ContainerDescription.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ContainerDescription.java @@ -12,7 +12,6 @@ package org.eclipse.sirius.properties; import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> A representation of the model object ' @@ -22,85 +21,63 @@ import org.eclipse.emf.ecore.EObject; * The following features are supported: * </p> * <ul> - * <li>{@link org.eclipse.sirius.properties.ContainerDescription#getIdentifier - * <em>Identifier</em>}</li> - * <li>{@link org.eclipse.sirius.properties.ContainerDescription#getWidgets - * <em>Widgets</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.ContainerDescription#getDynamicMappings - * <em>Dynamic Mappings</em>}</li> + * <li>{@link org.eclipse.sirius.properties.ContainerDescription#getControls + * <em>Controls</em>}</li> + * <li>{@link org.eclipse.sirius.properties.ContainerDescription#getLayout + * <em>Layout</em>}</li> * </ul> * * @see org.eclipse.sirius.properties.PropertiesPackage#getContainerDescription() * @model * @generated */ -public interface ContainerDescription extends EObject { +public interface ContainerDescription extends ControlDescription { /** - * Returns the value of the '<em><b>Identifier</b></em>' attribute. <!-- + * Returns the value of the '<em><b>Controls</b></em>' containment reference + * list. The list contents are of type + * {@link org.eclipse.sirius.properties.ControlDescription}. <!-- * begin-user-doc --> * <p> - * If the meaning of the '<em>Identifier</em>' attribute isn't clear, there - * really should be more of a description here... + * If the meaning of the '<em>Controls</em>' containment reference list + * isn't clear, there really should be more of a description here... * </p> * <!-- end-user-doc --> * - * @return the value of the '<em>Identifier</em>' attribute. - * @see #setIdentifier(String) - * @see org.eclipse.sirius.properties.PropertiesPackage#getContainerDescription_Identifier() - * @model required="true" - * @generated - */ - String getIdentifier(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.ContainerDescription#getIdentifier - * <em>Identifier</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @param value - * the new value of the '<em>Identifier</em>' attribute. - * @see #getIdentifier() + * @return the value of the '<em>Controls</em>' containment reference list. + * @see org.eclipse.sirius.properties.PropertiesPackage#getContainerDescription_Controls() + * @model containment="true" * @generated */ - void setIdentifier(String value); + EList<ControlDescription> getControls(); /** - * Returns the value of the '<em><b>Widgets</b></em>' containment reference - * list. The list contents are of type - * {@link org.eclipse.sirius.properties.WidgetDescription}. <!-- - * begin-user-doc --> + * Returns the value of the '<em><b>Layout</b></em>' containment reference. + * <!-- begin-user-doc --> * <p> - * If the meaning of the '<em>Widgets</em>' containment reference list isn't + * If the meaning of the '<em>Layout</em>' containment reference isn't * clear, there really should be more of a description here... * </p> * <!-- end-user-doc --> * - * @return the value of the '<em>Widgets</em>' containment reference list. - * @see org.eclipse.sirius.properties.PropertiesPackage#getContainerDescription_Widgets() + * @return the value of the '<em>Layout</em>' containment reference. + * @see #setLayout(LayoutDescription) + * @see org.eclipse.sirius.properties.PropertiesPackage#getContainerDescription_Layout() * @model containment="true" * @generated */ - EList<WidgetDescription> getWidgets(); + LayoutDescription getLayout(); /** - * Returns the value of the '<em><b>Dynamic Mappings</b></em>' containment - * reference list. The list contents are of type - * {@link org.eclipse.sirius.properties.DynamicMappingFor}. <!-- - * begin-user-doc --> - * <p> - * If the meaning of the '<em>Dynamic Mappings</em>' containment reference - * list isn't clear, there really should be more of a description here... - * </p> - * <!-- end-user-doc --> + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.ContainerDescription#getLayout + * <em>Layout</em>}' containment reference. <!-- begin-user-doc --> <!-- + * end-user-doc --> * - * @return the value of the '<em>Dynamic Mappings</em>' containment - * reference list. - * @see org.eclipse.sirius.properties.PropertiesPackage#getContainerDescription_DynamicMappings() - * @model containment="true" + * @param value + * the new value of the '<em>Layout</em>' containment reference. + * @see #getLayout() * @generated */ - EList<DynamicMappingFor> getDynamicMappings(); + void setLayout(LayoutDescription value); } // ContainerDescription diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ControlDescription.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ControlDescription.java new file mode 100644 index 0000000000..b364c13927 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ControlDescription.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + * + */ +package org.eclipse.sirius.properties; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> A representation of the model object ' + * <em><b>Control Description</b></em>'. <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.properties.ControlDescription#getIdentifier + * <em>Identifier</em>}</li> + * </ul> + * + * @see org.eclipse.sirius.properties.PropertiesPackage#getControlDescription() + * @model abstract="true" + * @generated + */ +public interface ControlDescription extends EObject { + /** + * Returns the value of the '<em><b>Identifier</b></em>' attribute. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>Identifier</em>' attribute isn't clear, there + * really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Identifier</em>' attribute. + * @see #setIdentifier(String) + * @see org.eclipse.sirius.properties.PropertiesPackage#getControlDescription_Identifier() + * @model required="true" + * @generated + */ + String getIdentifier(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.ControlDescription#getIdentifier + * <em>Identifier</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Identifier</em>' attribute. + * @see #getIdentifier() + * @generated + */ + void setIdentifier(String value); + +} // ControlDescription diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingFor.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingFor.java index b863890d45..8c76b98d92 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingFor.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingFor.java @@ -12,7 +12,6 @@ package org.eclipse.sirius.properties; import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> A representation of the model object ' @@ -35,7 +34,7 @@ import org.eclipse.emf.ecore.EObject; * @model * @generated */ -public interface DynamicMappingFor extends EObject { +public interface DynamicMappingFor extends ControlDescription { /** * Returns the value of the '<em><b>Iterator</b></em>' attribute. <!-- * begin-user-doc --> diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/FILL_LAYOUT_ORIENTATION.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/FILL_LAYOUT_ORIENTATION.java new file mode 100644 index 0000000000..8cf54f3cc4 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/FILL_LAYOUT_ORIENTATION.java @@ -0,0 +1,224 @@ +/** + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + * + */ +package org.eclipse.sirius.properties; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * <!-- begin-user-doc --> A representation of the literals of the enumeration ' + * <em><b>FILL LAYOUT ORIENTATION</b></em>', and utility methods for working + * with them. <!-- end-user-doc --> + * + * @see org.eclipse.sirius.properties.PropertiesPackage#getFILL_LAYOUT_ORIENTATION() + * @model + * @generated + */ +public enum FILL_LAYOUT_ORIENTATION implements Enumerator { + /** + * The '<em><b>VERTICAL</b></em>' literal object. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #VERTICAL_VALUE + * @generated + * @ordered + */ + VERTICAL(0, "VERTICAL", "VERTICAL"), + + /** + * The '<em><b>HORIZONTAL</b></em>' literal object. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #HORIZONTAL_VALUE + * @generated + * @ordered + */ + HORIZONTAL(0, "HORIZONTAL", "HORIZONTAL"); + + /** + * The '<em><b>VERTICAL</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>VERTICAL</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #VERTICAL + * @model + * @generated + * @ordered + */ + public static final int VERTICAL_VALUE = 0; + + /** + * The '<em><b>HORIZONTAL</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>HORIZONTAL</b></em>' literal object isn't + * clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #HORIZONTAL + * @model + * @generated + * @ordered + */ + public static final int HORIZONTAL_VALUE = 0; + + /** + * An array of all the '<em><b>FILL LAYOUT ORIENTATION</b></em>' + * enumerators. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private static final FILL_LAYOUT_ORIENTATION[] VALUES_ARRAY = new FILL_LAYOUT_ORIENTATION[] { VERTICAL, HORIZONTAL, }; + + /** + * A public read-only list of all the ' + * <em><b>FILL LAYOUT ORIENTATION</b></em>' enumerators. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + public static final List<FILL_LAYOUT_ORIENTATION> VALUES = Collections.unmodifiableList(Arrays.asList(FILL_LAYOUT_ORIENTATION.VALUES_ARRAY)); + + /** + * Returns the '<em><b>FILL LAYOUT ORIENTATION</b></em>' literal with the + * specified literal value. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param literal + * the literal. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static FILL_LAYOUT_ORIENTATION get(String literal) { + for (FILL_LAYOUT_ORIENTATION result : FILL_LAYOUT_ORIENTATION.VALUES_ARRAY) { + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>FILL LAYOUT ORIENTATION</b></em>' literal with the + * specified name. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param name + * the name. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static FILL_LAYOUT_ORIENTATION getByName(String name) { + for (FILL_LAYOUT_ORIENTATION result : FILL_LAYOUT_ORIENTATION.VALUES_ARRAY) { + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>FILL LAYOUT ORIENTATION</b></em>' literal with the + * specified integer value. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the integer value. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static FILL_LAYOUT_ORIENTATION get(int value) { + switch (value) { + case VERTICAL_VALUE: + return VERTICAL; + } + return null; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + private FILL_LAYOUT_ORIENTATION(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string + * representation. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} // FILL_LAYOUT_ORIENTATION diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/FillLayoutDescription.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/FillLayoutDescription.java new file mode 100644 index 0000000000..cbdc46ccae --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/FillLayoutDescription.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + * + */ +package org.eclipse.sirius.properties; + +/** + * <!-- begin-user-doc --> A representation of the model object ' + * <em><b>Fill Layout Description</b></em>'. <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.properties.FillLayoutDescription#getOrientation + * <em>Orientation</em>}</li> + * </ul> + * + * @see org.eclipse.sirius.properties.PropertiesPackage#getFillLayoutDescription() + * @model + * @generated + */ +public interface FillLayoutDescription extends LayoutDescription { + /** + * Returns the value of the '<em><b>Orientation</b></em>' attribute. The + * literals are from the enumeration + * {@link org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION}. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>Orientation</em>' attribute isn't clear, there + * really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Orientation</em>' attribute. + * @see org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION + * @see #setOrientation(FILL_LAYOUT_ORIENTATION) + * @see org.eclipse.sirius.properties.PropertiesPackage#getFillLayoutDescription_Orientation() + * @model + * @generated + */ + FILL_LAYOUT_ORIENTATION getOrientation(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.FillLayoutDescription#getOrientation + * <em>Orientation</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Orientation</em>' attribute. + * @see org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION + * @see #getOrientation() + * @generated + */ + void setOrientation(FILL_LAYOUT_ORIENTATION value); + +} // FillLayoutDescription diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GridLayoutDescription.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GridLayoutDescription.java new file mode 100644 index 0000000000..9b028b3a74 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GridLayoutDescription.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + * + */ +package org.eclipse.sirius.properties; + +/** + * <!-- begin-user-doc --> A representation of the model object ' + * <em><b>Grid Layout Description</b></em>'. <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li> + * {@link org.eclipse.sirius.properties.GridLayoutDescription#getNumberOfColumns + * <em>Number Of Columns</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.GridLayoutDescription#isMakeColumnsWithEqualWidth + * <em>Make Columns With Equal Width</em>}</li> + * </ul> + * + * @see org.eclipse.sirius.properties.PropertiesPackage#getGridLayoutDescription() + * @model + * @generated + */ +public interface GridLayoutDescription extends LayoutDescription { + /** + * Returns the value of the '<em><b>Number Of Columns</b></em>' attribute. + * The default value is <code>"1"</code>. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Number Of Columns</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Number Of Columns</em>' attribute. + * @see #setNumberOfColumns(int) + * @see org.eclipse.sirius.properties.PropertiesPackage#getGridLayoutDescription_NumberOfColumns() + * @model default="1" + * @generated + */ + int getNumberOfColumns(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.GridLayoutDescription#getNumberOfColumns + * <em>Number Of Columns</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Number Of Columns</em>' attribute. + * @see #getNumberOfColumns() + * @generated + */ + void setNumberOfColumns(int value); + + /** + * Returns the value of the '<em><b>Make Columns With Equal Width</b></em>' + * attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Make Columns With Equal Width</em>' attribute + * isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Make Columns With Equal Width</em>' + * attribute. + * @see #setMakeColumnsWithEqualWidth(boolean) + * @see org.eclipse.sirius.properties.PropertiesPackage#getGridLayoutDescription_MakeColumnsWithEqualWidth() + * @model + * @generated + */ + boolean isMakeColumnsWithEqualWidth(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.GridLayoutDescription#isMakeColumnsWithEqualWidth + * <em>Make Columns With Equal Width</em>}' attribute. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Make Columns With Equal Width</em>' + * attribute. + * @see #isMakeColumnsWithEqualWidth() + * @generated + */ + void setMakeColumnsWithEqualWidth(boolean value); + +} // GridLayoutDescription diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupDescription.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupDescription.java index 2f59c1c825..3982df6829 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupDescription.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/GroupDescription.java @@ -11,6 +11,7 @@ */ package org.eclipse.sirius.properties; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; /** @@ -33,8 +34,8 @@ import org.eclipse.emf.ecore.EObject; * <li> * {@link org.eclipse.sirius.properties.GroupDescription#getPreconditionExpression * <em>Precondition Expression</em>}</li> - * <li>{@link org.eclipse.sirius.properties.GroupDescription#getContainer - * <em>Container</em>}</li> + * <li>{@link org.eclipse.sirius.properties.GroupDescription#getControls + * <em>Controls</em>}</li> * <li>{@link org.eclipse.sirius.properties.GroupDescription#getValidationSet * <em>Validation Set</em>}</li> * </ul> @@ -201,35 +202,22 @@ public interface GroupDescription extends EObject { void setPreconditionExpression(String value); /** - * Returns the value of the '<em><b>Container</b></em>' containment - * reference. <!-- begin-user-doc --> + * Returns the value of the '<em><b>Controls</b></em>' containment reference + * list. The list contents are of type + * {@link org.eclipse.sirius.properties.ControlDescription}. <!-- + * begin-user-doc --> * <p> - * If the meaning of the '<em>Container</em>' containment reference isn't - * clear, there really should be more of a description here... + * If the meaning of the '<em>Controls</em>' containment reference list + * isn't clear, there really should be more of a description here... * </p> * <!-- end-user-doc --> * - * @return the value of the '<em>Container</em>' containment reference. - * @see #setContainer(ContainerDescription) - * @see org.eclipse.sirius.properties.PropertiesPackage#getGroupDescription_Container() + * @return the value of the '<em>Controls</em>' containment reference list. + * @see org.eclipse.sirius.properties.PropertiesPackage#getGroupDescription_Controls() * @model containment="true" * @generated */ - ContainerDescription getContainer(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.GroupDescription#getContainer - * <em>Container</em>}' containment reference. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @param value - * the new value of the '<em>Container</em>' containment - * reference. - * @see #getContainer() - * @generated - */ - void setContainer(ContainerDescription value); + EList<ControlDescription> getControls(); /** * Returns the value of the '<em><b>Validation Set</b></em>' containment diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/LayoutDescription.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/LayoutDescription.java new file mode 100644 index 0000000000..cde44b96d3 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/LayoutDescription.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + * + */ +package org.eclipse.sirius.properties; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> A representation of the model object ' + * <em><b>Layout Description</b></em>'. <!-- end-user-doc --> + * + * + * @see org.eclipse.sirius.properties.PropertiesPackage#getLayoutDescription() + * @model abstract="true" + * @generated + */ +public interface LayoutDescription extends EObject { +} // LayoutDescription diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesFactory.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesFactory.java index 105c3002e9..c39012a6df 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesFactory.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesFactory.java @@ -94,6 +94,24 @@ public interface PropertiesFactory extends EFactory { ContainerDescription createContainerDescription(); /** + * Returns a new object of class '<em>Fill Layout Description</em>'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Fill Layout Description</em>'. + * @generated + */ + FillLayoutDescription createFillLayoutDescription(); + + /** + * Returns a new object of class '<em>Grid Layout Description</em>'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Grid Layout Description</em>'. + * @generated + */ + GridLayoutDescription createGridLayoutDescription(); + + /** * Returns a new object of class '<em>Text Description</em>'. <!-- * begin-user-doc --> <!-- end-user-doc --> * diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java index de7e73a5a4..dba4c61c0b 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java @@ -13,6 +13,7 @@ package org.eclipse.sirius.properties; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.eclipse.sirius.viewpoint.description.DescriptionPackage; @@ -379,13 +380,13 @@ public interface PropertiesPackage extends EPackage { int GROUP_DESCRIPTION__PRECONDITION_EXPRESSION = 4; /** - * The feature id for the '<em><b>Container</b></em>' containment reference. - * <!-- begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Controls</b></em>' containment reference + * list. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int GROUP_DESCRIPTION__CONTAINER = 5; + int GROUP_DESCRIPTION__CONTROLS = 5; /** * The feature id for the '<em><b>Validation Set</b></em>' containment @@ -447,6 +448,36 @@ public interface PropertiesPackage extends EPackage { /** * The meta object id for the ' + * {@link org.eclipse.sirius.properties.impl.ControlDescriptionImpl + * <em>Control Description</em>}' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.ControlDescriptionImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getControlDescription() + * @generated + */ + int CONTROL_DESCRIPTION = 6; + + /** + * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONTROL_DESCRIPTION__IDENTIFIER = 0; + + /** + * The number of structural features of the '<em>Control Description</em>' + * class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CONTROL_DESCRIPTION_FEATURE_COUNT = 1; + + /** + * The meta object id for the ' * {@link org.eclipse.sirius.properties.impl.ContainerDescriptionImpl * <em>Container Description</em>}' class. <!-- begin-user-doc --> <!-- * end-user-doc --> @@ -455,7 +486,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getContainerDescription() * @generated */ - int CONTAINER_DESCRIPTION = 6; + int CONTAINER_DESCRIPTION = 7; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -464,25 +495,25 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int CONTAINER_DESCRIPTION__IDENTIFIER = 0; + int CONTAINER_DESCRIPTION__IDENTIFIER = PropertiesPackage.CONTROL_DESCRIPTION__IDENTIFIER; /** - * The feature id for the '<em><b>Widgets</b></em>' containment reference + * The feature id for the '<em><b>Controls</b></em>' containment reference * list. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int CONTAINER_DESCRIPTION__WIDGETS = 1; + int CONTAINER_DESCRIPTION__CONTROLS = PropertiesPackage.CONTROL_DESCRIPTION_FEATURE_COUNT + 0; /** - * The feature id for the '<em><b>Dynamic Mappings</b></em>' containment - * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Layout</b></em>' containment reference. + * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS = 2; + int CONTAINER_DESCRIPTION__LAYOUT = PropertiesPackage.CONTROL_DESCRIPTION_FEATURE_COUNT + 1; /** * The number of structural features of the '<em>Container Description</em>' @@ -491,7 +522,99 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int CONTAINER_DESCRIPTION_FEATURE_COUNT = 3; + int CONTAINER_DESCRIPTION_FEATURE_COUNT = PropertiesPackage.CONTROL_DESCRIPTION_FEATURE_COUNT + 2; + + /** + * The meta object id for the ' + * {@link org.eclipse.sirius.properties.impl.LayoutDescriptionImpl + * <em>Layout Description</em>}' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.LayoutDescriptionImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getLayoutDescription() + * @generated + */ + int LAYOUT_DESCRIPTION = 8; + + /** + * The number of structural features of the '<em>Layout Description</em>' + * class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int LAYOUT_DESCRIPTION_FEATURE_COUNT = 0; + + /** + * The meta object id for the ' + * {@link org.eclipse.sirius.properties.impl.FillLayoutDescriptionImpl + * <em>Fill Layout Description</em>}' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.FillLayoutDescriptionImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getFillLayoutDescription() + * @generated + */ + int FILL_LAYOUT_DESCRIPTION = 9; + + /** + * The feature id for the '<em><b>Orientation</b></em>' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int FILL_LAYOUT_DESCRIPTION__ORIENTATION = PropertiesPackage.LAYOUT_DESCRIPTION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the ' + * <em>Fill Layout Description</em>' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int FILL_LAYOUT_DESCRIPTION_FEATURE_COUNT = PropertiesPackage.LAYOUT_DESCRIPTION_FEATURE_COUNT + 1; + + /** + * The meta object id for the ' + * {@link org.eclipse.sirius.properties.impl.GridLayoutDescriptionImpl + * <em>Grid Layout Description</em>}' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.GridLayoutDescriptionImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getGridLayoutDescription() + * @generated + */ + int GRID_LAYOUT_DESCRIPTION = 10; + + /** + * The feature id for the '<em><b>Number Of Columns</b></em>' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int GRID_LAYOUT_DESCRIPTION__NUMBER_OF_COLUMNS = PropertiesPackage.LAYOUT_DESCRIPTION_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Make Columns With Equal Width</b></em>' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int GRID_LAYOUT_DESCRIPTION__MAKE_COLUMNS_WITH_EQUAL_WIDTH = PropertiesPackage.LAYOUT_DESCRIPTION_FEATURE_COUNT + 1; + + /** + * The number of structural features of the ' + * <em>Grid Layout Description</em>' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int GRID_LAYOUT_DESCRIPTION_FEATURE_COUNT = PropertiesPackage.LAYOUT_DESCRIPTION_FEATURE_COUNT + 2; /** * The meta object id for the ' @@ -503,7 +626,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getWidgetDescription() * @generated */ - int WIDGET_DESCRIPTION = 7; + int WIDGET_DESCRIPTION = 11; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -512,7 +635,7 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int WIDGET_DESCRIPTION__IDENTIFIER = 0; + int WIDGET_DESCRIPTION__IDENTIFIER = PropertiesPackage.CONTROL_DESCRIPTION__IDENTIFIER; /** * The feature id for the '<em><b>Label Expression</b></em>' attribute. <!-- @@ -521,7 +644,7 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int WIDGET_DESCRIPTION__LABEL_EXPRESSION = 1; + int WIDGET_DESCRIPTION__LABEL_EXPRESSION = PropertiesPackage.CONTROL_DESCRIPTION_FEATURE_COUNT + 0; /** * The feature id for the '<em><b>Help Expression</b></em>' attribute. <!-- @@ -530,7 +653,7 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int WIDGET_DESCRIPTION__HELP_EXPRESSION = 2; + int WIDGET_DESCRIPTION__HELP_EXPRESSION = PropertiesPackage.CONTROL_DESCRIPTION_FEATURE_COUNT + 1; /** * The number of structural features of the '<em>Widget Description</em>' @@ -539,7 +662,7 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int WIDGET_DESCRIPTION_FEATURE_COUNT = 3; + int WIDGET_DESCRIPTION_FEATURE_COUNT = PropertiesPackage.CONTROL_DESCRIPTION_FEATURE_COUNT + 2; /** * The meta object id for the ' @@ -551,7 +674,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getTextDescription() * @generated */ - int TEXT_DESCRIPTION = 8; + int TEXT_DESCRIPTION = 12; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -635,7 +758,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getButtonDescription() * @generated */ - int BUTTON_DESCRIPTION = 9; + int BUTTON_DESCRIPTION = 13; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -719,7 +842,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getLabelDescription() * @generated */ - int LABEL_DESCRIPTION = 10; + int LABEL_DESCRIPTION = 14; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -794,7 +917,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCheckboxDescription() * @generated */ - int CHECKBOX_DESCRIPTION = 11; + int CHECKBOX_DESCRIPTION = 15; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -878,7 +1001,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getSelectDescription() * @generated */ - int SELECT_DESCRIPTION = 12; + int SELECT_DESCRIPTION = 16; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -980,7 +1103,16 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingFor() * @generated */ - int DYNAMIC_MAPPING_FOR = 13; + int DYNAMIC_MAPPING_FOR = 17; + + /** + * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int DYNAMIC_MAPPING_FOR__IDENTIFIER = PropertiesPackage.CONTROL_DESCRIPTION__IDENTIFIER; /** * The feature id for the '<em><b>Iterator</b></em>' attribute. <!-- @@ -989,7 +1121,7 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int DYNAMIC_MAPPING_FOR__ITERATOR = 0; + int DYNAMIC_MAPPING_FOR__ITERATOR = PropertiesPackage.CONTROL_DESCRIPTION_FEATURE_COUNT + 0; /** * The feature id for the '<em><b>Domain Class Expression</b></em>' @@ -998,7 +1130,7 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION = 1; + int DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION = PropertiesPackage.CONTROL_DESCRIPTION_FEATURE_COUNT + 1; /** * The feature id for the '<em><b>Ifs</b></em>' containment reference list. @@ -1007,7 +1139,7 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int DYNAMIC_MAPPING_FOR__IFS = 2; + int DYNAMIC_MAPPING_FOR__IFS = PropertiesPackage.CONTROL_DESCRIPTION_FEATURE_COUNT + 2; /** * The number of structural features of the '<em>Dynamic Mapping For</em>' @@ -1016,7 +1148,7 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int DYNAMIC_MAPPING_FOR_FEATURE_COUNT = 3; + int DYNAMIC_MAPPING_FOR_FEATURE_COUNT = PropertiesPackage.CONTROL_DESCRIPTION_FEATURE_COUNT + 3; /** * The meta object id for the ' @@ -1028,7 +1160,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingIf() * @generated */ - int DYNAMIC_MAPPING_IF = 14; + int DYNAMIC_MAPPING_IF = 18; /** * The feature id for the '<em><b>Predicate Expression</b></em>' attribute. @@ -1067,7 +1199,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getTextAreaDescription() * @generated */ - int TEXT_AREA_DESCRIPTION = 15; + int TEXT_AREA_DESCRIPTION = 19; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -1160,7 +1292,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getRadioDescription() * @generated */ - int RADIO_DESCRIPTION = 16; + int RADIO_DESCRIPTION = 20; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -1271,7 +1403,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getSingleReferenceDescription() * @generated */ - int SINGLE_REFERENCE_DESCRIPTION = 17; + int SINGLE_REFERENCE_DESCRIPTION = 21; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -1374,7 +1506,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getOperationDescription() * @generated */ - int OPERATION_DESCRIPTION = 18; + int OPERATION_DESCRIPTION = 22; /** * The feature id for the '<em><b>Initial Operation</b></em>' containment @@ -1404,7 +1536,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getMultipleReferencesDescription() * @generated */ - int MULTIPLE_REFERENCES_DESCRIPTION = 19; + int MULTIPLE_REFERENCES_DESCRIPTION = 23; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -1525,7 +1657,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCustomDescription() * @generated */ - int CUSTOM_DESCRIPTION = 20; + int CUSTOM_DESCRIPTION = 24; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -1609,7 +1741,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCustomExpression() * @generated */ - int CUSTOM_EXPRESSION = 21; + int CUSTOM_EXPRESSION = 25; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -1648,7 +1780,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCustomOperation() * @generated */ - int CUSTOM_OPERATION = 22; + int CUSTOM_OPERATION = 26; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -1687,7 +1819,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getWidgetStyle() * @generated */ - int WIDGET_STYLE = 23; + int WIDGET_STYLE = 27; /** * The feature id for the '<em><b>Label Font Name Expression</b></em>' @@ -1753,7 +1885,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getTextWidgetStyle() * @generated */ - int TEXT_WIDGET_STYLE = 24; + int TEXT_WIDGET_STYLE = 28; /** * The feature id for the '<em><b>Label Font Name Expression</b></em>' @@ -1864,7 +1996,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getLabelWidgetStyle() * @generated */ - int LABEL_WIDGET_STYLE = 25; + int LABEL_WIDGET_STYLE = 29; /** * The feature id for the '<em><b>Label Font Name Expression</b></em>' @@ -1975,7 +2107,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCheckboxWidgetStyle() * @generated */ - int CHECKBOX_WIDGET_STYLE = 26; + int CHECKBOX_WIDGET_STYLE = 30; /** * The feature id for the '<em><b>Label Font Name Expression</b></em>' @@ -2041,7 +2173,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getRadioWidgetStyle() * @generated */ - int RADIO_WIDGET_STYLE = 27; + int RADIO_WIDGET_STYLE = 31; /** * The feature id for the '<em><b>Label Font Name Expression</b></em>' @@ -2107,7 +2239,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getButtonWidgetStyle() * @generated */ - int BUTTON_WIDGET_STYLE = 28; + int BUTTON_WIDGET_STYLE = 32; /** * The feature id for the '<em><b>Label Font Name Expression</b></em>' @@ -2173,7 +2305,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getSelectWidgetStyle() * @generated */ - int SELECT_WIDGET_STYLE = 29; + int SELECT_WIDGET_STYLE = 33; /** * The feature id for the '<em><b>Label Font Name Expression</b></em>' @@ -2239,7 +2371,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCustomWidgetStyle() * @generated */ - int CUSTOM_WIDGET_STYLE = 30; + int CUSTOM_WIDGET_STYLE = 34; /** * The feature id for the '<em><b>Label Font Name Expression</b></em>' @@ -2305,7 +2437,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getWidgetConditionalStyle() * @generated */ - int WIDGET_CONDITIONAL_STYLE = 31; + int WIDGET_CONDITIONAL_STYLE = 35; /** * The feature id for the '<em><b>Precondition Expression</b></em>' @@ -2336,7 +2468,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getTextWidgetConditionalStyle() * @generated */ - int TEXT_WIDGET_CONDITIONAL_STYLE = 32; + int TEXT_WIDGET_CONDITIONAL_STYLE = 36; /** * The feature id for the '<em><b>Precondition Expression</b></em>' @@ -2376,7 +2508,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getLabelWidgetConditionalStyle() * @generated */ - int LABEL_WIDGET_CONDITIONAL_STYLE = 33; + int LABEL_WIDGET_CONDITIONAL_STYLE = 37; /** * The feature id for the '<em><b>Precondition Expression</b></em>' @@ -2416,7 +2548,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCheckboxWidgetConditionalStyle() * @generated */ - int CHECKBOX_WIDGET_CONDITIONAL_STYLE = 34; + int CHECKBOX_WIDGET_CONDITIONAL_STYLE = 38; /** * The feature id for the '<em><b>Precondition Expression</b></em>' @@ -2456,7 +2588,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getRadioWidgetConditionalStyle() * @generated */ - int RADIO_WIDGET_CONDITIONAL_STYLE = 35; + int RADIO_WIDGET_CONDITIONAL_STYLE = 39; /** * The feature id for the '<em><b>Precondition Expression</b></em>' @@ -2496,7 +2628,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getButtonWidgetConditionalStyle() * @generated */ - int BUTTON_WIDGET_CONDITIONAL_STYLE = 36; + int BUTTON_WIDGET_CONDITIONAL_STYLE = 40; /** * The feature id for the '<em><b>Precondition Expression</b></em>' @@ -2536,7 +2668,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getSelectWidgetConditionalStyle() * @generated */ - int SELECT_WIDGET_CONDITIONAL_STYLE = 37; + int SELECT_WIDGET_CONDITIONAL_STYLE = 41; /** * The feature id for the '<em><b>Precondition Expression</b></em>' @@ -2576,7 +2708,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCustomWidgetConditionalStyle() * @generated */ - int CUSTOM_WIDGET_CONDITIONAL_STYLE = 38; + int CUSTOM_WIDGET_CONDITIONAL_STYLE = 42; /** * The feature id for the '<em><b>Precondition Expression</b></em>' @@ -2607,6 +2739,18 @@ public interface PropertiesPackage extends EPackage { int CUSTOM_WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT = PropertiesPackage.WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT + 1; /** + * The meta object id for the ' + * {@link org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION + * <em>FILL LAYOUT ORIENTATION</em>}' enum. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getFILL_LAYOUT_ORIENTATION() + * @generated + */ + int FILL_LAYOUT_ORIENTATION = 43; + + /** * Returns the meta object for class ' * {@link org.eclipse.sirius.properties.ViewExtensionDescription * <em>View Extension Description</em>}'. <!-- begin-user-doc --> <!-- @@ -2899,17 +3043,17 @@ public interface PropertiesPackage extends EPackage { EAttribute getGroupDescription_PreconditionExpression(); /** - * Returns the meta object for the containment reference ' - * {@link org.eclipse.sirius.properties.GroupDescription#getContainer - * <em>Container</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.sirius.properties.GroupDescription#getControls + * <em>Controls</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> * - * @return the meta object for the containment reference '<em>Container</em> - * '. - * @see org.eclipse.sirius.properties.GroupDescription#getContainer() + * @return the meta object for the containment reference list ' + * <em>Controls</em>'. + * @see org.eclipse.sirius.properties.GroupDescription#getControls() * @see #getGroupDescription() * @generated */ - EReference getGroupDescription_Container(); + EReference getGroupDescription_Controls(); /** * Returns the meta object for the containment reference ' @@ -2967,6 +3111,30 @@ public interface PropertiesPackage extends EPackage { /** * Returns the meta object for class ' + * {@link org.eclipse.sirius.properties.ControlDescription + * <em>Control Description</em>}'. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @return the meta object for class '<em>Control Description</em>'. + * @see org.eclipse.sirius.properties.ControlDescription + * @generated + */ + EClass getControlDescription(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.sirius.properties.ControlDescription#getIdentifier + * <em>Identifier</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Identifier</em>'. + * @see org.eclipse.sirius.properties.ControlDescription#getIdentifier() + * @see #getControlDescription() + * @generated + */ + EAttribute getControlDescription_Identifier(); + + /** + * Returns the meta object for class ' * {@link org.eclipse.sirius.properties.ContainerDescription * <em>Container Description</em>}'. <!-- begin-user-doc --> <!-- * end-user-doc --> @@ -2978,67 +3146,116 @@ public interface PropertiesPackage extends EPackage { EClass getContainerDescription(); /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.sirius.properties.ContainerDescription#getIdentifier - * <em>Identifier</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.sirius.properties.ContainerDescription#getControls + * <em>Controls</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> * - * @return the meta object for the attribute '<em>Identifier</em>'. - * @see org.eclipse.sirius.properties.ContainerDescription#getIdentifier() + * @return the meta object for the containment reference list ' + * <em>Controls</em>'. + * @see org.eclipse.sirius.properties.ContainerDescription#getControls() * @see #getContainerDescription() * @generated */ - EAttribute getContainerDescription_Identifier(); + EReference getContainerDescription_Controls(); /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.sirius.properties.ContainerDescription#getWidgets - * <em>Widgets</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * Returns the meta object for the containment reference ' + * {@link org.eclipse.sirius.properties.ContainerDescription#getLayout + * <em>Layout</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> * - * @return the meta object for the containment reference list ' - * <em>Widgets</em>'. - * @see org.eclipse.sirius.properties.ContainerDescription#getWidgets() + * @return the meta object for the containment reference '<em>Layout</em>'. + * @see org.eclipse.sirius.properties.ContainerDescription#getLayout() * @see #getContainerDescription() * @generated */ - EReference getContainerDescription_Widgets(); + EReference getContainerDescription_Layout(); /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.sirius.properties.ContainerDescription#getDynamicMappings - * <em>Dynamic Mappings</em>}'. <!-- begin-user-doc --> <!-- end-user-doc + * Returns the meta object for class ' + * {@link org.eclipse.sirius.properties.LayoutDescription + * <em>Layout Description</em>}'. <!-- begin-user-doc --> <!-- end-user-doc * --> * - * @return the meta object for the containment reference list ' - * <em>Dynamic Mappings</em>'. - * @see org.eclipse.sirius.properties.ContainerDescription#getDynamicMappings() - * @see #getContainerDescription() + * @return the meta object for class '<em>Layout Description</em>'. + * @see org.eclipse.sirius.properties.LayoutDescription * @generated */ - EReference getContainerDescription_DynamicMappings(); + EClass getLayoutDescription(); /** * Returns the meta object for class ' - * {@link org.eclipse.sirius.properties.WidgetDescription - * <em>Widget Description</em>}'. <!-- begin-user-doc --> <!-- end-user-doc + * {@link org.eclipse.sirius.properties.FillLayoutDescription + * <em>Fill Layout Description</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the meta object for class '<em>Fill Layout Description</em>'. + * @see org.eclipse.sirius.properties.FillLayoutDescription + * @generated + */ + EClass getFillLayoutDescription(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.sirius.properties.FillLayoutDescription#getOrientation + * <em>Orientation</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Orientation</em>'. + * @see org.eclipse.sirius.properties.FillLayoutDescription#getOrientation() + * @see #getFillLayoutDescription() + * @generated + */ + EAttribute getFillLayoutDescription_Orientation(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.sirius.properties.GridLayoutDescription + * <em>Grid Layout Description</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the meta object for class '<em>Grid Layout Description</em>'. + * @see org.eclipse.sirius.properties.GridLayoutDescription + * @generated + */ + EClass getGridLayoutDescription(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.sirius.properties.GridLayoutDescription#getNumberOfColumns + * <em>Number Of Columns</em>}'. <!-- begin-user-doc --> <!-- end-user-doc * --> * - * @return the meta object for class '<em>Widget Description</em>'. - * @see org.eclipse.sirius.properties.WidgetDescription + * @return the meta object for the attribute '<em>Number Of Columns</em>'. + * @see org.eclipse.sirius.properties.GridLayoutDescription#getNumberOfColumns() + * @see #getGridLayoutDescription() * @generated */ - EClass getWidgetDescription(); + EAttribute getGridLayoutDescription_NumberOfColumns(); /** * Returns the meta object for the attribute ' - * {@link org.eclipse.sirius.properties.WidgetDescription#getIdentifier - * <em>Identifier</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * {@link org.eclipse.sirius.properties.GridLayoutDescription#isMakeColumnsWithEqualWidth + * <em>Make Columns With Equal Width</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> * - * @return the meta object for the attribute '<em>Identifier</em>'. - * @see org.eclipse.sirius.properties.WidgetDescription#getIdentifier() - * @see #getWidgetDescription() + * @return the meta object for the attribute ' + * <em>Make Columns With Equal Width</em>'. + * @see org.eclipse.sirius.properties.GridLayoutDescription#isMakeColumnsWithEqualWidth() + * @see #getGridLayoutDescription() + * @generated + */ + EAttribute getGridLayoutDescription_MakeColumnsWithEqualWidth(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.sirius.properties.WidgetDescription + * <em>Widget Description</em>}'. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @return the meta object for class '<em>Widget Description</em>'. + * @see org.eclipse.sirius.properties.WidgetDescription * @generated */ - EAttribute getWidgetDescription_Identifier(); + EClass getWidgetDescription(); /** * Returns the meta object for the attribute ' @@ -4497,6 +4714,18 @@ public interface PropertiesPackage extends EPackage { EReference getCustomWidgetConditionalStyle_Style(); /** + * Returns the meta object for enum ' + * {@link org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION + * <em>FILL LAYOUT ORIENTATION</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the meta object for enum '<em>FILL LAYOUT ORIENTATION</em>'. + * @see org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION + * @generated + */ + EEnum getFILL_LAYOUT_ORIENTATION(); + + /** * Returns the factory that creates the instances of the model. <!-- * begin-user-doc --> <!-- end-user-doc --> * @@ -4730,13 +4959,13 @@ public interface PropertiesPackage extends EPackage { EAttribute GROUP_DESCRIPTION__PRECONDITION_EXPRESSION = PropertiesPackage.eINSTANCE.getGroupDescription_PreconditionExpression(); /** - * The meta object literal for the '<em><b>Container</b></em>' - * containment reference feature. <!-- begin-user-doc --> <!-- + * The meta object literal for the '<em><b>Controls</b></em>' + * containment reference list feature. <!-- begin-user-doc --> <!-- * end-user-doc --> * * @generated */ - EReference GROUP_DESCRIPTION__CONTAINER = PropertiesPackage.eINSTANCE.getGroupDescription_Container(); + EReference GROUP_DESCRIPTION__CONTROLS = PropertiesPackage.eINSTANCE.getGroupDescription_Controls(); /** * The meta object literal for the '<em><b>Validation Set</b></em>' @@ -4779,6 +5008,26 @@ public interface PropertiesPackage extends EPackage { /** * The meta object literal for the ' + * {@link org.eclipse.sirius.properties.impl.ControlDescriptionImpl + * <em>Control Description</em>}' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.ControlDescriptionImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getControlDescription() + * @generated + */ + EClass CONTROL_DESCRIPTION = PropertiesPackage.eINSTANCE.getControlDescription(); + + /** + * The meta object literal for the '<em><b>Identifier</b></em>' + * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute CONTROL_DESCRIPTION__IDENTIFIER = PropertiesPackage.eINSTANCE.getControlDescription_Identifier(); + + /** + * The meta object literal for the ' * {@link org.eclipse.sirius.properties.impl.ContainerDescriptionImpl * <em>Container Description</em>}' class. <!-- begin-user-doc --> <!-- * end-user-doc --> @@ -4790,49 +5039,94 @@ public interface PropertiesPackage extends EPackage { EClass CONTAINER_DESCRIPTION = PropertiesPackage.eINSTANCE.getContainerDescription(); /** - * The meta object literal for the '<em><b>Identifier</b></em>' - * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * The meta object literal for the '<em><b>Controls</b></em>' + * containment reference list feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> * * @generated */ - EAttribute CONTAINER_DESCRIPTION__IDENTIFIER = PropertiesPackage.eINSTANCE.getContainerDescription_Identifier(); + EReference CONTAINER_DESCRIPTION__CONTROLS = PropertiesPackage.eINSTANCE.getContainerDescription_Controls(); /** - * The meta object literal for the '<em><b>Widgets</b></em>' containment - * reference list feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * The meta object literal for the '<em><b>Layout</b></em>' containment + * reference feature. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - EReference CONTAINER_DESCRIPTION__WIDGETS = PropertiesPackage.eINSTANCE.getContainerDescription_Widgets(); + EReference CONTAINER_DESCRIPTION__LAYOUT = PropertiesPackage.eINSTANCE.getContainerDescription_Layout(); /** - * The meta object literal for the '<em><b>Dynamic Mappings</b></em>' - * containment reference list feature. <!-- begin-user-doc --> <!-- + * The meta object literal for the ' + * {@link org.eclipse.sirius.properties.impl.LayoutDescriptionImpl + * <em>Layout Description</em>}' class. <!-- begin-user-doc --> <!-- * end-user-doc --> * + * @see org.eclipse.sirius.properties.impl.LayoutDescriptionImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getLayoutDescription() * @generated */ - EReference CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS = PropertiesPackage.eINSTANCE.getContainerDescription_DynamicMappings(); + EClass LAYOUT_DESCRIPTION = PropertiesPackage.eINSTANCE.getLayoutDescription(); /** * The meta object literal for the ' - * {@link org.eclipse.sirius.properties.impl.WidgetDescriptionImpl - * <em>Widget Description</em>}' class. <!-- begin-user-doc --> <!-- - * end-user-doc --> + * {@link org.eclipse.sirius.properties.impl.FillLayoutDescriptionImpl + * <em>Fill Layout Description</em>}' class. <!-- begin-user-doc --> + * <!-- end-user-doc --> * - * @see org.eclipse.sirius.properties.impl.WidgetDescriptionImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getWidgetDescription() + * @see org.eclipse.sirius.properties.impl.FillLayoutDescriptionImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getFillLayoutDescription() * @generated */ - EClass WIDGET_DESCRIPTION = PropertiesPackage.eINSTANCE.getWidgetDescription(); + EClass FILL_LAYOUT_DESCRIPTION = PropertiesPackage.eINSTANCE.getFillLayoutDescription(); /** - * The meta object literal for the '<em><b>Identifier</b></em>' + * The meta object literal for the '<em><b>Orientation</b></em>' * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - EAttribute WIDGET_DESCRIPTION__IDENTIFIER = PropertiesPackage.eINSTANCE.getWidgetDescription_Identifier(); + EAttribute FILL_LAYOUT_DESCRIPTION__ORIENTATION = PropertiesPackage.eINSTANCE.getFillLayoutDescription_Orientation(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.sirius.properties.impl.GridLayoutDescriptionImpl + * <em>Grid Layout Description</em>}' class. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.GridLayoutDescriptionImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getGridLayoutDescription() + * @generated + */ + EClass GRID_LAYOUT_DESCRIPTION = PropertiesPackage.eINSTANCE.getGridLayoutDescription(); + + /** + * The meta object literal for the '<em><b>Number Of Columns</b></em>' + * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute GRID_LAYOUT_DESCRIPTION__NUMBER_OF_COLUMNS = PropertiesPackage.eINSTANCE.getGridLayoutDescription_NumberOfColumns(); + + /** + * The meta object literal for the ' + * <em><b>Make Columns With Equal Width</b></em>' attribute feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute GRID_LAYOUT_DESCRIPTION__MAKE_COLUMNS_WITH_EQUAL_WIDTH = PropertiesPackage.eINSTANCE.getGridLayoutDescription_MakeColumnsWithEqualWidth(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.sirius.properties.impl.WidgetDescriptionImpl + * <em>Widget Description</em>}' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.WidgetDescriptionImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getWidgetDescription() + * @generated + */ + EClass WIDGET_DESCRIPTION = PropertiesPackage.eINSTANCE.getWidgetDescription(); /** * The meta object literal for the '<em><b>Label Expression</b></em>' @@ -5898,6 +6192,18 @@ public interface PropertiesPackage extends EPackage { */ EReference CUSTOM_WIDGET_CONDITIONAL_STYLE__STYLE = PropertiesPackage.eINSTANCE.getCustomWidgetConditionalStyle_Style(); + /** + * The meta object literal for the ' + * {@link org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION + * <em>FILL LAYOUT ORIENTATION</em>}' enum. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getFILL_LAYOUT_ORIENTATION() + * @generated + */ + EEnum FILL_LAYOUT_ORIENTATION = PropertiesPackage.eINSTANCE.getFILL_LAYOUT_ORIENTATION(); + } } // PropertiesPackage diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/TextWidgetConditionalStyle.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/TextWidgetConditionalStyle.java index 7125a9f97d..7a5421c6c7 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/TextWidgetConditionalStyle.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/TextWidgetConditionalStyle.java @@ -29,18 +29,18 @@ package org.eclipse.sirius.properties; */ public interface TextWidgetConditionalStyle extends WidgetConditionalStyle { /** - * Returns the value of the '<em><b>Style</b></em>' reference. <!-- - * begin-user-doc --> + * Returns the value of the '<em><b>Style</b></em>' containment reference. + * <!-- begin-user-doc --> * <p> - * If the meaning of the '<em>Style</em>' reference isn't clear, there - * really should be more of a description here... + * If the meaning of the '<em>Style</em>' containment reference isn't clear, + * there really should be more of a description here... * </p> * <!-- end-user-doc --> * - * @return the value of the '<em>Style</em>' reference. + * @return the value of the '<em>Style</em>' containment reference. * @see #setStyle(TextWidgetStyle) * @see org.eclipse.sirius.properties.PropertiesPackage#getTextWidgetConditionalStyle_Style() - * @model + * @model containment="true" * @generated */ TextWidgetStyle getStyle(); diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/WidgetDescription.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/WidgetDescription.java index 8e9bd0141f..760262d851 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/WidgetDescription.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/WidgetDescription.java @@ -11,8 +11,6 @@ */ package org.eclipse.sirius.properties; -import org.eclipse.emf.ecore.EObject; - /** * <!-- begin-user-doc --> A representation of the model object ' * <em><b>Widget Description</b></em>'. <!-- end-user-doc --> @@ -21,8 +19,6 @@ import org.eclipse.emf.ecore.EObject; * The following features are supported: * </p> * <ul> - * <li>{@link org.eclipse.sirius.properties.WidgetDescription#getIdentifier - * <em>Identifier</em>}</li> * <li>{@link org.eclipse.sirius.properties.WidgetDescription#getLabelExpression * <em>Label Expression</em>}</li> * <li>{@link org.eclipse.sirius.properties.WidgetDescription#getHelpExpression @@ -33,37 +29,7 @@ import org.eclipse.emf.ecore.EObject; * @model abstract="true" * @generated */ -public interface WidgetDescription extends EObject { - /** - * Returns the value of the '<em><b>Identifier</b></em>' attribute. <!-- - * begin-user-doc --> - * <p> - * If the meaning of the '<em>Identifier</em>' attribute isn't clear, there - * really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * - * @return the value of the '<em>Identifier</em>' attribute. - * @see #setIdentifier(String) - * @see org.eclipse.sirius.properties.PropertiesPackage#getWidgetDescription_Identifier() - * @model required="true" - * @generated - */ - String getIdentifier(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.WidgetDescription#getIdentifier - * <em>Identifier</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @param value - * the new value of the '<em>Identifier</em>' attribute. - * @see #getIdentifier() - * @generated - */ - void setIdentifier(String value); - +public interface WidgetDescription extends ControlDescription { /** * Returns the value of the '<em><b>Label Expression</b></em>' attribute. * <!-- begin-user-doc --> diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/WidgetStyle.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/WidgetStyle.java index 6e5a115aa3..e99c83de74 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/WidgetStyle.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/WidgetStyle.java @@ -42,7 +42,6 @@ import org.eclipse.sirius.viewpoint.description.ColorDescription; * @generated */ public interface WidgetStyle extends EObject { - /** * Returns the value of the '<em><b>Label Font Name Expression</b></em>' * attribute. <!-- begin-user-doc --> @@ -186,4 +185,5 @@ public interface WidgetStyle extends EObject { * @generated */ EList<FontFormat> getLabelFontFormat(); + } // WidgetStyle diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ContainerDescriptionImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ContainerDescriptionImpl.java index 4d1d9ab8cb..93d80cc662 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ContainerDescriptionImpl.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ContainerDescriptionImpl.java @@ -19,13 +19,12 @@ import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; import org.eclipse.sirius.properties.ContainerDescription; -import org.eclipse.sirius.properties.DynamicMappingFor; +import org.eclipse.sirius.properties.ControlDescription; +import org.eclipse.sirius.properties.LayoutDescription; import org.eclipse.sirius.properties.PropertiesPackage; -import org.eclipse.sirius.properties.WidgetDescription; /** * <!-- begin-user-doc --> An implementation of the model object ' @@ -35,59 +34,35 @@ import org.eclipse.sirius.properties.WidgetDescription; * </p> * <ul> * <li> - * {@link org.eclipse.sirius.properties.impl.ContainerDescriptionImpl#getIdentifier - * <em>Identifier</em>}</li> + * {@link org.eclipse.sirius.properties.impl.ContainerDescriptionImpl#getControls + * <em>Controls</em>}</li> * <li> - * {@link org.eclipse.sirius.properties.impl.ContainerDescriptionImpl#getWidgets - * <em>Widgets</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.impl.ContainerDescriptionImpl#getDynamicMappings - * <em>Dynamic Mappings</em>}</li> + * {@link org.eclipse.sirius.properties.impl.ContainerDescriptionImpl#getLayout + * <em>Layout</em>}</li> * </ul> * * @generated */ -public class ContainerDescriptionImpl extends MinimalEObjectImpl.Container implements ContainerDescription { - /** - * The default value of the '{@link #getIdentifier() <em>Identifier</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getIdentifier() - * @generated - * @ordered - */ - protected static final String IDENTIFIER_EDEFAULT = null; - +public class ContainerDescriptionImpl extends ControlDescriptionImpl implements ContainerDescription { /** - * The cached value of the '{@link #getIdentifier() <em>Identifier</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getIdentifier() - * @generated - * @ordered - */ - protected String identifier = ContainerDescriptionImpl.IDENTIFIER_EDEFAULT; - - /** - * The cached value of the '{@link #getWidgets() <em>Widgets</em>}' + * The cached value of the '{@link #getControls() <em>Controls</em>}' * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc --> * - * @see #getWidgets() + * @see #getControls() * @generated * @ordered */ - protected EList<WidgetDescription> widgets; + protected EList<ControlDescription> controls; /** - * The cached value of the '{@link #getDynamicMappings() - * <em>Dynamic Mappings</em>}' containment reference list. <!-- - * begin-user-doc --> <!-- end-user-doc --> + * The cached value of the '{@link #getLayout() <em>Layout</em>}' + * containment reference. <!-- begin-user-doc --> <!-- end-user-doc --> * - * @see #getDynamicMappings() + * @see #getLayout() * @generated * @ordered */ - protected EList<DynamicMappingFor> dynamicMappings; + protected LayoutDescription layout; /** * <!-- begin-user-doc --> <!-- end-user-doc --> @@ -114,8 +89,11 @@ public class ContainerDescriptionImpl extends MinimalEObjectImpl.Container imple * @generated */ @Override - public String getIdentifier() { - return identifier; + public EList<ControlDescription> getControls() { + if (controls == null) { + controls = new EObjectContainmentEList<ControlDescription>(ControlDescription.class, this, PropertiesPackage.CONTAINER_DESCRIPTION__CONTROLS); + } + return controls; } /** @@ -124,12 +102,8 @@ public class ContainerDescriptionImpl extends MinimalEObjectImpl.Container imple * @generated */ @Override - public void setIdentifier(String newIdentifier) { - String oldIdentifier = identifier; - identifier = newIdentifier; - if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.CONTAINER_DESCRIPTION__IDENTIFIER, oldIdentifier, identifier)); - } + public LayoutDescription getLayout() { + return layout; } /** @@ -137,12 +111,18 @@ public class ContainerDescriptionImpl extends MinimalEObjectImpl.Container imple * * @generated */ - @Override - public EList<WidgetDescription> getWidgets() { - if (widgets == null) { - widgets = new EObjectContainmentEList<WidgetDescription>(WidgetDescription.class, this, PropertiesPackage.CONTAINER_DESCRIPTION__WIDGETS); + public NotificationChain basicSetLayout(LayoutDescription newLayout, NotificationChain msgs) { + LayoutDescription oldLayout = layout; + layout = newLayout; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.CONTAINER_DESCRIPTION__LAYOUT, oldLayout, newLayout); + if (msgs == null) { + msgs = notification; + } else { + msgs.add(notification); + } } - return widgets; + return msgs; } /** @@ -151,11 +131,22 @@ public class ContainerDescriptionImpl extends MinimalEObjectImpl.Container imple * @generated */ @Override - public EList<DynamicMappingFor> getDynamicMappings() { - if (dynamicMappings == null) { - dynamicMappings = new EObjectContainmentEList<DynamicMappingFor>(DynamicMappingFor.class, this, PropertiesPackage.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS); + public void setLayout(LayoutDescription newLayout) { + if (newLayout != layout) { + NotificationChain msgs = null; + if (layout != null) { + msgs = ((InternalEObject) layout).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.CONTAINER_DESCRIPTION__LAYOUT, null, msgs); + } + if (newLayout != null) { + msgs = ((InternalEObject) newLayout).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.CONTAINER_DESCRIPTION__LAYOUT, null, msgs); + } + msgs = basicSetLayout(newLayout, msgs); + if (msgs != null) { + msgs.dispatch(); + } + } else if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.CONTAINER_DESCRIPTION__LAYOUT, newLayout, newLayout)); } - return dynamicMappings; } /** @@ -166,10 +157,10 @@ public class ContainerDescriptionImpl extends MinimalEObjectImpl.Container imple @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { - case PropertiesPackage.CONTAINER_DESCRIPTION__WIDGETS: - return ((InternalEList<?>) getWidgets()).basicRemove(otherEnd, msgs); - case PropertiesPackage.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS: - return ((InternalEList<?>) getDynamicMappings()).basicRemove(otherEnd, msgs); + case PropertiesPackage.CONTAINER_DESCRIPTION__CONTROLS: + return ((InternalEList<?>) getControls()).basicRemove(otherEnd, msgs); + case PropertiesPackage.CONTAINER_DESCRIPTION__LAYOUT: + return basicSetLayout(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -182,12 +173,10 @@ public class ContainerDescriptionImpl extends MinimalEObjectImpl.Container imple @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case PropertiesPackage.CONTAINER_DESCRIPTION__IDENTIFIER: - return getIdentifier(); - case PropertiesPackage.CONTAINER_DESCRIPTION__WIDGETS: - return getWidgets(); - case PropertiesPackage.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS: - return getDynamicMappings(); + case PropertiesPackage.CONTAINER_DESCRIPTION__CONTROLS: + return getControls(); + case PropertiesPackage.CONTAINER_DESCRIPTION__LAYOUT: + return getLayout(); } return super.eGet(featureID, resolve, coreType); } @@ -201,16 +190,12 @@ public class ContainerDescriptionImpl extends MinimalEObjectImpl.Container imple @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case PropertiesPackage.CONTAINER_DESCRIPTION__IDENTIFIER: - setIdentifier((String) newValue); - return; - case PropertiesPackage.CONTAINER_DESCRIPTION__WIDGETS: - getWidgets().clear(); - getWidgets().addAll((Collection<? extends WidgetDescription>) newValue); + case PropertiesPackage.CONTAINER_DESCRIPTION__CONTROLS: + getControls().clear(); + getControls().addAll((Collection<? extends ControlDescription>) newValue); return; - case PropertiesPackage.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS: - getDynamicMappings().clear(); - getDynamicMappings().addAll((Collection<? extends DynamicMappingFor>) newValue); + case PropertiesPackage.CONTAINER_DESCRIPTION__LAYOUT: + setLayout((LayoutDescription) newValue); return; } super.eSet(featureID, newValue); @@ -224,14 +209,11 @@ public class ContainerDescriptionImpl extends MinimalEObjectImpl.Container imple @Override public void eUnset(int featureID) { switch (featureID) { - case PropertiesPackage.CONTAINER_DESCRIPTION__IDENTIFIER: - setIdentifier(ContainerDescriptionImpl.IDENTIFIER_EDEFAULT); + case PropertiesPackage.CONTAINER_DESCRIPTION__CONTROLS: + getControls().clear(); return; - case PropertiesPackage.CONTAINER_DESCRIPTION__WIDGETS: - getWidgets().clear(); - return; - case PropertiesPackage.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS: - getDynamicMappings().clear(); + case PropertiesPackage.CONTAINER_DESCRIPTION__LAYOUT: + setLayout((LayoutDescription) null); return; } super.eUnset(featureID); @@ -245,32 +227,12 @@ public class ContainerDescriptionImpl extends MinimalEObjectImpl.Container imple @Override public boolean eIsSet(int featureID) { switch (featureID) { - case PropertiesPackage.CONTAINER_DESCRIPTION__IDENTIFIER: - return ContainerDescriptionImpl.IDENTIFIER_EDEFAULT == null ? identifier != null : !ContainerDescriptionImpl.IDENTIFIER_EDEFAULT.equals(identifier); - case PropertiesPackage.CONTAINER_DESCRIPTION__WIDGETS: - return widgets != null && !widgets.isEmpty(); - case PropertiesPackage.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS: - return dynamicMappings != null && !dynamicMappings.isEmpty(); + case PropertiesPackage.CONTAINER_DESCRIPTION__CONTROLS: + return controls != null && !controls.isEmpty(); + case PropertiesPackage.CONTAINER_DESCRIPTION__LAYOUT: + return layout != null; } return super.eIsSet(featureID); } - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) { - return super.toString(); - } - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (identifier: "); - result.append(identifier); - result.append(')'); - return result.toString(); - } - } // ContainerDescriptionImpl diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ControlDescriptionImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ControlDescriptionImpl.java new file mode 100644 index 0000000000..48ffb4657b --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ControlDescriptionImpl.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + * + */ +package org.eclipse.sirius.properties.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.sirius.properties.ControlDescription; +import org.eclipse.sirius.properties.PropertiesPackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object ' + * <em><b>Control Description</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li> + * {@link org.eclipse.sirius.properties.impl.ControlDescriptionImpl#getIdentifier + * <em>Identifier</em>}</li> + * </ul> + * + * @generated + */ +public abstract class ControlDescriptionImpl extends MinimalEObjectImpl.Container implements ControlDescription { + /** + * The default value of the '{@link #getIdentifier() <em>Identifier</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getIdentifier() + * @generated + * @ordered + */ + protected static final String IDENTIFIER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIdentifier() <em>Identifier</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getIdentifier() + * @generated + * @ordered + */ + protected String identifier = ControlDescriptionImpl.IDENTIFIER_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ControlDescriptionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiesPackage.Literals.CONTROL_DESCRIPTION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getIdentifier() { + return identifier; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setIdentifier(String newIdentifier) { + String oldIdentifier = identifier; + identifier = newIdentifier; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.CONTROL_DESCRIPTION__IDENTIFIER, oldIdentifier, identifier)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertiesPackage.CONTROL_DESCRIPTION__IDENTIFIER: + return getIdentifier(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertiesPackage.CONTROL_DESCRIPTION__IDENTIFIER: + setIdentifier((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertiesPackage.CONTROL_DESCRIPTION__IDENTIFIER: + setIdentifier(ControlDescriptionImpl.IDENTIFIER_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertiesPackage.CONTROL_DESCRIPTION__IDENTIFIER: + return ControlDescriptionImpl.IDENTIFIER_EDEFAULT == null ? identifier != null : !ControlDescriptionImpl.IDENTIFIER_EDEFAULT.equals(identifier); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (identifier: "); + result.append(identifier); + result.append(')'); + return result.toString(); + } + +} // ControlDescriptionImpl diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingForImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingForImpl.java index 23dcee6c76..88788590db 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingForImpl.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingForImpl.java @@ -19,7 +19,6 @@ import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; import org.eclipse.sirius.properties.DynamicMappingFor; @@ -45,7 +44,7 @@ import org.eclipse.sirius.properties.PropertiesPackage; * * @generated */ -public class DynamicMappingForImpl extends MinimalEObjectImpl.Container implements DynamicMappingFor { +public class DynamicMappingForImpl extends ControlDescriptionImpl implements DynamicMappingFor { /** * The default value of the '{@link #getIterator() <em>Iterator</em>}' * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/FillLayoutDescriptionImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/FillLayoutDescriptionImpl.java new file mode 100644 index 0000000000..c80fa5c45a --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/FillLayoutDescriptionImpl.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + * + */ +package org.eclipse.sirius.properties.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION; +import org.eclipse.sirius.properties.FillLayoutDescription; +import org.eclipse.sirius.properties.PropertiesPackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object ' + * <em><b>Fill Layout Description</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li> + * {@link org.eclipse.sirius.properties.impl.FillLayoutDescriptionImpl#getOrientation + * <em>Orientation</em>}</li> + * </ul> + * + * @generated + */ +public class FillLayoutDescriptionImpl extends LayoutDescriptionImpl implements FillLayoutDescription { + /** + * The default value of the '{@link #getOrientation() <em>Orientation</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getOrientation() + * @generated + * @ordered + */ + protected static final FILL_LAYOUT_ORIENTATION ORIENTATION_EDEFAULT = FILL_LAYOUT_ORIENTATION.VERTICAL; + + /** + * The cached value of the '{@link #getOrientation() <em>Orientation</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getOrientation() + * @generated + * @ordered + */ + protected FILL_LAYOUT_ORIENTATION orientation = FillLayoutDescriptionImpl.ORIENTATION_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected FillLayoutDescriptionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiesPackage.Literals.FILL_LAYOUT_DESCRIPTION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public FILL_LAYOUT_ORIENTATION getOrientation() { + return orientation; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setOrientation(FILL_LAYOUT_ORIENTATION newOrientation) { + FILL_LAYOUT_ORIENTATION oldOrientation = orientation; + orientation = newOrientation == null ? FillLayoutDescriptionImpl.ORIENTATION_EDEFAULT : newOrientation; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.FILL_LAYOUT_DESCRIPTION__ORIENTATION, oldOrientation, orientation)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertiesPackage.FILL_LAYOUT_DESCRIPTION__ORIENTATION: + return getOrientation(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertiesPackage.FILL_LAYOUT_DESCRIPTION__ORIENTATION: + setOrientation((FILL_LAYOUT_ORIENTATION) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertiesPackage.FILL_LAYOUT_DESCRIPTION__ORIENTATION: + setOrientation(FillLayoutDescriptionImpl.ORIENTATION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertiesPackage.FILL_LAYOUT_DESCRIPTION__ORIENTATION: + return orientation != FillLayoutDescriptionImpl.ORIENTATION_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (orientation: "); + result.append(orientation); + result.append(')'); + return result.toString(); + } + +} // FillLayoutDescriptionImpl diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GridLayoutDescriptionImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GridLayoutDescriptionImpl.java new file mode 100644 index 0000000000..2035c242da --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GridLayoutDescriptionImpl.java @@ -0,0 +1,237 @@ +/** + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + * + */ +package org.eclipse.sirius.properties.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.sirius.properties.GridLayoutDescription; +import org.eclipse.sirius.properties.PropertiesPackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object ' + * <em><b>Grid Layout Description</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li> + * {@link org.eclipse.sirius.properties.impl.GridLayoutDescriptionImpl#getNumberOfColumns + * <em>Number Of Columns</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.impl.GridLayoutDescriptionImpl#isMakeColumnsWithEqualWidth + * <em>Make Columns With Equal Width</em>}</li> + * </ul> + * + * @generated + */ +public class GridLayoutDescriptionImpl extends LayoutDescriptionImpl implements GridLayoutDescription { + /** + * The default value of the '{@link #getNumberOfColumns() + * <em>Number Of Columns</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getNumberOfColumns() + * @generated + * @ordered + */ + protected static final int NUMBER_OF_COLUMNS_EDEFAULT = 1; + + /** + * The cached value of the '{@link #getNumberOfColumns() + * <em>Number Of Columns</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getNumberOfColumns() + * @generated + * @ordered + */ + protected int numberOfColumns = GridLayoutDescriptionImpl.NUMBER_OF_COLUMNS_EDEFAULT; + + /** + * The default value of the '{@link #isMakeColumnsWithEqualWidth() + * <em>Make Columns With Equal Width</em>}' attribute. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @see #isMakeColumnsWithEqualWidth() + * @generated + * @ordered + */ + protected static final boolean MAKE_COLUMNS_WITH_EQUAL_WIDTH_EDEFAULT = false; + + /** + * The cached value of the '{@link #isMakeColumnsWithEqualWidth() + * <em>Make Columns With Equal Width</em>}' attribute. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @see #isMakeColumnsWithEqualWidth() + * @generated + * @ordered + */ + protected boolean makeColumnsWithEqualWidth = GridLayoutDescriptionImpl.MAKE_COLUMNS_WITH_EQUAL_WIDTH_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected GridLayoutDescriptionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiesPackage.Literals.GRID_LAYOUT_DESCRIPTION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public int getNumberOfColumns() { + return numberOfColumns; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setNumberOfColumns(int newNumberOfColumns) { + int oldNumberOfColumns = numberOfColumns; + numberOfColumns = newNumberOfColumns; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.GRID_LAYOUT_DESCRIPTION__NUMBER_OF_COLUMNS, oldNumberOfColumns, numberOfColumns)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isMakeColumnsWithEqualWidth() { + return makeColumnsWithEqualWidth; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setMakeColumnsWithEqualWidth(boolean newMakeColumnsWithEqualWidth) { + boolean oldMakeColumnsWithEqualWidth = makeColumnsWithEqualWidth; + makeColumnsWithEqualWidth = newMakeColumnsWithEqualWidth; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.GRID_LAYOUT_DESCRIPTION__MAKE_COLUMNS_WITH_EQUAL_WIDTH, oldMakeColumnsWithEqualWidth, makeColumnsWithEqualWidth)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertiesPackage.GRID_LAYOUT_DESCRIPTION__NUMBER_OF_COLUMNS: + return getNumberOfColumns(); + case PropertiesPackage.GRID_LAYOUT_DESCRIPTION__MAKE_COLUMNS_WITH_EQUAL_WIDTH: + return isMakeColumnsWithEqualWidth(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertiesPackage.GRID_LAYOUT_DESCRIPTION__NUMBER_OF_COLUMNS: + setNumberOfColumns((Integer) newValue); + return; + case PropertiesPackage.GRID_LAYOUT_DESCRIPTION__MAKE_COLUMNS_WITH_EQUAL_WIDTH: + setMakeColumnsWithEqualWidth((Boolean) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertiesPackage.GRID_LAYOUT_DESCRIPTION__NUMBER_OF_COLUMNS: + setNumberOfColumns(GridLayoutDescriptionImpl.NUMBER_OF_COLUMNS_EDEFAULT); + return; + case PropertiesPackage.GRID_LAYOUT_DESCRIPTION__MAKE_COLUMNS_WITH_EQUAL_WIDTH: + setMakeColumnsWithEqualWidth(GridLayoutDescriptionImpl.MAKE_COLUMNS_WITH_EQUAL_WIDTH_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertiesPackage.GRID_LAYOUT_DESCRIPTION__NUMBER_OF_COLUMNS: + return numberOfColumns != GridLayoutDescriptionImpl.NUMBER_OF_COLUMNS_EDEFAULT; + case PropertiesPackage.GRID_LAYOUT_DESCRIPTION__MAKE_COLUMNS_WITH_EQUAL_WIDTH: + return makeColumnsWithEqualWidth != GridLayoutDescriptionImpl.MAKE_COLUMNS_WITH_EQUAL_WIDTH_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (numberOfColumns: "); + result.append(numberOfColumns); + result.append(", makeColumnsWithEqualWidth: "); + result.append(makeColumnsWithEqualWidth); + result.append(')'); + return result.toString(); + } + +} // GridLayoutDescriptionImpl diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupDescriptionImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupDescriptionImpl.java index 96c634102b..a2fd30b527 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupDescriptionImpl.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/GroupDescriptionImpl.java @@ -11,13 +11,18 @@ */ package org.eclipse.sirius.properties.impl; +import java.util.Collection; + import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; -import org.eclipse.sirius.properties.ContainerDescription; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.sirius.properties.ControlDescription; import org.eclipse.sirius.properties.GroupDescription; import org.eclipse.sirius.properties.GroupValidationSetDescription; import org.eclipse.sirius.properties.PropertiesPackage; @@ -45,8 +50,8 @@ import org.eclipse.sirius.properties.PropertiesPackage; * {@link org.eclipse.sirius.properties.impl.GroupDescriptionImpl#getPreconditionExpression * <em>Precondition Expression</em>}</li> * <li> - * {@link org.eclipse.sirius.properties.impl.GroupDescriptionImpl#getContainer - * <em>Container</em>}</li> + * {@link org.eclipse.sirius.properties.impl.GroupDescriptionImpl#getControls + * <em>Controls</em>}</li> * <li> * {@link org.eclipse.sirius.properties.impl.GroupDescriptionImpl#getValidationSet * <em>Validation Set</em>}</li> @@ -162,14 +167,14 @@ public class GroupDescriptionImpl extends MinimalEObjectImpl.Container implement protected String preconditionExpression = GroupDescriptionImpl.PRECONDITION_EXPRESSION_EDEFAULT; /** - * The cached value of the '{@link #getContainer() <em>Container</em>}' - * containment reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * The cached value of the '{@link #getControls() <em>Controls</em>}' + * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc --> * - * @see #getContainer() + * @see #getControls() * @generated * @ordered */ - protected ContainerDescription container; + protected EList<ControlDescription> controls; /** * The cached value of the '{@link #getValidationSet() @@ -327,51 +332,11 @@ public class GroupDescriptionImpl extends MinimalEObjectImpl.Container implement * @generated */ @Override - public ContainerDescription getContainer() { - return container; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetContainer(ContainerDescription newContainer, NotificationChain msgs) { - ContainerDescription oldContainer = container; - container = newContainer; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.GROUP_DESCRIPTION__CONTAINER, oldContainer, newContainer); - if (msgs == null) { - msgs = notification; - } else { - msgs.add(notification); - } - } - return msgs; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setContainer(ContainerDescription newContainer) { - if (newContainer != container) { - NotificationChain msgs = null; - if (container != null) { - msgs = ((InternalEObject) container).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.GROUP_DESCRIPTION__CONTAINER, null, msgs); - } - if (newContainer != null) { - msgs = ((InternalEObject) newContainer).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.GROUP_DESCRIPTION__CONTAINER, null, msgs); - } - msgs = basicSetContainer(newContainer, msgs); - if (msgs != null) { - msgs.dispatch(); - } - } else if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.GROUP_DESCRIPTION__CONTAINER, newContainer, newContainer)); + public EList<ControlDescription> getControls() { + if (controls == null) { + controls = new EObjectContainmentEList<ControlDescription>(ControlDescription.class, this, PropertiesPackage.GROUP_DESCRIPTION__CONTROLS); } + return controls; } /** @@ -435,8 +400,8 @@ public class GroupDescriptionImpl extends MinimalEObjectImpl.Container implement @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { - case PropertiesPackage.GROUP_DESCRIPTION__CONTAINER: - return basicSetContainer(null, msgs); + case PropertiesPackage.GROUP_DESCRIPTION__CONTROLS: + return ((InternalEList<?>) getControls()).basicRemove(otherEnd, msgs); case PropertiesPackage.GROUP_DESCRIPTION__VALIDATION_SET: return basicSetValidationSet(null, msgs); } @@ -461,8 +426,8 @@ public class GroupDescriptionImpl extends MinimalEObjectImpl.Container implement return getSemanticCandidateExpression(); case PropertiesPackage.GROUP_DESCRIPTION__PRECONDITION_EXPRESSION: return getPreconditionExpression(); - case PropertiesPackage.GROUP_DESCRIPTION__CONTAINER: - return getContainer(); + case PropertiesPackage.GROUP_DESCRIPTION__CONTROLS: + return getControls(); case PropertiesPackage.GROUP_DESCRIPTION__VALIDATION_SET: return getValidationSet(); } @@ -474,6 +439,7 @@ public class GroupDescriptionImpl extends MinimalEObjectImpl.Container implement * * @generated */ + @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { @@ -492,8 +458,9 @@ public class GroupDescriptionImpl extends MinimalEObjectImpl.Container implement case PropertiesPackage.GROUP_DESCRIPTION__PRECONDITION_EXPRESSION: setPreconditionExpression((String) newValue); return; - case PropertiesPackage.GROUP_DESCRIPTION__CONTAINER: - setContainer((ContainerDescription) newValue); + case PropertiesPackage.GROUP_DESCRIPTION__CONTROLS: + getControls().clear(); + getControls().addAll((Collection<? extends ControlDescription>) newValue); return; case PropertiesPackage.GROUP_DESCRIPTION__VALIDATION_SET: setValidationSet((GroupValidationSetDescription) newValue); @@ -525,8 +492,8 @@ public class GroupDescriptionImpl extends MinimalEObjectImpl.Container implement case PropertiesPackage.GROUP_DESCRIPTION__PRECONDITION_EXPRESSION: setPreconditionExpression(GroupDescriptionImpl.PRECONDITION_EXPRESSION_EDEFAULT); return; - case PropertiesPackage.GROUP_DESCRIPTION__CONTAINER: - setContainer((ContainerDescription) null); + case PropertiesPackage.GROUP_DESCRIPTION__CONTROLS: + getControls().clear(); return; case PropertiesPackage.GROUP_DESCRIPTION__VALIDATION_SET: setValidationSet((GroupValidationSetDescription) null); @@ -555,8 +522,8 @@ public class GroupDescriptionImpl extends MinimalEObjectImpl.Container implement case PropertiesPackage.GROUP_DESCRIPTION__PRECONDITION_EXPRESSION: return GroupDescriptionImpl.PRECONDITION_EXPRESSION_EDEFAULT == null ? preconditionExpression != null : !GroupDescriptionImpl.PRECONDITION_EXPRESSION_EDEFAULT.equals(preconditionExpression); - case PropertiesPackage.GROUP_DESCRIPTION__CONTAINER: - return container != null; + case PropertiesPackage.GROUP_DESCRIPTION__CONTROLS: + return controls != null && !controls.isEmpty(); case PropertiesPackage.GROUP_DESCRIPTION__VALIDATION_SET: return validationSet != null; } diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/LayoutDescriptionImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/LayoutDescriptionImpl.java new file mode 100644 index 0000000000..61e161e134 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/LayoutDescriptionImpl.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + * + */ +package org.eclipse.sirius.properties.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.sirius.properties.LayoutDescription; +import org.eclipse.sirius.properties.PropertiesPackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object ' + * <em><b>Layout Description</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public abstract class LayoutDescriptionImpl extends MinimalEObjectImpl.Container implements LayoutDescription { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected LayoutDescriptionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiesPackage.Literals.LAYOUT_DESCRIPTION; + } + +} // LayoutDescriptionImpl diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesFactoryImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesFactoryImpl.java index a568b75d15..1875055a01 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesFactoryImpl.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesFactoryImpl.java @@ -12,6 +12,7 @@ package org.eclipse.sirius.properties.impl; import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.impl.EFactoryImpl; @@ -30,6 +31,9 @@ import org.eclipse.sirius.properties.CustomWidgetConditionalStyle; import org.eclipse.sirius.properties.CustomWidgetStyle; import org.eclipse.sirius.properties.DynamicMappingFor; import org.eclipse.sirius.properties.DynamicMappingIf; +import org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION; +import org.eclipse.sirius.properties.FillLayoutDescription; +import org.eclipse.sirius.properties.GridLayoutDescription; import org.eclipse.sirius.properties.GroupDescription; import org.eclipse.sirius.properties.GroupValidationSetDescription; import org.eclipse.sirius.properties.LabelDescription; @@ -113,6 +117,10 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac return createGroupValidationSetDescription(); case PropertiesPackage.CONTAINER_DESCRIPTION: return createContainerDescription(); + case PropertiesPackage.FILL_LAYOUT_DESCRIPTION: + return createFillLayoutDescription(); + case PropertiesPackage.GRID_LAYOUT_DESCRIPTION: + return createGridLayoutDescription(); case PropertiesPackage.TEXT_DESCRIPTION: return createTextDescription(); case PropertiesPackage.BUTTON_DESCRIPTION: @@ -184,6 +192,36 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac * @generated */ @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case PropertiesPackage.FILL_LAYOUT_ORIENTATION: + return createFILL_LAYOUT_ORIENTATIONFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case PropertiesPackage.FILL_LAYOUT_ORIENTATION: + return convertFILL_LAYOUT_ORIENTATIONToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public ViewExtensionDescription createViewExtensionDescription() { ViewExtensionDescriptionImpl viewExtensionDescription = new ViewExtensionDescriptionImpl(); return viewExtensionDescription; @@ -261,6 +299,28 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac * @generated */ @Override + public FillLayoutDescription createFillLayoutDescription() { + FillLayoutDescriptionImpl fillLayoutDescription = new FillLayoutDescriptionImpl(); + return fillLayoutDescription; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public GridLayoutDescription createGridLayoutDescription() { + GridLayoutDescriptionImpl gridLayoutDescription = new GridLayoutDescriptionImpl(); + return gridLayoutDescription; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public TextDescription createTextDescription() { TextDescriptionImpl textDescription = new TextDescriptionImpl(); return textDescription; @@ -338,6 +398,17 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac * @generated */ @Override + public TextAreaDescription createTextAreaDescription() { + TextAreaDescriptionImpl textAreaDescription = new TextAreaDescriptionImpl(); + return textAreaDescription; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public RadioDescription createRadioDescription() { RadioDescriptionImpl radioDescription = new RadioDescriptionImpl(); return radioDescription; @@ -579,10 +650,21 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac * * @generated */ - @Override - public TextAreaDescription createTextAreaDescription() { - TextAreaDescriptionImpl textAreaDescription = new TextAreaDescriptionImpl(); - return textAreaDescription; + public FILL_LAYOUT_ORIENTATION createFILL_LAYOUT_ORIENTATIONFromString(EDataType eDataType, String initialValue) { + FILL_LAYOUT_ORIENTATION result = FILL_LAYOUT_ORIENTATION.get(initialValue); + if (result == null) { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + } + return result; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String convertFILL_LAYOUT_ORIENTATIONToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); } /** diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java index 78e736186a..66aadc5227 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java @@ -13,6 +13,7 @@ package org.eclipse.sirius.properties.impl; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EcorePackage; @@ -24,6 +25,7 @@ import org.eclipse.sirius.properties.CheckboxDescription; import org.eclipse.sirius.properties.CheckboxWidgetConditionalStyle; import org.eclipse.sirius.properties.CheckboxWidgetStyle; import org.eclipse.sirius.properties.ContainerDescription; +import org.eclipse.sirius.properties.ControlDescription; import org.eclipse.sirius.properties.CustomDescription; import org.eclipse.sirius.properties.CustomExpression; import org.eclipse.sirius.properties.CustomOperation; @@ -31,11 +33,14 @@ import org.eclipse.sirius.properties.CustomWidgetConditionalStyle; import org.eclipse.sirius.properties.CustomWidgetStyle; import org.eclipse.sirius.properties.DynamicMappingFor; import org.eclipse.sirius.properties.DynamicMappingIf; +import org.eclipse.sirius.properties.FillLayoutDescription; +import org.eclipse.sirius.properties.GridLayoutDescription; import org.eclipse.sirius.properties.GroupDescription; import org.eclipse.sirius.properties.GroupValidationSetDescription; import org.eclipse.sirius.properties.LabelDescription; import org.eclipse.sirius.properties.LabelWidgetConditionalStyle; import org.eclipse.sirius.properties.LabelWidgetStyle; +import org.eclipse.sirius.properties.LayoutDescription; import org.eclipse.sirius.properties.MultipleReferencesDescription; import org.eclipse.sirius.properties.OperationDescription; import org.eclipse.sirius.properties.PageDescription; @@ -117,6 +122,13 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * * @generated */ + private EClass controlDescriptionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ private EClass containerDescriptionEClass = null; /** @@ -124,6 +136,27 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * * @generated */ + private EClass layoutDescriptionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass fillLayoutDescriptionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass gridLayoutDescriptionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ private EClass widgetDescriptionEClass = null; /** @@ -344,6 +377,13 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac private EClass customWidgetConditionalStyleEClass = null; /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EEnum filL_LAYOUT_ORIENTATIONEEnum = null; + + /** * Creates an instance of the model <b>Package</b>, registered with * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the * package package URI value. @@ -648,7 +688,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EReference getGroupDescription_Container() { + public EReference getGroupDescription_Controls() { return (EReference) groupDescriptionEClass.getEStructuralFeatures().get(5); } @@ -698,6 +738,26 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override + public EClass getControlDescription() { + return controlDescriptionEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getControlDescription_Identifier() { + return (EAttribute) controlDescriptionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public EClass getContainerDescription() { return containerDescriptionEClass; } @@ -708,8 +768,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EAttribute getContainerDescription_Identifier() { - return (EAttribute) containerDescriptionEClass.getEStructuralFeatures().get(0); + public EReference getContainerDescription_Controls() { + return (EReference) containerDescriptionEClass.getEStructuralFeatures().get(0); } /** @@ -718,7 +778,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EReference getContainerDescription_Widgets() { + public EReference getContainerDescription_Layout() { return (EReference) containerDescriptionEClass.getEStructuralFeatures().get(1); } @@ -728,8 +788,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EReference getContainerDescription_DynamicMappings() { - return (EReference) containerDescriptionEClass.getEStructuralFeatures().get(2); + public EClass getLayoutDescription() { + return layoutDescriptionEClass; } /** @@ -738,8 +798,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EClass getWidgetDescription() { - return widgetDescriptionEClass; + public EClass getFillLayoutDescription() { + return fillLayoutDescriptionEClass; } /** @@ -748,8 +808,48 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EAttribute getWidgetDescription_Identifier() { - return (EAttribute) widgetDescriptionEClass.getEStructuralFeatures().get(0); + public EAttribute getFillLayoutDescription_Orientation() { + return (EAttribute) fillLayoutDescriptionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getGridLayoutDescription() { + return gridLayoutDescriptionEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getGridLayoutDescription_NumberOfColumns() { + return (EAttribute) gridLayoutDescriptionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getGridLayoutDescription_MakeColumnsWithEqualWidth() { + return (EAttribute) gridLayoutDescriptionEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getWidgetDescription() { + return widgetDescriptionEClass; } /** @@ -759,7 +859,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac */ @Override public EAttribute getWidgetDescription_LabelExpression() { - return (EAttribute) widgetDescriptionEClass.getEStructuralFeatures().get(1); + return (EAttribute) widgetDescriptionEClass.getEStructuralFeatures().get(0); } /** @@ -769,7 +869,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac */ @Override public EAttribute getWidgetDescription_HelpExpression() { - return (EAttribute) widgetDescriptionEClass.getEStructuralFeatures().get(2); + return (EAttribute) widgetDescriptionEClass.getEStructuralFeatures().get(1); } /** @@ -1888,6 +1988,16 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override + public EEnum getFILL_LAYOUT_ORIENTATION() { + return filL_LAYOUT_ORIENTATIONEEnum; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public PropertiesFactory getPropertiesFactory() { return (PropertiesFactory) getEFactoryInstance(); } @@ -1940,20 +2050,30 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac createEAttribute(groupDescriptionEClass, PropertiesPackage.GROUP_DESCRIPTION__DOMAIN_CLASS); createEAttribute(groupDescriptionEClass, PropertiesPackage.GROUP_DESCRIPTION__SEMANTIC_CANDIDATE_EXPRESSION); createEAttribute(groupDescriptionEClass, PropertiesPackage.GROUP_DESCRIPTION__PRECONDITION_EXPRESSION); - createEReference(groupDescriptionEClass, PropertiesPackage.GROUP_DESCRIPTION__CONTAINER); + createEReference(groupDescriptionEClass, PropertiesPackage.GROUP_DESCRIPTION__CONTROLS); createEReference(groupDescriptionEClass, PropertiesPackage.GROUP_DESCRIPTION__VALIDATION_SET); groupValidationSetDescriptionEClass = createEClass(PropertiesPackage.GROUP_VALIDATION_SET_DESCRIPTION); createEReference(groupValidationSetDescriptionEClass, PropertiesPackage.GROUP_VALIDATION_SET_DESCRIPTION__SEMANTIC_VALIDATION_RULES); createEReference(groupValidationSetDescriptionEClass, PropertiesPackage.GROUP_VALIDATION_SET_DESCRIPTION__PROPERTY_VALIDATION_RULES); + controlDescriptionEClass = createEClass(PropertiesPackage.CONTROL_DESCRIPTION); + createEAttribute(controlDescriptionEClass, PropertiesPackage.CONTROL_DESCRIPTION__IDENTIFIER); + containerDescriptionEClass = createEClass(PropertiesPackage.CONTAINER_DESCRIPTION); - createEAttribute(containerDescriptionEClass, PropertiesPackage.CONTAINER_DESCRIPTION__IDENTIFIER); - createEReference(containerDescriptionEClass, PropertiesPackage.CONTAINER_DESCRIPTION__WIDGETS); - createEReference(containerDescriptionEClass, PropertiesPackage.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS); + createEReference(containerDescriptionEClass, PropertiesPackage.CONTAINER_DESCRIPTION__CONTROLS); + createEReference(containerDescriptionEClass, PropertiesPackage.CONTAINER_DESCRIPTION__LAYOUT); + + layoutDescriptionEClass = createEClass(PropertiesPackage.LAYOUT_DESCRIPTION); + + fillLayoutDescriptionEClass = createEClass(PropertiesPackage.FILL_LAYOUT_DESCRIPTION); + createEAttribute(fillLayoutDescriptionEClass, PropertiesPackage.FILL_LAYOUT_DESCRIPTION__ORIENTATION); + + gridLayoutDescriptionEClass = createEClass(PropertiesPackage.GRID_LAYOUT_DESCRIPTION); + createEAttribute(gridLayoutDescriptionEClass, PropertiesPackage.GRID_LAYOUT_DESCRIPTION__NUMBER_OF_COLUMNS); + createEAttribute(gridLayoutDescriptionEClass, PropertiesPackage.GRID_LAYOUT_DESCRIPTION__MAKE_COLUMNS_WITH_EQUAL_WIDTH); widgetDescriptionEClass = createEClass(PropertiesPackage.WIDGET_DESCRIPTION); - createEAttribute(widgetDescriptionEClass, PropertiesPackage.WIDGET_DESCRIPTION__IDENTIFIER); createEAttribute(widgetDescriptionEClass, PropertiesPackage.WIDGET_DESCRIPTION__LABEL_EXPRESSION); createEAttribute(widgetDescriptionEClass, PropertiesPackage.WIDGET_DESCRIPTION__HELP_EXPRESSION); @@ -2098,6 +2218,9 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac customWidgetConditionalStyleEClass = createEClass(PropertiesPackage.CUSTOM_WIDGET_CONDITIONAL_STYLE); createEReference(customWidgetConditionalStyleEClass, PropertiesPackage.CUSTOM_WIDGET_CONDITIONAL_STYLE__STYLE); + + // Create enums + filL_LAYOUT_ORIENTATIONEEnum = createEEnum(PropertiesPackage.FILL_LAYOUT_ORIENTATION); } /** @@ -2139,11 +2262,16 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac // Add supertypes to classes viewExtensionDescriptionEClass.getESuperTypes().add(theDescriptionPackage.getExtension()); propertyValidationRuleEClass.getESuperTypes().add(theValidationPackage.getValidationRule()); + containerDescriptionEClass.getESuperTypes().add(this.getControlDescription()); + fillLayoutDescriptionEClass.getESuperTypes().add(this.getLayoutDescription()); + gridLayoutDescriptionEClass.getESuperTypes().add(this.getLayoutDescription()); + widgetDescriptionEClass.getESuperTypes().add(this.getControlDescription()); textDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); buttonDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); labelDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); checkboxDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); selectDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); + dynamicMappingForEClass.getESuperTypes().add(this.getControlDescription()); textAreaDescriptionEClass.getESuperTypes().add(this.getTextDescription()); radioDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); singleReferenceDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); @@ -2224,7 +2352,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac initEAttribute(getGroupDescription_PreconditionExpression(), theDescriptionPackage.getInterpretedExpression(), "preconditionExpression", null, 0, 1, GroupDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); - initEReference(getGroupDescription_Container(), this.getContainerDescription(), null, "container", null, 0, 1, GroupDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, + initEReference(getGroupDescription_Controls(), this.getControlDescription(), null, "controls", null, 0, -1, GroupDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); initEReference(getGroupDescription_ValidationSet(), this.getGroupValidationSetDescription(), null, "validationSet", null, 0, 1, GroupDescription.class, !EPackageImpl.IS_TRANSIENT, @@ -2240,19 +2368,32 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); - initEClass(containerDescriptionEClass, ContainerDescription.class, "ContainerDescription", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getContainerDescription_Identifier(), ecorePackage.getEString(), "identifier", null, 1, 1, ContainerDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, + initEClass(controlDescriptionEClass, ControlDescription.class, "ControlDescription", EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getControlDescription_Identifier(), ecorePackage.getEString(), "identifier", null, 1, 1, ControlDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); - initEReference(getContainerDescription_Widgets(), this.getWidgetDescription(), null, "widgets", null, 0, -1, ContainerDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, - EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, - EPackageImpl.IS_ORDERED); - initEReference(getContainerDescription_DynamicMappings(), this.getDynamicMappingFor(), null, "dynamicMappings", null, 0, -1, ContainerDescription.class, !EPackageImpl.IS_TRANSIENT, + + initEClass(containerDescriptionEClass, ContainerDescription.class, "ContainerDescription", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); + initEReference(getContainerDescription_Controls(), this.getControlDescription(), null, "controls", null, 0, -1, ContainerDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEReference(getContainerDescription_Layout(), this.getLayoutDescription(), null, "layout", null, 0, 1, ContainerDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, + EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, + EPackageImpl.IS_ORDERED); + + initEClass(layoutDescriptionEClass, LayoutDescription.class, "LayoutDescription", EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); + + initEClass(fillLayoutDescriptionEClass, FillLayoutDescription.class, "FillLayoutDescription", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getFillLayoutDescription_Orientation(), this.getFILL_LAYOUT_ORIENTATION(), "orientation", null, 0, 1, FillLayoutDescription.class, !EPackageImpl.IS_TRANSIENT, + !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + + initEClass(gridLayoutDescriptionEClass, GridLayoutDescription.class, "GridLayoutDescription", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGridLayoutDescription_NumberOfColumns(), theEcorePackage.getEInt(), "numberOfColumns", "1", 0, 1, GridLayoutDescription.class, !EPackageImpl.IS_TRANSIENT, + !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEAttribute(getGridLayoutDescription_MakeColumnsWithEqualWidth(), theEcorePackage.getEBoolean(), "makeColumnsWithEqualWidth", null, 0, 1, GridLayoutDescription.class, + !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, + EPackageImpl.IS_ORDERED); initEClass(widgetDescriptionEClass, WidgetDescription.class, "WidgetDescription", EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getWidgetDescription_Identifier(), ecorePackage.getEString(), "identifier", null, 1, 1, WidgetDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, - EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); initEAttribute(getWidgetDescription_LabelExpression(), theDescriptionPackage.getInterpretedExpression(), "labelExpression", null, 0, 1, WidgetDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); initEAttribute(getWidgetDescription_HelpExpression(), theDescriptionPackage.getInterpretedExpression(), "helpExpression", null, 0, 1, WidgetDescription.class, !EPackageImpl.IS_TRANSIENT, @@ -2548,6 +2689,11 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + // Initialize enums and add enum literals + initEEnum(filL_LAYOUT_ORIENTATIONEEnum, org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION.class, "FILL_LAYOUT_ORIENTATION"); + addEEnumLiteral(filL_LAYOUT_ORIENTATIONEEnum, org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION.VERTICAL); + addEEnumLiteral(filL_LAYOUT_ORIENTATIONEEnum, org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION.HORIZONTAL); + // Create resource createResource(PropertiesPackage.eNS_URI); } diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/WidgetDescriptionImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/WidgetDescriptionImpl.java index 16dfda1cdf..78083a7729 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/WidgetDescriptionImpl.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/WidgetDescriptionImpl.java @@ -14,7 +14,6 @@ package org.eclipse.sirius.properties.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.sirius.properties.PropertiesPackage; import org.eclipse.sirius.properties.WidgetDescription; @@ -26,9 +25,6 @@ import org.eclipse.sirius.properties.WidgetDescription; * </p> * <ul> * <li> - * {@link org.eclipse.sirius.properties.impl.WidgetDescriptionImpl#getIdentifier - * <em>Identifier</em>}</li> - * <li> * {@link org.eclipse.sirius.properties.impl.WidgetDescriptionImpl#getLabelExpression * <em>Label Expression</em>}</li> * <li> @@ -38,27 +34,7 @@ import org.eclipse.sirius.properties.WidgetDescription; * * @generated */ -public abstract class WidgetDescriptionImpl extends MinimalEObjectImpl.Container implements WidgetDescription { - /** - * The default value of the '{@link #getIdentifier() <em>Identifier</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getIdentifier() - * @generated - * @ordered - */ - protected static final String IDENTIFIER_EDEFAULT = null; - - /** - * The cached value of the '{@link #getIdentifier() <em>Identifier</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getIdentifier() - * @generated - * @ordered - */ - protected String identifier = WidgetDescriptionImpl.IDENTIFIER_EDEFAULT; - +public abstract class WidgetDescriptionImpl extends ControlDescriptionImpl implements WidgetDescription { /** * The default value of the '{@link #getLabelExpression() * <em>Label Expression</em>}' attribute. <!-- begin-user-doc --> <!-- @@ -128,30 +104,6 @@ public abstract class WidgetDescriptionImpl extends MinimalEObjectImpl.Container * @generated */ @Override - public String getIdentifier() { - return identifier; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setIdentifier(String newIdentifier) { - String oldIdentifier = identifier; - identifier = newIdentifier; - if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.WIDGET_DESCRIPTION__IDENTIFIER, oldIdentifier, identifier)); - } - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override public String getLabelExpression() { return labelExpression; } @@ -202,8 +154,6 @@ public abstract class WidgetDescriptionImpl extends MinimalEObjectImpl.Container @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case PropertiesPackage.WIDGET_DESCRIPTION__IDENTIFIER: - return getIdentifier(); case PropertiesPackage.WIDGET_DESCRIPTION__LABEL_EXPRESSION: return getLabelExpression(); case PropertiesPackage.WIDGET_DESCRIPTION__HELP_EXPRESSION: @@ -220,9 +170,6 @@ public abstract class WidgetDescriptionImpl extends MinimalEObjectImpl.Container @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case PropertiesPackage.WIDGET_DESCRIPTION__IDENTIFIER: - setIdentifier((String) newValue); - return; case PropertiesPackage.WIDGET_DESCRIPTION__LABEL_EXPRESSION: setLabelExpression((String) newValue); return; @@ -241,9 +188,6 @@ public abstract class WidgetDescriptionImpl extends MinimalEObjectImpl.Container @Override public void eUnset(int featureID) { switch (featureID) { - case PropertiesPackage.WIDGET_DESCRIPTION__IDENTIFIER: - setIdentifier(WidgetDescriptionImpl.IDENTIFIER_EDEFAULT); - return; case PropertiesPackage.WIDGET_DESCRIPTION__LABEL_EXPRESSION: setLabelExpression(WidgetDescriptionImpl.LABEL_EXPRESSION_EDEFAULT); return; @@ -262,8 +206,6 @@ public abstract class WidgetDescriptionImpl extends MinimalEObjectImpl.Container @Override public boolean eIsSet(int featureID) { switch (featureID) { - case PropertiesPackage.WIDGET_DESCRIPTION__IDENTIFIER: - return WidgetDescriptionImpl.IDENTIFIER_EDEFAULT == null ? identifier != null : !WidgetDescriptionImpl.IDENTIFIER_EDEFAULT.equals(identifier); case PropertiesPackage.WIDGET_DESCRIPTION__LABEL_EXPRESSION: return WidgetDescriptionImpl.LABEL_EXPRESSION_EDEFAULT == null ? labelExpression != null : !WidgetDescriptionImpl.LABEL_EXPRESSION_EDEFAULT.equals(labelExpression); case PropertiesPackage.WIDGET_DESCRIPTION__HELP_EXPRESSION: @@ -284,9 +226,7 @@ public abstract class WidgetDescriptionImpl extends MinimalEObjectImpl.Container } StringBuffer result = new StringBuffer(super.toString()); - result.append(" (identifier: "); - result.append(identifier); - result.append(", labelExpression: "); + result.append(" (labelExpression: "); result.append(labelExpression); result.append(", helpExpression: "); result.append(helpExpression); diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java index 5758e92983..1f630dde42 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java @@ -22,6 +22,7 @@ import org.eclipse.sirius.properties.CheckboxDescription; import org.eclipse.sirius.properties.CheckboxWidgetConditionalStyle; import org.eclipse.sirius.properties.CheckboxWidgetStyle; import org.eclipse.sirius.properties.ContainerDescription; +import org.eclipse.sirius.properties.ControlDescription; import org.eclipse.sirius.properties.CustomDescription; import org.eclipse.sirius.properties.CustomExpression; import org.eclipse.sirius.properties.CustomOperation; @@ -29,11 +30,14 @@ import org.eclipse.sirius.properties.CustomWidgetConditionalStyle; import org.eclipse.sirius.properties.CustomWidgetStyle; import org.eclipse.sirius.properties.DynamicMappingFor; import org.eclipse.sirius.properties.DynamicMappingIf; +import org.eclipse.sirius.properties.FillLayoutDescription; +import org.eclipse.sirius.properties.GridLayoutDescription; import org.eclipse.sirius.properties.GroupDescription; import org.eclipse.sirius.properties.GroupValidationSetDescription; import org.eclipse.sirius.properties.LabelDescription; import org.eclipse.sirius.properties.LabelWidgetConditionalStyle; import org.eclipse.sirius.properties.LabelWidgetStyle; +import org.eclipse.sirius.properties.LayoutDescription; import org.eclipse.sirius.properties.MultipleReferencesDescription; import org.eclipse.sirius.properties.OperationDescription; import org.eclipse.sirius.properties.PageDescription; @@ -145,11 +149,31 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { } @Override + public Adapter caseControlDescription(ControlDescription object) { + return createControlDescriptionAdapter(); + } + + @Override public Adapter caseContainerDescription(ContainerDescription object) { return createContainerDescriptionAdapter(); } @Override + public Adapter caseLayoutDescription(LayoutDescription object) { + return createLayoutDescriptionAdapter(); + } + + @Override + public Adapter caseFillLayoutDescription(FillLayoutDescription object) { + return createFillLayoutDescriptionAdapter(); + } + + @Override + public Adapter caseGridLayoutDescription(GridLayoutDescription object) { + return createGridLayoutDescriptionAdapter(); + } + + @Override public Adapter caseWidgetDescription(WidgetDescription object) { return createWidgetDescriptionAdapter(); } @@ -442,6 +466,22 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { /** * Creates a new adapter for an object of class ' + * {@link org.eclipse.sirius.properties.ControlDescription + * <em>Control Description</em>}'. <!-- begin-user-doc --> This default + * implementation returns null so that we can easily ignore cases; it's + * useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.sirius.properties.ControlDescription + * @generated + */ + public Adapter createControlDescriptionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' * {@link org.eclipse.sirius.properties.ContainerDescription * <em>Container Description</em>}'. <!-- begin-user-doc --> This default * implementation returns null so that we can easily ignore cases; it's @@ -458,6 +498,54 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { /** * Creates a new adapter for an object of class ' + * {@link org.eclipse.sirius.properties.LayoutDescription + * <em>Layout Description</em>}'. <!-- begin-user-doc --> This default + * implementation returns null so that we can easily ignore cases; it's + * useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.sirius.properties.LayoutDescription + * @generated + */ + public Adapter createLayoutDescriptionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.sirius.properties.FillLayoutDescription + * <em>Fill Layout Description</em>}'. <!-- begin-user-doc --> This default + * implementation returns null so that we can easily ignore cases; it's + * useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.sirius.properties.FillLayoutDescription + * @generated + */ + public Adapter createFillLayoutDescriptionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.sirius.properties.GridLayoutDescription + * <em>Grid Layout Description</em>}'. <!-- begin-user-doc --> This default + * implementation returns null so that we can easily ignore cases; it's + * useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.sirius.properties.GridLayoutDescription + * @generated + */ + public Adapter createGridLayoutDescriptionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' * {@link org.eclipse.sirius.properties.WidgetDescription * <em>Widget Description</em>}'. <!-- begin-user-doc --> This default * implementation returns null so that we can easily ignore cases; it's @@ -586,6 +674,22 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { /** * Creates a new adapter for an object of class ' + * {@link org.eclipse.sirius.properties.TextAreaDescription + * <em>Text Area Description</em>}'. <!-- begin-user-doc --> This default + * implementation returns null so that we can easily ignore cases; it's + * useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.sirius.properties.TextAreaDescription + * @generated + */ + public Adapter createTextAreaDescriptionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' * {@link org.eclipse.sirius.properties.RadioDescription * <em>Radio Description</em>}'. <!-- begin-user-doc --> This default * implementation returns null so that we can easily ignore cases; it's @@ -953,22 +1057,6 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { /** * Creates a new adapter for an object of class ' - * {@link org.eclipse.sirius.properties.TextAreaDescription - * <em>Text Area Description</em>}'. <!-- begin-user-doc --> This default - * implementation returns null so that we can easily ignore cases; it's - * useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * - * @return the new adapter. - * @see org.eclipse.sirius.properties.TextAreaDescription - * @generated - */ - public Adapter createTextAreaDescriptionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' * {@link org.eclipse.sirius.viewpoint.description.Extension * <em>Extension</em>}'. <!-- begin-user-doc --> This default implementation * returns null so that we can easily ignore cases; it's useful to ignore a diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesSwitch.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesSwitch.java index 0b3d042b9f..a16e2141a4 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesSwitch.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesSwitch.java @@ -22,6 +22,7 @@ import org.eclipse.sirius.properties.CheckboxDescription; import org.eclipse.sirius.properties.CheckboxWidgetConditionalStyle; import org.eclipse.sirius.properties.CheckboxWidgetStyle; import org.eclipse.sirius.properties.ContainerDescription; +import org.eclipse.sirius.properties.ControlDescription; import org.eclipse.sirius.properties.CustomDescription; import org.eclipse.sirius.properties.CustomExpression; import org.eclipse.sirius.properties.CustomOperation; @@ -29,11 +30,14 @@ import org.eclipse.sirius.properties.CustomWidgetConditionalStyle; import org.eclipse.sirius.properties.CustomWidgetStyle; import org.eclipse.sirius.properties.DynamicMappingFor; import org.eclipse.sirius.properties.DynamicMappingIf; +import org.eclipse.sirius.properties.FillLayoutDescription; +import org.eclipse.sirius.properties.GridLayoutDescription; import org.eclipse.sirius.properties.GroupDescription; import org.eclipse.sirius.properties.GroupValidationSetDescription; import org.eclipse.sirius.properties.LabelDescription; import org.eclipse.sirius.properties.LabelWidgetConditionalStyle; import org.eclipse.sirius.properties.LabelWidgetStyle; +import org.eclipse.sirius.properties.LayoutDescription; import org.eclipse.sirius.properties.MultipleReferencesDescription; import org.eclipse.sirius.properties.OperationDescription; import org.eclipse.sirius.properties.PageDescription; @@ -189,10 +193,51 @@ public class PropertiesSwitch<T> { } return result; } + case PropertiesPackage.CONTROL_DESCRIPTION: { + ControlDescription controlDescription = (ControlDescription) theEObject; + T result = caseControlDescription(controlDescription); + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } case PropertiesPackage.CONTAINER_DESCRIPTION: { ContainerDescription containerDescription = (ContainerDescription) theEObject; T result = caseContainerDescription(containerDescription); if (result == null) { + result = caseControlDescription(containerDescription); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case PropertiesPackage.LAYOUT_DESCRIPTION: { + LayoutDescription layoutDescription = (LayoutDescription) theEObject; + T result = caseLayoutDescription(layoutDescription); + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case PropertiesPackage.FILL_LAYOUT_DESCRIPTION: { + FillLayoutDescription fillLayoutDescription = (FillLayoutDescription) theEObject; + T result = caseFillLayoutDescription(fillLayoutDescription); + if (result == null) { + result = caseLayoutDescription(fillLayoutDescription); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case PropertiesPackage.GRID_LAYOUT_DESCRIPTION: { + GridLayoutDescription gridLayoutDescription = (GridLayoutDescription) theEObject; + T result = caseGridLayoutDescription(gridLayoutDescription); + if (result == null) { + result = caseLayoutDescription(gridLayoutDescription); + } + if (result == null) { result = defaultCase(theEObject); } return result; @@ -201,6 +246,9 @@ public class PropertiesSwitch<T> { WidgetDescription widgetDescription = (WidgetDescription) theEObject; T result = caseWidgetDescription(widgetDescription); if (result == null) { + result = caseControlDescription(widgetDescription); + } + if (result == null) { result = defaultCase(theEObject); } return result; @@ -212,6 +260,9 @@ public class PropertiesSwitch<T> { result = caseWidgetDescription(textDescription); } if (result == null) { + result = caseControlDescription(textDescription); + } + if (result == null) { result = defaultCase(theEObject); } return result; @@ -223,6 +274,9 @@ public class PropertiesSwitch<T> { result = caseWidgetDescription(buttonDescription); } if (result == null) { + result = caseControlDescription(buttonDescription); + } + if (result == null) { result = defaultCase(theEObject); } return result; @@ -234,6 +288,9 @@ public class PropertiesSwitch<T> { result = caseWidgetDescription(labelDescription); } if (result == null) { + result = caseControlDescription(labelDescription); + } + if (result == null) { result = defaultCase(theEObject); } return result; @@ -245,6 +302,9 @@ public class PropertiesSwitch<T> { result = caseWidgetDescription(checkboxDescription); } if (result == null) { + result = caseControlDescription(checkboxDescription); + } + if (result == null) { result = defaultCase(theEObject); } return result; @@ -256,6 +316,9 @@ public class PropertiesSwitch<T> { result = caseWidgetDescription(selectDescription); } if (result == null) { + result = caseControlDescription(selectDescription); + } + if (result == null) { result = defaultCase(theEObject); } return result; @@ -264,6 +327,9 @@ public class PropertiesSwitch<T> { DynamicMappingFor dynamicMappingFor = (DynamicMappingFor) theEObject; T result = caseDynamicMappingFor(dynamicMappingFor); if (result == null) { + result = caseControlDescription(dynamicMappingFor); + } + if (result == null) { result = defaultCase(theEObject); } return result; @@ -286,6 +352,9 @@ public class PropertiesSwitch<T> { result = caseWidgetDescription(textAreaDescription); } if (result == null) { + result = caseControlDescription(textAreaDescription); + } + if (result == null) { result = defaultCase(theEObject); } return result; @@ -297,6 +366,9 @@ public class PropertiesSwitch<T> { result = caseWidgetDescription(radioDescription); } if (result == null) { + result = caseControlDescription(radioDescription); + } + if (result == null) { result = defaultCase(theEObject); } return result; @@ -308,6 +380,9 @@ public class PropertiesSwitch<T> { result = caseWidgetDescription(singleReferenceDescription); } if (result == null) { + result = caseControlDescription(singleReferenceDescription); + } + if (result == null) { result = defaultCase(theEObject); } return result; @@ -327,6 +402,9 @@ public class PropertiesSwitch<T> { result = caseWidgetDescription(multipleReferencesDescription); } if (result == null) { + result = caseControlDescription(multipleReferencesDescription); + } + if (result == null) { result = defaultCase(theEObject); } return result; @@ -338,6 +416,9 @@ public class PropertiesSwitch<T> { result = caseWidgetDescription(customDescription); } if (result == null) { + result = caseControlDescription(customDescription); + } + if (result == null) { result = defaultCase(theEObject); } return result; @@ -637,6 +718,23 @@ public class PropertiesSwitch<T> { /** * Returns the result of interpreting the object as an instance of ' + * <em>Control Description</em>'. <!-- begin-user-doc --> This + * implementation returns null; returning a non-null result will terminate + * the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' + * <em>Control Description</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseControlDescription(ControlDescription object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' * <em>Container Description</em>'. <!-- begin-user-doc --> This * implementation returns null; returning a non-null result will terminate * the switch. <!-- end-user-doc --> @@ -654,6 +752,57 @@ public class PropertiesSwitch<T> { /** * Returns the result of interpreting the object as an instance of ' + * <em>Layout Description</em>'. <!-- begin-user-doc --> This implementation + * returns null; returning a non-null result will terminate the switch. <!-- + * end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' + * <em>Layout Description</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLayoutDescription(LayoutDescription object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' + * <em>Fill Layout Description</em>'. <!-- begin-user-doc --> This + * implementation returns null; returning a non-null result will terminate + * the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' + * <em>Fill Layout Description</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFillLayoutDescription(FillLayoutDescription object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' + * <em>Grid Layout Description</em>'. <!-- begin-user-doc --> This + * implementation returns null; returning a non-null result will terminate + * the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' + * <em>Grid Layout Description</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGridLayoutDescription(GridLayoutDescription object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' * <em>Widget Description</em>'. <!-- begin-user-doc --> This implementation * returns null; returning a non-null result will terminate the switch. <!-- * end-user-doc --> @@ -790,6 +939,23 @@ public class PropertiesSwitch<T> { /** * Returns the result of interpreting the object as an instance of ' + * <em>Text Area Description</em>'. <!-- begin-user-doc --> This + * implementation returns null; returning a non-null result will terminate + * the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' + * <em>Text Area Description</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTextAreaDescription(TextAreaDescription object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' * <em>Radio Description</em>'. <!-- begin-user-doc --> This implementation * returns null; returning a non-null result will terminate the switch. <!-- * end-user-doc --> @@ -1181,23 +1347,6 @@ public class PropertiesSwitch<T> { /** * Returns the result of interpreting the object as an instance of ' - * <em>Text Area Description</em>'. <!-- begin-user-doc --> This - * implementation returns null; returning a non-null result will terminate - * the switch. <!-- end-user-doc --> - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of ' - * <em>Text Area Description</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseTextAreaDescription(TextAreaDescription object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of ' * <em>Extension</em>'. <!-- begin-user-doc --> This implementation returns * null; returning a non-null result will terminate the switch. <!-- * end-user-doc --> diff --git a/incubation/org.eclipse.sirius.ui.properties/model/properties.xmi b/incubation/org.eclipse.sirius.ui.properties/model/properties.xmi index 056521b4c8..15b138bebf 100644 --- a/incubation/org.eclipse.sirius.ui.properties/model/properties.xmi +++ b/incubation/org.eclipse.sirius.ui.properties/model/properties.xmi @@ -6,54 +6,40 @@ xmlns:properties="http://www.eclipse.org/sirius/properties/1.0.0" xmlns:tool="http://www.eclipse.org/sirius/description/tool/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/properties/1.0.0 ../../org.eclipse.sirius.properties/model/properties.ecore http://www.eclipse.org/sirius/description/tool/1.1.0 ../../org.eclipse.sirius/model/viewpoint.ecore#//description/tool" - identifier="org.eclipse.sirius.ui.properties" - defaultPage="//@pages.0"> + identifier="org.eclipse.sirius.ui.properties"> <pages identifier="org.eclipse.sirius.ui.properties.defaultpage" labelExpression="General" groups="//@groups.0"/> <groups identifier="org.eclipse.sirius.ui.properties.defaultgroup" - labelExpression="Properties" - semanticCandidateExpression=""> - <container> - <dynamicMappings - iterator="eStructuralFeature" - domainClassExpression="aql:self.eClass().eAllStructuralFeatures"> - <ifs - predicateExpression="aql:eStructuralFeature.eType = ecore::EString and not(eStructuralFeature.many)"> - <widget - xsi:type="properties:TextDescription" - labelExpression="aql:eStructuralFeature.name" - valueExpression="aql:self.eGet(eStructuralFeature)"> - <initialOperation> - <firstModelOperations - xsi:type="tool:ChangeContext" - browseExpression="aql:self.eSet(eStructuralFeature, newValue)"/> - </initialOperation> - </widget> - </ifs> - <ifs - predicateExpression="aql:eStructuralFeature.eType = ecore::EBoolean and not(eStructuralFeature.many)"> - <widget - xsi:type="properties:CheckboxDescription" - labelExpression="aql:eStructuralFeature.name" - valueExpression="aql:self.eGet(eStructuralFeature)"> - <initialOperation> - <firstModelOperations - xsi:type="tool:ChangeContext" - browseExpression="aql:self.eSet(eStructuralFeature, newValue)"/> - </initialOperation> - </widget> - </ifs> - <ifs - predicateExpression="aql:eStructuralFeature.oclIsKindOf(ecore::EReference) and not(eStructuralFeature.many) and not(eStructuralFeature.containment) and not(eStructuralFeature.container) and not(eStructuralFeature.derived)"> - <widget - xsi:type="properties:SelectDescription" - labelExpression="aql:eStructuralFeature.name" - valueExpression="aql:self.eGet(eStructuralFeature)" - candidatesExpression="aql:self.eResource().getContents().eAllContents()->filter(eStructuralFeature.eType)" - candidateDisplayExpression="aql:candidate.name"/> - </ifs> - </dynamicMappings> - </container> + labelExpression="Properties"> + <controls + xsi:type="properties:DynamicMappingFor" + iterator="eStructuralFeature" + domainClassExpression="aql:self.eClass().eAllStructuralFeatures"> + <ifs predicateExpression="aql:eStructuralFeature.eType = ecore::EString and not(eStructuralFeature.many)"> + <widget + xsi:type="properties:TextDescription" + labelExpression="aql:eStructuralFeature.name.toUpperFirst() + ':'" + valueExpression="aql:self.eGet(eStructuralFeature)"> + <initialOperation> + <firstModelOperations + xsi:type="tool:ChangeContext" + browseExpression="aql:self.eSet(eStructuralFeature, newValue)"/> + </initialOperation> + </widget> + </ifs> + <ifs predicateExpression="aql:eStructuralFeature.eType = ecore::EBoolean and not(eStructuralFeature.many)"> + <widget + xsi:type="properties:CheckboxDescription" + labelExpression="aql:eStructuralFeature.name.toUpperFirst() + ':'" + valueExpression="aql:self.eGet(eStructuralFeature)"> + <initialOperation> + <firstModelOperations + xsi:type="tool:ChangeContext" + browseExpression="aql:self.eSet(eStructuralFeature, newValue)"/> + </initialOperation> + </widget> + </ifs> + </controls> </groups> </properties:ViewExtensionDescription> diff --git a/incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/tabprovider/ViewDescriptionConverter.java b/incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/tabprovider/ViewDescriptionConverter.java index 95e71daab3..dffe3b1719 100644 --- a/incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/tabprovider/ViewDescriptionConverter.java +++ b/incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/tabprovider/ViewDescriptionConverter.java @@ -25,12 +25,15 @@ import org.eclipse.eef.EEFCheckboxConditionalStyle; import org.eclipse.eef.EEFCheckboxDescription; import org.eclipse.eef.EEFCheckboxStyle; import org.eclipse.eef.EEFContainerDescription; +import org.eclipse.eef.EEFControlDescription; import org.eclipse.eef.EEFCustomExpression; import org.eclipse.eef.EEFCustomWidgetConditionalStyle; import org.eclipse.eef.EEFCustomWidgetDescription; import org.eclipse.eef.EEFCustomWidgetStyle; import org.eclipse.eef.EEFDynamicMappingFor; import org.eclipse.eef.EEFDynamicMappingIf; +import org.eclipse.eef.EEFFillLayoutDescription; +import org.eclipse.eef.EEFGridLayoutDescription; import org.eclipse.eef.EEFGroupDescription; import org.eclipse.eef.EEFLabelConditionalStyle; import org.eclipse.eef.EEFLabelDescription; @@ -53,6 +56,7 @@ import org.eclipse.eef.EEFValidationRuleDescription; import org.eclipse.eef.EEFViewDescription; import org.eclipse.eef.EEFWidgetDescription; import org.eclipse.eef.EEFWidgetStyle; +import org.eclipse.eef.EEF_FILL_LAYOUT_ORIENTATION; import org.eclipse.eef.EEF_VALIDATION_SEVERITY_DESCRIPTION; import org.eclipse.eef.EefFactory; import org.eclipse.emf.ecore.EObject; @@ -65,6 +69,8 @@ import org.eclipse.sirius.properties.ButtonWidgetStyle; import org.eclipse.sirius.properties.CheckboxDescription; import org.eclipse.sirius.properties.CheckboxWidgetConditionalStyle; import org.eclipse.sirius.properties.CheckboxWidgetStyle; +import org.eclipse.sirius.properties.ContainerDescription; +import org.eclipse.sirius.properties.ControlDescription; import org.eclipse.sirius.properties.CustomDescription; import org.eclipse.sirius.properties.CustomExpression; import org.eclipse.sirius.properties.CustomOperation; @@ -72,10 +78,14 @@ import org.eclipse.sirius.properties.CustomWidgetConditionalStyle; import org.eclipse.sirius.properties.CustomWidgetStyle; import org.eclipse.sirius.properties.DynamicMappingFor; import org.eclipse.sirius.properties.DynamicMappingIf; +import org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION; +import org.eclipse.sirius.properties.FillLayoutDescription; +import org.eclipse.sirius.properties.GridLayoutDescription; import org.eclipse.sirius.properties.GroupDescription; import org.eclipse.sirius.properties.LabelDescription; import org.eclipse.sirius.properties.LabelWidgetConditionalStyle; import org.eclipse.sirius.properties.LabelWidgetStyle; +import org.eclipse.sirius.properties.LayoutDescription; import org.eclipse.sirius.properties.PageDescription; import org.eclipse.sirius.properties.PropertyValidationRule; import org.eclipse.sirius.properties.RadioDescription; @@ -300,35 +310,75 @@ public class ViewDescriptionConverter { } private void convertGroupContents(GroupDescription groupDescription, EEFGroupDescription group) { - EEFContainerDescription containerDesc = EefFactory.eINSTANCE.createEEFContainerDescription(); + List<ControlDescription> controls = groupDescription.getControls(); + for (ControlDescription controlDescription : controls) { + EEFControlDescription eefControlDescription = this.createEEFControlDescription(controlDescription); + if (eefControlDescription != null) { + group.getControls().add(eefControlDescription); + } + } + } - if (groupDescription.getContainer() != null) { - for (WidgetDescription widgetDescription : groupDescription.getContainer().getWidgets()) { - EEFWidgetDescription description = this.createEEFWidgetDescription(widgetDescription); - if (description != null) { - containerDesc.getWidgets().add(description); - } + private EEFControlDescription createEEFControlDescription(ControlDescription controlDescription) { + EEFControlDescription eefControlDescription = null; + if (controlDescription instanceof WidgetDescription) { + WidgetDescription widgetDescription = (WidgetDescription) controlDescription; + eefControlDescription = this.createEEFWidgetDescription(widgetDescription); + } else if (controlDescription instanceof ContainerDescription) { + ContainerDescription containerDescription = (ContainerDescription) controlDescription; + eefControlDescription = this.createEEFContainerDescription(containerDescription); + } else if (controlDescription instanceof DynamicMappingFor) { + DynamicMappingFor dynamicMappingFor = (DynamicMappingFor) controlDescription; + eefControlDescription = this.createEEFDynamicMappingFor(dynamicMappingFor); + } + return eefControlDescription; + } + + private EEFContainerDescription createEEFContainerDescription(ContainerDescription containerDescription) { + EEFContainerDescription eefContainerDescription = EefFactory.eINSTANCE.createEEFContainerDescription(); + + LayoutDescription layout = containerDescription.getLayout(); + if (layout instanceof FillLayoutDescription) { + EEFFillLayoutDescription eefFillLayoutDescription = EefFactory.eINSTANCE.createEEFFillLayoutDescription(); + if (((FillLayoutDescription) layout).getOrientation() == FILL_LAYOUT_ORIENTATION.HORIZONTAL) { + eefFillLayoutDescription.setOrientation(EEF_FILL_LAYOUT_ORIENTATION.HORIZONTAL); + } else if (((FillLayoutDescription) layout).getOrientation() == FILL_LAYOUT_ORIENTATION.VERTICAL) { + eefFillLayoutDescription.setOrientation(EEF_FILL_LAYOUT_ORIENTATION.VERTICAL); + } + eefContainerDescription.setLayout(eefFillLayoutDescription); + } else if (layout instanceof GridLayoutDescription) { + EEFGridLayoutDescription eefGridLayoutDescription = EefFactory.eINSTANCE.createEEFGridLayoutDescription(); + eefGridLayoutDescription.setNumberOfColumns(((GridLayoutDescription) layout).getNumberOfColumns()); + eefGridLayoutDescription.setMakeColumnsWithEqualWidth(((GridLayoutDescription) layout).isMakeColumnsWithEqualWidth()); + eefContainerDescription.setLayout(eefGridLayoutDescription); + } + + List<ControlDescription> controls = containerDescription.getControls(); + for (ControlDescription controlDescription : controls) { + EEFControlDescription eefControlDescription = this.createEEFControlDescription(controlDescription); + if (eefControlDescription != null) { + eefContainerDescription.getControls().add(eefControlDescription); } - for (DynamicMappingFor dynamicMappingFor : groupDescription.getContainer().getDynamicMappings()) { - EEFDynamicMappingFor eefDynamicMappingFor = EefFactory.eINSTANCE.createEEFDynamicMappingFor(); - eefDynamicMappingFor.setDomainClassExpression(dynamicMappingFor.getDomainClassExpression()); - eefDynamicMappingFor.setIterator(dynamicMappingFor.getIterator()); + } + return eefContainerDescription; + } - List<DynamicMappingIf> dynamicMappingIfs = dynamicMappingFor.getIfs(); - for (DynamicMappingIf dynamicMappingIf : dynamicMappingIfs) { - EEFDynamicMappingIf eefDynamicMappingIf = EefFactory.eINSTANCE.createEEFDynamicMappingIf(); - eefDynamicMappingIf.setPredicateExpression(dynamicMappingIf.getPredicateExpression()); + private EEFDynamicMappingFor createEEFDynamicMappingFor(DynamicMappingFor dynamicMappingFor) { + EEFDynamicMappingFor eefDynamicMappingFor = EefFactory.eINSTANCE.createEEFDynamicMappingFor(); + eefDynamicMappingFor.setDomainClassExpression(dynamicMappingFor.getDomainClassExpression()); + eefDynamicMappingFor.setIterator(dynamicMappingFor.getIterator()); - EEFWidgetDescription eefWidgetDescription = this.createEEFWidgetDescription(dynamicMappingIf.getWidget()); - eefDynamicMappingIf.setWidget(eefWidgetDescription); + List<DynamicMappingIf> dynamicMappingIfs = dynamicMappingFor.getIfs(); + for (DynamicMappingIf dynamicMappingIf : dynamicMappingIfs) { + EEFDynamicMappingIf eefDynamicMappingIf = EefFactory.eINSTANCE.createEEFDynamicMappingIf(); + eefDynamicMappingIf.setPredicateExpression(dynamicMappingIf.getPredicateExpression()); - eefDynamicMappingFor.getIfs().add(eefDynamicMappingIf); - } + EEFWidgetDescription eefWidgetDescription = this.createEEFWidgetDescription(dynamicMappingIf.getWidget()); + eefDynamicMappingIf.setWidget(eefWidgetDescription); - containerDesc.getDynamicMappings().add(eefDynamicMappingFor); - } - group.setContainer(containerDesc); + eefDynamicMappingFor.getIfs().add(eefDynamicMappingIf); } + return eefDynamicMappingFor; } private EEFWidgetDescription createEEFWidgetDescription(WidgetDescription widgetDescription) { |
