diff options
| author | Mélanie Bats | 2016-04-08 11:58:50 +0000 |
|---|---|---|
| committer | Pierre-Charles David | 2016-04-27 08:57:44 +0000 |
| commit | 8210d763b5bdb6c96e294ff641162d3c491ddc56 (patch) | |
| tree | b70d0967da523cc41ada485da29113335579fead | |
| parent | 6f2b3ab12c80043439c5b36869cb18072cd67969 (diff) | |
| download | org.eclipse.sirius-8210d763b5bdb6c96e294ff641162d3c491ddc56.tar.gz org.eclipse.sirius-8210d763b5bdb6c96e294ff641162d3c491ddc56.tar.xz org.eclipse.sirius-8210d763b5bdb6c96e294ff641162d3c491ddc56.zip | |
[482528] Re-implement the support of reference widgets
One widget implements containment or not, single/multiple valued
references.
Bug: 482528
Change-Id: I4ee6f1549cfada8a73d0721e8b8baf6d5fbf6631
Signed-off-by: Mélanie Bats <melanie.bats@obeo.fr>
46 files changed, 3255 insertions, 3210 deletions
diff --git a/incubation/org.eclipse.sirius.editor.properties/help/contexts.xml b/incubation/org.eclipse.sirius.editor.properties/help/contexts.xml index 034cc060cf..5dc605eef4 100644 --- a/incubation/org.eclipse.sirius.editor.properties/help/contexts.xml +++ b/incubation/org.eclipse.sirius.editor.properties/help/contexts.xml @@ -237,15 +237,15 @@ </description> </context> - <context id="SingleReferenceDescription"> + <context id="ReferenceDescription"> <description> - Represents a single reference in the user interface. + Represents a reference in the user interface. - <!-- Start of user code SingleReferenceDescription description --> + <!-- Start of user code ReferenceDescription description --> - <!-- End of user code SingleReferenceDescription description --> + <!-- End of user code ReferenceDescription description --> </description> </context> @@ -260,18 +260,6 @@ </description> </context> - <context id="MultipleReferencesDescription"> - <description> - Represents a radio button in the user interface. - - - - <!-- Start of user code MultipleReferencesDescription description --> - - <!-- End of user code MultipleReferencesDescription description --> - - </description> - </context> <context id="CustomDescription"> <description> @@ -393,6 +381,17 @@ </description> </context> + <context id="ReferenceWidgetStyle"> + <description> + + + + <!-- Start of user code ReferenceWidgetStyle description --> + + <!-- End of user code ReferenceWidgetStyle description --> + + </description> + </context> <context id="WidgetConditionalStyle"> <description> @@ -481,4 +480,26 @@ </description> </context> + <context id="ReferenceWidgetConditionalStyle"> + <description> + + + + <!-- Start of user code ReferenceWidgetConditionalStyle description --> + + <!-- End of user code ReferenceWidgetConditionalStyle description --> + + </description> + </context> + <context id="WidgetAction"> + <description> + + + + <!-- Start of user code WidgetAction description --> + + <!-- End of user code WidgetAction description --> + + </description> + </context> </contexts>
\ No newline at end of file diff --git a/incubation/org.eclipse.sirius.editor.properties/plugin.xml b/incubation/org.eclipse.sirius.editor.properties/plugin.xml index e6650eb7ad..fb60eaa046 100644 --- a/incubation/org.eclipse.sirius.editor.properties/plugin.xml +++ b/incubation/org.eclipse.sirius.editor.properties/plugin.xml @@ -17,6 +17,13 @@ <extension point="org.eclipse.ui.views.properties.tabbed.propertySections"> <propertySections contributorId="org.eclipse.sirius.editor.editorPlugin.SiriusEditorContributor"> <propertySection + class="org.eclipse.sirius.properties.editor.properties.sections.properties.widgetaction.WidgetActionLabelExpressionPropertySection" + id="properties.section.widgetAction.LabelExpression" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.widgetaction.WidgetActionLabelExpressionFilter" + tab="viewpoint.tab.general"> + <input type="org.eclipse.sirius.properties.WidgetAction"/> + </propertySection> + <propertySection class="org.eclipse.sirius.properties.editor.properties.sections.properties.widgetconditionalstyle.WidgetConditionalStylePreconditionExpressionPropertySection" id="properties.section.widgetConditionalStyle.PreconditionExpression" filter="org.eclipse.sirius.properties.editor.properties.filters.properties.widgetconditionalstyle.WidgetConditionalStylePreconditionExpressionFilter" @@ -163,34 +170,27 @@ <input type="org.eclipse.sirius.properties.CustomExpression"/> </propertySection> <propertySection - class="org.eclipse.sirius.properties.editor.properties.sections.properties.multiplereferencesdescription.MultipleReferencesDescriptionDisplayExpressionPropertySection" - id="properties.section.multipleReferencesDescription.DisplayExpression" - filter="org.eclipse.sirius.properties.editor.properties.filters.properties.multiplereferencesdescription.MultipleReferencesDescriptionDisplayExpressionFilter" - afterSection="properties.section.multipleReferencesDescription.ValueExpression" - tab="viewpoint.tab.general"> - <input type="org.eclipse.sirius.properties.MultipleReferencesDescription"/> - </propertySection> - <propertySection - class="org.eclipse.sirius.properties.editor.properties.sections.properties.multiplereferencesdescription.MultipleReferencesDescriptionValueExpressionPropertySection" - id="properties.section.multipleReferencesDescription.ValueExpression" - filter="org.eclipse.sirius.properties.editor.properties.filters.properties.multiplereferencesdescription.MultipleReferencesDescriptionValueExpressionFilter" + class="org.eclipse.sirius.properties.editor.properties.sections.properties.referencedescription.ReferenceDescriptionDisplayExpressionPropertySection" + id="properties.section.referenceDescription.DisplayExpression" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.referencedescription.ReferenceDescriptionDisplayExpressionFilter" + afterSection="properties.section.referenceDescription.ValueExpression" tab="viewpoint.tab.general"> - <input type="org.eclipse.sirius.properties.MultipleReferencesDescription"/> + <input type="org.eclipse.sirius.properties.ReferenceDescription"/> </propertySection> <propertySection - class="org.eclipse.sirius.properties.editor.properties.sections.properties.singlereferencedescription.SingleReferenceDescriptionDisplayExpressionPropertySection" - id="properties.section.singleReferenceDescription.DisplayExpression" - filter="org.eclipse.sirius.properties.editor.properties.filters.properties.singlereferencedescription.SingleReferenceDescriptionDisplayExpressionFilter" - afterSection="properties.section.singleReferenceDescription.ValueExpression" + class="org.eclipse.sirius.properties.editor.properties.sections.properties.referencedescription.ReferenceDescriptionValueExpressionPropertySection" + id="properties.section.referenceDescription.ValueExpression" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.referencedescription.ReferenceDescriptionValueExpressionFilter" + afterSection="properties.section.referenceDescription.Multiple" tab="viewpoint.tab.general"> - <input type="org.eclipse.sirius.properties.SingleReferenceDescription"/> + <input type="org.eclipse.sirius.properties.ReferenceDescription"/> </propertySection> <propertySection - class="org.eclipse.sirius.properties.editor.properties.sections.properties.singlereferencedescription.SingleReferenceDescriptionValueExpressionPropertySection" - id="properties.section.singleReferenceDescription.ValueExpression" - filter="org.eclipse.sirius.properties.editor.properties.filters.properties.singlereferencedescription.SingleReferenceDescriptionValueExpressionFilter" + class="org.eclipse.sirius.properties.editor.properties.sections.properties.referencedescription.ReferenceDescriptionMultiplePropertySection" + id="properties.section.referenceDescription.Multiple" + filter="org.eclipse.sirius.properties.editor.properties.filters.properties.referencedescription.ReferenceDescriptionMultipleFilter" tab="viewpoint.tab.general"> - <input type="org.eclipse.sirius.properties.SingleReferenceDescription"/> + <input type="org.eclipse.sirius.properties.ReferenceDescription"/> </propertySection> <propertySection class="org.eclipse.sirius.properties.editor.properties.sections.properties.radiodescription.RadioDescriptionNumberOfColumnsPropertySection" diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/singlereferencedescription/SingleReferenceDescriptionDisplayExpressionFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/referencedescription/ReferenceDescriptionDisplayExpressionFilter.java index 3a67687bdb..9fccc8443f 100644 --- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/singlereferencedescription/SingleReferenceDescriptionDisplayExpressionFilter.java +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/referencedescription/ReferenceDescriptionDisplayExpressionFilter.java @@ -7,7 +7,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.eclipse.sirius.properties.editor.properties.filters.properties.singlereferencedescription; +package org.eclipse.sirius.properties.editor.properties.filters.properties.referencedescription; // Start of user code specific imports @@ -20,14 +20,14 @@ import org.eclipse.sirius.properties.PropertiesPackage; /** * A filter for the displayExpression property section. */ -public class SingleReferenceDescriptionDisplayExpressionFilter extends ViewpointPropertyFilter { +public class ReferenceDescriptionDisplayExpressionFilter extends ViewpointPropertyFilter { /** * {@inheritDoc} */ @Override protected EStructuralFeature getFeature() { - return PropertiesPackage.eINSTANCE.getSingleReferenceDescription_DisplayExpression(); + return PropertiesPackage.eINSTANCE.getReferenceDescription_DisplayExpression(); } /** @@ -35,7 +35,7 @@ public class SingleReferenceDescriptionDisplayExpressionFilter extends Viewpoint */ @Override protected boolean isRightInputType(Object arg0) { - return arg0 instanceof org.eclipse.sirius.properties.SingleReferenceDescription; + return arg0 instanceof org.eclipse.sirius.properties.ReferenceDescription; } // 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/multiplereferencesdescription/MultipleReferencesDescriptionValueExpressionFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/referencedescription/ReferenceDescriptionMultipleFilter.java index 3b323c1471..457dc0f7f1 100644 --- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/multiplereferencesdescription/MultipleReferencesDescriptionValueExpressionFilter.java +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/referencedescription/ReferenceDescriptionMultipleFilter.java @@ -7,7 +7,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.eclipse.sirius.properties.editor.properties.filters.properties.multiplereferencesdescription; +package org.eclipse.sirius.properties.editor.properties.filters.properties.referencedescription; // 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 valueExpression property section. + * A filter for the multiple property section. */ -public class MultipleReferencesDescriptionValueExpressionFilter extends ViewpointPropertyFilter { +public class ReferenceDescriptionMultipleFilter extends ViewpointPropertyFilter { /** * {@inheritDoc} */ @Override protected EStructuralFeature getFeature() { - return PropertiesPackage.eINSTANCE.getMultipleReferencesDescription_ValueExpression(); + return PropertiesPackage.eINSTANCE.getReferenceDescription_Multiple(); } /** @@ -35,7 +35,7 @@ public class MultipleReferencesDescriptionValueExpressionFilter extends Viewpoin */ @Override protected boolean isRightInputType(Object arg0) { - return arg0 instanceof org.eclipse.sirius.properties.MultipleReferencesDescription; + return arg0 instanceof org.eclipse.sirius.properties.ReferenceDescription; } // 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/singlereferencedescription/SingleReferenceDescriptionValueExpressionFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/referencedescription/ReferenceDescriptionValueExpressionFilter.java index c37a8c9264..c8523cbaeb 100644 --- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/singlereferencedescription/SingleReferenceDescriptionValueExpressionFilter.java +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/referencedescription/ReferenceDescriptionValueExpressionFilter.java @@ -7,7 +7,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.eclipse.sirius.properties.editor.properties.filters.properties.singlereferencedescription; +package org.eclipse.sirius.properties.editor.properties.filters.properties.referencedescription; // Start of user code specific imports @@ -20,14 +20,14 @@ import org.eclipse.sirius.properties.PropertiesPackage; /** * A filter for the valueExpression property section. */ -public class SingleReferenceDescriptionValueExpressionFilter extends ViewpointPropertyFilter { +public class ReferenceDescriptionValueExpressionFilter extends ViewpointPropertyFilter { /** * {@inheritDoc} */ @Override protected EStructuralFeature getFeature() { - return PropertiesPackage.eINSTANCE.getSingleReferenceDescription_ValueExpression(); + return PropertiesPackage.eINSTANCE.getReferenceDescription_ValueExpression(); } /** @@ -35,7 +35,7 @@ public class SingleReferenceDescriptionValueExpressionFilter extends ViewpointPr */ @Override protected boolean isRightInputType(Object arg0) { - return arg0 instanceof org.eclipse.sirius.properties.SingleReferenceDescription; + return arg0 instanceof org.eclipse.sirius.properties.ReferenceDescription; } // 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/multiplereferencesdescription/MultipleReferencesDescriptionDisplayExpressionFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/widgetaction/WidgetActionLabelExpressionFilter.java index d2a4b22be8..7db50d98b6 100644 --- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/multiplereferencesdescription/MultipleReferencesDescriptionDisplayExpressionFilter.java +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/widgetaction/WidgetActionLabelExpressionFilter.java @@ -7,7 +7,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.eclipse.sirius.properties.editor.properties.filters.properties.multiplereferencesdescription; +package org.eclipse.sirius.properties.editor.properties.filters.properties.widgetaction; // 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 displayExpression property section. + * A filter for the labelExpression property section. */ -public class MultipleReferencesDescriptionDisplayExpressionFilter extends ViewpointPropertyFilter { +public class WidgetActionLabelExpressionFilter extends ViewpointPropertyFilter { /** * {@inheritDoc} */ @Override protected EStructuralFeature getFeature() { - return PropertiesPackage.eINSTANCE.getMultipleReferencesDescription_DisplayExpression(); + return PropertiesPackage.eINSTANCE.getWidgetAction_LabelExpression(); } /** @@ -35,7 +35,7 @@ public class MultipleReferencesDescriptionDisplayExpressionFilter extends Viewpo */ @Override protected boolean isRightInputType(Object arg0) { - return arg0 instanceof org.eclipse.sirius.properties.MultipleReferencesDescription; + return arg0 instanceof org.eclipse.sirius.properties.WidgetAction; } // Start of user code user methods diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/multiplereferencesdescription/MultipleReferencesDescriptionDisplayExpressionPropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/multiplereferencesdescription/MultipleReferencesDescriptionDisplayExpressionPropertySection.java deleted file mode 100644 index fe87b558de..0000000000 --- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/multiplereferencesdescription/MultipleReferencesDescriptionDisplayExpressionPropertySection.java +++ /dev/null @@ -1,121 +0,0 @@ -/******************************************************************************* - * 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.multiplereferencesdescription; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.sirius.editor.editorPlugin.SiriusEditor; -import org.eclipse.sirius.editor.properties.sections.common.AbstractTextWithButtonPropertySection; -import org.eclipse.sirius.editor.tools.api.assist.TypeContentProposalProvider; -import org.eclipse.sirius.editor.tools.internal.presentation.TextWithContentProposalDialog; -import org.eclipse.sirius.properties.PropertiesPackage; -import org.eclipse.sirius.ui.tools.api.assist.ContentProposalClient; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; - -// End of user code imports - -/** - * A section for the displayExpression property of a - * MultipleReferencesDescription object. - */ -public class MultipleReferencesDescriptionDisplayExpressionPropertySection extends AbstractTextWithButtonPropertySection implements ContentProposalClient { - - /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getDefaultLabelText() - */ - @Override - protected String getDefaultLabelText() { - return "DisplayExpression"; //$NON-NLS-1$ - } - - /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#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.AbstractTextWithButtonPropertySection#getFeature() - */ - @Override - public EAttribute getFeature() { - return PropertiesPackage.eINSTANCE.getMultipleReferencesDescription_DisplayExpression(); - } - - /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getFeatureValue(String) - */ - @Override - protected Object getFeatureValue(String newText) { - return newText; - } - - /** - * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#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); - /* - * We set the color as it's a InterpretedExpression - */ - text.setBackground(SiriusEditor.getColorRegistry().get("yellow")); - - TypeContentProposalProvider.bindPluginsCompletionProcessors(this, text); - - // Start of user code create controls - - // End of user code create controls - - } - - @Override - protected SelectionListener createButtonListener() { - return new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - TextWithContentProposalDialog dialog = new TextWithContentProposalDialog(composite.getShell(), MultipleReferencesDescriptionDisplayExpressionPropertySection.this, text.getText()); - dialog.open(); - text.setText(dialog.getResult()); - handleTextModified(); - } - }; - } - - /** - * {@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.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/singlereferencedescription/SingleReferenceDescriptionDisplayExpressionPropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/referencedescription/ReferenceDescriptionDisplayExpressionPropertySection.java index 40a899de13..e50d1febff 100644 --- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/singlereferencedescription/SingleReferenceDescriptionDisplayExpressionPropertySection.java +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/referencedescription/ReferenceDescriptionDisplayExpressionPropertySection.java @@ -7,7 +7,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.eclipse.sirius.properties.editor.properties.sections.properties.singlereferencedescription; +package org.eclipse.sirius.properties.editor.properties.sections.properties.referencedescription; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.sirius.editor.editorPlugin.SiriusEditor; @@ -25,10 +25,10 @@ import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; // End of user code imports /** - * A section for the displayExpression property of a SingleReferenceDescription + * A section for the displayExpression property of a ReferenceDescription * object. */ -public class SingleReferenceDescriptionDisplayExpressionPropertySection extends AbstractTextWithButtonPropertySection implements ContentProposalClient { +public class ReferenceDescriptionDisplayExpressionPropertySection extends AbstractTextWithButtonPropertySection implements ContentProposalClient { /** * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getDefaultLabelText() @@ -56,7 +56,7 @@ public class SingleReferenceDescriptionDisplayExpressionPropertySection extends */ @Override public EAttribute getFeature() { - return PropertiesPackage.eINSTANCE.getSingleReferenceDescription_DisplayExpression(); + return PropertiesPackage.eINSTANCE.getReferenceDescription_DisplayExpression(); } /** @@ -99,7 +99,7 @@ public class SingleReferenceDescriptionDisplayExpressionPropertySection extends return new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - TextWithContentProposalDialog dialog = new TextWithContentProposalDialog(composite.getShell(), SingleReferenceDescriptionDisplayExpressionPropertySection.this, text.getText()); + TextWithContentProposalDialog dialog = new TextWithContentProposalDialog(composite.getShell(), ReferenceDescriptionDisplayExpressionPropertySection.this, text.getText()); dialog.open(); text.setText(dialog.getResult()); handleTextModified(); diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/referencedescription/ReferenceDescriptionMultiplePropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/referencedescription/ReferenceDescriptionMultiplePropertySection.java new file mode 100644 index 0000000000..e09e135dd0 --- /dev/null +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/referencedescription/ReferenceDescriptionMultiplePropertySection.java @@ -0,0 +1,109 @@ +/******************************************************************************* + * 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.referencedescription; + +// Start of user code imports + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.sirius.editor.properties.sections.common.AbstractCheckBoxPropertySection; +// End of user code imports +import org.eclipse.sirius.properties.PropertiesPackage; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; + +/** + * A section for the multiple property of a ReferenceDescription object. + */ +public class ReferenceDescriptionMultiplePropertySection extends AbstractCheckBoxPropertySection { + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractCheckBoxPropertySection#getDefaultLabelText() + */ + @Override + protected String getDefaultLabelText() { + return "Multiple"; //$NON-NLS-1$ + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractCheckBoxPropertySection#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.AbstractCheckBoxPropertySection#getFeature() + */ + @Override + protected EAttribute getFeature() { + return PropertiesPackage.eINSTANCE.getReferenceDescription_Multiple(); + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractCheckBoxPropertySection#getFeatureAsInteger() + */ + @Override + protected String getDefaultFeatureAsText() { + String value = new String(); + if (eObject.eGet(getFeature()) != null) { + value = toBoolean(eObject.eGet(getFeature()).toString()).toString(); + } + return value; + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractCheckBoxPropertySection#getFeatureValue(int) + */ + @Override + protected Object getFeatureValue(String newText) { + return toBoolean(newText); + } + + /** + * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractCheckBoxPropertySection#isEqual(int) + */ + @Override + protected boolean isEqual(String newText) { + boolean equal = true; + if (toBoolean(newText) != null) { + equal = getFeatureAsText().equals(toBoolean(newText).toString()); + } else { + refresh(); + } + return equal; + } + + /** + * Converts the given text to the boolean it represents if applicable. + * + * @return The boolean the given text represents if applicable, + * <code>null</code> otherwise. + */ + private Boolean toBoolean(String text) { + Boolean booleanValue = null; + if (text.toLowerCase().matches("true|false")) { + booleanValue = Boolean.parseBoolean(text); + } + return booleanValue; + } + + /** + * {@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/singlereferencedescription/SingleReferenceDescriptionValueExpressionPropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/referencedescription/ReferenceDescriptionValueExpressionPropertySection.java index 9772ae5d6d..0763341db2 100644 --- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/singlereferencedescription/SingleReferenceDescriptionValueExpressionPropertySection.java +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/referencedescription/ReferenceDescriptionValueExpressionPropertySection.java @@ -7,7 +7,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.eclipse.sirius.properties.editor.properties.sections.properties.singlereferencedescription; +package org.eclipse.sirius.properties.editor.properties.sections.properties.referencedescription; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.sirius.editor.editorPlugin.SiriusEditor; @@ -25,10 +25,9 @@ import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; // End of user code imports /** - * A section for the valueExpression property of a SingleReferenceDescription - * object. + * A section for the valueExpression property of a ReferenceDescription object. */ -public class SingleReferenceDescriptionValueExpressionPropertySection extends AbstractTextWithButtonPropertySection implements ContentProposalClient { +public class ReferenceDescriptionValueExpressionPropertySection extends AbstractTextWithButtonPropertySection implements ContentProposalClient { /** * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getDefaultLabelText() @@ -56,7 +55,7 @@ public class SingleReferenceDescriptionValueExpressionPropertySection extends Ab */ @Override public EAttribute getFeature() { - return PropertiesPackage.eINSTANCE.getSingleReferenceDescription_ValueExpression(); + return PropertiesPackage.eINSTANCE.getReferenceDescription_ValueExpression(); } /** @@ -99,7 +98,7 @@ public class SingleReferenceDescriptionValueExpressionPropertySection extends Ab return new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - TextWithContentProposalDialog dialog = new TextWithContentProposalDialog(composite.getShell(), SingleReferenceDescriptionValueExpressionPropertySection.this, text.getText()); + TextWithContentProposalDialog dialog = new TextWithContentProposalDialog(composite.getShell(), ReferenceDescriptionValueExpressionPropertySection.this, text.getText()); dialog.open(); text.setText(dialog.getResult()); handleTextModified(); diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/multiplereferencesdescription/MultipleReferencesDescriptionValueExpressionPropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/widgetaction/WidgetActionLabelExpressionPropertySection.java index 6cfd232630..0ce09d8ecf 100644 --- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/multiplereferencesdescription/MultipleReferencesDescriptionValueExpressionPropertySection.java +++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/widgetaction/WidgetActionLabelExpressionPropertySection.java @@ -7,7 +7,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.eclipse.sirius.properties.editor.properties.sections.properties.multiplereferencesdescription; +package org.eclipse.sirius.properties.editor.properties.sections.properties.widgetaction; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.sirius.editor.editorPlugin.SiriusEditor; @@ -25,17 +25,16 @@ import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; // End of user code imports /** - * A section for the valueExpression property of a MultipleReferencesDescription - * object. + * A section for the labelExpression property of a WidgetAction object. */ -public class MultipleReferencesDescriptionValueExpressionPropertySection extends AbstractTextWithButtonPropertySection implements ContentProposalClient { +public class WidgetActionLabelExpressionPropertySection extends AbstractTextWithButtonPropertySection implements ContentProposalClient { /** * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextWithButtonPropertySection#getDefaultLabelText() */ @Override protected String getDefaultLabelText() { - return "ValueExpression"; //$NON-NLS-1$ + return "LabelExpression"; //$NON-NLS-1$ } /** @@ -56,7 +55,7 @@ public class MultipleReferencesDescriptionValueExpressionPropertySection extends */ @Override public EAttribute getFeature() { - return PropertiesPackage.eINSTANCE.getMultipleReferencesDescription_ValueExpression(); + return PropertiesPackage.eINSTANCE.getWidgetAction_LabelExpression(); } /** @@ -99,7 +98,7 @@ public class MultipleReferencesDescriptionValueExpressionPropertySection extends return new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - TextWithContentProposalDialog dialog = new TextWithContentProposalDialog(composite.getShell(), MultipleReferencesDescriptionValueExpressionPropertySection.this, text.getText()); + TextWithContentProposalDialog dialog = new TextWithContentProposalDialog(composite.getShell(), WidgetActionLabelExpressionPropertySection.this, text.getText()); dialog.open(); text.setText(dialog.getResult()); handleTextModified(); diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/ReferenceDescription.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/ReferenceDescription.gif Binary files differnew file mode 100644 index 0000000000..94c953e013 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/ReferenceDescription.gif diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/ReferenceWidgetConditionalStyle.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/ReferenceWidgetConditionalStyle.gif Binary files differnew file mode 100644 index 0000000000..b3643da048 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/ReferenceWidgetConditionalStyle.gif diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/ReferenceWidgetStyle.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/ReferenceWidgetStyle.gif Binary files differnew file mode 100644 index 0000000000..db7414e937 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/ReferenceWidgetStyle.gif diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/WidgetAction.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/WidgetAction.gif Binary files differnew file mode 100644 index 0000000000..ed87474740 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/WidgetAction.gif diff --git a/incubation/org.eclipse.sirius.properties.edit/plugin.properties b/incubation/org.eclipse.sirius.properties.edit/plugin.properties index 9a5781a7b7..5296033f97 100644 --- a/incubation/org.eclipse.sirius.properties.edit/plugin.properties +++ b/incubation/org.eclipse.sirius.properties.edit/plugin.properties @@ -86,10 +86,6 @@ _UI_SingleReferenceDescription_addButton_feature = Add Button _UI_AddButtonDescription_type = Add Button Description _UI_AddButtonDescription_initialOperation_feature = Initial Operation _UI_OperationDescription_type = Operation Description -_UI_SingleReferenceDescription_createOperation_feature = Create Operation -_UI_SingleReferenceDescription_searchOperation_feature = Search Operation -_UI_SingleReferenceDescription_unsetOperation_feature = Unset Operation -_UI_SingleReferenceDescription_onClickOperation_feature = On Click Operation _UI_CustomDescription_type = Custom Description _UI_CustomExpression_type = Custom Expression _UI_CustomDescription_customExpressions_feature = Custom Expressions @@ -103,18 +99,6 @@ _UI_CustomDescription_customOperations_feature = Custom Operations _UI_CustomOperation_identifier_feature = Identifier _UI_CustomOperation_initialOperation_feature = Initial Operation _UI_OperationDescription_initialOperation_feature = Initial Operation -_UI_MultipleReferencesDescription_type = Multiple References Description -_UI_MultipleReferencesDescription_valueExpression_feature = Value Expression -_UI_MultipleReferencesDescription_candidatesExpression_feature = Candidates Expression -_UI_MultipleReferencesDescription_candidateDisplayExpression_feature = Candidate Display Expression -_UI_MultipleReferencesDescription_createOperation_feature = Create Operation -_UI_MultipleReferencesDescription_searchOperation_feature = Search Operation -_UI_MultipleReferencesDescription_unsetOperation_feature = Unset Operation -_UI_MultipleReferencesDescription_onClickOperation_feature = On Click Operation -_UI_MultipleReferencesDescription_upOperation_feature = Up Operation -_UI_MultipleReferencesDescription_downOperation_feature = Down Operation -_UI_SingleReferenceDescription_displayExpression_feature = Display Expression -_UI_MultipleReferencesDescription_displayExpression_feature = Display Expression _UI_ValidationSetDescription_type = Validation _UI_PropertyValidationRule_type = Property Validation Rule _UI_PageDescription_validationSet_feature = Validation @@ -214,3 +198,17 @@ _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 +_UI_ReferenceDescription_type = Reference Description +_UI_WidgetAction_type = Widget Action +_UI_ReferenceWidgetStyle_type = Reference Widget Style +_UI_ReferenceDescription_multiple_feature = Multiple +_UI_ReferenceDescription_valueExpression_feature = Value Expression +_UI_ReferenceDescription_displayExpression_feature = Display Expression +_UI_ReferenceDescription_onClickOperation_feature = On Click Operation +_UI_ReferenceDescription_actions_feature = Actions +_UI_ReferenceDescription_style_feature = Style +_UI_WidgetAction_labelExpression_feature = Label Expression +_UI_WidgetAction_initialOperation_feature = Initial Operation +_UI_ReferenceWidgetConditionalStyle_type = Reference Widget Conditional Style +_UI_ReferenceDescription_conditionalStyles_feature = Conditional Styles +_UI_ReferenceWidgetConditionalStyle_style_feature = Style 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 e3df120420..51f010cb09 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 @@ -163,9 +163,7 @@ public class ContainerDescriptionItemProvider extends ControlDescriptionItemProv newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createRadioDescription())); - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createSingleReferenceDescription())); - - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createMultipleReferencesDescription())); + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createReferenceDescription())); newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createCustomDescription())); diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingIfItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingIfItemProvider.java index 3d1f7eb0e8..494b88586e 100644 --- a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingIfItemProvider.java +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingIfItemProvider.java @@ -184,9 +184,7 @@ public class DynamicMappingIfItemProvider extends ItemProviderAdapter newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_IF__WIDGET, PropertiesFactory.eINSTANCE.createRadioDescription())); - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_IF__WIDGET, PropertiesFactory.eINSTANCE.createSingleReferenceDescription())); - - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_IF__WIDGET, PropertiesFactory.eINSTANCE.createMultipleReferencesDescription())); + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_IF__WIDGET, PropertiesFactory.eINSTANCE.createReferenceDescription())); newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_IF__WIDGET, PropertiesFactory.eINSTANCE.createCustomDescription())); } 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 40234ff000..35453c8c9a 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 @@ -247,9 +247,7 @@ public class GroupDescriptionItemProvider extends ItemProviderAdapter 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.createReferenceDescription())); newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.GROUP_DESCRIPTION__CONTROLS, PropertiesFactory.eINSTANCE.createCustomDescription())); diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/MultipleReferencesDescriptionItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/MultipleReferencesDescriptionItemProvider.java deleted file mode 100644 index 78199cfeb1..0000000000 --- a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/MultipleReferencesDescriptionItemProvider.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * 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.ecore.EStructuralFeature; -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.MultipleReferencesDescription; -import org.eclipse.sirius.properties.PropertiesFactory; -import org.eclipse.sirius.properties.PropertiesPackage; - -/** - * This is the item provider adapter for a - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription} object. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ -public class MultipleReferencesDescriptionItemProvider extends WidgetDescriptionItemProvider { - /** - * This constructs an instance from a factory and a notifier. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public MultipleReferencesDescriptionItemProvider(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); - - addValueExpressionPropertyDescriptor(object); - addDisplayExpressionPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Value Expression feature. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected void addValueExpressionPropertyDescriptor(Object object) { - itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_MultipleReferencesDescription_valueExpression_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_MultipleReferencesDescription_valueExpression_feature", "_UI_MultipleReferencesDescription_type"), - PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__VALUE_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); - } - - /** - * This adds a property descriptor for the Display Expression feature. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected void addDisplayExpressionPropertyDescriptor(Object object) { - itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_MultipleReferencesDescription_displayExpression_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_MultipleReferencesDescription_displayExpression_feature", "_UI_MultipleReferencesDescription_type"), - PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__DISPLAY_EXPRESSION, 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}, - * {@link org.eclipse.emf.edit.command.RemoveCommand} or - * {@link org.eclipse.emf.edit.command.MoveCommand} in - * {@link #createCommand}. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { - if (childrenFeatures == null) { - super.getChildrenFeatures(object); - childrenFeatures.add(PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__CREATE_OPERATION); - childrenFeatures.add(PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__SEARCH_OPERATION); - childrenFeatures.add(PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__UNSET_OPERATION); - childrenFeatures.add(PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__ON_CLICK_OPERATION); - childrenFeatures.add(PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__UP_OPERATION); - childrenFeatures.add(PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__DOWN_OPERATION); - } - return childrenFeatures; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - protected EStructuralFeature getChildFeature(Object object, Object child) { - // Check the type of the specified child object and return the proper - // feature to use for - // adding (see {@link AddCommand}) it as a child. - - return super.getChildFeature(object, child); - } - - /** - * This returns MultipleReferencesDescription.gif. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/MultipleReferencesDescription")); - } - - /** - * This returns the label text for the adapted class. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public String getText(Object object) { - String label = ((MultipleReferencesDescription) object).getIdentifier(); - return label == null || label.length() == 0 ? getString("_UI_MultipleReferencesDescription_type") : getString("_UI_MultipleReferencesDescription_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(MultipleReferencesDescription.class)) { - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__VALUE_EXPRESSION: - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DISPLAY_EXPRESSION: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__CREATE_OPERATION: - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__SEARCH_OPERATION: - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UNSET_OPERATION: - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__ON_CLICK_OPERATION: - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UP_OPERATION: - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DOWN_OPERATION: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s - * describing the children that can be created under this object. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__CREATE_OPERATION, PropertiesFactory.eINSTANCE.createOperationDescription())); - - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__SEARCH_OPERATION, PropertiesFactory.eINSTANCE.createOperationDescription())); - - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__UNSET_OPERATION, PropertiesFactory.eINSTANCE.createOperationDescription())); - - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__ON_CLICK_OPERATION, PropertiesFactory.eINSTANCE.createOperationDescription())); - - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__UP_OPERATION, PropertiesFactory.eINSTANCE.createOperationDescription())); - - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__DOWN_OPERATION, PropertiesFactory.eINSTANCE.createOperationDescription())); - } - - /** - * This returns the label text for - * {@link org.eclipse.emf.edit.command.CreateChildCommand}. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) { - Object childFeature = feature; - Object childObject = child; - - boolean qualify = childFeature == PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__CREATE_OPERATION - || childFeature == PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__SEARCH_OPERATION - || childFeature == PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__UNSET_OPERATION - || childFeature == PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__ON_CLICK_OPERATION - || childFeature == PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__UP_OPERATION - || childFeature == PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION__DOWN_OPERATION; - - if (qualify) { - return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); - } - return super.getCreateChildText(owner, feature, child, selection); - } - -} 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 6c2c72883e..7712d972e3 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 @@ -546,27 +546,27 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto /** * This keeps track of the one adapter used for all - * {@link org.eclipse.sirius.properties.SingleReferenceDescription} - * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * {@link org.eclipse.sirius.properties.ReferenceDescription} instances. + * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - protected SingleReferenceDescriptionItemProvider singleReferenceDescriptionItemProvider; + protected ReferenceDescriptionItemProvider referenceDescriptionItemProvider; /** * This creates an adapter for a - * {@link org.eclipse.sirius.properties.SingleReferenceDescription}. <!-- + * {@link org.eclipse.sirius.properties.ReferenceDescription}. <!-- * begin-user-doc --> <!-- end-user-doc --> * * @generated */ @Override - public Adapter createSingleReferenceDescriptionAdapter() { - if (singleReferenceDescriptionItemProvider == null) { - singleReferenceDescriptionItemProvider = new SingleReferenceDescriptionItemProvider(this); + public Adapter createReferenceDescriptionAdapter() { + if (referenceDescriptionItemProvider == null) { + referenceDescriptionItemProvider = new ReferenceDescriptionItemProvider(this); } - return singleReferenceDescriptionItemProvider; + return referenceDescriptionItemProvider; } /** @@ -596,31 +596,6 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto /** * This keeps track of the one adapter used for all - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription} - * instances. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected MultipleReferencesDescriptionItemProvider multipleReferencesDescriptionItemProvider; - - /** - * This creates an adapter for a - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription}. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public Adapter createMultipleReferencesDescriptionAdapter() { - if (multipleReferencesDescriptionItemProvider == null) { - multipleReferencesDescriptionItemProvider = new MultipleReferencesDescriptionItemProvider(this); - } - - return multipleReferencesDescriptionItemProvider; - } - - /** - * This keeps track of the one adapter used for all * {@link org.eclipse.sirius.properties.CustomDescription} instances. <!-- * begin-user-doc --> <!-- end-user-doc --> * @@ -1070,6 +1045,81 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto } /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ReferenceWidgetConditionalStyleItemProvider referenceWidgetConditionalStyleItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createReferenceWidgetConditionalStyleAdapter() { + if (referenceWidgetConditionalStyleItemProvider == null) { + referenceWidgetConditionalStyleItemProvider = new ReferenceWidgetConditionalStyleItemProvider(this); + } + + return referenceWidgetConditionalStyleItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.properties.WidgetAction} instances. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected WidgetActionItemProvider widgetActionItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.properties.WidgetAction}. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createWidgetActionAdapter() { + if (widgetActionItemProvider == null) { + widgetActionItemProvider = new WidgetActionItemProvider(this); + } + + return widgetActionItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.properties.ReferenceWidgetStyle} instances. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ReferenceWidgetStyleItemProvider referenceWidgetStyleItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.properties.ReferenceWidgetStyle}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createReferenceWidgetStyleAdapter() { + if (referenceWidgetStyleItemProvider == null) { + referenceWidgetStyleItemProvider = new ReferenceWidgetStyleItemProvider(this); + } + + return referenceWidgetStyleItemProvider; + } + + /** * This returns the root adapter factory that contains this factory. <!-- * begin-user-doc --> <!-- end-user-doc --> * @@ -1227,15 +1277,12 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto if (radioDescriptionItemProvider != null) { radioDescriptionItemProvider.dispose(); } - if (singleReferenceDescriptionItemProvider != null) { - singleReferenceDescriptionItemProvider.dispose(); + if (referenceDescriptionItemProvider != null) { + referenceDescriptionItemProvider.dispose(); } if (operationDescriptionItemProvider != null) { operationDescriptionItemProvider.dispose(); } - if (multipleReferencesDescriptionItemProvider != null) { - multipleReferencesDescriptionItemProvider.dispose(); - } if (customDescriptionItemProvider != null) { customDescriptionItemProvider.dispose(); } @@ -1269,6 +1316,9 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto if (customWidgetStyleItemProvider != null) { customWidgetStyleItemProvider.dispose(); } + if (referenceWidgetStyleItemProvider != null) { + referenceWidgetStyleItemProvider.dispose(); + } if (textWidgetConditionalStyleItemProvider != null) { textWidgetConditionalStyleItemProvider.dispose(); } @@ -1290,6 +1340,12 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto if (customWidgetConditionalStyleItemProvider != null) { customWidgetConditionalStyleItemProvider.dispose(); } + if (referenceWidgetConditionalStyleItemProvider != null) { + referenceWidgetConditionalStyleItemProvider.dispose(); + } + if (widgetActionItemProvider != null) { + widgetActionItemProvider.dispose(); + } } /** diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/SingleReferenceDescriptionItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ReferenceDescriptionItemProvider.java index bfca101561..a94faffd98 100644 --- a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/SingleReferenceDescriptionItemProvider.java +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ReferenceDescriptionItemProvider.java @@ -23,23 +23,24 @@ import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ViewerNotification; import org.eclipse.sirius.properties.PropertiesFactory; import org.eclipse.sirius.properties.PropertiesPackage; -import org.eclipse.sirius.properties.SingleReferenceDescription; +import org.eclipse.sirius.properties.ReferenceDescription; +import org.eclipse.sirius.viewpoint.description.tool.ToolFactory; /** * This is the item provider adapter for a - * {@link org.eclipse.sirius.properties.SingleReferenceDescription} object. <!-- + * {@link org.eclipse.sirius.properties.ReferenceDescription} object. <!-- * begin-user-doc --> <!-- end-user-doc --> * * @generated */ -public class SingleReferenceDescriptionItemProvider extends WidgetDescriptionItemProvider { +public class ReferenceDescriptionItemProvider extends WidgetDescriptionItemProvider { /** * This constructs an instance from a factory and a notifier. <!-- * begin-user-doc --> <!-- end-user-doc --> * * @generated */ - public SingleReferenceDescriptionItemProvider(AdapterFactory adapterFactory) { + public ReferenceDescriptionItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } @@ -54,6 +55,7 @@ public class SingleReferenceDescriptionItemProvider extends WidgetDescriptionIte if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); + addMultiplePropertyDescriptor(object); addValueExpressionPropertyDescriptor(object); addDisplayExpressionPropertyDescriptor(object); } @@ -61,16 +63,28 @@ public class SingleReferenceDescriptionItemProvider extends WidgetDescriptionIte } /** + * This adds a property descriptor for the Multiple feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addMultiplePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_ReferenceDescription_multiple_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ReferenceDescription_multiple_feature", "_UI_ReferenceDescription_type"), + PropertiesPackage.Literals.REFERENCE_DESCRIPTION__MULTIPLE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + } + + /** * This adds a property descriptor for the Value Expression feature. <!-- * begin-user-doc --> <!-- end-user-doc --> * * @generated */ protected void addValueExpressionPropertyDescriptor(Object object) { - itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_SingleReferenceDescription_valueExpression_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_SingleReferenceDescription_valueExpression_feature", "_UI_SingleReferenceDescription_type"), - PropertiesPackage.Literals.SINGLE_REFERENCE_DESCRIPTION__VALUE_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + itemPropertyDescriptors.add( + createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ReferenceDescription_valueExpression_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ReferenceDescription_valueExpression_feature", "_UI_ReferenceDescription_type"), + PropertiesPackage.Literals.REFERENCE_DESCRIPTION__VALUE_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** @@ -81,9 +95,9 @@ public class SingleReferenceDescriptionItemProvider extends WidgetDescriptionIte */ protected void addDisplayExpressionPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_SingleReferenceDescription_displayExpression_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_SingleReferenceDescription_displayExpression_feature", "_UI_SingleReferenceDescription_type"), - PropertiesPackage.Literals.SINGLE_REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + getString("_UI_ReferenceDescription_displayExpression_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ReferenceDescription_displayExpression_feature", "_UI_ReferenceDescription_type"), + PropertiesPackage.Literals.REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** @@ -100,10 +114,10 @@ public class SingleReferenceDescriptionItemProvider extends WidgetDescriptionIte public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); - childrenFeatures.add(PropertiesPackage.Literals.SINGLE_REFERENCE_DESCRIPTION__CREATE_OPERATION); - childrenFeatures.add(PropertiesPackage.Literals.SINGLE_REFERENCE_DESCRIPTION__SEARCH_OPERATION); - childrenFeatures.add(PropertiesPackage.Literals.SINGLE_REFERENCE_DESCRIPTION__UNSET_OPERATION); - childrenFeatures.add(PropertiesPackage.Literals.SINGLE_REFERENCE_DESCRIPTION__ON_CLICK_OPERATION); + childrenFeatures.add(PropertiesPackage.Literals.REFERENCE_DESCRIPTION__ON_CLICK_OPERATION); + childrenFeatures.add(PropertiesPackage.Literals.REFERENCE_DESCRIPTION__ACTIONS); + childrenFeatures.add(PropertiesPackage.Literals.REFERENCE_DESCRIPTION__STYLE); + childrenFeatures.add(PropertiesPackage.Literals.REFERENCE_DESCRIPTION__CONDITIONAL_STYLES); } return childrenFeatures; } @@ -123,14 +137,14 @@ public class SingleReferenceDescriptionItemProvider extends WidgetDescriptionIte } /** - * This returns SingleReferenceDescription.gif. <!-- begin-user-doc --> <!-- + * This returns ReferenceDescription.gif. <!-- begin-user-doc --> <!-- * end-user-doc --> * * @generated */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/SingleReferenceDescription")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/ReferenceDescription")); } /** @@ -141,8 +155,8 @@ public class SingleReferenceDescriptionItemProvider extends WidgetDescriptionIte */ @Override public String getText(Object object) { - String label = ((SingleReferenceDescription) object).getIdentifier(); - return label == null || label.length() == 0 ? getString("_UI_SingleReferenceDescription_type") : getString("_UI_SingleReferenceDescription_type") + " " + label; + String label = ((ReferenceDescription) object).getIdentifier(); + return label == null || label.length() == 0 ? getString("_UI_ReferenceDescription_type") : getString("_UI_ReferenceDescription_type") + " " + label; } /** @@ -157,15 +171,16 @@ public class SingleReferenceDescriptionItemProvider extends WidgetDescriptionIte public void notifyChanged(Notification notification) { updateChildren(notification); - switch (notification.getFeatureID(SingleReferenceDescription.class)) { - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__VALUE_EXPRESSION: - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION: + switch (notification.getFeatureID(ReferenceDescription.class)) { + case PropertiesPackage.REFERENCE_DESCRIPTION__MULTIPLE: + case PropertiesPackage.REFERENCE_DESCRIPTION__VALUE_EXPRESSION: + case PropertiesPackage.REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__CREATE_OPERATION: - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__SEARCH_OPERATION: - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__UNSET_OPERATION: - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__ON_CLICK_OPERATION: + case PropertiesPackage.REFERENCE_DESCRIPTION__ON_CLICK_OPERATION: + case PropertiesPackage.REFERENCE_DESCRIPTION__ACTIONS: + case PropertiesPackage.REFERENCE_DESCRIPTION__STYLE: + case PropertiesPackage.REFERENCE_DESCRIPTION__CONDITIONAL_STYLES: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } @@ -183,35 +198,13 @@ public class SingleReferenceDescriptionItemProvider extends WidgetDescriptionIte protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.SINGLE_REFERENCE_DESCRIPTION__CREATE_OPERATION, PropertiesFactory.eINSTANCE.createOperationDescription())); - - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.SINGLE_REFERENCE_DESCRIPTION__SEARCH_OPERATION, PropertiesFactory.eINSTANCE.createOperationDescription())); + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.REFERENCE_DESCRIPTION__ON_CLICK_OPERATION, ToolFactory.eINSTANCE.createInitialOperation())); - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.SINGLE_REFERENCE_DESCRIPTION__UNSET_OPERATION, PropertiesFactory.eINSTANCE.createOperationDescription())); + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.REFERENCE_DESCRIPTION__ACTIONS, PropertiesFactory.eINSTANCE.createWidgetAction())); - newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.SINGLE_REFERENCE_DESCRIPTION__ON_CLICK_OPERATION, PropertiesFactory.eINSTANCE.createOperationDescription())); - } - - /** - * This returns the label text for - * {@link org.eclipse.emf.edit.command.CreateChildCommand}. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) { - Object childFeature = feature; - Object childObject = child; + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.REFERENCE_DESCRIPTION__STYLE, PropertiesFactory.eINSTANCE.createReferenceWidgetStyle())); - boolean qualify = childFeature == PropertiesPackage.Literals.SINGLE_REFERENCE_DESCRIPTION__CREATE_OPERATION - || childFeature == PropertiesPackage.Literals.SINGLE_REFERENCE_DESCRIPTION__SEARCH_OPERATION || childFeature == PropertiesPackage.Literals.SINGLE_REFERENCE_DESCRIPTION__UNSET_OPERATION - || childFeature == PropertiesPackage.Literals.SINGLE_REFERENCE_DESCRIPTION__ON_CLICK_OPERATION; - - if (qualify) { - return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); - } - return super.getCreateChildText(owner, feature, child, selection); + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.REFERENCE_DESCRIPTION__CONDITIONAL_STYLES, PropertiesFactory.eINSTANCE.createReferenceWidgetConditionalStyle())); } } diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ReferenceWidgetConditionalStyleItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ReferenceWidgetConditionalStyleItemProvider.java new file mode 100644 index 0000000000..574e928b82 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ReferenceWidgetConditionalStyleItemProvider.java @@ -0,0 +1,149 @@ +/** + * 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.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.sirius.properties.PropertiesFactory; +import org.eclipse.sirius.properties.PropertiesPackage; +import org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class ReferenceWidgetConditionalStyleItemProvider extends WidgetConditionalStyleItemProvider { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ReferenceWidgetConditionalStyleItemProvider(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 specifies how to implement {@link #getChildren} and is used to + * deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, + * {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in + * {@link #createCommand}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PropertiesPackage.Literals.REFERENCE_WIDGET_CONDITIONAL_STYLE__STYLE); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper + // feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns ReferenceWidgetConditionalStyle.gif. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ReferenceWidgetConditionalStyle")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ReferenceWidgetConditionalStyle) object).getPreconditionExpression(); + return label == null || label.length() == 0 ? getString("_UI_ReferenceWidgetConditionalStyle_type") : getString("_UI_ReferenceWidgetConditionalStyle_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(ReferenceWidgetConditionalStyle.class)) { + case PropertiesPackage.REFERENCE_WIDGET_CONDITIONAL_STYLE__STYLE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.REFERENCE_WIDGET_CONDITIONAL_STYLE__STYLE, PropertiesFactory.eINSTANCE.createReferenceWidgetStyle())); + } + +} diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ReferenceWidgetStyleItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ReferenceWidgetStyleItemProvider.java new file mode 100644 index 0000000000..39d89cb51e --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ReferenceWidgetStyleItemProvider.java @@ -0,0 +1,104 @@ +/** + * 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.IItemPropertyDescriptor; +import org.eclipse.sirius.properties.ReferenceWidgetStyle; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.properties.ReferenceWidgetStyle} object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class ReferenceWidgetStyleItemProvider extends WidgetStyleItemProvider { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ReferenceWidgetStyleItemProvider(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 ReferenceWidgetStyle.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ReferenceWidgetStyle")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ReferenceWidgetStyle) object).getLabelFontNameExpression(); + return label == null || label.length() == 0 ? getString("_UI_ReferenceWidgetStyle_type") : getString("_UI_ReferenceWidgetStyle_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); + 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/WidgetActionItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/WidgetActionItemProvider.java new file mode 100644 index 0000000000..ab7c29a754 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/WidgetActionItemProvider.java @@ -0,0 +1,186 @@ +/** + * 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.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.PropertiesPackage; +import org.eclipse.sirius.properties.WidgetAction; +import org.eclipse.sirius.viewpoint.description.tool.ToolFactory; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.properties.WidgetAction} object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class WidgetActionItemProvider 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 WidgetActionItemProvider(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); + + addLabelExpressionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Label Expression feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addLabelExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_WidgetAction_labelExpression_feature"), getString("_UI_PropertyDescriptor_description", "_UI_WidgetAction_labelExpression_feature", "_UI_WidgetAction_type"), + PropertiesPackage.Literals.WIDGET_ACTION__LABEL_EXPRESSION, 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}, + * {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in + * {@link #createCommand}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PropertiesPackage.Literals.WIDGET_ACTION__INITIAL_OPERATION); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper + // feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns WidgetAction.gif. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/WidgetAction")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((WidgetAction) object).getLabelExpression(); + return label == null || label.length() == 0 ? getString("_UI_WidgetAction_type") : getString("_UI_WidgetAction_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(WidgetAction.class)) { + case PropertiesPackage.WIDGET_ACTION__LABEL_EXPRESSION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case PropertiesPackage.WIDGET_ACTION__INITIAL_OPERATION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.WIDGET_ACTION__INITIAL_OPERATION, ToolFactory.eINSTANCE.createInitialOperation())); + } + + /** + * 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 07ca4be00b..6a7090ad55 100644 --- a/incubation/org.eclipse.sirius.properties/model/properties.ecore +++ b/incubation/org.eclipse.sirius.properties/model/properties.ecore @@ -213,10 +213,11 @@ <eStructuralFeatures xsi:type="ecore:EReference" name="conditionalStyles" upperBound="-1" eType="#//RadioWidgetConditionalStyle" containment="true"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="SingleReferenceDescription" eSuperTypes="#//WidgetDescription"> + <eClassifiers xsi:type="ecore:EClass" name="ReferenceDescription" eSuperTypes="#//WidgetDescription"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Represents a single reference in the user interface."/> + <details key="documentation" value="Represents a reference in the user interface."/> </eAnnotations> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="multiple" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="valueExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <details key="documentation" value="The initial value."/> @@ -227,63 +228,24 @@ <details key="documentation" value="Represents how to display the value."/> </eAnnotations> </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EReference" name="createOperation" eType="#//OperationDescription" - containment="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Defines the expected behavior when the user clicks on the create button."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EReference" name="searchOperation" eType="#//OperationDescription" - containment="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Defines the expected behavior when the user clicks on the search button."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EReference" name="unsetOperation" eType="#//OperationDescription" - containment="true"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Defines the expected behavior when the user clicks on the unset button."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EReference" name="onClickOperation" eType="#//OperationDescription" + <eStructuralFeatures xsi:type="ecore:EReference" name="onClickOperation" eType="ecore:EClass ../../org.eclipse.sirius/model/viewpoint.ecore#//description/tool/InitialOperation" containment="true"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <details key="documentation" value="Defines the expected behavior when the user clicks on the hyperlink."/> </eAnnotations> </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="actions" upperBound="-1" + eType="#//WidgetAction" containment="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="style" eType="#//ReferenceWidgetStyle" + containment="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="conditionalStyles" upperBound="-1" + eType="#//ReferenceWidgetConditionalStyle" containment="true"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="OperationDescription"> <eStructuralFeatures xsi:type="ecore:EReference" name="initialOperation" lowerBound="1" eType="ecore:EClass ../../org.eclipse.sirius/model/viewpoint.ecore#//description/tool/InitialOperation" containment="true"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="MultipleReferencesDescription" eSuperTypes="#//WidgetDescription"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Represents a radio button in the user interface."/> - </eAnnotations> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="valueExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="The initial values."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="displayExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="Indicates how to display the input value."/> - </eAnnotations> - </eStructuralFeatures> - <eStructuralFeatures xsi:type="ecore:EReference" name="createOperation" eType="#//OperationDescription" - containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="searchOperation" eType="#//OperationDescription" - containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="unsetOperation" eType="#//OperationDescription" - containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="onClickOperation" eType="#//OperationDescription" - containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="upOperation" eType="#//OperationDescription" - containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="downOperation" eType="#//OperationDescription" - containment="true"/> - </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="CustomDescription" eSuperTypes="#//WidgetDescription"> <eStructuralFeatures xsi:type="ecore:EReference" name="customExpressions" upperBound="-1" eType="#//CustomExpression" containment="true"/> @@ -336,6 +298,7 @@ <eClassifiers xsi:type="ecore:EClass" name="ButtonWidgetStyle" eSuperTypes="#//WidgetStyle"/> <eClassifiers xsi:type="ecore:EClass" name="SelectWidgetStyle" eSuperTypes="#//WidgetStyle"/> <eClassifiers xsi:type="ecore:EClass" name="CustomWidgetStyle" eSuperTypes="#//WidgetStyle"/> + <eClassifiers xsi:type="ecore:EClass" name="ReferenceWidgetStyle" eSuperTypes="#//WidgetStyle"/> <eClassifiers xsi:type="ecore:EClass" name="WidgetConditionalStyle" abstract="true"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="preconditionExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> @@ -368,4 +331,18 @@ <eStructuralFeatures xsi:type="ecore:EReference" name="style" eType="#//CustomWidgetStyle" containment="true"/> </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="ReferenceWidgetConditionalStyle" eSuperTypes="#//WidgetConditionalStyle"> + <eStructuralFeatures xsi:type="ecore:EReference" name="style" eType="#//ReferenceWidgetStyle" + containment="true"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="WidgetAction"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="labelExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="initialOperation" lowerBound="1" + eType="ecore:EClass ../../org.eclipse.sirius/model/viewpoint.ecore#//description/tool/InitialOperation" + containment="true"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="Defines the behavior executed when the end-user updates the value of the radio."/> + </eAnnotations> + </eStructuralFeatures> + </eClassifiers> </ecore:EPackage> diff --git a/incubation/org.eclipse.sirius.properties/model/properties.genmodel b/incubation/org.eclipse.sirius.properties/model/properties.genmodel index e9bc4412d6..cc4bc6adaf 100644 --- a/incubation/org.eclipse.sirius.properties/model/properties.genmodel +++ b/incubation/org.eclipse.sirius.properties/model/properties.genmodel @@ -122,27 +122,18 @@ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//RadioDescription/numberOfColumns"/> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//RadioDescription/conditionalStyles"/> </genClasses> - <genClasses ecoreClass="properties.ecore#//SingleReferenceDescription"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//SingleReferenceDescription/valueExpression"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//SingleReferenceDescription/displayExpression"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//SingleReferenceDescription/createOperation"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//SingleReferenceDescription/searchOperation"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//SingleReferenceDescription/unsetOperation"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//SingleReferenceDescription/onClickOperation"/> + <genClasses ecoreClass="properties.ecore#//ReferenceDescription"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//ReferenceDescription/multiple"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//ReferenceDescription/valueExpression"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//ReferenceDescription/displayExpression"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//ReferenceDescription/onClickOperation"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//ReferenceDescription/actions"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//ReferenceDescription/style"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//ReferenceDescription/conditionalStyles"/> </genClasses> <genClasses ecoreClass="properties.ecore#//OperationDescription"> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//OperationDescription/initialOperation"/> </genClasses> - <genClasses ecoreClass="properties.ecore#//MultipleReferencesDescription"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//MultipleReferencesDescription/valueExpression"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//MultipleReferencesDescription/displayExpression"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//MultipleReferencesDescription/createOperation"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//MultipleReferencesDescription/searchOperation"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//MultipleReferencesDescription/unsetOperation"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//MultipleReferencesDescription/onClickOperation"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//MultipleReferencesDescription/upOperation"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//MultipleReferencesDescription/downOperation"/> - </genClasses> <genClasses ecoreClass="properties.ecore#//CustomDescription"> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//CustomDescription/customExpressions"/> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//CustomDescription/customOperations"/> @@ -183,6 +174,7 @@ <genClasses ecoreClass="properties.ecore#//ButtonWidgetStyle"/> <genClasses ecoreClass="properties.ecore#//SelectWidgetStyle"/> <genClasses ecoreClass="properties.ecore#//CustomWidgetStyle"/> + <genClasses ecoreClass="properties.ecore#//ReferenceWidgetStyle"/> <genClasses image="false" ecoreClass="properties.ecore#//WidgetConditionalStyle"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//WidgetConditionalStyle/preconditionExpression"/> </genClasses> @@ -207,5 +199,12 @@ <genClasses ecoreClass="properties.ecore#//CustomWidgetConditionalStyle"> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//CustomWidgetConditionalStyle/style"/> </genClasses> + <genClasses ecoreClass="properties.ecore#//ReferenceWidgetConditionalStyle"> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//ReferenceWidgetConditionalStyle/style"/> + </genClasses> + <genClasses ecoreClass="properties.ecore#//WidgetAction"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//WidgetAction/labelExpression"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//WidgetAction/initialOperation"/> + </genClasses> </genPackages> </genmodel:GenModel> diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/MultipleReferencesDescription.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/MultipleReferencesDescription.java deleted file mode 100644 index e9deda0b9c..0000000000 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/MultipleReferencesDescription.java +++ /dev/null @@ -1,300 +0,0 @@ -/** - * 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>Multiple References Description</b></em>'. <!-- end-user-doc --> - * - * <!-- begin-model-doc --> Represents a radio button in the user interface. - * <!-- end-model-doc --> - * - * <p> - * The following features are supported: - * </p> - * <ul> - * <li> - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getValueExpression - * <em>Value Expression</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getDisplayExpression - * <em>Display Expression</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getCreateOperation - * <em>Create Operation</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getSearchOperation - * <em>Search Operation</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getUnsetOperation - * <em>Unset Operation</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getOnClickOperation - * <em>On Click Operation</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getUpOperation - * <em>Up Operation</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getDownOperation - * <em>Down Operation</em>}</li> - * </ul> - * - * @see org.eclipse.sirius.properties.PropertiesPackage#getMultipleReferencesDescription() - * @model - * @generated - */ -public interface MultipleReferencesDescription extends WidgetDescription { - /** - * Returns the value of the '<em><b>Value Expression</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> - * The initial values. <!-- end-model-doc --> - * - * @return the value of the '<em>Value Expression</em>' attribute. - * @see #setValueExpression(String) - * @see org.eclipse.sirius.properties.PropertiesPackage#getMultipleReferencesDescription_ValueExpression() - * @model dataType= - * "org.eclipse.sirius.viewpoint.description.InterpretedExpression" - * @generated - */ - String getValueExpression(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getValueExpression - * <em>Value Expression</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @param value - * the new value of the '<em>Value Expression</em>' attribute. - * @see #getValueExpression() - * @generated - */ - void setValueExpression(String value); - - /** - * Returns the value of the '<em><b>Display Expression</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> - * Indicates how to display the input value. <!-- end-model-doc --> - * - * @return the value of the '<em>Display Expression</em>' attribute. - * @see #setDisplayExpression(String) - * @see org.eclipse.sirius.properties.PropertiesPackage#getMultipleReferencesDescription_DisplayExpression() - * @model dataType= - * "org.eclipse.sirius.viewpoint.description.InterpretedExpression" - * @generated - */ - String getDisplayExpression(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getDisplayExpression - * <em>Display Expression</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @param value - * the new value of the '<em>Display Expression</em>' attribute. - * @see #getDisplayExpression() - * @generated - */ - void setDisplayExpression(String value); - - /** - * Returns the value of the '<em><b>Create Operation</b></em>' containment - * reference. <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Create Operation</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>Create Operation</em>' containment - * reference. - * @see #setCreateOperation(OperationDescription) - * @see org.eclipse.sirius.properties.PropertiesPackage#getMultipleReferencesDescription_CreateOperation() - * @model containment="true" - * @generated - */ - OperationDescription getCreateOperation(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getCreateOperation - * <em>Create Operation</em>}' containment reference. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Create Operation</em>' containment - * reference. - * @see #getCreateOperation() - * @generated - */ - void setCreateOperation(OperationDescription value); - - /** - * Returns the value of the '<em><b>Search Operation</b></em>' containment - * reference. <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Search Operation</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>Search Operation</em>' containment - * reference. - * @see #setSearchOperation(OperationDescription) - * @see org.eclipse.sirius.properties.PropertiesPackage#getMultipleReferencesDescription_SearchOperation() - * @model containment="true" - * @generated - */ - OperationDescription getSearchOperation(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getSearchOperation - * <em>Search Operation</em>}' containment reference. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Search Operation</em>' containment - * reference. - * @see #getSearchOperation() - * @generated - */ - void setSearchOperation(OperationDescription value); - - /** - * Returns the value of the '<em><b>Unset Operation</b></em>' containment - * reference. <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Unset Operation</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>Unset Operation</em>' containment - * reference. - * @see #setUnsetOperation(OperationDescription) - * @see org.eclipse.sirius.properties.PropertiesPackage#getMultipleReferencesDescription_UnsetOperation() - * @model containment="true" - * @generated - */ - OperationDescription getUnsetOperation(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getUnsetOperation - * <em>Unset Operation</em>}' containment reference. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Unset Operation</em>' containment - * reference. - * @see #getUnsetOperation() - * @generated - */ - void setUnsetOperation(OperationDescription value); - - /** - * Returns the value of the '<em><b>On Click Operation</b></em>' containment - * reference. <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>On Click Operation</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>On Click Operation</em>' containment - * reference. - * @see #setOnClickOperation(OperationDescription) - * @see org.eclipse.sirius.properties.PropertiesPackage#getMultipleReferencesDescription_OnClickOperation() - * @model containment="true" - * @generated - */ - OperationDescription getOnClickOperation(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getOnClickOperation - * <em>On Click Operation</em>}' containment reference. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>On Click Operation</em>' containment - * reference. - * @see #getOnClickOperation() - * @generated - */ - void setOnClickOperation(OperationDescription value); - - /** - * Returns the value of the '<em><b>Up Operation</b></em>' containment - * reference. <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Up Operation</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>Up Operation</em>' containment reference. - * @see #setUpOperation(OperationDescription) - * @see org.eclipse.sirius.properties.PropertiesPackage#getMultipleReferencesDescription_UpOperation() - * @model containment="true" - * @generated - */ - OperationDescription getUpOperation(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getUpOperation - * <em>Up Operation</em>}' containment reference. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Up Operation</em>' containment - * reference. - * @see #getUpOperation() - * @generated - */ - void setUpOperation(OperationDescription value); - - /** - * Returns the value of the '<em><b>Down Operation</b></em>' containment - * reference. <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Down Operation</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>Down Operation</em>' containment reference. - * @see #setDownOperation(OperationDescription) - * @see org.eclipse.sirius.properties.PropertiesPackage#getMultipleReferencesDescription_DownOperation() - * @model containment="true" - * @generated - */ - OperationDescription getDownOperation(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getDownOperation - * <em>Down Operation</em>}' containment reference. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Down Operation</em>' containment - * reference. - * @see #getDownOperation() - * @generated - */ - void setDownOperation(OperationDescription value); - -} // MultipleReferencesDescription 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 c39012a6df..c910d628d4 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 @@ -193,13 +193,13 @@ public interface PropertiesFactory extends EFactory { RadioDescription createRadioDescription(); /** - * Returns a new object of class '<em>Single Reference Description</em>'. - * <!-- begin-user-doc --> <!-- end-user-doc --> + * Returns a new object of class '<em>Reference Description</em>'. <!-- + * begin-user-doc --> <!-- end-user-doc --> * - * @return a new object of class '<em>Single Reference Description</em>'. + * @return a new object of class '<em>Reference Description</em>'. * @generated */ - SingleReferenceDescription createSingleReferenceDescription(); + ReferenceDescription createReferenceDescription(); /** * Returns a new object of class '<em>Operation Description</em>'. <!-- @@ -211,15 +211,6 @@ public interface PropertiesFactory extends EFactory { OperationDescription createOperationDescription(); /** - * Returns a new object of class '<em>Multiple References Description</em>'. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return a new object of class '<em>Multiple References Description</em>'. - * @generated - */ - MultipleReferencesDescription createMultipleReferencesDescription(); - - /** * Returns a new object of class '<em>Custom Description</em>'. <!-- * begin-user-doc --> <!-- end-user-doc --> * @@ -383,6 +374,35 @@ public interface PropertiesFactory extends EFactory { CustomWidgetConditionalStyle createCustomWidgetConditionalStyle(); /** + * Returns a new object of class ' + * <em>Reference Widget Conditional Style</em>'. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return a new object of class ' + * <em>Reference Widget Conditional Style</em>'. + * @generated + */ + ReferenceWidgetConditionalStyle createReferenceWidgetConditionalStyle(); + + /** + * Returns a new object of class '<em>Widget Action</em>'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Widget Action</em>'. + * @generated + */ + WidgetAction createWidgetAction(); + + /** + * Returns a new object of class '<em>Reference Widget Style</em>'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Reference Widget Style</em>'. + * @generated + */ + ReferenceWidgetStyle createReferenceWidgetStyle(); + + /** * Returns the package supported by this factory. <!-- 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 dba4c61c0b..66de9c5d7e 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 @@ -1395,15 +1395,15 @@ public interface PropertiesPackage extends EPackage { /** * The meta object id for the ' - * {@link org.eclipse.sirius.properties.impl.SingleReferenceDescriptionImpl - * <em>Single Reference Description</em>}' class. <!-- begin-user-doc --> - * <!-- end-user-doc --> + * {@link org.eclipse.sirius.properties.impl.ReferenceDescriptionImpl + * <em>Reference Description</em>}' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> * - * @see org.eclipse.sirius.properties.impl.SingleReferenceDescriptionImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getSingleReferenceDescription() + * @see org.eclipse.sirius.properties.impl.ReferenceDescriptionImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getReferenceDescription() * @generated */ - int SINGLE_REFERENCE_DESCRIPTION = 21; + int REFERENCE_DESCRIPTION = 21; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -1412,7 +1412,7 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int SINGLE_REFERENCE_DESCRIPTION__IDENTIFIER = PropertiesPackage.WIDGET_DESCRIPTION__IDENTIFIER; + int REFERENCE_DESCRIPTION__IDENTIFIER = PropertiesPackage.WIDGET_DESCRIPTION__IDENTIFIER; /** * The feature id for the '<em><b>Label Expression</b></em>' attribute. <!-- @@ -1421,7 +1421,7 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int SINGLE_REFERENCE_DESCRIPTION__LABEL_EXPRESSION = PropertiesPackage.WIDGET_DESCRIPTION__LABEL_EXPRESSION; + int REFERENCE_DESCRIPTION__LABEL_EXPRESSION = PropertiesPackage.WIDGET_DESCRIPTION__LABEL_EXPRESSION; /** * The feature id for the '<em><b>Help Expression</b></em>' attribute. <!-- @@ -1430,7 +1430,16 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int SINGLE_REFERENCE_DESCRIPTION__HELP_EXPRESSION = PropertiesPackage.WIDGET_DESCRIPTION__HELP_EXPRESSION; + int REFERENCE_DESCRIPTION__HELP_EXPRESSION = PropertiesPackage.WIDGET_DESCRIPTION__HELP_EXPRESSION; + + /** + * The feature id for the '<em><b>Multiple</b></em>' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REFERENCE_DESCRIPTION__MULTIPLE = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 0; /** * The feature id for the '<em><b>Value Expression</b></em>' attribute. <!-- @@ -1439,7 +1448,7 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int SINGLE_REFERENCE_DESCRIPTION__VALUE_EXPRESSION = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 0; + int REFERENCE_DESCRIPTION__VALUE_EXPRESSION = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 1; /** * The feature id for the '<em><b>Display Expression</b></em>' attribute. @@ -1448,53 +1457,52 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int SINGLE_REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 1; + int REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 2; /** - * The feature id for the '<em><b>Create Operation</b></em>' containment + * The feature id for the '<em><b>On Click Operation</b></em>' containment * reference. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int SINGLE_REFERENCE_DESCRIPTION__CREATE_OPERATION = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 2; + int REFERENCE_DESCRIPTION__ON_CLICK_OPERATION = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 3; /** - * The feature id for the '<em><b>Search Operation</b></em>' containment - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Actions</b></em>' containment reference + * list. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int SINGLE_REFERENCE_DESCRIPTION__SEARCH_OPERATION = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 3; + int REFERENCE_DESCRIPTION__ACTIONS = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 4; /** - * The feature id for the '<em><b>Unset Operation</b></em>' containment - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Style</b></em>' containment reference. + * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int SINGLE_REFERENCE_DESCRIPTION__UNSET_OPERATION = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 4; + int REFERENCE_DESCRIPTION__STYLE = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 5; /** - * The feature id for the '<em><b>On Click Operation</b></em>' containment - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Conditional Styles</b></em>' containment + * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int SINGLE_REFERENCE_DESCRIPTION__ON_CLICK_OPERATION = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 5; + int REFERENCE_DESCRIPTION__CONDITIONAL_STYLES = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 6; /** - * The number of structural features of the ' - * <em>Single Reference Description</em>' class. <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The number of structural features of the '<em>Reference Description</em>' + * class. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int SINGLE_REFERENCE_DESCRIPTION_FEATURE_COUNT = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 6; + int REFERENCE_DESCRIPTION_FEATURE_COUNT = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 7; /** * The meta object id for the ' @@ -1528,127 +1536,6 @@ public interface PropertiesPackage extends EPackage { /** * The meta object id for the ' - * {@link org.eclipse.sirius.properties.impl.MultipleReferencesDescriptionImpl - * <em>Multiple References Description</em>}' class. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see org.eclipse.sirius.properties.impl.MultipleReferencesDescriptionImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getMultipleReferencesDescription() - * @generated - */ - int MULTIPLE_REFERENCES_DESCRIPTION = 23; - - /** - * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int MULTIPLE_REFERENCES_DESCRIPTION__IDENTIFIER = PropertiesPackage.WIDGET_DESCRIPTION__IDENTIFIER; - - /** - * The feature id for the '<em><b>Label Expression</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int MULTIPLE_REFERENCES_DESCRIPTION__LABEL_EXPRESSION = PropertiesPackage.WIDGET_DESCRIPTION__LABEL_EXPRESSION; - - /** - * The feature id for the '<em><b>Help Expression</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int MULTIPLE_REFERENCES_DESCRIPTION__HELP_EXPRESSION = PropertiesPackage.WIDGET_DESCRIPTION__HELP_EXPRESSION; - - /** - * The feature id for the '<em><b>Value Expression</b></em>' attribute. <!-- - * begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int MULTIPLE_REFERENCES_DESCRIPTION__VALUE_EXPRESSION = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>Display Expression</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int MULTIPLE_REFERENCES_DESCRIPTION__DISPLAY_EXPRESSION = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 1; - - /** - * The feature id for the '<em><b>Create Operation</b></em>' containment - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int MULTIPLE_REFERENCES_DESCRIPTION__CREATE_OPERATION = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 2; - - /** - * The feature id for the '<em><b>Search Operation</b></em>' containment - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int MULTIPLE_REFERENCES_DESCRIPTION__SEARCH_OPERATION = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 3; - - /** - * The feature id for the '<em><b>Unset Operation</b></em>' containment - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int MULTIPLE_REFERENCES_DESCRIPTION__UNSET_OPERATION = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 4; - - /** - * The feature id for the '<em><b>On Click Operation</b></em>' containment - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int MULTIPLE_REFERENCES_DESCRIPTION__ON_CLICK_OPERATION = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 5; - - /** - * The feature id for the '<em><b>Up Operation</b></em>' containment - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int MULTIPLE_REFERENCES_DESCRIPTION__UP_OPERATION = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 6; - - /** - * The feature id for the '<em><b>Down Operation</b></em>' containment - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int MULTIPLE_REFERENCES_DESCRIPTION__DOWN_OPERATION = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 7; - - /** - * The number of structural features of the ' - * <em>Multiple References Description</em>' class. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @generated - * @ordered - */ - int MULTIPLE_REFERENCES_DESCRIPTION_FEATURE_COUNT = PropertiesPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 8; - - /** - * The meta object id for the ' * {@link org.eclipse.sirius.properties.impl.CustomDescriptionImpl * <em>Custom Description</em>}' class. <!-- begin-user-doc --> <!-- * end-user-doc --> @@ -1657,7 +1544,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCustomDescription() * @generated */ - int CUSTOM_DESCRIPTION = 24; + int CUSTOM_DESCRIPTION = 23; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -1741,7 +1628,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCustomExpression() * @generated */ - int CUSTOM_EXPRESSION = 25; + int CUSTOM_EXPRESSION = 24; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -1780,7 +1667,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCustomOperation() * @generated */ - int CUSTOM_OPERATION = 26; + int CUSTOM_OPERATION = 25; /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- @@ -1819,7 +1706,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getWidgetStyle() * @generated */ - int WIDGET_STYLE = 27; + int WIDGET_STYLE = 26; /** * The feature id for the '<em><b>Label Font Name Expression</b></em>' @@ -1885,7 +1772,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getTextWidgetStyle() * @generated */ - int TEXT_WIDGET_STYLE = 28; + int TEXT_WIDGET_STYLE = 27; /** * The feature id for the '<em><b>Label Font Name Expression</b></em>' @@ -1996,7 +1883,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getLabelWidgetStyle() * @generated */ - int LABEL_WIDGET_STYLE = 29; + int LABEL_WIDGET_STYLE = 28; /** * The feature id for the '<em><b>Label Font Name Expression</b></em>' @@ -2107,7 +1994,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCheckboxWidgetStyle() * @generated */ - int CHECKBOX_WIDGET_STYLE = 30; + int CHECKBOX_WIDGET_STYLE = 29; /** * The feature id for the '<em><b>Label Font Name Expression</b></em>' @@ -2173,7 +2060,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getRadioWidgetStyle() * @generated */ - int RADIO_WIDGET_STYLE = 31; + int RADIO_WIDGET_STYLE = 30; /** * The feature id for the '<em><b>Label Font Name Expression</b></em>' @@ -2239,7 +2126,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getButtonWidgetStyle() * @generated */ - int BUTTON_WIDGET_STYLE = 32; + int BUTTON_WIDGET_STYLE = 31; /** * The feature id for the '<em><b>Label Font Name Expression</b></em>' @@ -2305,7 +2192,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getSelectWidgetStyle() * @generated */ - int SELECT_WIDGET_STYLE = 33; + int SELECT_WIDGET_STYLE = 32; /** * The feature id for the '<em><b>Label Font Name Expression</b></em>' @@ -2371,7 +2258,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCustomWidgetStyle() * @generated */ - int CUSTOM_WIDGET_STYLE = 34; + int CUSTOM_WIDGET_STYLE = 33; /** * The feature id for the '<em><b>Label Font Name Expression</b></em>' @@ -2440,6 +2327,180 @@ public interface PropertiesPackage extends EPackage { int WIDGET_CONDITIONAL_STYLE = 35; /** + * The meta object id for the ' + * {@link org.eclipse.sirius.properties.impl.TextWidgetConditionalStyleImpl + * <em>Text Widget Conditional Style</em>}' class. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.TextWidgetConditionalStyleImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getTextWidgetConditionalStyle() + * @generated + */ + int TEXT_WIDGET_CONDITIONAL_STYLE = 36; + + /** + * The meta object id for the ' + * {@link org.eclipse.sirius.properties.impl.LabelWidgetConditionalStyleImpl + * <em>Label Widget Conditional Style</em>}' class. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.LabelWidgetConditionalStyleImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getLabelWidgetConditionalStyle() + * @generated + */ + int LABEL_WIDGET_CONDITIONAL_STYLE = 37; + + /** + * The meta object id for the ' + * {@link org.eclipse.sirius.properties.impl.CheckboxWidgetConditionalStyleImpl + * <em>Checkbox Widget Conditional Style</em>}' class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.CheckboxWidgetConditionalStyleImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCheckboxWidgetConditionalStyle() + * @generated + */ + int CHECKBOX_WIDGET_CONDITIONAL_STYLE = 38; + + /** + * The meta object id for the ' + * {@link org.eclipse.sirius.properties.impl.RadioWidgetConditionalStyleImpl + * <em>Radio Widget Conditional Style</em>}' class. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.RadioWidgetConditionalStyleImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getRadioWidgetConditionalStyle() + * @generated + */ + int RADIO_WIDGET_CONDITIONAL_STYLE = 39; + + /** + * The meta object id for the ' + * {@link org.eclipse.sirius.properties.impl.ButtonWidgetConditionalStyleImpl + * <em>Button Widget Conditional Style</em>}' class. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.ButtonWidgetConditionalStyleImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getButtonWidgetConditionalStyle() + * @generated + */ + int BUTTON_WIDGET_CONDITIONAL_STYLE = 40; + + /** + * The meta object id for the ' + * {@link org.eclipse.sirius.properties.impl.SelectWidgetConditionalStyleImpl + * <em>Select Widget Conditional Style</em>}' class. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.SelectWidgetConditionalStyleImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getSelectWidgetConditionalStyle() + * @generated + */ + int SELECT_WIDGET_CONDITIONAL_STYLE = 41; + + /** + * The meta object id for the ' + * {@link org.eclipse.sirius.properties.impl.CustomWidgetConditionalStyleImpl + * <em>Custom Widget Conditional Style</em>}' class. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.CustomWidgetConditionalStyleImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCustomWidgetConditionalStyle() + * @generated + */ + int CUSTOM_WIDGET_CONDITIONAL_STYLE = 42; + + /** + * The meta object id for the ' + * {@link org.eclipse.sirius.properties.impl.ReferenceWidgetConditionalStyleImpl + * <em>Reference Widget Conditional Style</em>}' class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.ReferenceWidgetConditionalStyleImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getReferenceWidgetConditionalStyle() + * @generated + */ + int REFERENCE_WIDGET_CONDITIONAL_STYLE = 43; + + /** + * The meta object id for the ' + * {@link org.eclipse.sirius.properties.impl.WidgetActionImpl + * <em>Widget Action</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @see org.eclipse.sirius.properties.impl.WidgetActionImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getWidgetAction() + * @generated + */ + int WIDGET_ACTION = 44; + + /** + * The meta object id for the ' + * {@link org.eclipse.sirius.properties.impl.ReferenceWidgetStyleImpl + * <em>Reference Widget Style</em>}' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.ReferenceWidgetStyleImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getReferenceWidgetStyle() + * @generated + */ + int REFERENCE_WIDGET_STYLE = 34; + + /** + * The feature id for the '<em><b>Label Font Name Expression</b></em>' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REFERENCE_WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION; + + /** + * The feature id for the '<em><b>Label Font Size</b></em>' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REFERENCE_WIDGET_STYLE__LABEL_FONT_SIZE = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_SIZE; + + /** + * The feature id for the '<em><b>Label Background Color</b></em>' + * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REFERENCE_WIDGET_STYLE__LABEL_BACKGROUND_COLOR = PropertiesPackage.WIDGET_STYLE__LABEL_BACKGROUND_COLOR; + + /** + * The feature id for the '<em><b>Label Foreground Color</b></em>' + * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REFERENCE_WIDGET_STYLE__LABEL_FOREGROUND_COLOR = PropertiesPackage.WIDGET_STYLE__LABEL_FOREGROUND_COLOR; + + /** + * The feature id for the '<em><b>Label Font Format</b></em>' attribute + * list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REFERENCE_WIDGET_STYLE__LABEL_FONT_FORMAT = PropertiesPackage.WIDGET_STYLE__LABEL_FONT_FORMAT; + + /** + * The number of structural features of the '<em>Reference Widget Style</em> + * ' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int REFERENCE_WIDGET_STYLE_FEATURE_COUNT = PropertiesPackage.WIDGET_STYLE_FEATURE_COUNT + 0; + + /** * The feature id for the '<em><b>Precondition Expression</b></em>' * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -2459,18 +2520,6 @@ public interface PropertiesPackage extends EPackage { int WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT = 1; /** - * The meta object id for the ' - * {@link org.eclipse.sirius.properties.impl.TextWidgetConditionalStyleImpl - * <em>Text Widget Conditional Style</em>}' class. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see org.eclipse.sirius.properties.impl.TextWidgetConditionalStyleImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getTextWidgetConditionalStyle() - * @generated - */ - int TEXT_WIDGET_CONDITIONAL_STYLE = 36; - - /** * The feature id for the '<em><b>Precondition Expression</b></em>' * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -2499,18 +2548,6 @@ public interface PropertiesPackage extends EPackage { int TEXT_WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT = PropertiesPackage.WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT + 1; /** - * The meta object id for the ' - * {@link org.eclipse.sirius.properties.impl.LabelWidgetConditionalStyleImpl - * <em>Label Widget Conditional Style</em>}' class. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see org.eclipse.sirius.properties.impl.LabelWidgetConditionalStyleImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getLabelWidgetConditionalStyle() - * @generated - */ - int LABEL_WIDGET_CONDITIONAL_STYLE = 37; - - /** * The feature id for the '<em><b>Precondition Expression</b></em>' * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -2539,18 +2576,6 @@ public interface PropertiesPackage extends EPackage { int LABEL_WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT = PropertiesPackage.WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT + 1; /** - * The meta object id for the ' - * {@link org.eclipse.sirius.properties.impl.CheckboxWidgetConditionalStyleImpl - * <em>Checkbox Widget Conditional Style</em>}' class. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see org.eclipse.sirius.properties.impl.CheckboxWidgetConditionalStyleImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCheckboxWidgetConditionalStyle() - * @generated - */ - int CHECKBOX_WIDGET_CONDITIONAL_STYLE = 38; - - /** * The feature id for the '<em><b>Precondition Expression</b></em>' * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -2579,18 +2604,6 @@ public interface PropertiesPackage extends EPackage { int CHECKBOX_WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT = PropertiesPackage.WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT + 1; /** - * The meta object id for the ' - * {@link org.eclipse.sirius.properties.impl.RadioWidgetConditionalStyleImpl - * <em>Radio Widget Conditional Style</em>}' class. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see org.eclipse.sirius.properties.impl.RadioWidgetConditionalStyleImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getRadioWidgetConditionalStyle() - * @generated - */ - int RADIO_WIDGET_CONDITIONAL_STYLE = 39; - - /** * The feature id for the '<em><b>Precondition Expression</b></em>' * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -2619,18 +2632,6 @@ public interface PropertiesPackage extends EPackage { int RADIO_WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT = PropertiesPackage.WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT + 1; /** - * The meta object id for the ' - * {@link org.eclipse.sirius.properties.impl.ButtonWidgetConditionalStyleImpl - * <em>Button Widget Conditional Style</em>}' class. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see org.eclipse.sirius.properties.impl.ButtonWidgetConditionalStyleImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getButtonWidgetConditionalStyle() - * @generated - */ - int BUTTON_WIDGET_CONDITIONAL_STYLE = 40; - - /** * The feature id for the '<em><b>Precondition Expression</b></em>' * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -2659,18 +2660,6 @@ public interface PropertiesPackage extends EPackage { int BUTTON_WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT = PropertiesPackage.WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT + 1; /** - * The meta object id for the ' - * {@link org.eclipse.sirius.properties.impl.SelectWidgetConditionalStyleImpl - * <em>Select Widget Conditional Style</em>}' class. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see org.eclipse.sirius.properties.impl.SelectWidgetConditionalStyleImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getSelectWidgetConditionalStyle() - * @generated - */ - int SELECT_WIDGET_CONDITIONAL_STYLE = 41; - - /** * The feature id for the '<em><b>Precondition Expression</b></em>' * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -2699,16 +2688,32 @@ public interface PropertiesPackage extends EPackage { int SELECT_WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT = PropertiesPackage.WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT + 1; /** - * The meta object id for the ' - * {@link org.eclipse.sirius.properties.impl.CustomWidgetConditionalStyleImpl - * <em>Custom Widget Conditional Style</em>}' class. <!-- begin-user-doc --> + * The feature id for the '<em><b>Precondition Expression</b></em>' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CUSTOM_WIDGET_CONDITIONAL_STYLE__PRECONDITION_EXPRESSION = PropertiesPackage.WIDGET_CONDITIONAL_STYLE__PRECONDITION_EXPRESSION; + + /** + * The feature id for the '<em><b>Style</b></em>' containment reference. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CUSTOM_WIDGET_CONDITIONAL_STYLE__STYLE = PropertiesPackage.WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the ' + * <em>Custom Widget Conditional Style</em>' class. <!-- begin-user-doc --> * <!-- end-user-doc --> * - * @see org.eclipse.sirius.properties.impl.CustomWidgetConditionalStyleImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCustomWidgetConditionalStyle() * @generated + * @ordered */ - int CUSTOM_WIDGET_CONDITIONAL_STYLE = 42; + int CUSTOM_WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT = PropertiesPackage.WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT + 1; /** * The feature id for the '<em><b>Precondition Expression</b></em>' @@ -2717,7 +2722,7 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int CUSTOM_WIDGET_CONDITIONAL_STYLE__PRECONDITION_EXPRESSION = PropertiesPackage.WIDGET_CONDITIONAL_STYLE__PRECONDITION_EXPRESSION; + int REFERENCE_WIDGET_CONDITIONAL_STYLE__PRECONDITION_EXPRESSION = PropertiesPackage.WIDGET_CONDITIONAL_STYLE__PRECONDITION_EXPRESSION; /** * The feature id for the '<em><b>Style</b></em>' containment reference. @@ -2726,17 +2731,44 @@ public interface PropertiesPackage extends EPackage { * @generated * @ordered */ - int CUSTOM_WIDGET_CONDITIONAL_STYLE__STYLE = PropertiesPackage.WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT + 0; + int REFERENCE_WIDGET_CONDITIONAL_STYLE__STYLE = PropertiesPackage.WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT + 0; /** * The number of structural features of the ' - * <em>Custom Widget Conditional Style</em>' class. <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <em>Reference Widget Conditional Style</em>' class. <!-- begin-user-doc + * --> <!-- end-user-doc --> * * @generated * @ordered */ - int CUSTOM_WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT = PropertiesPackage.WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT + 1; + int REFERENCE_WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT = PropertiesPackage.WIDGET_CONDITIONAL_STYLE_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Label Expression</b></em>' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int WIDGET_ACTION__LABEL_EXPRESSION = 0; + + /** + * The feature id for the '<em><b>Initial Operation</b></em>' containment + * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int WIDGET_ACTION__INITIAL_OPERATION = 1; + + /** + * The number of structural features of the '<em>Widget Action</em>' class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int WIDGET_ACTION_FEATURE_COUNT = 2; /** * The meta object id for the ' @@ -2748,7 +2780,7 @@ public interface PropertiesPackage extends EPackage { * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getFILL_LAYOUT_ORIENTATION() * @generated */ - int FILL_LAYOUT_ORIENTATION = 43; + int FILL_LAYOUT_ORIENTATION = 45; /** * Returns the meta object for class ' @@ -3842,97 +3874,106 @@ public interface PropertiesPackage extends EPackage { /** * Returns the meta object for class ' - * {@link org.eclipse.sirius.properties.SingleReferenceDescription - * <em>Single Reference Description</em>}'. <!-- begin-user-doc --> <!-- + * {@link org.eclipse.sirius.properties.ReferenceDescription + * <em>Reference Description</em>}'. <!-- begin-user-doc --> <!-- * end-user-doc --> * - * @return the meta object for class '<em>Single Reference Description</em> - * '. - * @see org.eclipse.sirius.properties.SingleReferenceDescription + * @return the meta object for class '<em>Reference Description</em>'. + * @see org.eclipse.sirius.properties.ReferenceDescription * @generated */ - EClass getSingleReferenceDescription(); + EClass getReferenceDescription(); /** * Returns the meta object for the attribute ' - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getValueExpression + * {@link org.eclipse.sirius.properties.ReferenceDescription#isMultiple + * <em>Multiple</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Multiple</em>'. + * @see org.eclipse.sirius.properties.ReferenceDescription#isMultiple() + * @see #getReferenceDescription() + * @generated + */ + EAttribute getReferenceDescription_Multiple(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.sirius.properties.ReferenceDescription#getValueExpression * <em>Value Expression</em>}'. <!-- begin-user-doc --> <!-- end-user-doc * --> * * @return the meta object for the attribute '<em>Value Expression</em>'. - * @see org.eclipse.sirius.properties.SingleReferenceDescription#getValueExpression() - * @see #getSingleReferenceDescription() + * @see org.eclipse.sirius.properties.ReferenceDescription#getValueExpression() + * @see #getReferenceDescription() * @generated */ - EAttribute getSingleReferenceDescription_ValueExpression(); + EAttribute getReferenceDescription_ValueExpression(); /** * Returns the meta object for the attribute ' - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getDisplayExpression + * {@link org.eclipse.sirius.properties.ReferenceDescription#getDisplayExpression * <em>Display Expression</em>}'. <!-- begin-user-doc --> <!-- end-user-doc * --> * * @return the meta object for the attribute '<em>Display Expression</em>'. - * @see org.eclipse.sirius.properties.SingleReferenceDescription#getDisplayExpression() - * @see #getSingleReferenceDescription() + * @see org.eclipse.sirius.properties.ReferenceDescription#getDisplayExpression() + * @see #getReferenceDescription() * @generated */ - EAttribute getSingleReferenceDescription_DisplayExpression(); + EAttribute getReferenceDescription_DisplayExpression(); /** * Returns the meta object for the containment reference ' - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getCreateOperation - * <em>Create Operation</em>}'. <!-- begin-user-doc --> <!-- end-user-doc + * {@link org.eclipse.sirius.properties.ReferenceDescription#getOnClickOperation + * <em>On Click Operation</em>}'. <!-- begin-user-doc --> <!-- end-user-doc * --> * * @return the meta object for the containment reference ' - * <em>Create Operation</em>'. - * @see org.eclipse.sirius.properties.SingleReferenceDescription#getCreateOperation() - * @see #getSingleReferenceDescription() + * <em>On Click Operation</em>'. + * @see org.eclipse.sirius.properties.ReferenceDescription#getOnClickOperation() + * @see #getReferenceDescription() * @generated */ - EReference getSingleReferenceDescription_CreateOperation(); + EReference getReferenceDescription_OnClickOperation(); /** - * Returns the meta object for the containment reference ' - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getSearchOperation - * <em>Search Operation</em>}'. <!-- begin-user-doc --> <!-- end-user-doc - * --> + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.sirius.properties.ReferenceDescription#getActions + * <em>Actions</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> * - * @return the meta object for the containment reference ' - * <em>Search Operation</em>'. - * @see org.eclipse.sirius.properties.SingleReferenceDescription#getSearchOperation() - * @see #getSingleReferenceDescription() + * @return the meta object for the containment reference list ' + * <em>Actions</em>'. + * @see org.eclipse.sirius.properties.ReferenceDescription#getActions() + * @see #getReferenceDescription() * @generated */ - EReference getSingleReferenceDescription_SearchOperation(); + EReference getReferenceDescription_Actions(); /** * Returns the meta object for the containment reference ' - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getUnsetOperation - * <em>Unset Operation</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * {@link org.eclipse.sirius.properties.ReferenceDescription#getStyle + * <em>Style</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> * - * @return the meta object for the containment reference ' - * <em>Unset Operation</em>'. - * @see org.eclipse.sirius.properties.SingleReferenceDescription#getUnsetOperation() - * @see #getSingleReferenceDescription() + * @return the meta object for the containment reference '<em>Style</em>'. + * @see org.eclipse.sirius.properties.ReferenceDescription#getStyle() + * @see #getReferenceDescription() * @generated */ - EReference getSingleReferenceDescription_UnsetOperation(); + EReference getReferenceDescription_Style(); /** - * Returns the meta object for the containment reference ' - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getOnClickOperation - * <em>On Click Operation</em>}'. <!-- begin-user-doc --> <!-- end-user-doc + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.sirius.properties.ReferenceDescription#getConditionalStyles + * <em>Conditional Styles</em>}'. <!-- begin-user-doc --> <!-- end-user-doc * --> * - * @return the meta object for the containment reference ' - * <em>On Click Operation</em>'. - * @see org.eclipse.sirius.properties.SingleReferenceDescription#getOnClickOperation() - * @see #getSingleReferenceDescription() + * @return the meta object for the containment reference list ' + * <em>Conditional Styles</em>'. + * @see org.eclipse.sirius.properties.ReferenceDescription#getConditionalStyles() + * @see #getReferenceDescription() * @generated */ - EReference getSingleReferenceDescription_OnClickOperation(); + EReference getReferenceDescription_ConditionalStyles(); /** * Returns the meta object for class ' @@ -3962,126 +4003,6 @@ public interface PropertiesPackage extends EPackage { /** * Returns the meta object for class ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription - * <em>Multiple References Description</em>}'. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @return the meta object for class ' - * <em>Multiple References Description</em>'. - * @see org.eclipse.sirius.properties.MultipleReferencesDescription - * @generated - */ - EClass getMultipleReferencesDescription(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getValueExpression - * <em>Value Expression</em>}'. <!-- begin-user-doc --> <!-- end-user-doc - * --> - * - * @return the meta object for the attribute '<em>Value Expression</em>'. - * @see org.eclipse.sirius.properties.MultipleReferencesDescription#getValueExpression() - * @see #getMultipleReferencesDescription() - * @generated - */ - EAttribute getMultipleReferencesDescription_ValueExpression(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getDisplayExpression - * <em>Display Expression</em>}'. <!-- begin-user-doc --> <!-- end-user-doc - * --> - * - * @return the meta object for the attribute '<em>Display Expression</em>'. - * @see org.eclipse.sirius.properties.MultipleReferencesDescription#getDisplayExpression() - * @see #getMultipleReferencesDescription() - * @generated - */ - EAttribute getMultipleReferencesDescription_DisplayExpression(); - - /** - * Returns the meta object for the containment reference ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getCreateOperation - * <em>Create Operation</em>}'. <!-- begin-user-doc --> <!-- end-user-doc - * --> - * - * @return the meta object for the containment reference ' - * <em>Create Operation</em>'. - * @see org.eclipse.sirius.properties.MultipleReferencesDescription#getCreateOperation() - * @see #getMultipleReferencesDescription() - * @generated - */ - EReference getMultipleReferencesDescription_CreateOperation(); - - /** - * Returns the meta object for the containment reference ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getSearchOperation - * <em>Search Operation</em>}'. <!-- begin-user-doc --> <!-- end-user-doc - * --> - * - * @return the meta object for the containment reference ' - * <em>Search Operation</em>'. - * @see org.eclipse.sirius.properties.MultipleReferencesDescription#getSearchOperation() - * @see #getMultipleReferencesDescription() - * @generated - */ - EReference getMultipleReferencesDescription_SearchOperation(); - - /** - * Returns the meta object for the containment reference ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getUnsetOperation - * <em>Unset Operation</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the containment reference ' - * <em>Unset Operation</em>'. - * @see org.eclipse.sirius.properties.MultipleReferencesDescription#getUnsetOperation() - * @see #getMultipleReferencesDescription() - * @generated - */ - EReference getMultipleReferencesDescription_UnsetOperation(); - - /** - * Returns the meta object for the containment reference ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getOnClickOperation - * <em>On Click Operation</em>}'. <!-- begin-user-doc --> <!-- end-user-doc - * --> - * - * @return the meta object for the containment reference ' - * <em>On Click Operation</em>'. - * @see org.eclipse.sirius.properties.MultipleReferencesDescription#getOnClickOperation() - * @see #getMultipleReferencesDescription() - * @generated - */ - EReference getMultipleReferencesDescription_OnClickOperation(); - - /** - * Returns the meta object for the containment reference ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getUpOperation - * <em>Up Operation</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the containment reference ' - * <em>Up Operation</em>'. - * @see org.eclipse.sirius.properties.MultipleReferencesDescription#getUpOperation() - * @see #getMultipleReferencesDescription() - * @generated - */ - EReference getMultipleReferencesDescription_UpOperation(); - - /** - * Returns the meta object for the containment reference ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription#getDownOperation - * <em>Down Operation</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @return the meta object for the containment reference ' - * <em>Down Operation</em>'. - * @see org.eclipse.sirius.properties.MultipleReferencesDescription#getDownOperation() - * @see #getMultipleReferencesDescription() - * @generated - */ - EReference getMultipleReferencesDescription_DownOperation(); - - /** - * Returns the meta object for class ' * {@link org.eclipse.sirius.properties.CustomDescription * <em>Custom Description</em>}'. <!-- begin-user-doc --> <!-- end-user-doc * --> @@ -4714,6 +4635,81 @@ public interface PropertiesPackage extends EPackage { EReference getCustomWidgetConditionalStyle_Style(); /** + * Returns the meta object for class ' + * {@link org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle + * <em>Reference Widget Conditional Style</em>}'. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for class ' + * <em>Reference Widget Conditional Style</em>'. + * @see org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle + * @generated + */ + EClass getReferenceWidgetConditionalStyle(); + + /** + * Returns the meta object for the containment reference ' + * {@link org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle#getStyle + * <em>Style</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the containment reference '<em>Style</em>'. + * @see org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle#getStyle() + * @see #getReferenceWidgetConditionalStyle() + * @generated + */ + EReference getReferenceWidgetConditionalStyle_Style(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.sirius.properties.WidgetAction <em>Widget Action</em>} + * '. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Widget Action</em>'. + * @see org.eclipse.sirius.properties.WidgetAction + * @generated + */ + EClass getWidgetAction(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.sirius.properties.WidgetAction#getLabelExpression + * <em>Label Expression</em>}'. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @return the meta object for the attribute '<em>Label Expression</em>'. + * @see org.eclipse.sirius.properties.WidgetAction#getLabelExpression() + * @see #getWidgetAction() + * @generated + */ + EAttribute getWidgetAction_LabelExpression(); + + /** + * Returns the meta object for the containment reference ' + * {@link org.eclipse.sirius.properties.WidgetAction#getInitialOperation + * <em>Initial Operation</em>}'. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @return the meta object for the containment reference ' + * <em>Initial Operation</em>'. + * @see org.eclipse.sirius.properties.WidgetAction#getInitialOperation() + * @see #getWidgetAction() + * @generated + */ + EReference getWidgetAction_InitialOperation(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.sirius.properties.ReferenceWidgetStyle + * <em>Reference Widget Style</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the meta object for class '<em>Reference Widget Style</em>'. + * @see org.eclipse.sirius.properties.ReferenceWidgetStyle + * @generated + */ + EClass getReferenceWidgetStyle(); + + /** * Returns the meta object for enum ' * {@link org.eclipse.sirius.properties.FILL_LAYOUT_ORIENTATION * <em>FILL LAYOUT ORIENTATION</em>}'. <!-- begin-user-doc --> <!-- @@ -5543,15 +5539,23 @@ public interface PropertiesPackage extends EPackage { /** * The meta object literal for the ' - * {@link org.eclipse.sirius.properties.impl.SingleReferenceDescriptionImpl - * <em>Single Reference Description</em>}' class. <!-- begin-user-doc - * --> <!-- end-user-doc --> + * {@link org.eclipse.sirius.properties.impl.ReferenceDescriptionImpl + * <em>Reference Description</em>}' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> * - * @see org.eclipse.sirius.properties.impl.SingleReferenceDescriptionImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getSingleReferenceDescription() + * @see org.eclipse.sirius.properties.impl.ReferenceDescriptionImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getReferenceDescription() * @generated */ - EClass SINGLE_REFERENCE_DESCRIPTION = PropertiesPackage.eINSTANCE.getSingleReferenceDescription(); + EClass REFERENCE_DESCRIPTION = PropertiesPackage.eINSTANCE.getReferenceDescription(); + + /** + * The meta object literal for the '<em><b>Multiple</b></em>' attribute + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute REFERENCE_DESCRIPTION__MULTIPLE = PropertiesPackage.eINSTANCE.getReferenceDescription_Multiple(); /** * The meta object literal for the '<em><b>Value Expression</b></em>' @@ -5559,7 +5563,7 @@ public interface PropertiesPackage extends EPackage { * * @generated */ - EAttribute SINGLE_REFERENCE_DESCRIPTION__VALUE_EXPRESSION = PropertiesPackage.eINSTANCE.getSingleReferenceDescription_ValueExpression(); + EAttribute REFERENCE_DESCRIPTION__VALUE_EXPRESSION = PropertiesPackage.eINSTANCE.getReferenceDescription_ValueExpression(); /** * The meta object literal for the '<em><b>Display Expression</b></em>' @@ -5567,43 +5571,41 @@ public interface PropertiesPackage extends EPackage { * * @generated */ - EAttribute SINGLE_REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION = PropertiesPackage.eINSTANCE.getSingleReferenceDescription_DisplayExpression(); + EAttribute REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION = PropertiesPackage.eINSTANCE.getReferenceDescription_DisplayExpression(); /** - * The meta object literal for the '<em><b>Create Operation</b></em>' + * The meta object literal for the '<em><b>On Click Operation</b></em>' * containment reference feature. <!-- begin-user-doc --> <!-- * end-user-doc --> * * @generated */ - EReference SINGLE_REFERENCE_DESCRIPTION__CREATE_OPERATION = PropertiesPackage.eINSTANCE.getSingleReferenceDescription_CreateOperation(); + EReference REFERENCE_DESCRIPTION__ON_CLICK_OPERATION = PropertiesPackage.eINSTANCE.getReferenceDescription_OnClickOperation(); /** - * The meta object literal for the '<em><b>Search Operation</b></em>' - * containment reference feature. <!-- begin-user-doc --> <!-- - * end-user-doc --> + * The meta object literal for the '<em><b>Actions</b></em>' containment + * reference list feature. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - EReference SINGLE_REFERENCE_DESCRIPTION__SEARCH_OPERATION = PropertiesPackage.eINSTANCE.getSingleReferenceDescription_SearchOperation(); + EReference REFERENCE_DESCRIPTION__ACTIONS = PropertiesPackage.eINSTANCE.getReferenceDescription_Actions(); /** - * The meta object literal for the '<em><b>Unset Operation</b></em>' - * containment reference feature. <!-- begin-user-doc --> <!-- - * end-user-doc --> + * The meta object literal for the '<em><b>Style</b></em>' containment + * reference feature. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - EReference SINGLE_REFERENCE_DESCRIPTION__UNSET_OPERATION = PropertiesPackage.eINSTANCE.getSingleReferenceDescription_UnsetOperation(); + EReference REFERENCE_DESCRIPTION__STYLE = PropertiesPackage.eINSTANCE.getReferenceDescription_Style(); /** - * The meta object literal for the '<em><b>On Click Operation</b></em>' - * containment reference feature. <!-- begin-user-doc --> <!-- + * The meta object literal for the '<em><b>Conditional Styles</b></em>' + * containment reference list feature. <!-- begin-user-doc --> <!-- * end-user-doc --> * * @generated */ - EReference SINGLE_REFERENCE_DESCRIPTION__ON_CLICK_OPERATION = PropertiesPackage.eINSTANCE.getSingleReferenceDescription_OnClickOperation(); + EReference REFERENCE_DESCRIPTION__CONDITIONAL_STYLES = PropertiesPackage.eINSTANCE.getReferenceDescription_ConditionalStyles(); /** * The meta object literal for the ' @@ -5628,88 +5630,6 @@ public interface PropertiesPackage extends EPackage { /** * The meta object literal for the ' - * {@link org.eclipse.sirius.properties.impl.MultipleReferencesDescriptionImpl - * <em>Multiple References Description</em>}' class. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see org.eclipse.sirius.properties.impl.MultipleReferencesDescriptionImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getMultipleReferencesDescription() - * @generated - */ - EClass MULTIPLE_REFERENCES_DESCRIPTION = PropertiesPackage.eINSTANCE.getMultipleReferencesDescription(); - - /** - * The meta object literal for the '<em><b>Value Expression</b></em>' - * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - EAttribute MULTIPLE_REFERENCES_DESCRIPTION__VALUE_EXPRESSION = PropertiesPackage.eINSTANCE.getMultipleReferencesDescription_ValueExpression(); - - /** - * The meta object literal for the '<em><b>Display Expression</b></em>' - * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - EAttribute MULTIPLE_REFERENCES_DESCRIPTION__DISPLAY_EXPRESSION = PropertiesPackage.eINSTANCE.getMultipleReferencesDescription_DisplayExpression(); - - /** - * The meta object literal for the '<em><b>Create Operation</b></em>' - * containment reference feature. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @generated - */ - EReference MULTIPLE_REFERENCES_DESCRIPTION__CREATE_OPERATION = PropertiesPackage.eINSTANCE.getMultipleReferencesDescription_CreateOperation(); - - /** - * The meta object literal for the '<em><b>Search Operation</b></em>' - * containment reference feature. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @generated - */ - EReference MULTIPLE_REFERENCES_DESCRIPTION__SEARCH_OPERATION = PropertiesPackage.eINSTANCE.getMultipleReferencesDescription_SearchOperation(); - - /** - * The meta object literal for the '<em><b>Unset Operation</b></em>' - * containment reference feature. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @generated - */ - EReference MULTIPLE_REFERENCES_DESCRIPTION__UNSET_OPERATION = PropertiesPackage.eINSTANCE.getMultipleReferencesDescription_UnsetOperation(); - - /** - * The meta object literal for the '<em><b>On Click Operation</b></em>' - * containment reference feature. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @generated - */ - EReference MULTIPLE_REFERENCES_DESCRIPTION__ON_CLICK_OPERATION = PropertiesPackage.eINSTANCE.getMultipleReferencesDescription_OnClickOperation(); - - /** - * The meta object literal for the '<em><b>Up Operation</b></em>' - * containment reference feature. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @generated - */ - EReference MULTIPLE_REFERENCES_DESCRIPTION__UP_OPERATION = PropertiesPackage.eINSTANCE.getMultipleReferencesDescription_UpOperation(); - - /** - * The meta object literal for the '<em><b>Down Operation</b></em>' - * containment reference feature. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @generated - */ - EReference MULTIPLE_REFERENCES_DESCRIPTION__DOWN_OPERATION = PropertiesPackage.eINSTANCE.getMultipleReferencesDescription_DownOperation(); - - /** - * The meta object literal for the ' * {@link org.eclipse.sirius.properties.impl.CustomDescriptionImpl * <em>Custom Description</em>}' class. <!-- begin-user-doc --> <!-- * end-user-doc --> @@ -6194,6 +6114,67 @@ public interface PropertiesPackage extends EPackage { /** * The meta object literal for the ' + * {@link org.eclipse.sirius.properties.impl.ReferenceWidgetConditionalStyleImpl + * <em>Reference Widget Conditional Style</em>}' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.ReferenceWidgetConditionalStyleImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getReferenceWidgetConditionalStyle() + * @generated + */ + EClass REFERENCE_WIDGET_CONDITIONAL_STYLE = PropertiesPackage.eINSTANCE.getReferenceWidgetConditionalStyle(); + + /** + * The meta object literal for the '<em><b>Style</b></em>' containment + * reference feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference REFERENCE_WIDGET_CONDITIONAL_STYLE__STYLE = PropertiesPackage.eINSTANCE.getReferenceWidgetConditionalStyle_Style(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.sirius.properties.impl.WidgetActionImpl + * <em>Widget Action</em>}' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.WidgetActionImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getWidgetAction() + * @generated + */ + EClass WIDGET_ACTION = PropertiesPackage.eINSTANCE.getWidgetAction(); + + /** + * The meta object literal for the '<em><b>Label Expression</b></em>' + * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute WIDGET_ACTION__LABEL_EXPRESSION = PropertiesPackage.eINSTANCE.getWidgetAction_LabelExpression(); + + /** + * The meta object literal for the '<em><b>Initial Operation</b></em>' + * containment reference feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EReference WIDGET_ACTION__INITIAL_OPERATION = PropertiesPackage.eINSTANCE.getWidgetAction_InitialOperation(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.sirius.properties.impl.ReferenceWidgetStyleImpl + * <em>Reference Widget Style</em>}' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.properties.impl.ReferenceWidgetStyleImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getReferenceWidgetStyle() + * @generated + */ + EClass REFERENCE_WIDGET_STYLE = PropertiesPackage.eINSTANCE.getReferenceWidgetStyle(); + + /** + * 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 --> diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ReferenceDescription.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ReferenceDescription.java new file mode 100644 index 0000000000..252b9f7625 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ReferenceDescription.java @@ -0,0 +1,233 @@ +/** + * 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.common.util.EList; +import org.eclipse.sirius.viewpoint.description.tool.InitialOperation; + +/** + * <!-- begin-user-doc --> A representation of the model object ' + * <em><b>Reference Description</b></em>'. <!-- end-user-doc --> + * + * <!-- begin-model-doc --> Represents a reference in the user interface. <!-- + * end-model-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.properties.ReferenceDescription#isMultiple + * <em>Multiple</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.ReferenceDescription#getValueExpression + * <em>Value Expression</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.ReferenceDescription#getDisplayExpression + * <em>Display Expression</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.ReferenceDescription#getOnClickOperation + * <em>On Click Operation</em>}</li> + * <li>{@link org.eclipse.sirius.properties.ReferenceDescription#getActions + * <em>Actions</em>}</li> + * <li>{@link org.eclipse.sirius.properties.ReferenceDescription#getStyle + * <em>Style</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.ReferenceDescription#getConditionalStyles + * <em>Conditional Styles</em>}</li> + * </ul> + * + * @see org.eclipse.sirius.properties.PropertiesPackage#getReferenceDescription() + * @model + * @generated + */ +public interface ReferenceDescription extends WidgetDescription { + /** + * Returns the value of the '<em><b>Multiple</b></em>' attribute. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>Multiple</em>' attribute isn't clear, there + * really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Multiple</em>' attribute. + * @see #setMultiple(boolean) + * @see org.eclipse.sirius.properties.PropertiesPackage#getReferenceDescription_Multiple() + * @model + * @generated + */ + boolean isMultiple(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.ReferenceDescription#isMultiple + * <em>Multiple</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @param value + * the new value of the '<em>Multiple</em>' attribute. + * @see #isMultiple() + * @generated + */ + void setMultiple(boolean value); + + /** + * Returns the value of the '<em><b>Value Expression</b></em>' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> + * The initial value. <!-- end-model-doc --> + * + * @return the value of the '<em>Value Expression</em>' attribute. + * @see #setValueExpression(String) + * @see org.eclipse.sirius.properties.PropertiesPackage#getReferenceDescription_ValueExpression() + * @model dataType= + * "org.eclipse.sirius.viewpoint.description.InterpretedExpression" + * @generated + */ + String getValueExpression(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.ReferenceDescription#getValueExpression + * <em>Value Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Value Expression</em>' attribute. + * @see #getValueExpression() + * @generated + */ + void setValueExpression(String value); + + /** + * Returns the value of the '<em><b>Display Expression</b></em>' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> + * Represents how to display the value. <!-- end-model-doc --> + * + * @return the value of the '<em>Display Expression</em>' attribute. + * @see #setDisplayExpression(String) + * @see org.eclipse.sirius.properties.PropertiesPackage#getReferenceDescription_DisplayExpression() + * @model dataType= + * "org.eclipse.sirius.viewpoint.description.InterpretedExpression" + * @generated + */ + String getDisplayExpression(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.ReferenceDescription#getDisplayExpression + * <em>Display Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Display Expression</em>' attribute. + * @see #getDisplayExpression() + * @generated + */ + void setDisplayExpression(String value); + + /** + * Returns the value of the '<em><b>On Click Operation</b></em>' containment + * reference. <!-- begin-user-doc --> <!-- end-user-doc --> <!-- + * begin-model-doc --> Defines the expected behavior when the user clicks on + * the hyperlink. <!-- end-model-doc --> + * + * @return the value of the '<em>On Click Operation</em>' containment + * reference. + * @see #setOnClickOperation(OperationDescription) + * @see org.eclipse.sirius.properties.PropertiesPackage#getReferenceDescription_OnClickOperation() + * @model containment="true" + * @generated + */ + InitialOperation getOnClickOperation(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.ReferenceDescription#getOnClickOperation + * <em>On Click Operation</em>}' containment reference. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>On Click Operation</em>' containment + * reference. + * @see #getOnClickOperation() + * @generated + */ + void setOnClickOperation(InitialOperation value); + + /** + * Returns the value of the '<em><b>Actions</b></em>' containment reference + * list. The list contents are of type + * {@link org.eclipse.sirius.properties.WidgetAction}. <!-- begin-user-doc + * --> + * <p> + * If the meaning of the '<em>Actions</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>Actions</em>' containment reference list. + * @see org.eclipse.sirius.properties.PropertiesPackage#getReferenceDescription_Actions() + * @model containment="true" + * @generated + */ + EList<WidgetAction> getActions(); + + /** + * Returns the value of the '<em><b>Style</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * 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>' containment reference. + * @see #setStyle(ReferenceWidgetStyle) + * @see org.eclipse.sirius.properties.PropertiesPackage#getReferenceDescription_Style() + * @model containment="true" + * @generated + */ + ReferenceWidgetStyle getStyle(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.ReferenceDescription#getStyle + * <em>Style</em>}' containment reference. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Style</em>' containment reference. + * @see #getStyle() + * @generated + */ + void setStyle(ReferenceWidgetStyle value); + + /** + * Returns the value of the '<em><b>Conditional Styles</b></em>' containment + * reference list. The list contents are of type + * {@link org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Conditional Styles</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>Conditional Styles</em>' containment + * reference list. + * @see org.eclipse.sirius.properties.PropertiesPackage#getReferenceDescription_ConditionalStyles() + * @model containment="true" + * @generated + */ + EList<ReferenceWidgetConditionalStyle> getConditionalStyles(); + +} // ReferenceDescription diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ReferenceWidgetConditionalStyle.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ReferenceWidgetConditionalStyle.java new file mode 100644 index 0000000000..755337ad89 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ReferenceWidgetConditionalStyle.java @@ -0,0 +1,62 @@ +/** + * 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>Reference Widget Conditional Style</b></em>'. <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li> + * {@link org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle#getStyle + * <em>Style</em>}</li> + * </ul> + * + * @see org.eclipse.sirius.properties.PropertiesPackage#getReferenceWidgetConditionalStyle() + * @model + * @generated + */ +public interface ReferenceWidgetConditionalStyle extends WidgetConditionalStyle { + /** + * Returns the value of the '<em><b>Style</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * 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>' containment reference. + * @see #setStyle(ReferenceWidgetStyle) + * @see org.eclipse.sirius.properties.PropertiesPackage#getReferenceWidgetConditionalStyle_Style() + * @model containment="true" + * @generated + */ + ReferenceWidgetStyle getStyle(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle#getStyle + * <em>Style</em>}' containment reference. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Style</em>' containment reference. + * @see #getStyle() + * @generated + */ + void setStyle(ReferenceWidgetStyle value); + +} // ReferenceWidgetConditionalStyle diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ReferenceWidgetStyle.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ReferenceWidgetStyle.java new file mode 100644 index 0000000000..852648a7e7 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ReferenceWidgetStyle.java @@ -0,0 +1,24 @@ +/** + * 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>Reference Widget Style</b></em>'. <!-- end-user-doc --> + * + * + * @see org.eclipse.sirius.properties.PropertiesPackage#getReferenceWidgetStyle() + * @model + * @generated + */ +public interface ReferenceWidgetStyle extends WidgetStyle { +} // ReferenceWidgetStyle diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/SingleReferenceDescription.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/SingleReferenceDescription.java deleted file mode 100644 index 11ef8af305..0000000000 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/SingleReferenceDescription.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * 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>Single Reference Description</b></em>'. <!-- end-user-doc --> - * - * <!-- begin-model-doc --> Represents a single reference in the user interface. - * <!-- end-model-doc --> - * - * <p> - * The following features are supported: - * </p> - * <ul> - * <li> - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getValueExpression - * <em>Value Expression</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getDisplayExpression - * <em>Display Expression</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getCreateOperation - * <em>Create Operation</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getSearchOperation - * <em>Search Operation</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getUnsetOperation - * <em>Unset Operation</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getOnClickOperation - * <em>On Click Operation</em>}</li> - * </ul> - * - * @see org.eclipse.sirius.properties.PropertiesPackage#getSingleReferenceDescription() - * @model - * @generated - */ -public interface SingleReferenceDescription extends WidgetDescription { - /** - * Returns the value of the '<em><b>Value Expression</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> - * The initial value. <!-- end-model-doc --> - * - * @return the value of the '<em>Value Expression</em>' attribute. - * @see #setValueExpression(String) - * @see org.eclipse.sirius.properties.PropertiesPackage#getSingleReferenceDescription_ValueExpression() - * @model dataType= - * "org.eclipse.sirius.viewpoint.description.InterpretedExpression" - * @generated - */ - String getValueExpression(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getValueExpression - * <em>Value Expression</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @param value - * the new value of the '<em>Value Expression</em>' attribute. - * @see #getValueExpression() - * @generated - */ - void setValueExpression(String value); - - /** - * Returns the value of the '<em><b>Display Expression</b></em>' attribute. - * <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> - * Represents how to display the value. <!-- end-model-doc --> - * - * @return the value of the '<em>Display Expression</em>' attribute. - * @see #setDisplayExpression(String) - * @see org.eclipse.sirius.properties.PropertiesPackage#getSingleReferenceDescription_DisplayExpression() - * @model dataType= - * "org.eclipse.sirius.viewpoint.description.InterpretedExpression" - * @generated - */ - String getDisplayExpression(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getDisplayExpression - * <em>Display Expression</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @param value - * the new value of the '<em>Display Expression</em>' attribute. - * @see #getDisplayExpression() - * @generated - */ - void setDisplayExpression(String value); - - /** - * Returns the value of the '<em><b>Create Operation</b></em>' containment - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> <!-- - * begin-model-doc --> Defines the expected behavior when the user clicks on - * the create button. <!-- end-model-doc --> - * - * @return the value of the '<em>Create Operation</em>' containment - * reference. - * @see #setCreateOperation(OperationDescription) - * @see org.eclipse.sirius.properties.PropertiesPackage#getSingleReferenceDescription_CreateOperation() - * @model containment="true" - * @generated - */ - OperationDescription getCreateOperation(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getCreateOperation - * <em>Create Operation</em>}' containment reference. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Create Operation</em>' containment - * reference. - * @see #getCreateOperation() - * @generated - */ - void setCreateOperation(OperationDescription value); - - /** - * Returns the value of the '<em><b>Search Operation</b></em>' containment - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> <!-- - * begin-model-doc --> Defines the expected behavior when the user clicks on - * the search button. <!-- end-model-doc --> - * - * @return the value of the '<em>Search Operation</em>' containment - * reference. - * @see #setSearchOperation(OperationDescription) - * @see org.eclipse.sirius.properties.PropertiesPackage#getSingleReferenceDescription_SearchOperation() - * @model containment="true" - * @generated - */ - OperationDescription getSearchOperation(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getSearchOperation - * <em>Search Operation</em>}' containment reference. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Search Operation</em>' containment - * reference. - * @see #getSearchOperation() - * @generated - */ - void setSearchOperation(OperationDescription value); - - /** - * Returns the value of the '<em><b>Unset Operation</b></em>' containment - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> <!-- - * begin-model-doc --> Defines the expected behavior when the user clicks on - * the unset button. <!-- end-model-doc --> - * - * @return the value of the '<em>Unset Operation</em>' containment - * reference. - * @see #setUnsetOperation(OperationDescription) - * @see org.eclipse.sirius.properties.PropertiesPackage#getSingleReferenceDescription_UnsetOperation() - * @model containment="true" - * @generated - */ - OperationDescription getUnsetOperation(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getUnsetOperation - * <em>Unset Operation</em>}' containment reference. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>Unset Operation</em>' containment - * reference. - * @see #getUnsetOperation() - * @generated - */ - void setUnsetOperation(OperationDescription value); - - /** - * Returns the value of the '<em><b>On Click Operation</b></em>' containment - * reference. <!-- begin-user-doc --> <!-- end-user-doc --> <!-- - * begin-model-doc --> Defines the expected behavior when the user clicks on - * the hyperlink. <!-- end-model-doc --> - * - * @return the value of the '<em>On Click Operation</em>' containment - * reference. - * @see #setOnClickOperation(OperationDescription) - * @see org.eclipse.sirius.properties.PropertiesPackage#getSingleReferenceDescription_OnClickOperation() - * @model containment="true" - * @generated - */ - OperationDescription getOnClickOperation(); - - /** - * Sets the value of the ' - * {@link org.eclipse.sirius.properties.SingleReferenceDescription#getOnClickOperation - * <em>On Click Operation</em>}' containment reference. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @param value - * the new value of the '<em>On Click Operation</em>' containment - * reference. - * @see #getOnClickOperation() - * @generated - */ - void setOnClickOperation(OperationDescription value); - -} // SingleReferenceDescription diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/WidgetAction.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/WidgetAction.java new file mode 100644 index 0000000000..bb2895e69d --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/WidgetAction.java @@ -0,0 +1,96 @@ +/** + * 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; +import org.eclipse.sirius.viewpoint.description.tool.InitialOperation; + +/** + * <!-- begin-user-doc --> A representation of the model object ' + * <em><b>Widget Action</b></em>'. <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.properties.WidgetAction#getLabelExpression + * <em>Label Expression</em>}</li> + * <li>{@link org.eclipse.sirius.properties.WidgetAction#getInitialOperation + * <em>Initial Operation</em>}</li> + * </ul> + * + * @see org.eclipse.sirius.properties.PropertiesPackage#getWidgetAction() + * @model + * @generated + */ +public interface WidgetAction extends EObject { + /** + * Returns the value of the '<em><b>Label Expression</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Label Expression</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Label Expression</em>' attribute. + * @see #setLabelExpression(String) + * @see org.eclipse.sirius.properties.PropertiesPackage#getWidgetAction_LabelExpression() + * @model dataType= + * "org.eclipse.sirius.viewpoint.description.InterpretedExpression" + * @generated + */ + String getLabelExpression(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.WidgetAction#getLabelExpression + * <em>Label Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Label Expression</em>' attribute. + * @see #getLabelExpression() + * @generated + */ + void setLabelExpression(String value); + + /** + * Returns the value of the '<em><b>Initial Operation</b></em>' containment + * reference. <!-- begin-user-doc --> <!-- end-user-doc --> <!-- + * begin-model-doc --> Defines the behavior executed when the end-user + * updates the value of the radio. <!-- end-model-doc --> + * + * @return the value of the '<em>Initial Operation</em>' containment + * reference. + * @see #setInitialOperation(InitialOperation) + * @see org.eclipse.sirius.properties.PropertiesPackage#getWidgetAction_InitialOperation() + * @model containment="true" required="true" + * @generated + */ + InitialOperation getInitialOperation(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.properties.WidgetAction#getInitialOperation + * <em>Initial Operation</em>}' containment reference. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Initial Operation</em>' containment + * reference. + * @see #getInitialOperation() + * @generated + */ + void setInitialOperation(InitialOperation value); + +} // WidgetAction diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/MultipleReferencesDescriptionImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/MultipleReferencesDescriptionImpl.java deleted file mode 100644 index 836eb2244b..0000000000 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/MultipleReferencesDescriptionImpl.java +++ /dev/null @@ -1,733 +0,0 @@ -/** - * 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.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.sirius.properties.MultipleReferencesDescription; -import org.eclipse.sirius.properties.OperationDescription; -import org.eclipse.sirius.properties.PropertiesPackage; - -/** - * <!-- begin-user-doc --> An implementation of the model object ' - * <em><b>Multiple References Description</b></em>'. <!-- end-user-doc --> - * <p> - * The following features are implemented: - * </p> - * <ul> - * <li> - * {@link org.eclipse.sirius.properties.impl.MultipleReferencesDescriptionImpl#getValueExpression - * <em>Value Expression</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.impl.MultipleReferencesDescriptionImpl#getDisplayExpression - * <em>Display Expression</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.impl.MultipleReferencesDescriptionImpl#getCreateOperation - * <em>Create Operation</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.impl.MultipleReferencesDescriptionImpl#getSearchOperation - * <em>Search Operation</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.impl.MultipleReferencesDescriptionImpl#getUnsetOperation - * <em>Unset Operation</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.impl.MultipleReferencesDescriptionImpl#getOnClickOperation - * <em>On Click Operation</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.impl.MultipleReferencesDescriptionImpl#getUpOperation - * <em>Up Operation</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.impl.MultipleReferencesDescriptionImpl#getDownOperation - * <em>Down Operation</em>}</li> - * </ul> - * - * @generated - */ -public class MultipleReferencesDescriptionImpl extends WidgetDescriptionImpl implements MultipleReferencesDescription { - /** - * The default value of the '{@link #getValueExpression() - * <em>Value Expression</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @see #getValueExpression() - * @generated - * @ordered - */ - protected static final String VALUE_EXPRESSION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getValueExpression() - * <em>Value Expression</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @see #getValueExpression() - * @generated - * @ordered - */ - protected String valueExpression = MultipleReferencesDescriptionImpl.VALUE_EXPRESSION_EDEFAULT; - - /** - * The default value of the '{@link #getDisplayExpression() - * <em>Display Expression</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @see #getDisplayExpression() - * @generated - * @ordered - */ - protected static final String DISPLAY_EXPRESSION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getDisplayExpression() - * <em>Display Expression</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @see #getDisplayExpression() - * @generated - * @ordered - */ - protected String displayExpression = MultipleReferencesDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT; - - /** - * The cached value of the '{@link #getCreateOperation() - * <em>Create Operation</em>}' containment reference. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #getCreateOperation() - * @generated - * @ordered - */ - protected OperationDescription createOperation; - - /** - * The cached value of the '{@link #getSearchOperation() - * <em>Search Operation</em>}' containment reference. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #getSearchOperation() - * @generated - * @ordered - */ - protected OperationDescription searchOperation; - - /** - * The cached value of the '{@link #getUnsetOperation() - * <em>Unset Operation</em>}' containment reference. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see #getUnsetOperation() - * @generated - * @ordered - */ - protected OperationDescription unsetOperation; - - /** - * The cached value of the '{@link #getOnClickOperation() - * <em>On Click Operation</em>}' containment reference. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #getOnClickOperation() - * @generated - * @ordered - */ - protected OperationDescription onClickOperation; - - /** - * The cached value of the '{@link #getUpOperation() <em>Up Operation</em>}' - * containment reference. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @see #getUpOperation() - * @generated - * @ordered - */ - protected OperationDescription upOperation; - - /** - * The cached value of the '{@link #getDownOperation() - * <em>Down Operation</em>}' containment reference. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see #getDownOperation() - * @generated - * @ordered - */ - protected OperationDescription downOperation; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected MultipleReferencesDescriptionImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return PropertiesPackage.Literals.MULTIPLE_REFERENCES_DESCRIPTION; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public String getValueExpression() { - return valueExpression; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setValueExpression(String newValueExpression) { - String oldValueExpression = valueExpression; - valueExpression = newValueExpression; - if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__VALUE_EXPRESSION, oldValueExpression, valueExpression)); - } - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public String getDisplayExpression() { - return displayExpression; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setDisplayExpression(String newDisplayExpression) { - String oldDisplayExpression = displayExpression; - displayExpression = newDisplayExpression; - if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DISPLAY_EXPRESSION, oldDisplayExpression, displayExpression)); - } - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public OperationDescription getCreateOperation() { - return createOperation; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetCreateOperation(OperationDescription newCreateOperation, NotificationChain msgs) { - OperationDescription oldCreateOperation = createOperation; - createOperation = newCreateOperation; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__CREATE_OPERATION, oldCreateOperation, newCreateOperation); - if (msgs == null) { - msgs = notification; - } else { - msgs.add(notification); - } - } - return msgs; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setCreateOperation(OperationDescription newCreateOperation) { - if (newCreateOperation != createOperation) { - NotificationChain msgs = null; - if (createOperation != null) { - msgs = ((InternalEObject) createOperation).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__CREATE_OPERATION, null, - msgs); - } - if (newCreateOperation != null) { - msgs = ((InternalEObject) newCreateOperation).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__CREATE_OPERATION, null, - msgs); - } - msgs = basicSetCreateOperation(newCreateOperation, msgs); - if (msgs != null) { - msgs.dispatch(); - } - } else if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__CREATE_OPERATION, newCreateOperation, newCreateOperation)); - } - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public OperationDescription getSearchOperation() { - return searchOperation; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetSearchOperation(OperationDescription newSearchOperation, NotificationChain msgs) { - OperationDescription oldSearchOperation = searchOperation; - searchOperation = newSearchOperation; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__SEARCH_OPERATION, oldSearchOperation, newSearchOperation); - if (msgs == null) { - msgs = notification; - } else { - msgs.add(notification); - } - } - return msgs; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setSearchOperation(OperationDescription newSearchOperation) { - if (newSearchOperation != searchOperation) { - NotificationChain msgs = null; - if (searchOperation != null) { - msgs = ((InternalEObject) searchOperation).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__SEARCH_OPERATION, null, - msgs); - } - if (newSearchOperation != null) { - msgs = ((InternalEObject) newSearchOperation).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__SEARCH_OPERATION, null, - msgs); - } - msgs = basicSetSearchOperation(newSearchOperation, msgs); - if (msgs != null) { - msgs.dispatch(); - } - } else if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__SEARCH_OPERATION, newSearchOperation, newSearchOperation)); - } - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public OperationDescription getUnsetOperation() { - return unsetOperation; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetUnsetOperation(OperationDescription newUnsetOperation, NotificationChain msgs) { - OperationDescription oldUnsetOperation = unsetOperation; - unsetOperation = newUnsetOperation; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UNSET_OPERATION, oldUnsetOperation, newUnsetOperation); - if (msgs == null) { - msgs = notification; - } else { - msgs.add(notification); - } - } - return msgs; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setUnsetOperation(OperationDescription newUnsetOperation) { - if (newUnsetOperation != unsetOperation) { - NotificationChain msgs = null; - if (unsetOperation != null) { - msgs = ((InternalEObject) unsetOperation).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UNSET_OPERATION, null, msgs); - } - if (newUnsetOperation != null) { - msgs = ((InternalEObject) newUnsetOperation).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UNSET_OPERATION, null, msgs); - } - msgs = basicSetUnsetOperation(newUnsetOperation, msgs); - if (msgs != null) { - msgs.dispatch(); - } - } else if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UNSET_OPERATION, newUnsetOperation, newUnsetOperation)); - } - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public OperationDescription getOnClickOperation() { - return onClickOperation; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetOnClickOperation(OperationDescription newOnClickOperation, NotificationChain msgs) { - OperationDescription oldOnClickOperation = onClickOperation; - onClickOperation = newOnClickOperation; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__ON_CLICK_OPERATION, oldOnClickOperation, - newOnClickOperation); - if (msgs == null) { - msgs = notification; - } else { - msgs.add(notification); - } - } - return msgs; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setOnClickOperation(OperationDescription newOnClickOperation) { - if (newOnClickOperation != onClickOperation) { - NotificationChain msgs = null; - if (onClickOperation != null) { - msgs = ((InternalEObject) onClickOperation).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__ON_CLICK_OPERATION, null, - msgs); - } - if (newOnClickOperation != null) { - msgs = ((InternalEObject) newOnClickOperation).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__ON_CLICK_OPERATION, null, - msgs); - } - msgs = basicSetOnClickOperation(newOnClickOperation, msgs); - if (msgs != null) { - msgs.dispatch(); - } - } else if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__ON_CLICK_OPERATION, newOnClickOperation, newOnClickOperation)); - } - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public OperationDescription getUpOperation() { - return upOperation; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetUpOperation(OperationDescription newUpOperation, NotificationChain msgs) { - OperationDescription oldUpOperation = upOperation; - upOperation = newUpOperation; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UP_OPERATION, oldUpOperation, newUpOperation); - if (msgs == null) { - msgs = notification; - } else { - msgs.add(notification); - } - } - return msgs; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setUpOperation(OperationDescription newUpOperation) { - if (newUpOperation != upOperation) { - NotificationChain msgs = null; - if (upOperation != null) { - msgs = ((InternalEObject) upOperation).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UP_OPERATION, null, msgs); - } - if (newUpOperation != null) { - msgs = ((InternalEObject) newUpOperation).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UP_OPERATION, null, msgs); - } - msgs = basicSetUpOperation(newUpOperation, msgs); - if (msgs != null) { - msgs.dispatch(); - } - } else if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UP_OPERATION, newUpOperation, newUpOperation)); - } - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public OperationDescription getDownOperation() { - return downOperation; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetDownOperation(OperationDescription newDownOperation, NotificationChain msgs) { - OperationDescription oldDownOperation = downOperation; - downOperation = newDownOperation; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DOWN_OPERATION, oldDownOperation, newDownOperation); - if (msgs == null) { - msgs = notification; - } else { - msgs.add(notification); - } - } - return msgs; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setDownOperation(OperationDescription newDownOperation) { - if (newDownOperation != downOperation) { - NotificationChain msgs = null; - if (downOperation != null) { - msgs = ((InternalEObject) downOperation).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DOWN_OPERATION, null, msgs); - } - if (newDownOperation != null) { - msgs = ((InternalEObject) newDownOperation).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DOWN_OPERATION, null, msgs); - } - msgs = basicSetDownOperation(newDownOperation, msgs); - if (msgs != null) { - msgs.dispatch(); - } - } else if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DOWN_OPERATION, newDownOperation, newDownOperation)); - } - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__CREATE_OPERATION: - return basicSetCreateOperation(null, msgs); - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__SEARCH_OPERATION: - return basicSetSearchOperation(null, msgs); - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UNSET_OPERATION: - return basicSetUnsetOperation(null, msgs); - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__ON_CLICK_OPERATION: - return basicSetOnClickOperation(null, msgs); - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UP_OPERATION: - return basicSetUpOperation(null, msgs); - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DOWN_OPERATION: - return basicSetDownOperation(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__VALUE_EXPRESSION: - return getValueExpression(); - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DISPLAY_EXPRESSION: - return getDisplayExpression(); - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__CREATE_OPERATION: - return getCreateOperation(); - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__SEARCH_OPERATION: - return getSearchOperation(); - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UNSET_OPERATION: - return getUnsetOperation(); - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__ON_CLICK_OPERATION: - return getOnClickOperation(); - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UP_OPERATION: - return getUpOperation(); - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DOWN_OPERATION: - return getDownOperation(); - } - 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.MULTIPLE_REFERENCES_DESCRIPTION__VALUE_EXPRESSION: - setValueExpression((String) newValue); - return; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DISPLAY_EXPRESSION: - setDisplayExpression((String) newValue); - return; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__CREATE_OPERATION: - setCreateOperation((OperationDescription) newValue); - return; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__SEARCH_OPERATION: - setSearchOperation((OperationDescription) newValue); - return; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UNSET_OPERATION: - setUnsetOperation((OperationDescription) newValue); - return; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__ON_CLICK_OPERATION: - setOnClickOperation((OperationDescription) newValue); - return; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UP_OPERATION: - setUpOperation((OperationDescription) newValue); - return; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DOWN_OPERATION: - setDownOperation((OperationDescription) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__VALUE_EXPRESSION: - setValueExpression(MultipleReferencesDescriptionImpl.VALUE_EXPRESSION_EDEFAULT); - return; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DISPLAY_EXPRESSION: - setDisplayExpression(MultipleReferencesDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT); - return; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__CREATE_OPERATION: - setCreateOperation((OperationDescription) null); - return; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__SEARCH_OPERATION: - setSearchOperation((OperationDescription) null); - return; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UNSET_OPERATION: - setUnsetOperation((OperationDescription) null); - return; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__ON_CLICK_OPERATION: - setOnClickOperation((OperationDescription) null); - return; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UP_OPERATION: - setUpOperation((OperationDescription) null); - return; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DOWN_OPERATION: - setDownOperation((OperationDescription) null); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__VALUE_EXPRESSION: - return MultipleReferencesDescriptionImpl.VALUE_EXPRESSION_EDEFAULT == null ? valueExpression != null : !MultipleReferencesDescriptionImpl.VALUE_EXPRESSION_EDEFAULT.equals(valueExpression); - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DISPLAY_EXPRESSION: - return MultipleReferencesDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT == null ? displayExpression != null - : !MultipleReferencesDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT.equals(displayExpression); - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__CREATE_OPERATION: - return createOperation != null; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__SEARCH_OPERATION: - return searchOperation != null; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UNSET_OPERATION: - return unsetOperation != null; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__ON_CLICK_OPERATION: - return onClickOperation != null; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UP_OPERATION: - return upOperation != null; - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DOWN_OPERATION: - return downOperation != 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(" (valueExpression: "); - result.append(valueExpression); - result.append(", displayExpression: "); - result.append(displayExpression); - result.append(')'); - return result.toString(); - } - -} // MultipleReferencesDescriptionImpl 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 1875055a01..b27dacfd5f 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 @@ -39,7 +39,6 @@ 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.MultipleReferencesDescription; import org.eclipse.sirius.properties.OperationDescription; import org.eclipse.sirius.properties.PageDescription; import org.eclipse.sirius.properties.PageValidationSetDescription; @@ -49,15 +48,18 @@ import org.eclipse.sirius.properties.PropertyValidationRule; import org.eclipse.sirius.properties.RadioDescription; import org.eclipse.sirius.properties.RadioWidgetConditionalStyle; import org.eclipse.sirius.properties.RadioWidgetStyle; +import org.eclipse.sirius.properties.ReferenceDescription; +import org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle; +import org.eclipse.sirius.properties.ReferenceWidgetStyle; import org.eclipse.sirius.properties.SelectDescription; import org.eclipse.sirius.properties.SelectWidgetConditionalStyle; import org.eclipse.sirius.properties.SelectWidgetStyle; -import org.eclipse.sirius.properties.SingleReferenceDescription; import org.eclipse.sirius.properties.TextAreaDescription; import org.eclipse.sirius.properties.TextDescription; import org.eclipse.sirius.properties.TextWidgetConditionalStyle; import org.eclipse.sirius.properties.TextWidgetStyle; import org.eclipse.sirius.properties.ViewExtensionDescription; +import org.eclipse.sirius.properties.WidgetAction; import org.eclipse.sirius.properties.WidgetStyle; /** @@ -139,12 +141,10 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac return createTextAreaDescription(); case PropertiesPackage.RADIO_DESCRIPTION: return createRadioDescription(); - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION: - return createSingleReferenceDescription(); + case PropertiesPackage.REFERENCE_DESCRIPTION: + return createReferenceDescription(); case PropertiesPackage.OPERATION_DESCRIPTION: return createOperationDescription(); - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION: - return createMultipleReferencesDescription(); case PropertiesPackage.CUSTOM_DESCRIPTION: return createCustomDescription(); case PropertiesPackage.CUSTOM_EXPRESSION: @@ -167,6 +167,8 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac return createSelectWidgetStyle(); case PropertiesPackage.CUSTOM_WIDGET_STYLE: return createCustomWidgetStyle(); + case PropertiesPackage.REFERENCE_WIDGET_STYLE: + return createReferenceWidgetStyle(); case PropertiesPackage.TEXT_WIDGET_CONDITIONAL_STYLE: return createTextWidgetConditionalStyle(); case PropertiesPackage.LABEL_WIDGET_CONDITIONAL_STYLE: @@ -181,6 +183,10 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac return createSelectWidgetConditionalStyle(); case PropertiesPackage.CUSTOM_WIDGET_CONDITIONAL_STYLE: return createCustomWidgetConditionalStyle(); + case PropertiesPackage.REFERENCE_WIDGET_CONDITIONAL_STYLE: + return createReferenceWidgetConditionalStyle(); + case PropertiesPackage.WIDGET_ACTION: + return createWidgetAction(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -420,9 +426,9 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac * @generated */ @Override - public SingleReferenceDescription createSingleReferenceDescription() { - SingleReferenceDescriptionImpl singleReferenceDescription = new SingleReferenceDescriptionImpl(); - return singleReferenceDescription; + public ReferenceDescription createReferenceDescription() { + ReferenceDescriptionImpl referenceDescription = new ReferenceDescriptionImpl(); + return referenceDescription; } /** @@ -442,17 +448,6 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac * @generated */ @Override - public MultipleReferencesDescription createMultipleReferencesDescription() { - MultipleReferencesDescriptionImpl multipleReferencesDescription = new MultipleReferencesDescriptionImpl(); - return multipleReferencesDescription; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override public CustomDescription createCustomDescription() { CustomDescriptionImpl customDescription = new CustomDescriptionImpl(); return customDescription; @@ -650,6 +645,39 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac * * @generated */ + @Override + public ReferenceWidgetConditionalStyle createReferenceWidgetConditionalStyle() { + ReferenceWidgetConditionalStyleImpl referenceWidgetConditionalStyle = new ReferenceWidgetConditionalStyleImpl(); + return referenceWidgetConditionalStyle; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public WidgetAction createWidgetAction() { + WidgetActionImpl widgetAction = new WidgetActionImpl(); + return widgetAction; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ReferenceWidgetStyle createReferenceWidgetStyle() { + ReferenceWidgetStyleImpl referenceWidgetStyle = new ReferenceWidgetStyleImpl(); + return referenceWidgetStyle; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ public FILL_LAYOUT_ORIENTATION createFILL_LAYOUT_ORIENTATIONFromString(EDataType eDataType, String initialValue) { FILL_LAYOUT_ORIENTATION result = FILL_LAYOUT_ORIENTATION.get(initialValue); if (result == null) { 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 66aadc5227..10ab83f4ed 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 @@ -41,7 +41,6 @@ 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; import org.eclipse.sirius.properties.PageValidationSetDescription; @@ -51,15 +50,18 @@ import org.eclipse.sirius.properties.PropertyValidationRule; import org.eclipse.sirius.properties.RadioDescription; import org.eclipse.sirius.properties.RadioWidgetConditionalStyle; import org.eclipse.sirius.properties.RadioWidgetStyle; +import org.eclipse.sirius.properties.ReferenceDescription; +import org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle; +import org.eclipse.sirius.properties.ReferenceWidgetStyle; import org.eclipse.sirius.properties.SelectDescription; import org.eclipse.sirius.properties.SelectWidgetConditionalStyle; import org.eclipse.sirius.properties.SelectWidgetStyle; -import org.eclipse.sirius.properties.SingleReferenceDescription; import org.eclipse.sirius.properties.TextAreaDescription; import org.eclipse.sirius.properties.TextDescription; import org.eclipse.sirius.properties.TextWidgetConditionalStyle; import org.eclipse.sirius.properties.TextWidgetStyle; import org.eclipse.sirius.properties.ViewExtensionDescription; +import org.eclipse.sirius.properties.WidgetAction; import org.eclipse.sirius.properties.WidgetConditionalStyle; import org.eclipse.sirius.properties.WidgetDescription; import org.eclipse.sirius.properties.WidgetStyle; @@ -227,7 +229,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * * @generated */ - private EClass singleReferenceDescriptionEClass = null; + private EClass referenceDescriptionEClass = null; /** * <!-- begin-user-doc --> <!-- end-user-doc --> @@ -241,13 +243,6 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * * @generated */ - private EClass multipleReferencesDescriptionEClass = null; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ private EClass customDescriptionEClass = null; /** @@ -381,6 +376,27 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * * @generated */ + private EClass referenceWidgetConditionalStyleEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass widgetActionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass referenceWidgetStyleEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ private EEnum filL_LAYOUT_ORIENTATIONEEnum = null; /** @@ -1308,8 +1324,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EClass getSingleReferenceDescription() { - return singleReferenceDescriptionEClass; + public EClass getReferenceDescription() { + return referenceDescriptionEClass; } /** @@ -1318,8 +1334,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EAttribute getSingleReferenceDescription_ValueExpression() { - return (EAttribute) singleReferenceDescriptionEClass.getEStructuralFeatures().get(0); + public EAttribute getReferenceDescription_Multiple() { + return (EAttribute) referenceDescriptionEClass.getEStructuralFeatures().get(0); } /** @@ -1328,8 +1344,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EAttribute getSingleReferenceDescription_DisplayExpression() { - return (EAttribute) singleReferenceDescriptionEClass.getEStructuralFeatures().get(1); + public EAttribute getReferenceDescription_ValueExpression() { + return (EAttribute) referenceDescriptionEClass.getEStructuralFeatures().get(1); } /** @@ -1338,8 +1354,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EReference getSingleReferenceDescription_CreateOperation() { - return (EReference) singleReferenceDescriptionEClass.getEStructuralFeatures().get(2); + public EAttribute getReferenceDescription_DisplayExpression() { + return (EAttribute) referenceDescriptionEClass.getEStructuralFeatures().get(2); } /** @@ -1348,8 +1364,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EReference getSingleReferenceDescription_SearchOperation() { - return (EReference) singleReferenceDescriptionEClass.getEStructuralFeatures().get(3); + public EReference getReferenceDescription_OnClickOperation() { + return (EReference) referenceDescriptionEClass.getEStructuralFeatures().get(3); } /** @@ -1358,8 +1374,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EReference getSingleReferenceDescription_UnsetOperation() { - return (EReference) singleReferenceDescriptionEClass.getEStructuralFeatures().get(4); + public EReference getReferenceDescription_Actions() { + return (EReference) referenceDescriptionEClass.getEStructuralFeatures().get(4); } /** @@ -1368,8 +1384,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EReference getSingleReferenceDescription_OnClickOperation() { - return (EReference) singleReferenceDescriptionEClass.getEStructuralFeatures().get(5); + public EReference getReferenceDescription_Style() { + return (EReference) referenceDescriptionEClass.getEStructuralFeatures().get(5); } /** @@ -1378,18 +1394,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EClass getOperationDescription() { - return operationDescriptionEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public EReference getOperationDescription_InitialOperation() { - return (EReference) operationDescriptionEClass.getEStructuralFeatures().get(0); + public EReference getReferenceDescription_ConditionalStyles() { + return (EReference) referenceDescriptionEClass.getEStructuralFeatures().get(6); } /** @@ -1398,78 +1404,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EClass getMultipleReferencesDescription() { - return multipleReferencesDescriptionEClass; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public EAttribute getMultipleReferencesDescription_ValueExpression() { - return (EAttribute) multipleReferencesDescriptionEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public EAttribute getMultipleReferencesDescription_DisplayExpression() { - return (EAttribute) multipleReferencesDescriptionEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public EReference getMultipleReferencesDescription_CreateOperation() { - return (EReference) multipleReferencesDescriptionEClass.getEStructuralFeatures().get(2); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public EReference getMultipleReferencesDescription_SearchOperation() { - return (EReference) multipleReferencesDescriptionEClass.getEStructuralFeatures().get(3); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public EReference getMultipleReferencesDescription_UnsetOperation() { - return (EReference) multipleReferencesDescriptionEClass.getEStructuralFeatures().get(4); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public EReference getMultipleReferencesDescription_OnClickOperation() { - return (EReference) multipleReferencesDescriptionEClass.getEStructuralFeatures().get(5); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public EReference getMultipleReferencesDescription_UpOperation() { - return (EReference) multipleReferencesDescriptionEClass.getEStructuralFeatures().get(6); + public EClass getOperationDescription() { + return operationDescriptionEClass; } /** @@ -1478,8 +1414,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override - public EReference getMultipleReferencesDescription_DownOperation() { - return (EReference) multipleReferencesDescriptionEClass.getEStructuralFeatures().get(7); + public EReference getOperationDescription_InitialOperation() { + return (EReference) operationDescriptionEClass.getEStructuralFeatures().get(0); } /** @@ -1988,6 +1924,66 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * @generated */ @Override + public EClass getReferenceWidgetConditionalStyle() { + return referenceWidgetConditionalStyleEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getReferenceWidgetConditionalStyle_Style() { + return (EReference) referenceWidgetConditionalStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getWidgetAction() { + return widgetActionEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getWidgetAction_LabelExpression() { + return (EAttribute) widgetActionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getWidgetAction_InitialOperation() { + return (EReference) widgetActionEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getReferenceWidgetStyle() { + return referenceWidgetStyleEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public EEnum getFILL_LAYOUT_ORIENTATION() { return filL_LAYOUT_ORIENTATIONEEnum; } @@ -2129,27 +2125,18 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac createEAttribute(radioDescriptionEClass, PropertiesPackage.RADIO_DESCRIPTION__NUMBER_OF_COLUMNS); createEReference(radioDescriptionEClass, PropertiesPackage.RADIO_DESCRIPTION__CONDITIONAL_STYLES); - singleReferenceDescriptionEClass = createEClass(PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION); - createEAttribute(singleReferenceDescriptionEClass, PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__VALUE_EXPRESSION); - createEAttribute(singleReferenceDescriptionEClass, PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION); - createEReference(singleReferenceDescriptionEClass, PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__CREATE_OPERATION); - createEReference(singleReferenceDescriptionEClass, PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__SEARCH_OPERATION); - createEReference(singleReferenceDescriptionEClass, PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__UNSET_OPERATION); - createEReference(singleReferenceDescriptionEClass, PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__ON_CLICK_OPERATION); + referenceDescriptionEClass = createEClass(PropertiesPackage.REFERENCE_DESCRIPTION); + createEAttribute(referenceDescriptionEClass, PropertiesPackage.REFERENCE_DESCRIPTION__MULTIPLE); + createEAttribute(referenceDescriptionEClass, PropertiesPackage.REFERENCE_DESCRIPTION__VALUE_EXPRESSION); + createEAttribute(referenceDescriptionEClass, PropertiesPackage.REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION); + createEReference(referenceDescriptionEClass, PropertiesPackage.REFERENCE_DESCRIPTION__ON_CLICK_OPERATION); + createEReference(referenceDescriptionEClass, PropertiesPackage.REFERENCE_DESCRIPTION__ACTIONS); + createEReference(referenceDescriptionEClass, PropertiesPackage.REFERENCE_DESCRIPTION__STYLE); + createEReference(referenceDescriptionEClass, PropertiesPackage.REFERENCE_DESCRIPTION__CONDITIONAL_STYLES); operationDescriptionEClass = createEClass(PropertiesPackage.OPERATION_DESCRIPTION); createEReference(operationDescriptionEClass, PropertiesPackage.OPERATION_DESCRIPTION__INITIAL_OPERATION); - multipleReferencesDescriptionEClass = createEClass(PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION); - createEAttribute(multipleReferencesDescriptionEClass, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__VALUE_EXPRESSION); - createEAttribute(multipleReferencesDescriptionEClass, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DISPLAY_EXPRESSION); - createEReference(multipleReferencesDescriptionEClass, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__CREATE_OPERATION); - createEReference(multipleReferencesDescriptionEClass, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__SEARCH_OPERATION); - createEReference(multipleReferencesDescriptionEClass, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UNSET_OPERATION); - createEReference(multipleReferencesDescriptionEClass, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__ON_CLICK_OPERATION); - createEReference(multipleReferencesDescriptionEClass, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__UP_OPERATION); - createEReference(multipleReferencesDescriptionEClass, PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION__DOWN_OPERATION); - customDescriptionEClass = createEClass(PropertiesPackage.CUSTOM_DESCRIPTION); createEReference(customDescriptionEClass, PropertiesPackage.CUSTOM_DESCRIPTION__CUSTOM_EXPRESSIONS); createEReference(customDescriptionEClass, PropertiesPackage.CUSTOM_DESCRIPTION__CUSTOM_OPERATIONS); @@ -2195,6 +2182,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac customWidgetStyleEClass = createEClass(PropertiesPackage.CUSTOM_WIDGET_STYLE); + referenceWidgetStyleEClass = createEClass(PropertiesPackage.REFERENCE_WIDGET_STYLE); + widgetConditionalStyleEClass = createEClass(PropertiesPackage.WIDGET_CONDITIONAL_STYLE); createEAttribute(widgetConditionalStyleEClass, PropertiesPackage.WIDGET_CONDITIONAL_STYLE__PRECONDITION_EXPRESSION); @@ -2219,6 +2208,13 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac customWidgetConditionalStyleEClass = createEClass(PropertiesPackage.CUSTOM_WIDGET_CONDITIONAL_STYLE); createEReference(customWidgetConditionalStyleEClass, PropertiesPackage.CUSTOM_WIDGET_CONDITIONAL_STYLE__STYLE); + referenceWidgetConditionalStyleEClass = createEClass(PropertiesPackage.REFERENCE_WIDGET_CONDITIONAL_STYLE); + createEReference(referenceWidgetConditionalStyleEClass, PropertiesPackage.REFERENCE_WIDGET_CONDITIONAL_STYLE__STYLE); + + widgetActionEClass = createEClass(PropertiesPackage.WIDGET_ACTION); + createEAttribute(widgetActionEClass, PropertiesPackage.WIDGET_ACTION__LABEL_EXPRESSION); + createEReference(widgetActionEClass, PropertiesPackage.WIDGET_ACTION__INITIAL_OPERATION); + // Create enums filL_LAYOUT_ORIENTATIONEEnum = createEEnum(PropertiesPackage.FILL_LAYOUT_ORIENTATION); } @@ -2274,8 +2270,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac dynamicMappingForEClass.getESuperTypes().add(this.getControlDescription()); textAreaDescriptionEClass.getESuperTypes().add(this.getTextDescription()); radioDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); - singleReferenceDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); - multipleReferencesDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); + referenceDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); customDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); textWidgetStyleEClass.getESuperTypes().add(this.getWidgetStyle()); labelWidgetStyleEClass.getESuperTypes().add(this.getWidgetStyle()); @@ -2284,6 +2279,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac buttonWidgetStyleEClass.getESuperTypes().add(this.getWidgetStyle()); selectWidgetStyleEClass.getESuperTypes().add(this.getWidgetStyle()); customWidgetStyleEClass.getESuperTypes().add(this.getWidgetStyle()); + referenceWidgetStyleEClass.getESuperTypes().add(this.getWidgetStyle()); textWidgetConditionalStyleEClass.getESuperTypes().add(this.getWidgetConditionalStyle()); labelWidgetConditionalStyleEClass.getESuperTypes().add(this.getWidgetConditionalStyle()); checkboxWidgetConditionalStyleEClass.getESuperTypes().add(this.getWidgetConditionalStyle()); @@ -2291,6 +2287,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac buttonWidgetConditionalStyleEClass.getESuperTypes().add(this.getWidgetConditionalStyle()); selectWidgetConditionalStyleEClass.getESuperTypes().add(this.getWidgetConditionalStyle()); customWidgetConditionalStyleEClass.getESuperTypes().add(this.getWidgetConditionalStyle()); + referenceWidgetConditionalStyleEClass.getESuperTypes().add(this.getWidgetConditionalStyle()); // Initialize classes and features; add operations and parameters initEClass(viewExtensionDescriptionEClass, ViewExtensionDescription.class, "ViewExtensionDescription", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, @@ -2509,24 +2506,25 @@ 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); - initEClass(singleReferenceDescriptionEClass, SingleReferenceDescription.class, "SingleReferenceDescription", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, - EPackageImpl.IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getSingleReferenceDescription_ValueExpression(), theDescriptionPackage.getInterpretedExpression(), "valueExpression", null, 0, 1, SingleReferenceDescription.class, + initEClass(referenceDescriptionEClass, ReferenceDescription.class, "ReferenceDescription", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getReferenceDescription_Multiple(), ecorePackage.getEBoolean(), "multiple", null, 0, 1, ReferenceDescription.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(getReferenceDescription_ValueExpression(), theDescriptionPackage.getInterpretedExpression(), "valueExpression", null, 0, 1, ReferenceDescription.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(getSingleReferenceDescription_DisplayExpression(), theDescriptionPackage.getInterpretedExpression(), "displayExpression", null, 0, 1, SingleReferenceDescription.class, + initEAttribute(getReferenceDescription_DisplayExpression(), theDescriptionPackage.getInterpretedExpression(), "displayExpression", null, 0, 1, ReferenceDescription.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(getSingleReferenceDescription_CreateOperation(), this.getOperationDescription(), null, "createOperation", null, 0, 1, SingleReferenceDescription.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(getSingleReferenceDescription_SearchOperation(), this.getOperationDescription(), null, "searchOperation", null, 0, 1, SingleReferenceDescription.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(getSingleReferenceDescription_UnsetOperation(), this.getOperationDescription(), null, "unsetOperation", null, 0, 1, SingleReferenceDescription.class, !EPackageImpl.IS_TRANSIENT, + initEReference(getReferenceDescription_OnClickOperation(), theToolPackage.getInitialOperation(), null, "onClickOperation", null, 0, 1, ReferenceDescription.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(getSingleReferenceDescription_OnClickOperation(), this.getOperationDescription(), null, "onClickOperation", null, 0, 1, SingleReferenceDescription.class, + initEReference(getReferenceDescription_Actions(), this.getWidgetAction(), null, "actions", null, 0, -1, ReferenceDescription.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(getReferenceDescription_Style(), this.getReferenceWidgetStyle(), null, "style", null, 0, 1, ReferenceDescription.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(getReferenceDescription_ConditionalStyles(), this.getReferenceWidgetConditionalStyle(), null, "conditionalStyles", null, 0, -1, ReferenceDescription.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); @@ -2535,33 +2533,6 @@ 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); - initEClass(multipleReferencesDescriptionEClass, MultipleReferencesDescription.class, "MultipleReferencesDescription", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, - EPackageImpl.IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getMultipleReferencesDescription_ValueExpression(), theDescriptionPackage.getInterpretedExpression(), "valueExpression", null, 0, 1, MultipleReferencesDescription.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(getMultipleReferencesDescription_DisplayExpression(), theDescriptionPackage.getInterpretedExpression(), "displayExpression", null, 0, 1, MultipleReferencesDescription.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(getMultipleReferencesDescription_CreateOperation(), this.getOperationDescription(), null, "createOperation", null, 0, 1, MultipleReferencesDescription.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(getMultipleReferencesDescription_SearchOperation(), this.getOperationDescription(), null, "searchOperation", null, 0, 1, MultipleReferencesDescription.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(getMultipleReferencesDescription_UnsetOperation(), this.getOperationDescription(), null, "unsetOperation", null, 0, 1, MultipleReferencesDescription.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(getMultipleReferencesDescription_OnClickOperation(), this.getOperationDescription(), null, "onClickOperation", null, 0, 1, MultipleReferencesDescription.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(getMultipleReferencesDescription_UpOperation(), this.getOperationDescription(), null, "upOperation", null, 0, 1, MultipleReferencesDescription.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(getMultipleReferencesDescription_DownOperation(), this.getOperationDescription(), null, "downOperation", null, 0, 1, MultipleReferencesDescription.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(customDescriptionEClass, CustomDescription.class, "CustomDescription", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); initEReference(getCustomDescription_CustomExpressions(), this.getCustomExpression(), null, "customExpressions", null, 0, -1, CustomDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, @@ -2641,6 +2612,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac initEClass(customWidgetStyleEClass, CustomWidgetStyle.class, "CustomWidgetStyle", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); + initEClass(referenceWidgetStyleEClass, ReferenceWidgetStyle.class, "ReferenceWidgetStyle", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); + initEClass(widgetConditionalStyleEClass, WidgetConditionalStyle.class, "WidgetConditionalStyle", EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); initEAttribute(getWidgetConditionalStyle_PreconditionExpression(), theDescriptionPackage.getInterpretedExpression(), "preconditionExpression", null, 0, 1, WidgetConditionalStyle.class, @@ -2689,6 +2662,19 @@ 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); + initEClass(referenceWidgetConditionalStyleEClass, ReferenceWidgetConditionalStyle.class, "ReferenceWidgetConditionalStyle", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, + EPackageImpl.IS_GENERATED_INSTANCE_CLASS); + initEReference(getReferenceWidgetConditionalStyle_Style(), this.getReferenceWidgetStyle(), null, "style", null, 0, 1, ReferenceWidgetConditionalStyle.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(widgetActionEClass, WidgetAction.class, "WidgetAction", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getWidgetAction_LabelExpression(), theDescriptionPackage.getInterpretedExpression(), "labelExpression", null, 0, 1, WidgetAction.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(getWidgetAction_InitialOperation(), theToolPackage.getInitialOperation(), null, "initialOperation", null, 1, 1, WidgetAction.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); + // 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); diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ReferenceDescriptionImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ReferenceDescriptionImpl.java new file mode 100644 index 0000000000..a6b3e4d6ba --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ReferenceDescriptionImpl.java @@ -0,0 +1,556 @@ +/** + * 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 java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.sirius.properties.PropertiesPackage; +import org.eclipse.sirius.properties.ReferenceDescription; +import org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle; +import org.eclipse.sirius.properties.ReferenceWidgetStyle; +import org.eclipse.sirius.properties.WidgetAction; +import org.eclipse.sirius.viewpoint.description.tool.InitialOperation; + +/** + * <!-- begin-user-doc --> An implementation of the model object ' + * <em><b>Reference Description</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li> + * {@link org.eclipse.sirius.properties.impl.ReferenceDescriptionImpl#isMultiple + * <em>Multiple</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.impl.ReferenceDescriptionImpl#getValueExpression + * <em>Value Expression</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.impl.ReferenceDescriptionImpl#getDisplayExpression + * <em>Display Expression</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.impl.ReferenceDescriptionImpl#getOnClickOperation + * <em>On Click Operation</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.impl.ReferenceDescriptionImpl#getActions + * <em>Actions</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.impl.ReferenceDescriptionImpl#getStyle + * <em>Style</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.impl.ReferenceDescriptionImpl#getConditionalStyles + * <em>Conditional Styles</em>}</li> + * </ul> + * + * @generated + */ +public class ReferenceDescriptionImpl extends WidgetDescriptionImpl implements ReferenceDescription { + /** + * The default value of the '{@link #isMultiple() <em>Multiple</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #isMultiple() + * @generated + * @ordered + */ + protected static final boolean MULTIPLE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isMultiple() <em>Multiple</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #isMultiple() + * @generated + * @ordered + */ + protected boolean multiple = ReferenceDescriptionImpl.MULTIPLE_EDEFAULT; + + /** + * The default value of the '{@link #getValueExpression() + * <em>Value Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getValueExpression() + * @generated + * @ordered + */ + protected static final String VALUE_EXPRESSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValueExpression() + * <em>Value Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getValueExpression() + * @generated + * @ordered + */ + protected String valueExpression = ReferenceDescriptionImpl.VALUE_EXPRESSION_EDEFAULT; + + /** + * The default value of the '{@link #getDisplayExpression() + * <em>Display Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getDisplayExpression() + * @generated + * @ordered + */ + protected static final String DISPLAY_EXPRESSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisplayExpression() + * <em>Display Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getDisplayExpression() + * @generated + * @ordered + */ + protected String displayExpression = ReferenceDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT; + + /** + * The cached value of the '{@link #getOnClickOperation() + * <em>On Click Operation</em>}' containment reference. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @see #getOnClickOperation() + * @generated + * @ordered + */ + protected InitialOperation onClickOperation; + + /** + * The cached value of the '{@link #getActions() <em>Actions</em>}' + * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getActions() + * @generated + * @ordered + */ + protected EList<WidgetAction> actions; + + /** + * The cached value of the '{@link #getStyle() <em>Style</em>}' containment + * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getStyle() + * @generated + * @ordered + */ + protected ReferenceWidgetStyle style; + + /** + * The cached value of the '{@link #getConditionalStyles() + * <em>Conditional Styles</em>}' containment reference list. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see #getConditionalStyles() + * @generated + * @ordered + */ + protected EList<ReferenceWidgetConditionalStyle> conditionalStyles; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ReferenceDescriptionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiesPackage.Literals.REFERENCE_DESCRIPTION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isMultiple() { + return multiple; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setMultiple(boolean newMultiple) { + boolean oldMultiple = multiple; + multiple = newMultiple; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.REFERENCE_DESCRIPTION__MULTIPLE, oldMultiple, multiple)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getValueExpression() { + return valueExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setValueExpression(String newValueExpression) { + String oldValueExpression = valueExpression; + valueExpression = newValueExpression; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.REFERENCE_DESCRIPTION__VALUE_EXPRESSION, oldValueExpression, valueExpression)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getDisplayExpression() { + return displayExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setDisplayExpression(String newDisplayExpression) { + String oldDisplayExpression = displayExpression; + displayExpression = newDisplayExpression; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION, oldDisplayExpression, displayExpression)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public InitialOperation getOnClickOperation() { + return onClickOperation; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public NotificationChain basicSetOnClickOperation(InitialOperation newOnClickOperation, NotificationChain msgs) { + InitialOperation oldOnClickOperation = onClickOperation; + onClickOperation = newOnClickOperation; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.REFERENCE_DESCRIPTION__ON_CLICK_OPERATION, oldOnClickOperation, newOnClickOperation); + if (msgs == null) { + msgs = notification; + } else { + msgs.add(notification); + } + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setOnClickOperation(InitialOperation newOnClickOperation) { + if (newOnClickOperation != onClickOperation) { + NotificationChain msgs = null; + if (onClickOperation != null) { + msgs = ((InternalEObject) onClickOperation).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.REFERENCE_DESCRIPTION__ON_CLICK_OPERATION, null, msgs); + } + if (newOnClickOperation != null) { + msgs = ((InternalEObject) newOnClickOperation).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.REFERENCE_DESCRIPTION__ON_CLICK_OPERATION, null, msgs); + } + msgs = basicSetOnClickOperation(newOnClickOperation, msgs); + if (msgs != null) { + msgs.dispatch(); + } + } else if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.REFERENCE_DESCRIPTION__ON_CLICK_OPERATION, newOnClickOperation, newOnClickOperation)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EList<WidgetAction> getActions() { + if (actions == null) { + actions = new EObjectContainmentEList<WidgetAction>(WidgetAction.class, this, PropertiesPackage.REFERENCE_DESCRIPTION__ACTIONS); + } + return actions; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ReferenceWidgetStyle getStyle() { + return style; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public NotificationChain basicSetStyle(ReferenceWidgetStyle newStyle, NotificationChain msgs) { + ReferenceWidgetStyle oldStyle = style; + style = newStyle; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.REFERENCE_DESCRIPTION__STYLE, oldStyle, newStyle); + if (msgs == null) { + msgs = notification; + } else { + msgs.add(notification); + } + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setStyle(ReferenceWidgetStyle newStyle) { + if (newStyle != style) { + NotificationChain msgs = null; + if (style != null) { + msgs = ((InternalEObject) style).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.REFERENCE_DESCRIPTION__STYLE, null, msgs); + } + if (newStyle != null) { + msgs = ((InternalEObject) newStyle).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.REFERENCE_DESCRIPTION__STYLE, null, msgs); + } + msgs = basicSetStyle(newStyle, msgs); + if (msgs != null) { + msgs.dispatch(); + } + } else if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.REFERENCE_DESCRIPTION__STYLE, newStyle, newStyle)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EList<ReferenceWidgetConditionalStyle> getConditionalStyles() { + if (conditionalStyles == null) { + conditionalStyles = new EObjectContainmentEList<ReferenceWidgetConditionalStyle>(ReferenceWidgetConditionalStyle.class, this, PropertiesPackage.REFERENCE_DESCRIPTION__CONDITIONAL_STYLES); + } + return conditionalStyles; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertiesPackage.REFERENCE_DESCRIPTION__ON_CLICK_OPERATION: + return basicSetOnClickOperation(null, msgs); + case PropertiesPackage.REFERENCE_DESCRIPTION__ACTIONS: + return ((InternalEList<?>) getActions()).basicRemove(otherEnd, msgs); + case PropertiesPackage.REFERENCE_DESCRIPTION__STYLE: + return basicSetStyle(null, msgs); + case PropertiesPackage.REFERENCE_DESCRIPTION__CONDITIONAL_STYLES: + return ((InternalEList<?>) getConditionalStyles()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertiesPackage.REFERENCE_DESCRIPTION__MULTIPLE: + return isMultiple(); + case PropertiesPackage.REFERENCE_DESCRIPTION__VALUE_EXPRESSION: + return getValueExpression(); + case PropertiesPackage.REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION: + return getDisplayExpression(); + case PropertiesPackage.REFERENCE_DESCRIPTION__ON_CLICK_OPERATION: + return getOnClickOperation(); + case PropertiesPackage.REFERENCE_DESCRIPTION__ACTIONS: + return getActions(); + case PropertiesPackage.REFERENCE_DESCRIPTION__STYLE: + return getStyle(); + case PropertiesPackage.REFERENCE_DESCRIPTION__CONDITIONAL_STYLES: + return getConditionalStyles(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertiesPackage.REFERENCE_DESCRIPTION__MULTIPLE: + setMultiple((Boolean) newValue); + return; + case PropertiesPackage.REFERENCE_DESCRIPTION__VALUE_EXPRESSION: + setValueExpression((String) newValue); + return; + case PropertiesPackage.REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION: + setDisplayExpression((String) newValue); + return; + case PropertiesPackage.REFERENCE_DESCRIPTION__ON_CLICK_OPERATION: + setOnClickOperation((InitialOperation) newValue); + return; + case PropertiesPackage.REFERENCE_DESCRIPTION__ACTIONS: + getActions().clear(); + getActions().addAll((Collection<? extends WidgetAction>) newValue); + return; + case PropertiesPackage.REFERENCE_DESCRIPTION__STYLE: + setStyle((ReferenceWidgetStyle) newValue); + return; + case PropertiesPackage.REFERENCE_DESCRIPTION__CONDITIONAL_STYLES: + getConditionalStyles().clear(); + getConditionalStyles().addAll((Collection<? extends ReferenceWidgetConditionalStyle>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertiesPackage.REFERENCE_DESCRIPTION__MULTIPLE: + setMultiple(ReferenceDescriptionImpl.MULTIPLE_EDEFAULT); + return; + case PropertiesPackage.REFERENCE_DESCRIPTION__VALUE_EXPRESSION: + setValueExpression(ReferenceDescriptionImpl.VALUE_EXPRESSION_EDEFAULT); + return; + case PropertiesPackage.REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION: + setDisplayExpression(ReferenceDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT); + return; + case PropertiesPackage.REFERENCE_DESCRIPTION__ON_CLICK_OPERATION: + setOnClickOperation((InitialOperation) null); + return; + case PropertiesPackage.REFERENCE_DESCRIPTION__ACTIONS: + getActions().clear(); + return; + case PropertiesPackage.REFERENCE_DESCRIPTION__STYLE: + setStyle((ReferenceWidgetStyle) null); + return; + case PropertiesPackage.REFERENCE_DESCRIPTION__CONDITIONAL_STYLES: + getConditionalStyles().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertiesPackage.REFERENCE_DESCRIPTION__MULTIPLE: + return multiple != ReferenceDescriptionImpl.MULTIPLE_EDEFAULT; + case PropertiesPackage.REFERENCE_DESCRIPTION__VALUE_EXPRESSION: + return ReferenceDescriptionImpl.VALUE_EXPRESSION_EDEFAULT == null ? valueExpression != null : !ReferenceDescriptionImpl.VALUE_EXPRESSION_EDEFAULT.equals(valueExpression); + case PropertiesPackage.REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION: + return ReferenceDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT == null ? displayExpression != null : !ReferenceDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT.equals(displayExpression); + case PropertiesPackage.REFERENCE_DESCRIPTION__ON_CLICK_OPERATION: + return onClickOperation != null; + case PropertiesPackage.REFERENCE_DESCRIPTION__ACTIONS: + return actions != null && !actions.isEmpty(); + case PropertiesPackage.REFERENCE_DESCRIPTION__STYLE: + return style != null; + case PropertiesPackage.REFERENCE_DESCRIPTION__CONDITIONAL_STYLES: + return conditionalStyles != null && !conditionalStyles.isEmpty(); + } + 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(" (multiple: "); + result.append(multiple); + result.append(", valueExpression: "); + result.append(valueExpression); + result.append(", displayExpression: "); + result.append(displayExpression); + result.append(')'); + return result.toString(); + } + +} // ReferenceDescriptionImpl diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ReferenceWidgetConditionalStyleImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ReferenceWidgetConditionalStyleImpl.java new file mode 100644 index 0000000000..90b1185804 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ReferenceWidgetConditionalStyleImpl.java @@ -0,0 +1,192 @@ +/** + * 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.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.sirius.properties.PropertiesPackage; +import org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle; +import org.eclipse.sirius.properties.ReferenceWidgetStyle; + +/** + * <!-- begin-user-doc --> An implementation of the model object ' + * <em><b>Reference Widget Conditional Style</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li> + * {@link org.eclipse.sirius.properties.impl.ReferenceWidgetConditionalStyleImpl#getStyle + * <em>Style</em>}</li> + * </ul> + * + * @generated + */ +public class ReferenceWidgetConditionalStyleImpl extends WidgetConditionalStyleImpl implements ReferenceWidgetConditionalStyle { + /** + * The cached value of the '{@link #getStyle() <em>Style</em>}' containment + * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getStyle() + * @generated + * @ordered + */ + protected ReferenceWidgetStyle style; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ReferenceWidgetConditionalStyleImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiesPackage.Literals.REFERENCE_WIDGET_CONDITIONAL_STYLE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ReferenceWidgetStyle getStyle() { + return style; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public NotificationChain basicSetStyle(ReferenceWidgetStyle newStyle, NotificationChain msgs) { + ReferenceWidgetStyle oldStyle = style; + style = newStyle; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.REFERENCE_WIDGET_CONDITIONAL_STYLE__STYLE, oldStyle, newStyle); + if (msgs == null) { + msgs = notification; + } else { + msgs.add(notification); + } + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setStyle(ReferenceWidgetStyle newStyle) { + if (newStyle != style) { + NotificationChain msgs = null; + if (style != null) { + msgs = ((InternalEObject) style).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.REFERENCE_WIDGET_CONDITIONAL_STYLE__STYLE, null, msgs); + } + if (newStyle != null) { + msgs = ((InternalEObject) newStyle).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.REFERENCE_WIDGET_CONDITIONAL_STYLE__STYLE, null, msgs); + } + msgs = basicSetStyle(newStyle, msgs); + if (msgs != null) { + msgs.dispatch(); + } + } else if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.REFERENCE_WIDGET_CONDITIONAL_STYLE__STYLE, newStyle, newStyle)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertiesPackage.REFERENCE_WIDGET_CONDITIONAL_STYLE__STYLE: + return basicSetStyle(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertiesPackage.REFERENCE_WIDGET_CONDITIONAL_STYLE__STYLE: + return getStyle(); + } + 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.REFERENCE_WIDGET_CONDITIONAL_STYLE__STYLE: + setStyle((ReferenceWidgetStyle) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertiesPackage.REFERENCE_WIDGET_CONDITIONAL_STYLE__STYLE: + setStyle((ReferenceWidgetStyle) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertiesPackage.REFERENCE_WIDGET_CONDITIONAL_STYLE__STYLE: + return style != null; + } + return super.eIsSet(featureID); + } + +} // ReferenceWidgetConditionalStyleImpl diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ReferenceWidgetStyleImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ReferenceWidgetStyleImpl.java new file mode 100644 index 0000000000..089223639b --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ReferenceWidgetStyleImpl.java @@ -0,0 +1,44 @@ +/** + * 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.sirius.properties.PropertiesPackage; +import org.eclipse.sirius.properties.ReferenceWidgetStyle; + +/** + * <!-- begin-user-doc --> An implementation of the model object ' + * <em><b>Reference Widget Style</b></em>'. <!-- end-user-doc --> + * + * @generated + */ +public class ReferenceWidgetStyleImpl extends WidgetStyleImpl implements ReferenceWidgetStyle { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ReferenceWidgetStyleImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiesPackage.Literals.REFERENCE_WIDGET_STYLE; + } + +} // ReferenceWidgetStyleImpl diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/SingleReferenceDescriptionImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/SingleReferenceDescriptionImpl.java deleted file mode 100644 index e0290d4840..0000000000 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/SingleReferenceDescriptionImpl.java +++ /dev/null @@ -1,572 +0,0 @@ -/** - * 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.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.sirius.properties.OperationDescription; -import org.eclipse.sirius.properties.PropertiesPackage; -import org.eclipse.sirius.properties.SingleReferenceDescription; - -/** - * <!-- begin-user-doc --> An implementation of the model object ' - * <em><b>Single Reference Description</b></em>'. <!-- end-user-doc --> - * <p> - * The following features are implemented: - * </p> - * <ul> - * <li> - * {@link org.eclipse.sirius.properties.impl.SingleReferenceDescriptionImpl#getValueExpression - * <em>Value Expression</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.impl.SingleReferenceDescriptionImpl#getDisplayExpression - * <em>Display Expression</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.impl.SingleReferenceDescriptionImpl#getCreateOperation - * <em>Create Operation</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.impl.SingleReferenceDescriptionImpl#getSearchOperation - * <em>Search Operation</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.impl.SingleReferenceDescriptionImpl#getUnsetOperation - * <em>Unset Operation</em>}</li> - * <li> - * {@link org.eclipse.sirius.properties.impl.SingleReferenceDescriptionImpl#getOnClickOperation - * <em>On Click Operation</em>}</li> - * </ul> - * - * @generated - */ -public class SingleReferenceDescriptionImpl extends WidgetDescriptionImpl implements SingleReferenceDescription { - /** - * The default value of the '{@link #getValueExpression() - * <em>Value Expression</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @see #getValueExpression() - * @generated - * @ordered - */ - protected static final String VALUE_EXPRESSION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getValueExpression() - * <em>Value Expression</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @see #getValueExpression() - * @generated - * @ordered - */ - protected String valueExpression = SingleReferenceDescriptionImpl.VALUE_EXPRESSION_EDEFAULT; - - /** - * The default value of the '{@link #getDisplayExpression() - * <em>Display Expression</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @see #getDisplayExpression() - * @generated - * @ordered - */ - protected static final String DISPLAY_EXPRESSION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getDisplayExpression() - * <em>Display Expression</em>}' attribute. <!-- begin-user-doc --> <!-- - * end-user-doc --> - * - * @see #getDisplayExpression() - * @generated - * @ordered - */ - protected String displayExpression = SingleReferenceDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT; - - /** - * The cached value of the '{@link #getCreateOperation() - * <em>Create Operation</em>}' containment reference. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #getCreateOperation() - * @generated - * @ordered - */ - protected OperationDescription createOperation; - - /** - * The cached value of the '{@link #getSearchOperation() - * <em>Search Operation</em>}' containment reference. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #getSearchOperation() - * @generated - * @ordered - */ - protected OperationDescription searchOperation; - - /** - * The cached value of the '{@link #getUnsetOperation() - * <em>Unset Operation</em>}' containment reference. <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @see #getUnsetOperation() - * @generated - * @ordered - */ - protected OperationDescription unsetOperation; - - /** - * The cached value of the '{@link #getOnClickOperation() - * <em>On Click Operation</em>}' containment reference. <!-- begin-user-doc - * --> <!-- end-user-doc --> - * - * @see #getOnClickOperation() - * @generated - * @ordered - */ - protected OperationDescription onClickOperation; - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected SingleReferenceDescriptionImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return PropertiesPackage.Literals.SINGLE_REFERENCE_DESCRIPTION; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public String getValueExpression() { - return valueExpression; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setValueExpression(String newValueExpression) { - String oldValueExpression = valueExpression; - valueExpression = newValueExpression; - if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__VALUE_EXPRESSION, oldValueExpression, valueExpression)); - } - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public String getDisplayExpression() { - return displayExpression; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setDisplayExpression(String newDisplayExpression) { - String oldDisplayExpression = displayExpression; - displayExpression = newDisplayExpression; - if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION, oldDisplayExpression, displayExpression)); - } - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public OperationDescription getCreateOperation() { - return createOperation; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetCreateOperation(OperationDescription newCreateOperation, NotificationChain msgs) { - OperationDescription oldCreateOperation = createOperation; - createOperation = newCreateOperation; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__CREATE_OPERATION, oldCreateOperation, newCreateOperation); - if (msgs == null) { - msgs = notification; - } else { - msgs.add(notification); - } - } - return msgs; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setCreateOperation(OperationDescription newCreateOperation) { - if (newCreateOperation != createOperation) { - NotificationChain msgs = null; - if (createOperation != null) { - msgs = ((InternalEObject) createOperation).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__CREATE_OPERATION, null, msgs); - } - if (newCreateOperation != null) { - msgs = ((InternalEObject) newCreateOperation).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__CREATE_OPERATION, null, msgs); - } - msgs = basicSetCreateOperation(newCreateOperation, msgs); - if (msgs != null) { - msgs.dispatch(); - } - } else if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__CREATE_OPERATION, newCreateOperation, newCreateOperation)); - } - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public OperationDescription getSearchOperation() { - return searchOperation; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetSearchOperation(OperationDescription newSearchOperation, NotificationChain msgs) { - OperationDescription oldSearchOperation = searchOperation; - searchOperation = newSearchOperation; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__SEARCH_OPERATION, oldSearchOperation, newSearchOperation); - if (msgs == null) { - msgs = notification; - } else { - msgs.add(notification); - } - } - return msgs; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setSearchOperation(OperationDescription newSearchOperation) { - if (newSearchOperation != searchOperation) { - NotificationChain msgs = null; - if (searchOperation != null) { - msgs = ((InternalEObject) searchOperation).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__SEARCH_OPERATION, null, msgs); - } - if (newSearchOperation != null) { - msgs = ((InternalEObject) newSearchOperation).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__SEARCH_OPERATION, null, msgs); - } - msgs = basicSetSearchOperation(newSearchOperation, msgs); - if (msgs != null) { - msgs.dispatch(); - } - } else if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__SEARCH_OPERATION, newSearchOperation, newSearchOperation)); - } - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public OperationDescription getUnsetOperation() { - return unsetOperation; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetUnsetOperation(OperationDescription newUnsetOperation, NotificationChain msgs) { - OperationDescription oldUnsetOperation = unsetOperation; - unsetOperation = newUnsetOperation; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__UNSET_OPERATION, oldUnsetOperation, newUnsetOperation); - if (msgs == null) { - msgs = notification; - } else { - msgs.add(notification); - } - } - return msgs; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setUnsetOperation(OperationDescription newUnsetOperation) { - if (newUnsetOperation != unsetOperation) { - NotificationChain msgs = null; - if (unsetOperation != null) { - msgs = ((InternalEObject) unsetOperation).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__UNSET_OPERATION, null, msgs); - } - if (newUnsetOperation != null) { - msgs = ((InternalEObject) newUnsetOperation).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__UNSET_OPERATION, null, msgs); - } - msgs = basicSetUnsetOperation(newUnsetOperation, msgs); - if (msgs != null) { - msgs.dispatch(); - } - } else if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__UNSET_OPERATION, newUnsetOperation, newUnsetOperation)); - } - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public OperationDescription getOnClickOperation() { - return onClickOperation; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - public NotificationChain basicSetOnClickOperation(OperationDescription newOnClickOperation, NotificationChain msgs) { - OperationDescription oldOnClickOperation = onClickOperation; - onClickOperation = newOnClickOperation; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__ON_CLICK_OPERATION, oldOnClickOperation, - newOnClickOperation); - if (msgs == null) { - msgs = notification; - } else { - msgs.add(notification); - } - } - return msgs; - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void setOnClickOperation(OperationDescription newOnClickOperation) { - if (newOnClickOperation != onClickOperation) { - NotificationChain msgs = null; - if (onClickOperation != null) { - msgs = ((InternalEObject) onClickOperation).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__ON_CLICK_OPERATION, null, - msgs); - } - if (newOnClickOperation != null) { - msgs = ((InternalEObject) newOnClickOperation).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__ON_CLICK_OPERATION, null, - msgs); - } - msgs = basicSetOnClickOperation(newOnClickOperation, msgs); - if (msgs != null) { - msgs.dispatch(); - } - } else if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__ON_CLICK_OPERATION, newOnClickOperation, newOnClickOperation)); - } - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__CREATE_OPERATION: - return basicSetCreateOperation(null, msgs); - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__SEARCH_OPERATION: - return basicSetSearchOperation(null, msgs); - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__UNSET_OPERATION: - return basicSetUnsetOperation(null, msgs); - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__ON_CLICK_OPERATION: - return basicSetOnClickOperation(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__VALUE_EXPRESSION: - return getValueExpression(); - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION: - return getDisplayExpression(); - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__CREATE_OPERATION: - return getCreateOperation(); - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__SEARCH_OPERATION: - return getSearchOperation(); - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__UNSET_OPERATION: - return getUnsetOperation(); - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__ON_CLICK_OPERATION: - return getOnClickOperation(); - } - 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.SINGLE_REFERENCE_DESCRIPTION__VALUE_EXPRESSION: - setValueExpression((String) newValue); - return; - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION: - setDisplayExpression((String) newValue); - return; - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__CREATE_OPERATION: - setCreateOperation((OperationDescription) newValue); - return; - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__SEARCH_OPERATION: - setSearchOperation((OperationDescription) newValue); - return; - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__UNSET_OPERATION: - setUnsetOperation((OperationDescription) newValue); - return; - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__ON_CLICK_OPERATION: - setOnClickOperation((OperationDescription) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__VALUE_EXPRESSION: - setValueExpression(SingleReferenceDescriptionImpl.VALUE_EXPRESSION_EDEFAULT); - return; - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION: - setDisplayExpression(SingleReferenceDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT); - return; - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__CREATE_OPERATION: - setCreateOperation((OperationDescription) null); - return; - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__SEARCH_OPERATION: - setSearchOperation((OperationDescription) null); - return; - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__UNSET_OPERATION: - setUnsetOperation((OperationDescription) null); - return; - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__ON_CLICK_OPERATION: - setOnClickOperation((OperationDescription) null); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__VALUE_EXPRESSION: - return SingleReferenceDescriptionImpl.VALUE_EXPRESSION_EDEFAULT == null ? valueExpression != null : !SingleReferenceDescriptionImpl.VALUE_EXPRESSION_EDEFAULT.equals(valueExpression); - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__DISPLAY_EXPRESSION: - return SingleReferenceDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT == null ? displayExpression != null - : !SingleReferenceDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT.equals(displayExpression); - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__CREATE_OPERATION: - return createOperation != null; - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__SEARCH_OPERATION: - return searchOperation != null; - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__UNSET_OPERATION: - return unsetOperation != null; - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION__ON_CLICK_OPERATION: - return onClickOperation != 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(" (valueExpression: "); - result.append(valueExpression); - result.append(", displayExpression: "); - result.append(displayExpression); - result.append(')'); - return result.toString(); - } - -} // SingleReferenceDescriptionImpl diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/WidgetActionImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/WidgetActionImpl.java new file mode 100644 index 0000000000..8efbd14dcb --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/WidgetActionImpl.java @@ -0,0 +1,271 @@ +/** + * 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.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.sirius.properties.PropertiesPackage; +import org.eclipse.sirius.properties.WidgetAction; +import org.eclipse.sirius.viewpoint.description.tool.InitialOperation; + +/** + * <!-- begin-user-doc --> An implementation of the model object ' + * <em><b>Widget Action</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li> + * {@link org.eclipse.sirius.properties.impl.WidgetActionImpl#getLabelExpression + * <em>Label Expression</em>}</li> + * <li> + * {@link org.eclipse.sirius.properties.impl.WidgetActionImpl#getInitialOperation + * <em>Initial Operation</em>}</li> + * </ul> + * + * @generated + */ +public class WidgetActionImpl extends MinimalEObjectImpl.Container implements WidgetAction { + /** + * The default value of the '{@link #getLabelExpression() + * <em>Label Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getLabelExpression() + * @generated + * @ordered + */ + protected static final String LABEL_EXPRESSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLabelExpression() + * <em>Label Expression</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getLabelExpression() + * @generated + * @ordered + */ + protected String labelExpression = WidgetActionImpl.LABEL_EXPRESSION_EDEFAULT; + + /** + * The cached value of the '{@link #getInitialOperation() + * <em>Initial Operation</em>}' containment reference. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @see #getInitialOperation() + * @generated + * @ordered + */ + protected InitialOperation initialOperation; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected WidgetActionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiesPackage.Literals.WIDGET_ACTION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getLabelExpression() { + return labelExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setLabelExpression(String newLabelExpression) { + String oldLabelExpression = labelExpression; + labelExpression = newLabelExpression; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.WIDGET_ACTION__LABEL_EXPRESSION, oldLabelExpression, labelExpression)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public InitialOperation getInitialOperation() { + return initialOperation; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public NotificationChain basicSetInitialOperation(InitialOperation newInitialOperation, NotificationChain msgs) { + InitialOperation oldInitialOperation = initialOperation; + initialOperation = newInitialOperation; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.WIDGET_ACTION__INITIAL_OPERATION, oldInitialOperation, newInitialOperation); + if (msgs == null) { + msgs = notification; + } else { + msgs.add(notification); + } + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setInitialOperation(InitialOperation newInitialOperation) { + if (newInitialOperation != initialOperation) { + NotificationChain msgs = null; + if (initialOperation != null) { + msgs = ((InternalEObject) initialOperation).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.WIDGET_ACTION__INITIAL_OPERATION, null, msgs); + } + if (newInitialOperation != null) { + msgs = ((InternalEObject) newInitialOperation).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.WIDGET_ACTION__INITIAL_OPERATION, null, msgs); + } + msgs = basicSetInitialOperation(newInitialOperation, msgs); + if (msgs != null) { + msgs.dispatch(); + } + } else if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.WIDGET_ACTION__INITIAL_OPERATION, newInitialOperation, newInitialOperation)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertiesPackage.WIDGET_ACTION__INITIAL_OPERATION: + return basicSetInitialOperation(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertiesPackage.WIDGET_ACTION__LABEL_EXPRESSION: + return getLabelExpression(); + case PropertiesPackage.WIDGET_ACTION__INITIAL_OPERATION: + return getInitialOperation(); + } + 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.WIDGET_ACTION__LABEL_EXPRESSION: + setLabelExpression((String) newValue); + return; + case PropertiesPackage.WIDGET_ACTION__INITIAL_OPERATION: + setInitialOperation((InitialOperation) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertiesPackage.WIDGET_ACTION__LABEL_EXPRESSION: + setLabelExpression(WidgetActionImpl.LABEL_EXPRESSION_EDEFAULT); + return; + case PropertiesPackage.WIDGET_ACTION__INITIAL_OPERATION: + setInitialOperation((InitialOperation) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertiesPackage.WIDGET_ACTION__LABEL_EXPRESSION: + return WidgetActionImpl.LABEL_EXPRESSION_EDEFAULT == null ? labelExpression != null : !WidgetActionImpl.LABEL_EXPRESSION_EDEFAULT.equals(labelExpression); + case PropertiesPackage.WIDGET_ACTION__INITIAL_OPERATION: + return initialOperation != 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(" (labelExpression: "); + result.append(labelExpression); + result.append(')'); + return result.toString(); + } + +} // WidgetActionImpl 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 1f630dde42..0bdf5ee2e2 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 @@ -38,7 +38,6 @@ 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; import org.eclipse.sirius.properties.PageValidationSetDescription; @@ -47,15 +46,18 @@ import org.eclipse.sirius.properties.PropertyValidationRule; import org.eclipse.sirius.properties.RadioDescription; import org.eclipse.sirius.properties.RadioWidgetConditionalStyle; import org.eclipse.sirius.properties.RadioWidgetStyle; +import org.eclipse.sirius.properties.ReferenceDescription; +import org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle; +import org.eclipse.sirius.properties.ReferenceWidgetStyle; import org.eclipse.sirius.properties.SelectDescription; import org.eclipse.sirius.properties.SelectWidgetConditionalStyle; import org.eclipse.sirius.properties.SelectWidgetStyle; -import org.eclipse.sirius.properties.SingleReferenceDescription; import org.eclipse.sirius.properties.TextAreaDescription; import org.eclipse.sirius.properties.TextDescription; import org.eclipse.sirius.properties.TextWidgetConditionalStyle; import org.eclipse.sirius.properties.TextWidgetStyle; import org.eclipse.sirius.properties.ViewExtensionDescription; +import org.eclipse.sirius.properties.WidgetAction; import org.eclipse.sirius.properties.WidgetConditionalStyle; import org.eclipse.sirius.properties.WidgetDescription; import org.eclipse.sirius.properties.WidgetStyle; @@ -224,8 +226,8 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { } @Override - public Adapter caseSingleReferenceDescription(SingleReferenceDescription object) { - return createSingleReferenceDescriptionAdapter(); + public Adapter caseReferenceDescription(ReferenceDescription object) { + return createReferenceDescriptionAdapter(); } @Override @@ -234,11 +236,6 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { } @Override - public Adapter caseMultipleReferencesDescription(MultipleReferencesDescription object) { - return createMultipleReferencesDescriptionAdapter(); - } - - @Override public Adapter caseCustomDescription(CustomDescription object) { return createCustomDescriptionAdapter(); } @@ -294,6 +291,11 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { } @Override + public Adapter caseReferenceWidgetStyle(ReferenceWidgetStyle object) { + return createReferenceWidgetStyleAdapter(); + } + + @Override public Adapter caseWidgetConditionalStyle(WidgetConditionalStyle object) { return createWidgetConditionalStyleAdapter(); } @@ -334,6 +336,16 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { } @Override + public Adapter caseReferenceWidgetConditionalStyle(ReferenceWidgetConditionalStyle object) { + return createReferenceWidgetConditionalStyleAdapter(); + } + + @Override + public Adapter caseWidgetAction(WidgetAction object) { + return createWidgetActionAdapter(); + } + + @Override public Adapter caseExtension(Extension object) { return createExtensionAdapter(); } @@ -706,17 +718,17 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { /** * Creates a new adapter for an object of class ' - * {@link org.eclipse.sirius.properties.SingleReferenceDescription - * <em>Single Reference 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 --> + * {@link org.eclipse.sirius.properties.ReferenceDescription + * <em>Reference 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.SingleReferenceDescription + * @see org.eclipse.sirius.properties.ReferenceDescription * @generated */ - public Adapter createSingleReferenceDescriptionAdapter() { + public Adapter createReferenceDescriptionAdapter() { return null; } @@ -738,22 +750,6 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { /** * Creates a new adapter for an object of class ' - * {@link org.eclipse.sirius.properties.MultipleReferencesDescription - * <em>Multiple References 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.MultipleReferencesDescription - * @generated - */ - public Adapter createMultipleReferencesDescriptionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class ' * {@link org.eclipse.sirius.properties.CustomDescription * <em>Custom Description</em>}'. <!-- begin-user-doc --> This default * implementation returns null so that we can easily ignore cases; it's @@ -1057,6 +1053,53 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { /** * Creates a new adapter for an object of class ' + * {@link org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle + * <em>Reference Widget Conditional Style</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.ReferenceWidgetConditionalStyle + * @generated + */ + public Adapter createReferenceWidgetConditionalStyleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.sirius.properties.WidgetAction <em>Widget Action</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.WidgetAction + * @generated + */ + public Adapter createWidgetActionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.sirius.properties.ReferenceWidgetStyle + * <em>Reference Widget Style</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.ReferenceWidgetStyle + * @generated + */ + public Adapter createReferenceWidgetStyleAdapter() { + 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 a16e2141a4..092589a7d0 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 @@ -38,7 +38,6 @@ 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; import org.eclipse.sirius.properties.PageValidationSetDescription; @@ -47,15 +46,18 @@ import org.eclipse.sirius.properties.PropertyValidationRule; import org.eclipse.sirius.properties.RadioDescription; import org.eclipse.sirius.properties.RadioWidgetConditionalStyle; import org.eclipse.sirius.properties.RadioWidgetStyle; +import org.eclipse.sirius.properties.ReferenceDescription; +import org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle; +import org.eclipse.sirius.properties.ReferenceWidgetStyle; import org.eclipse.sirius.properties.SelectDescription; import org.eclipse.sirius.properties.SelectWidgetConditionalStyle; import org.eclipse.sirius.properties.SelectWidgetStyle; -import org.eclipse.sirius.properties.SingleReferenceDescription; import org.eclipse.sirius.properties.TextAreaDescription; import org.eclipse.sirius.properties.TextDescription; import org.eclipse.sirius.properties.TextWidgetConditionalStyle; import org.eclipse.sirius.properties.TextWidgetStyle; import org.eclipse.sirius.properties.ViewExtensionDescription; +import org.eclipse.sirius.properties.WidgetAction; import org.eclipse.sirius.properties.WidgetConditionalStyle; import org.eclipse.sirius.properties.WidgetDescription; import org.eclipse.sirius.properties.WidgetStyle; @@ -373,14 +375,14 @@ public class PropertiesSwitch<T> { } return result; } - case PropertiesPackage.SINGLE_REFERENCE_DESCRIPTION: { - SingleReferenceDescription singleReferenceDescription = (SingleReferenceDescription) theEObject; - T result = caseSingleReferenceDescription(singleReferenceDescription); + case PropertiesPackage.REFERENCE_DESCRIPTION: { + ReferenceDescription referenceDescription = (ReferenceDescription) theEObject; + T result = caseReferenceDescription(referenceDescription); if (result == null) { - result = caseWidgetDescription(singleReferenceDescription); + result = caseWidgetDescription(referenceDescription); } if (result == null) { - result = caseControlDescription(singleReferenceDescription); + result = caseControlDescription(referenceDescription); } if (result == null) { result = defaultCase(theEObject); @@ -395,20 +397,6 @@ public class PropertiesSwitch<T> { } return result; } - case PropertiesPackage.MULTIPLE_REFERENCES_DESCRIPTION: { - MultipleReferencesDescription multipleReferencesDescription = (MultipleReferencesDescription) theEObject; - T result = caseMultipleReferencesDescription(multipleReferencesDescription); - if (result == null) { - result = caseWidgetDescription(multipleReferencesDescription); - } - if (result == null) { - result = caseControlDescription(multipleReferencesDescription); - } - if (result == null) { - result = defaultCase(theEObject); - } - return result; - } case PropertiesPackage.CUSTOM_DESCRIPTION: { CustomDescription customDescription = (CustomDescription) theEObject; T result = caseCustomDescription(customDescription); @@ -524,6 +512,17 @@ public class PropertiesSwitch<T> { } return result; } + case PropertiesPackage.REFERENCE_WIDGET_STYLE: { + ReferenceWidgetStyle referenceWidgetStyle = (ReferenceWidgetStyle) theEObject; + T result = caseReferenceWidgetStyle(referenceWidgetStyle); + if (result == null) { + result = caseWidgetStyle(referenceWidgetStyle); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } case PropertiesPackage.WIDGET_CONDITIONAL_STYLE: { WidgetConditionalStyle widgetConditionalStyle = (WidgetConditionalStyle) theEObject; T result = caseWidgetConditionalStyle(widgetConditionalStyle); @@ -609,6 +608,25 @@ public class PropertiesSwitch<T> { } return result; } + case PropertiesPackage.REFERENCE_WIDGET_CONDITIONAL_STYLE: { + ReferenceWidgetConditionalStyle referenceWidgetConditionalStyle = (ReferenceWidgetConditionalStyle) theEObject; + T result = caseReferenceWidgetConditionalStyle(referenceWidgetConditionalStyle); + if (result == null) { + result = caseWidgetConditionalStyle(referenceWidgetConditionalStyle); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case PropertiesPackage.WIDGET_ACTION: { + WidgetAction widgetAction = (WidgetAction) theEObject; + T result = caseWidgetAction(widgetAction); + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } default: return defaultCase(theEObject); } @@ -973,18 +991,18 @@ public class PropertiesSwitch<T> { /** * Returns the result of interpreting the object as an instance of ' - * <em>Single Reference Description</em>'. <!-- begin-user-doc --> This + * <em>Reference 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>Single Reference Description</em>'. + * <em>Reference Description</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseSingleReferenceDescription(SingleReferenceDescription object) { + public T caseReferenceDescription(ReferenceDescription object) { return null; } @@ -1007,23 +1025,6 @@ public class PropertiesSwitch<T> { /** * Returns the result of interpreting the object as an instance of ' - * <em>Multiple References 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>Multiple References Description</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseMultipleReferencesDescription(MultipleReferencesDescription object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of ' * <em>Custom Description</em>'. <!-- begin-user-doc --> This implementation * returns null; returning a non-null result will terminate the switch. <!-- * end-user-doc --> @@ -1347,6 +1348,57 @@ public class PropertiesSwitch<T> { /** * Returns the result of interpreting the object as an instance of ' + * <em>Reference Widget Conditional Style</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>Reference Widget Conditional Style</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseReferenceWidgetConditionalStyle(ReferenceWidgetConditionalStyle object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' + * <em>Widget Action</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>Widget Action</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseWidgetAction(WidgetAction object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' + * <em>Reference Widget Style</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>Reference Widget Style</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseReferenceWidgetStyle(ReferenceWidgetStyle 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/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 f9449756e5..b820380fcb 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 @@ -43,6 +43,9 @@ import org.eclipse.eef.EEFPropertyValidationRuleDescription; import org.eclipse.eef.EEFRadioConditionalStyle; import org.eclipse.eef.EEFRadioDescription; import org.eclipse.eef.EEFRadioStyle; +import org.eclipse.eef.EEFReferenceConditionalStyle; +import org.eclipse.eef.EEFReferenceDescription; +import org.eclipse.eef.EEFReferenceStyle; import org.eclipse.eef.EEFRuleAuditDescription; import org.eclipse.eef.EEFSelectConditionalStyle; import org.eclipse.eef.EEFSelectDescription; @@ -54,6 +57,7 @@ import org.eclipse.eef.EEFTextStyle; import org.eclipse.eef.EEFValidationFixDescription; import org.eclipse.eef.EEFValidationRuleDescription; import org.eclipse.eef.EEFViewDescription; +import org.eclipse.eef.EEFWidgetAction; import org.eclipse.eef.EEFWidgetDescription; import org.eclipse.eef.EEFWidgetStyle; import org.eclipse.eef.EEF_FILL_LAYOUT_ORIENTATION; @@ -91,6 +95,9 @@ import org.eclipse.sirius.properties.PropertyValidationRule; import org.eclipse.sirius.properties.RadioDescription; import org.eclipse.sirius.properties.RadioWidgetConditionalStyle; import org.eclipse.sirius.properties.RadioWidgetStyle; +import org.eclipse.sirius.properties.ReferenceDescription; +import org.eclipse.sirius.properties.ReferenceWidgetConditionalStyle; +import org.eclipse.sirius.properties.ReferenceWidgetStyle; import org.eclipse.sirius.properties.SelectDescription; import org.eclipse.sirius.properties.SelectWidgetConditionalStyle; import org.eclipse.sirius.properties.SelectWidgetStyle; @@ -99,6 +106,7 @@ import org.eclipse.sirius.properties.TextDescription; import org.eclipse.sirius.properties.TextWidgetConditionalStyle; import org.eclipse.sirius.properties.TextWidgetStyle; import org.eclipse.sirius.properties.ViewExtensionDescription; +import org.eclipse.sirius.properties.WidgetAction; import org.eclipse.sirius.properties.WidgetDescription; import org.eclipse.sirius.properties.WidgetStyle; import org.eclipse.sirius.ui.properties.internal.SiriusInputDescriptor; @@ -398,6 +406,8 @@ public class ViewDescriptionConverter { description = createEEFButtonDescription((ButtonDescription) widgetDescription); } else if (widgetDescription instanceof RadioDescription) { description = createEEFRadioDescription((RadioDescription) widgetDescription); + } else if (widgetDescription instanceof ReferenceDescription) { + description = createEEFReferenceDescription((ReferenceDescription) widgetDescription); } else if (widgetDescription instanceof CustomDescription) { description = createEEFCustomDescription((CustomDescription) widgetDescription); } @@ -428,6 +438,8 @@ public class ViewDescriptionConverter { eefWidgetStyle = EefFactory.eINSTANCE.createEEFSelectStyle(); } else if (widgetStyle instanceof CustomWidgetStyle) { eefWidgetStyle = EefFactory.eINSTANCE.createEEFCustomWidgetStyle(); + } else if (widgetStyle instanceof ReferenceWidgetStyle) { + eefWidgetStyle = EefFactory.eINSTANCE.createEEFReferenceStyle(); } // Set label style @@ -739,6 +751,41 @@ public class ViewDescriptionConverter { return eefRadioDescription; } + private EEFReferenceDescription createEEFReferenceDescription(ReferenceDescription referenceDescription) { + EEFReferenceDescription eefReferenceDescription = EefFactory.eINSTANCE.createEEFReferenceDescription(); + eefReferenceDescription.setIdentifier(referenceDescription.getIdentifier()); + eefReferenceDescription.setValueExpression(referenceDescription.getValueExpression()); + eefReferenceDescription.setMultiple(referenceDescription.isMultiple()); + eefReferenceDescription.setDisplayExpression(referenceDescription.getDisplayExpression()); + eefReferenceDescription.setOnClickExpression(getExpressionForOperation(referenceDescription.getOnClickOperation())); + for (WidgetAction action : referenceDescription.getActions()) { + EEFWidgetAction eefAction = EefFactory.eINSTANCE.createEEFWidgetAction(); + eefAction.setLabelExpression(action.getLabelExpression()); + eefAction.setActionExpression(getExpressionForOperation(action.getInitialOperation())); + eefReferenceDescription.getActions().add(eefAction); + } + ReferenceWidgetStyle referenceStyle = referenceDescription.getStyle(); + if (referenceStyle != null) { + eefReferenceDescription.setStyle((EEFReferenceStyle) createEEFWidgetStyle(referenceStyle)); + } + + List<ReferenceWidgetConditionalStyle> conditionalStyles = referenceDescription.getConditionalStyles(); + if (conditionalStyles != null && !conditionalStyles.isEmpty()) { + List<EEFReferenceConditionalStyle> eefConditionalStyles = new ArrayList<EEFReferenceConditionalStyle>(); + for (ReferenceWidgetConditionalStyle conditionalStyle : conditionalStyles) { + EEFReferenceConditionalStyle eefConditionalStyle = EefFactory.eINSTANCE.createEEFReferenceConditionalStyle(); + eefConditionalStyle.setPreconditionExpression(conditionalStyle.getPreconditionExpression()); + eefConditionalStyle.setStyle((EEFReferenceStyle) createEEFWidgetStyle(conditionalStyle.getStyle())); + eefConditionalStyles.add(eefConditionalStyle); + } + + if (eefConditionalStyles != null && !eefConditionalStyles.isEmpty()) { + eefReferenceDescription.getConditionalStyles().addAll(eefConditionalStyles); + } + } + return eefReferenceDescription; + } + private EEFCustomWidgetDescription createEEFCustomDescription(CustomDescription customDescription) { EEFCustomWidgetDescription eefCustomDescription = EefFactory.eINSTANCE.createEEFCustomWidgetDescription(); eefCustomDescription.setIdentifier(customDescription.getIdentifier()); |
