diff options
| author | Pierre Guilet | 2018-02-27 14:25:41 +0000 |
|---|---|---|
| committer | Pierre Guilet | 2018-02-28 13:16:10 +0000 |
| commit | 5d91fd395ffac08c50ad6aa36329a24a9e9a6826 (patch) | |
| tree | 3ebc3e0d9aeafa154ab183abdc61039698a4d177 | |
| parent | dea99f00f9234993dbe89cccc9cf0fb4a5b88287 (diff) | |
| download | org.eclipse.sirius-5d91fd395ffac08c50ad6aa36329a24a9e9a6826.tar.gz org.eclipse.sirius-5d91fd395ffac08c50ad6aa36329a24a9e9a6826.tar.xz org.eclipse.sirius-5d91fd395ffac08c50ad6aa36329a24a9e9a6826.zip | |
[509070] Update diagram metamodel to handle layout algorithm options
VSM editor now provides contextual menus for layout algorithm items.
This menus shows and create all options that can be override with
default value.
Bug: 509070
Change-Id: I51b102792c3e0da330a5c4d646fa5afbfcc45260
Signed-off-by: pguilet <pierre.guilet@obeo.fr>
47 files changed, 4603 insertions, 205 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.elk/src/org/eclipse/sirius/diagram/elk/DiagramElkPlugin.java b/plugins/org.eclipse.sirius.diagram.elk/src/org/eclipse/sirius/diagram/elk/DiagramElkPlugin.java index 5e293d8061..89ad1c31a1 100644 --- a/plugins/org.eclipse.sirius.diagram.elk/src/org/eclipse/sirius/diagram/elk/DiagramElkPlugin.java +++ b/plugins/org.eclipse.sirius.diagram.elk/src/org/eclipse/sirius/diagram/elk/DiagramElkPlugin.java @@ -38,7 +38,7 @@ public class DiagramElkPlugin extends AbstractUIPlugin { Collection<LayoutAlgorithmData> algorithmData = LayoutMetaDataService.getInstance().getAlgorithmData(); for (LayoutAlgorithmData layoutAlgorithmData : algorithmData) { - DiagramUIPlugin.getPlugin().addLayoutProvider(layoutAlgorithmData.getId(), layoutAlgorithmData.getName(), () -> new ELKLayoutNodeProvider()); + DiagramUIPlugin.getPlugin().addLayoutProvider(layoutAlgorithmData.getId(), layoutAlgorithmData.getName(), () -> new ELKLayoutNodeProvider(), null); } } diff --git a/plugins/org.eclipse.sirius.diagram.ui/icons/full/obj16/EnumLayoutValue.gif b/plugins/org.eclipse.sirius.diagram.ui/icons/full/obj16/EnumLayoutValue.gif Binary files differnew file mode 100644 index 0000000000..dee0cbca02 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.ui/icons/full/obj16/EnumLayoutValue.gif diff --git a/plugins/org.eclipse.sirius.diagram.ui/plugin.properties b/plugins/org.eclipse.sirius.diagram.ui/plugin.properties index a1ebf7d88a..f2efe6cb2c 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/plugin.properties +++ b/plugins/org.eclipse.sirius.diagram.ui/plugin.properties @@ -1277,3 +1277,24 @@ _UI_CustomLayoutConfiguration_id_feature = Id _UI_CustomLayoutConfiguration_label_feature = Label _UI_CustomLayoutConfiguration_layoutOptions_feature = Layout Options _UI_LayoutOption_name_feature = Name +_UI_BooleanLayoutOption_type = Boolean Layout Option +_UI_IntegerLayoutOption_type = Integer Layout Option +_UI_DoubleLayoutOption_type = Double Layout Option +_UI_EnumLayoutOption_type = Enum Layout Option +_UI_EnumLayoutValue_type = Enum Layout Value +_UI_GenericLayout_description_feature = Description +_UI_LayoutOption_name_feature = Name +_UI_LayoutOption_description_feature = Description +_UI_BooleanLayoutOption_value_feature = Value +_UI_IntegerLayoutOption_value_feature = Value +_UI_DoubleLayoutOption_value_feature = Value +_UI_EnumLayoutOption_value_feature = Value +_UI_EnumLayoutValue_value_feature = Value +_UI_StringLayoutOption_type = String Layout Option +_UI_LayoutOption_id_feature = Id +_UI_LayoutOption_label_feature = Label +_UI_StringLayoutOption_value_feature = Value +_UI_EnumLayoutOption_choices_feature = Choices +_UI_EnumLayoutValue_description_feature = Description +_UI_EnumLayoutValue_name_feature = Name +_UI_CustomLayoutConfiguration_description_feature = Description diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/BooleanLayoutOptionItemProviderSpec.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/BooleanLayoutOptionItemProviderSpec.java new file mode 100644 index 0000000000..db9ab6e88d --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/BooleanLayoutOptionItemProviderSpec.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2018 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.diagram.internal.description.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.sirius.diagram.description.BooleanLayoutOption; +import org.eclipse.sirius.diagram.description.LayoutOption; +import org.eclipse.sirius.diagram.description.provider.BooleanLayoutOptionItemProvider; + +/** + * Customize the label of {@link BooleanLayoutOption} items in VSM editor. + * + * @author <a href="mailto:pierre.guilet@obeo.fr">Pierre Guilet</a> + * + */ +public class BooleanLayoutOptionItemProviderSpec extends BooleanLayoutOptionItemProvider { + + /** + * Default constructor. + * + * @param adapterFactory + * factory to use. + */ + public BooleanLayoutOptionItemProviderSpec(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + @Override + public String getText(Object object) { + LayoutOption layout = (LayoutOption) object; + return layout.getLabel(); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/CustomLayoutConfigurationItemProviderSpec.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/CustomLayoutConfigurationItemProviderSpec.java index 1140595c25..1e49d7e2df 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/CustomLayoutConfigurationItemProviderSpec.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/CustomLayoutConfigurationItemProviderSpec.java @@ -10,12 +10,21 @@ *******************************************************************************/ package org.eclipse.sirius.diagram.internal.description.provider; +import java.util.Collection; +import java.util.Map; + import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.sirius.diagram.description.EnumLayoutOption; import org.eclipse.sirius.diagram.description.GenericLayout; +import org.eclipse.sirius.diagram.description.LayoutOption; import org.eclipse.sirius.diagram.description.provider.CustomLayoutConfigurationItemProvider; +import org.eclipse.sirius.diagram.ui.internal.layout.GenericLayoutProviderSupplier; +import org.eclipse.sirius.diagram.ui.provider.DiagramUIPlugin; /** - * Customize the label of {@link GenericLayout} items in VSM editor. + * Customize the label of {@link GenericLayout} items in VSM editor. Also override child descriptor to propose available + * {@link LayoutOption} with their attributes already filled. * * @author <a href="mailto:pierre.guilet@obeo.fr">Pierre Guilet</a> * @@ -32,14 +41,35 @@ public class CustomLayoutConfigurationItemProviderSpec extends CustomLayoutConfi super(adapterFactory); } - /* - * (non-Javadoc) - * @see org.eclipse.sirius.diagram.description.provider.GenericLayoutItemProvider#getText(java.lang.Object) - */ @Override public String getText(Object object) { GenericLayout layout = (GenericLayout) object; return layout.getLabel(); } + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + Map<String, GenericLayoutProviderSupplier> layoutProviderRegistry = DiagramUIPlugin.getPlugin().getLayoutProviderRegistry(); + GenericLayout layout = (GenericLayout) object; + + GenericLayoutProviderSupplier genericLayoutProviderSupplier = layoutProviderRegistry.get(layout.getID()); + Map<String, LayoutOption> layoutOptions = genericLayoutProviderSupplier.getLayoutOptions(); + for (LayoutOption layoutOption : layoutOptions.values()) { + LayoutOption copy = EcoreUtil.copy(layoutOption); + if (copy instanceof EnumLayoutOption) { + ((EnumLayoutOption) copy).getChoices().clear(); + } + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.diagram.description.DescriptionPackage.Literals.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS, copy)); + } + } + + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) { + if (child instanceof LayoutOption) { + return ((LayoutOption) child).getLabel(); + } + + return super.getCreateChildText(owner, feature, child, selection); + } + } diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/DoubleLayoutOptionItemProviderSpec.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/DoubleLayoutOptionItemProviderSpec.java new file mode 100644 index 0000000000..c177db9b76 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/DoubleLayoutOptionItemProviderSpec.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2018 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.diagram.internal.description.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.sirius.diagram.description.LayoutOption; +import org.eclipse.sirius.diagram.description.provider.DoubleLayoutOptionItemProvider; + +/** + * Customize the label of {@link oubleLayoutOption} items in VSM editor. + * + * @author <a href="mailto:pierre.guilet@obeo.fr">Pierre Guilet</a> + * + */ +public class DoubleLayoutOptionItemProviderSpec extends DoubleLayoutOptionItemProvider { + + /** + * Default constructor. + * + * @param adapterFactory + * factory to use. + */ + public DoubleLayoutOptionItemProviderSpec(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + @Override + public String getText(Object object) { + LayoutOption layout = (LayoutOption) object; + return layout.getLabel(); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/EnumLayoutOptionItemProviderSpec.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/EnumLayoutOptionItemProviderSpec.java new file mode 100644 index 0000000000..3bc0fd3def --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/EnumLayoutOptionItemProviderSpec.java @@ -0,0 +1,75 @@ +/******************************************************************************* + * Copyright (c) 2018 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.diagram.internal.description.provider; + +import java.util.Collection; +import java.util.Map; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.sirius.diagram.description.EnumLayoutOption; +import org.eclipse.sirius.diagram.description.EnumLayoutValue; +import org.eclipse.sirius.diagram.description.GenericLayout; +import org.eclipse.sirius.diagram.description.LayoutOption; +import org.eclipse.sirius.diagram.description.provider.EnumLayoutOptionItemProvider; +import org.eclipse.sirius.diagram.ui.internal.layout.GenericLayoutProviderSupplier; +import org.eclipse.sirius.diagram.ui.provider.DiagramUIPlugin; + +/** + * Customize the label of {@link EnumLayoutOption} items in VSM editor. Also override child descriptor to propose + * available {@link EnumLayoutValue} with their attributes already filled. + * + * @author <a href="mailto:pierre.guilet@obeo.fr">Pierre Guilet</a> + * + */ +public class EnumLayoutOptionItemProviderSpec extends EnumLayoutOptionItemProvider { + + /** + * Default constructor. + * + * @param adapterFactory + * factory to use. + */ + public EnumLayoutOptionItemProviderSpec(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + @Override + public String getText(Object object) { + LayoutOption layout = (LayoutOption) object; + return layout.getLabel(); + } + + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + Map<String, GenericLayoutProviderSupplier> layoutProviderRegistry = DiagramUIPlugin.getPlugin().getLayoutProviderRegistry(); + EnumLayoutOption layoutOption = (EnumLayoutOption) object; + GenericLayout layout = (GenericLayout) layoutOption.eContainer(); + GenericLayoutProviderSupplier genericLayoutProviderSupplier = layoutProviderRegistry.get(layout.getID()); + Map<String, LayoutOption> layoutOptions = genericLayoutProviderSupplier.getLayoutOptions(); + EnumLayoutOption layoutOptionTemplate = (EnumLayoutOption) layoutOptions.get(layoutOption.getId()); + EList<EnumLayoutValue> choices = layoutOptionTemplate.getChoices(); + for (EnumLayoutValue enumLayoutValue : choices) { + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.diagram.description.DescriptionPackage.Literals.ENUM_LAYOUT_OPTION__VALUE, EcoreUtil.copy(enumLayoutValue))); + } + } + + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) { + if (child instanceof EnumLayoutValue) { + return ((EnumLayoutValue) child).getName(); + } + + return super.getCreateChildText(owner, feature, child, selection); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/EnumLayoutValueItemProviderSpec.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/EnumLayoutValueItemProviderSpec.java new file mode 100644 index 0000000000..3e976e71c0 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/EnumLayoutValueItemProviderSpec.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2018 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.diagram.internal.description.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.sirius.diagram.description.EnumLayoutValue; +import org.eclipse.sirius.diagram.description.provider.EnumLayoutValueItemProvider; + +/** + * Customize the label of {@link EnumLayoutValue} items in VSM editor. + * + * @author <a href="mailto:pierre.guilet@obeo.fr">Pierre Guilet</a> + * + */ +public class EnumLayoutValueItemProviderSpec extends EnumLayoutValueItemProvider { + + /** + * Default constructor. + * + * @param adapterFactory + * factory to use. + */ + public EnumLayoutValueItemProviderSpec(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + @Override + public String getText(Object object) { + EnumLayoutValue layout = (EnumLayoutValue) object; + return layout.getName(); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/IntegerLayoutOptionItemProviderSpec.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/IntegerLayoutOptionItemProviderSpec.java new file mode 100644 index 0000000000..649518a6c0 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/IntegerLayoutOptionItemProviderSpec.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2018 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.diagram.internal.description.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.sirius.diagram.description.IntegerLayoutOption; +import org.eclipse.sirius.diagram.description.LayoutOption; +import org.eclipse.sirius.diagram.description.provider.IntegerLayoutOptionItemProvider; + +/** + * Customize the label of {@link IntegerLayoutOption} items in VSM editor. + * + * @author <a href="mailto:pierre.guilet@obeo.fr">Pierre Guilet</a> + * + */ +public class IntegerLayoutOptionItemProviderSpec extends IntegerLayoutOptionItemProvider { + + /** + * Default constructor. + * + * @param adapterFactory + * factory to use. + */ + public IntegerLayoutOptionItemProviderSpec(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + @Override + public String getText(Object object) { + LayoutOption layout = (LayoutOption) object; + return layout.getLabel(); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/StringLayoutOptionItemProviderSpec.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/StringLayoutOptionItemProviderSpec.java new file mode 100644 index 0000000000..f844febd92 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/internal/description/provider/StringLayoutOptionItemProviderSpec.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2018 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.diagram.internal.description.provider; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.sirius.diagram.description.LayoutOption; +import org.eclipse.sirius.diagram.description.StringLayoutOption; +import org.eclipse.sirius.diagram.description.provider.StringLayoutOptionItemProvider; + +/** + * Customize the label of {@link StringLayoutOption} items in VSM editor. + * + * @author <a href="mailto:pierre.guilet@obeo.fr">Pierre Guilet</a> + * + */ +public class StringLayoutOptionItemProviderSpec extends StringLayoutOptionItemProvider { + + /** + * Default constructor. + * + * @param adapterFactory + * factory to use. + */ + public StringLayoutOptionItemProviderSpec(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + @Override + public String getText(Object object) { + LayoutOption layout = (LayoutOption) object; + return layout.getLabel(); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/BooleanLayoutOptionItemProvider.java b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/BooleanLayoutOptionItemProvider.java new file mode 100644 index 0000000000..ebe52defde --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/BooleanLayoutOptionItemProvider.java @@ -0,0 +1,111 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.sirius.diagram.description.BooleanLayoutOption; +import org.eclipse.sirius.diagram.description.DescriptionPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.sirius.diagram.description.BooleanLayoutOption} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class BooleanLayoutOptionItemProvider extends LayoutOptionItemProvider { + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public BooleanLayoutOptionItemProvider(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); + + addValuePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Value feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addValuePropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BooleanLayoutOption_value_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_BooleanLayoutOption_value_feature", "_UI_BooleanLayoutOption_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + DescriptionPackage.Literals.BOOLEAN_LAYOUT_OPTION__VALUE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((BooleanLayoutOption) object).getId(); + return label == null || label.length() == 0 ? getString("_UI_BooleanLayoutOption_type") : //$NON-NLS-1$ + getString("_UI_BooleanLayoutOption_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * 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(BooleanLayoutOption.class)) { + case DescriptionPackage.BOOLEAN_LAYOUT_OPTION__VALUE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created + * under this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/CustomLayoutConfigurationItemProvider.java b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/CustomLayoutConfigurationItemProvider.java index 1204d34b35..82b28f5c05 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/CustomLayoutConfigurationItemProvider.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/CustomLayoutConfigurationItemProvider.java @@ -17,11 +17,13 @@ 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.IItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ViewerNotification; import org.eclipse.sirius.diagram.description.CustomLayoutConfiguration; +import org.eclipse.sirius.diagram.description.DescriptionFactory; import org.eclipse.sirius.diagram.description.DescriptionPackage; import org.eclipse.sirius.diagram.ui.provider.DiagramUIPlugin; import org.eclipse.sirius.viewpoint.description.provider.DocumentedElementItemProvider; @@ -54,7 +56,7 @@ public class CustomLayoutConfigurationItemProvider extends DocumentedElementItem addIdPropertyDescriptor(object); addLabelPropertyDescriptor(object); - addLayoutOptionsPropertyDescriptor(object); + addDescriptionPropertyDescriptor(object); } return itemPropertyDescriptors; } @@ -84,15 +86,45 @@ public class CustomLayoutConfigurationItemProvider extends DocumentedElementItem } /** - * This adds a property descriptor for the Layout Options feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * This adds a property descriptor for the Description feature. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - protected void addLayoutOptionsPropertyDescriptor(Object object) { - itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_CustomLayoutConfiguration_layoutOptions_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_CustomLayoutConfiguration_layoutOptions_feature", "_UI_CustomLayoutConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - DescriptionPackage.Literals.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS, true, false, true, null, null, null)); + protected void addDescriptionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add( + createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CustomLayoutConfiguration_description_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_CustomLayoutConfiguration_description_feature", "_UI_CustomLayoutConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + DescriptionPackage.Literals.CUSTOM_LAYOUT_CONFIGURATION__DESCRIPTION, 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(DescriptionPackage.Literals.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS); + } + 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); } /** @@ -131,8 +163,12 @@ public class CustomLayoutConfigurationItemProvider extends DocumentedElementItem switch (notification.getFeatureID(CustomLayoutConfiguration.class)) { case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__ID: case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LABEL: + case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__DESCRIPTION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; + case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; } super.notifyChanged(notification); } @@ -146,6 +182,16 @@ public class CustomLayoutConfigurationItemProvider extends DocumentedElementItem @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS, DescriptionFactory.eINSTANCE.createBooleanLayoutOption())); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS, DescriptionFactory.eINSTANCE.createStringLayoutOption())); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS, DescriptionFactory.eINSTANCE.createIntegerLayoutOption())); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS, DescriptionFactory.eINSTANCE.createDoubleLayoutOption())); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS, DescriptionFactory.eINSTANCE.createEnumLayoutOption())); } /** diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DescriptionItemProviderAdapterFactory.java b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DescriptionItemProviderAdapterFactory.java index 94d3e7a4a4..1cf9ebb889 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DescriptionItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DescriptionItemProviderAdapterFactory.java @@ -38,8 +38,14 @@ import org.eclipse.sirius.diagram.description.DescriptionFactory; import org.eclipse.sirius.diagram.description.DiagramDescription; import org.eclipse.sirius.diagram.description.Layer; import org.eclipse.sirius.diagram.description.util.DescriptionAdapterFactory; +import org.eclipse.sirius.diagram.internal.description.provider.BooleanLayoutOptionItemProviderSpec; import org.eclipse.sirius.diagram.internal.description.provider.CustomLayoutConfigurationItemProviderSpec; import org.eclipse.sirius.diagram.internal.description.provider.DiagramDescriptionItemProviderSpec; +import org.eclipse.sirius.diagram.internal.description.provider.DoubleLayoutOptionItemProviderSpec; +import org.eclipse.sirius.diagram.internal.description.provider.EnumLayoutOptionItemProviderSpec; +import org.eclipse.sirius.diagram.internal.description.provider.EnumLayoutValueItemProviderSpec; +import org.eclipse.sirius.diagram.internal.description.provider.IntegerLayoutOptionItemProviderSpec; +import org.eclipse.sirius.diagram.internal.description.provider.StringLayoutOptionItemProviderSpec; import org.eclipse.sirius.diagram.ui.provider.DiagramUIPlugin; import org.eclipse.sirius.diagram.ui.provider.Messages; import org.eclipse.sirius.viewpoint.description.DecorationDescriptionsSet; @@ -448,26 +454,145 @@ public class DescriptionItemProviderAdapterFactory extends DescriptionAdapterFac } /** - * This keeps track of the one adapter used for all {@link org.eclipse.sirius.diagram.description.LayoutOption} + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.description.BooleanLayoutOption} instances. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected BooleanLayoutOptionItemProvider booleanLayoutOptionItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.sirius.diagram.description.BooleanLayoutOption}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public Adapter createBooleanLayoutOptionAdapter() { + if (booleanLayoutOptionItemProvider == null) { + booleanLayoutOptionItemProvider = new BooleanLayoutOptionItemProviderSpec(this); + } + + return booleanLayoutOptionItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.description.StringLayoutOption} instances. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected StringLayoutOptionItemProvider stringLayoutOptionItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.sirius.diagram.description.StringLayoutOption}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public Adapter createStringLayoutOptionAdapter() { + if (stringLayoutOptionItemProvider == null) { + stringLayoutOptionItemProvider = new StringLayoutOptionItemProviderSpec(this); + } + + return stringLayoutOptionItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.description.IntegerLayoutOption} instances. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected IntegerLayoutOptionItemProvider integerLayoutOptionItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.sirius.diagram.description.IntegerLayoutOption}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public Adapter createIntegerLayoutOptionAdapter() { + if (integerLayoutOptionItemProvider == null) { + integerLayoutOptionItemProvider = new IntegerLayoutOptionItemProviderSpec(this); + } + + return integerLayoutOptionItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.description.DoubleLayoutOption} instances. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected DoubleLayoutOptionItemProvider doubleLayoutOptionItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.sirius.diagram.description.DoubleLayoutOption}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public Adapter createDoubleLayoutOptionAdapter() { + if (doubleLayoutOptionItemProvider == null) { + doubleLayoutOptionItemProvider = new DoubleLayoutOptionItemProviderSpec(this); + } + + return doubleLayoutOptionItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.sirius.diagram.description.EnumLayoutOption} * instances. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - protected LayoutOptionItemProvider layoutOptionItemProvider; + protected EnumLayoutOptionItemProvider enumLayoutOptionItemProvider; /** - * This creates an adapter for a {@link org.eclipse.sirius.diagram.description.LayoutOption}. <!-- begin-user-doc - * --> <!-- end-user-doc --> + * This creates an adapter for a {@link org.eclipse.sirius.diagram.description.EnumLayoutOption}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + @Override + public Adapter createEnumLayoutOptionAdapter() { + if (enumLayoutOptionItemProvider == null) { + enumLayoutOptionItemProvider = new EnumLayoutOptionItemProviderSpec(this); + } + + return enumLayoutOptionItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.sirius.diagram.description.EnumLayoutValue} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ + protected EnumLayoutValueItemProvider enumLayoutValueItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.sirius.diagram.description.EnumLayoutValue}. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated NOT + */ @Override - public Adapter createLayoutOptionAdapter() { - if (layoutOptionItemProvider == null) { - layoutOptionItemProvider = new LayoutOptionItemProvider(this); + public Adapter createEnumLayoutValueAdapter() { + if (enumLayoutValueItemProvider == null) { + enumLayoutValueItemProvider = new EnumLayoutValueItemProviderSpec(this); } - return layoutOptionItemProvider; + return enumLayoutValueItemProvider; } /** @@ -685,8 +810,23 @@ public class DescriptionItemProviderAdapterFactory extends DescriptionAdapterFac if (customLayoutConfigurationItemProvider != null) { customLayoutConfigurationItemProvider.dispose(); } - if (layoutOptionItemProvider != null) { - layoutOptionItemProvider.dispose(); + if (booleanLayoutOptionItemProvider != null) { + booleanLayoutOptionItemProvider.dispose(); + } + if (stringLayoutOptionItemProvider != null) { + stringLayoutOptionItemProvider.dispose(); + } + if (integerLayoutOptionItemProvider != null) { + integerLayoutOptionItemProvider.dispose(); + } + if (doubleLayoutOptionItemProvider != null) { + doubleLayoutOptionItemProvider.dispose(); + } + if (enumLayoutOptionItemProvider != null) { + enumLayoutOptionItemProvider.dispose(); + } + if (enumLayoutValueItemProvider != null) { + enumLayoutValueItemProvider.dispose(); } if (mappingBasedDecorationItemProvider != null) { mappingBasedDecorationItemProvider.dispose(); diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DiagramDescriptionItemProvider.java b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DiagramDescriptionItemProvider.java index fe406b46a1..22630c62a6 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DiagramDescriptionItemProvider.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DiagramDescriptionItemProvider.java @@ -14,6 +14,8 @@ package org.eclipse.sirius.diagram.description.provider; import java.util.Collection; import java.util.List; import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; @@ -615,7 +617,6 @@ public class DiagramDescriptionItemProvider extends DragAndDropTargetDescription newChildDescriptors.add( createChildParameter(org.eclipse.sirius.diagram.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__LAYOUT, DescriptionFactory.eINSTANCE.createCustomLayoutConfiguration())); - addAllCustomLayoutChildDescriptors(newChildDescriptors); newChildDescriptors.add( createChildParameter(org.eclipse.sirius.diagram.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__DIAGRAM_INITIALISATION, ToolFactory.eINSTANCE.createInitialOperation())); @@ -653,18 +654,19 @@ public class DiagramDescriptionItemProvider extends DragAndDropTargetDescription /** * Add all registered generic layout providers as child descriptor. - * + * * @param newChildDescriptors * the child descriptor collection where to add new child descriptors. */ private void addAllCustomLayoutChildDescriptors(Collection<Object> newChildDescriptors) { Map<String, GenericLayoutProviderSupplier> layoutProviderRegistry = DiagramUIPlugin.getPlugin().getLayoutProviderRegistry(); - layoutProviderRegistry.forEach((key, value) -> { + Set<Entry<String, GenericLayoutProviderSupplier>> layoutProviders = layoutProviderRegistry.entrySet(); + for (Entry<String, GenericLayoutProviderSupplier> layoutProviderEntry : layoutProviders) { CustomLayoutConfiguration customConfiguration = DescriptionFactory.eINSTANCE.createCustomLayoutConfiguration(); - customConfiguration.setId(key); - customConfiguration.setLabel(value.getLabel()); + customConfiguration.setId(layoutProviderEntry.getKey()); + customConfiguration.setLabel(layoutProviderEntry.getValue().getLabel()); newChildDescriptors.add(createChildParameter(org.eclipse.sirius.diagram.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__LAYOUT, customConfiguration)); - }); + } } /** diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DoubleLayoutOptionItemProvider.java b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DoubleLayoutOptionItemProvider.java new file mode 100644 index 0000000000..1e472944e7 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DoubleLayoutOptionItemProvider.java @@ -0,0 +1,111 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.sirius.diagram.description.DescriptionPackage; +import org.eclipse.sirius.diagram.description.DoubleLayoutOption; + +/** + * This is the item provider adapter for a {@link org.eclipse.sirius.diagram.description.DoubleLayoutOption} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class DoubleLayoutOptionItemProvider extends LayoutOptionItemProvider { + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public DoubleLayoutOptionItemProvider(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); + + addValuePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Value feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addValuePropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DoubleLayoutOption_value_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_DoubleLayoutOption_value_feature", "_UI_DoubleLayoutOption_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + DescriptionPackage.Literals.DOUBLE_LAYOUT_OPTION__VALUE, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((DoubleLayoutOption) object).getId(); + return label == null || label.length() == 0 ? getString("_UI_DoubleLayoutOption_type") : //$NON-NLS-1$ + getString("_UI_DoubleLayoutOption_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * 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(DoubleLayoutOption.class)) { + case DescriptionPackage.DOUBLE_LAYOUT_OPTION__VALUE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created + * under this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/EnumLayoutOptionItemProvider.java b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/EnumLayoutOptionItemProvider.java new file mode 100644 index 0000000000..bad6d3dd70 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/EnumLayoutOptionItemProvider.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description.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.diagram.description.DescriptionFactory; +import org.eclipse.sirius.diagram.description.DescriptionPackage; +import org.eclipse.sirius.diagram.description.EnumLayoutOption; + +/** + * This is the item provider adapter for a {@link org.eclipse.sirius.diagram.description.EnumLayoutOption} object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class EnumLayoutOptionItemProvider extends LayoutOptionItemProvider { + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EnumLayoutOptionItemProvider(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(DescriptionPackage.Literals.ENUM_LAYOUT_OPTION__VALUE); + childrenFeatures.add(DescriptionPackage.Literals.ENUM_LAYOUT_OPTION__CHOICES); + } + 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 the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((EnumLayoutOption) object).getId(); + return label == null || label.length() == 0 ? getString("_UI_EnumLayoutOption_type") : //$NON-NLS-1$ + getString("_UI_EnumLayoutOption_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * 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(EnumLayoutOption.class)) { + case DescriptionPackage.ENUM_LAYOUT_OPTION__VALUE: + case DescriptionPackage.ENUM_LAYOUT_OPTION__CHOICES: + 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(DescriptionPackage.Literals.ENUM_LAYOUT_OPTION__VALUE, DescriptionFactory.eINSTANCE.createEnumLayoutValue())); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.ENUM_LAYOUT_OPTION__CHOICES, DescriptionFactory.eINSTANCE.createEnumLayoutValue())); + } + + /** + * 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 == DescriptionPackage.Literals.ENUM_LAYOUT_OPTION__VALUE || childFeature == DescriptionPackage.Literals.ENUM_LAYOUT_OPTION__CHOICES; + + if (qualify) { + return getString("_UI_CreateChild_text2", //$NON-NLS-1$ + new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/EnumLayoutValueItemProvider.java b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/EnumLayoutValueItemProvider.java new file mode 100644 index 0000000000..9d8b89a913 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/EnumLayoutValueItemProvider.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.sirius.diagram.description.DescriptionPackage; +import org.eclipse.sirius.diagram.description.EnumLayoutValue; +import org.eclipse.sirius.diagram.ui.provider.DiagramUIPlugin; + +/** + * This is the item provider adapter for a {@link org.eclipse.sirius.diagram.description.EnumLayoutValue} object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class EnumLayoutValueItemProvider 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 EnumLayoutValueItemProvider(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); + + addNamePropertyDescriptor(object); + addDescriptionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Name feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EnumLayoutValue_name_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_EnumLayoutValue_name_feature", "_UI_EnumLayoutValue_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + DescriptionPackage.Literals.ENUM_LAYOUT_VALUE__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Description feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addDescriptionPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EnumLayoutValue_description_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_EnumLayoutValue_description_feature", "_UI_EnumLayoutValue_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + DescriptionPackage.Literals.ENUM_LAYOUT_VALUE__DESCRIPTION, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This returns EnumLayoutValue.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/EnumLayoutValue")); //$NON-NLS-1$ + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((EnumLayoutValue) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_EnumLayoutValue_type") : //$NON-NLS-1$ + getString("_UI_EnumLayoutValue_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * 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(EnumLayoutValue.class)) { + case DescriptionPackage.ENUM_LAYOUT_VALUE__NAME: + case DescriptionPackage.ENUM_LAYOUT_VALUE__DESCRIPTION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created + * under this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return DiagramUIPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/IntegerLayoutOptionItemProvider.java b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/IntegerLayoutOptionItemProvider.java new file mode 100644 index 0000000000..00a449671a --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/IntegerLayoutOptionItemProvider.java @@ -0,0 +1,111 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.sirius.diagram.description.DescriptionPackage; +import org.eclipse.sirius.diagram.description.IntegerLayoutOption; + +/** + * This is the item provider adapter for a {@link org.eclipse.sirius.diagram.description.IntegerLayoutOption} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class IntegerLayoutOptionItemProvider extends LayoutOptionItemProvider { + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public IntegerLayoutOptionItemProvider(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); + + addValuePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Value feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addValuePropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IntegerLayoutOption_value_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IntegerLayoutOption_value_feature", "_UI_IntegerLayoutOption_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + DescriptionPackage.Literals.INTEGER_LAYOUT_OPTION__VALUE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((IntegerLayoutOption) object).getId(); + return label == null || label.length() == 0 ? getString("_UI_IntegerLayoutOption_type") : //$NON-NLS-1$ + getString("_UI_IntegerLayoutOption_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * 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(IntegerLayoutOption.class)) { + case DescriptionPackage.INTEGER_LAYOUT_OPTION__VALUE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created + * under this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/LayoutOptionItemProvider.java b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/LayoutOptionItemProvider.java index 59b9035fec..b98b6a934f 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/LayoutOptionItemProvider.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/LayoutOptionItemProvider.java @@ -58,33 +58,21 @@ public class LayoutOptionItemProvider extends ItemProviderAdapter if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); - addNamePropertyDescriptor(object); - addValuePropertyDescriptor(object); + addDescriptionPropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the Name feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * This adds a property descriptor for the Description feature. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ - protected void addNamePropertyDescriptor(Object object) { - itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LayoutOption_name_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_LayoutOption_name_feature", "_UI_LayoutOption_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - DescriptionPackage.Literals.LAYOUT_OPTION__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); - } - - /** - * This adds a property descriptor for the Value feature. <!-- begin-user-doc --> <!-- end-user-doc --> - * - * @generated - */ - protected void addValuePropertyDescriptor(Object object) { + protected void addDescriptionPropertyDescriptor(Object object) { itemPropertyDescriptors - .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LayoutOption_value_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_LayoutOption_value_feature", "_UI_LayoutOption_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - DescriptionPackage.Literals.LAYOUT_OPTION__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LayoutOption_description_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_LayoutOption_description_feature", "_UI_LayoutOption_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + DescriptionPackage.Literals.LAYOUT_OPTION__DESCRIPTION, false, true, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** @@ -104,7 +92,7 @@ public class LayoutOptionItemProvider extends ItemProviderAdapter */ @Override public String getText(Object object) { - String label = ((LayoutOption) object).getName(); + String label = ((LayoutOption) object).getId(); return label == null || label.length() == 0 ? getString("_UI_LayoutOption_type") : //$NON-NLS-1$ getString("_UI_LayoutOption_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ } @@ -121,8 +109,9 @@ public class LayoutOptionItemProvider extends ItemProviderAdapter updateChildren(notification); switch (notification.getFeatureID(LayoutOption.class)) { - case DescriptionPackage.LAYOUT_OPTION__NAME: - case DescriptionPackage.LAYOUT_OPTION__VALUE: + case DescriptionPackage.LAYOUT_OPTION__ID: + case DescriptionPackage.LAYOUT_OPTION__LABEL: + case DescriptionPackage.LAYOUT_OPTION__DESCRIPTION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/StringLayoutOptionItemProvider.java b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/StringLayoutOptionItemProvider.java new file mode 100644 index 0000000000..f348c7a01a --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/StringLayoutOptionItemProvider.java @@ -0,0 +1,111 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.sirius.diagram.description.DescriptionPackage; +import org.eclipse.sirius.diagram.description.StringLayoutOption; + +/** + * This is the item provider adapter for a {@link org.eclipse.sirius.diagram.description.StringLayoutOption} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class StringLayoutOptionItemProvider extends LayoutOptionItemProvider { + /** + * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public StringLayoutOptionItemProvider(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); + + addValuePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Value feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addValuePropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StringLayoutOption_value_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_StringLayoutOption_value_feature", "_UI_StringLayoutOption_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + DescriptionPackage.Literals.STRING_LAYOUT_OPTION__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((StringLayoutOption) object).getId(); + return label == null || label.length() == 0 ? getString("_UI_StringLayoutOption_type") : //$NON-NLS-1$ + getString("_UI_StringLayoutOption_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * 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(StringLayoutOption.class)) { + case DescriptionPackage.STRING_LAYOUT_OPTION__VALUE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created + * under this object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/ui/provider/DiagramUIPlugin.java b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/ui/provider/DiagramUIPlugin.java index 78efd4cbe2..799061c050 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/ui/provider/DiagramUIPlugin.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/ui/provider/DiagramUIPlugin.java @@ -44,6 +44,7 @@ import org.eclipse.jface.viewers.DecorationOverlayIcon; import org.eclipse.jface.viewers.IDecoration; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.sirius.common.ui.tools.internal.preference.DynamicConfigurationHelper; +import org.eclipse.sirius.diagram.description.LayoutOption; import org.eclipse.sirius.diagram.description.concern.provider.ConcernItemProviderAdapterFactory; import org.eclipse.sirius.diagram.description.filter.provider.FilterItemProviderAdapterFactory; import org.eclipse.sirius.diagram.provider.DiagramItemProviderAdapterFactory; @@ -169,27 +170,32 @@ public final class DiagramUIPlugin extends EMFPlugin { super(); // Remember the static instance. + // DiagramUIPlugin.plugin = this; } /** * Add a new layout provider to the registry. - * + * * @param providerId - * the id of the layout provider to add in the registry. - * + * the id of the layout provider to register. * @param providerLabel * the label of the layout provider to register. * @param layoutSupplier * the {@link DefaultLayoutProvider} instances supplier. + * @param layoutOptions */ - public void addLayoutProvider(String providerId, String providerLabel, Supplier<DefaultLayoutProvider> layoutSupplier) { - layoutProviderRegistry.put(providerId, new GenericLayoutProviderSupplier(providerLabel, layoutSupplier)); + public void addLayoutProvider(String providerId, String providerLabel, Supplier<DefaultLayoutProvider> layoutSupplier, List<LayoutOption> layoutOptions) { + Map<String, LayoutOption> optionsMap = new HashMap<String, LayoutOption>(); + for (LayoutOption layoutOption : layoutOptions) { + optionsMap.put(layoutOption.getId(), layoutOption); + } + layoutProviderRegistry.put(providerId, new GenericLayoutProviderSupplier(providerLabel, layoutSupplier, optionsMap)); } /** * Remove the layout provider identified by the given id from the registry. - * + * * @param layoutProviderId * the id of the layout provider to remove from the registry. * @return the layout provider removed if such element exists. @@ -200,7 +206,7 @@ public final class DiagramUIPlugin extends EMFPlugin { /** * Returns the unmodifiable registry containing all layout providers that can be specified directly in the VSM. - * + * * @return an unmodifiable map of layout providers suppliers associated to their ids. */ public Map<String, GenericLayoutProviderSupplier> getLayoutProviderRegistry() { @@ -232,7 +238,7 @@ public final class DiagramUIPlugin extends EMFPlugin { layoutDataManagerRegistryListener = new LayoutDataManagerRegistryListener(); layoutDataManagerRegistryListener.init(); - layoutProviderRegistry = new HashMap<>(); + layoutProviderRegistry = new HashMap<String, GenericLayoutProviderSupplier>(); registerCoreDecorationProviders(); } diff --git a/plugins/org.eclipse.sirius.diagram.ui/src/org/eclipse/sirius/diagram/ui/internal/layout/GenericLayoutProviderSupplier.java b/plugins/org.eclipse.sirius.diagram.ui/src/org/eclipse/sirius/diagram/ui/internal/layout/GenericLayoutProviderSupplier.java index 4962b06b68..1b43291b71 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src/org/eclipse/sirius/diagram/ui/internal/layout/GenericLayoutProviderSupplier.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src/org/eclipse/sirius/diagram/ui/internal/layout/GenericLayoutProviderSupplier.java @@ -10,8 +10,10 @@ *******************************************************************************/ package org.eclipse.sirius.diagram.ui.internal.layout; +import java.util.Map; import java.util.function.Supplier; +import org.eclipse.sirius.diagram.description.LayoutOption; import org.eclipse.sirius.diagram.ui.tools.api.layout.provider.DefaultLayoutProvider; /** @@ -31,6 +33,8 @@ public class GenericLayoutProviderSupplier { */ private Supplier<DefaultLayoutProvider> layoutProviderSupplier; + private Map<String, LayoutOption> layoutOptions; + /** * Initialize the component. * @@ -38,11 +42,13 @@ public class GenericLayoutProviderSupplier { * Label to use in Sirius UI to represent this layout algorithm provider. * @param layoutProviderSupplier * Provide instances of {@link DefaultLayoutProvider}. + * @param layoutOptions */ - public GenericLayoutProviderSupplier(String label, Supplier<DefaultLayoutProvider> layoutProviderSupplier) { + public GenericLayoutProviderSupplier(String label, Supplier<DefaultLayoutProvider> layoutProviderSupplier, Map<String, LayoutOption> layoutOptions) { super(); this.label = label; this.layoutProviderSupplier = layoutProviderSupplier; + this.layoutOptions = layoutOptions; } /** @@ -63,4 +69,7 @@ public class GenericLayoutProviderSupplier { return label; } + public Map<String, LayoutOption> getLayoutOptions() { + return layoutOptions; + } } diff --git a/plugins/org.eclipse.sirius.diagram/model/diagram.ecore b/plugins/org.eclipse.sirius.diagram/model/diagram.ecore index 29ad867497..54190a0372 100644 --- a/plugins/org.eclipse.sirius.diagram/model/diagram.ecore +++ b/plugins/org.eclipse.sirius.diagram/model/diagram.ecore @@ -1695,13 +1695,37 @@ <eClassifiers xsi:type="ecore:EClass" name="CustomLayoutConfiguration" eSuperTypes="#//description/Layout"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> <eStructuralFeatures xsi:type="ecore:EReference" name="layoutOptions" upperBound="-1" - eType="#//description/LayoutOption"/> + eType="#//description/LayoutOption" containment="true"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="LayoutOption"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eClassifiers xsi:type="ecore:EClass" name="LayoutOption" abstract="true"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="BooleanLayoutOption" eSuperTypes="#//description/LayoutOption"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="StringLayoutOption" eSuperTypes="#//description/LayoutOption"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="IntegerLayoutOption" eSuperTypes="#//description/LayoutOption"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="DoubleLayoutOption" eSuperTypes="#//description/LayoutOption"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EDouble"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="EnumLayoutOption" eSuperTypes="#//description/LayoutOption"> + <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="#//description/EnumLayoutValue" + containment="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="choices" upperBound="-1" + eType="#//description/EnumLayoutValue" containment="true"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="EnumLayoutValue"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> + </eClassifiers> <eClassifiers xsi:type="ecore:EEnum" name="LayoutDirection"> <eLiterals name="TopToBottom" literal="topToBottom"/> <eLiterals name="LeftToRight" value="1"/> diff --git a/plugins/org.eclipse.sirius.diagram/model/diagram.genmodel b/plugins/org.eclipse.sirius.diagram/model/diagram.genmodel index 4adf6a10c5..d93f0c3912 100644 --- a/plugins/org.eclipse.sirius.diagram/model/diagram.genmodel +++ b/plugins/org.eclipse.sirius.diagram/model/diagram.genmodel @@ -593,15 +593,38 @@ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute diagram.ecore#//description/CompositeLayout/padding"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute diagram.ecore#//description/CompositeLayout/direction"/> </genClasses> - <genClasses ecoreClass="diagram.ecore#//description/CustomLayoutConfiguration"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute diagram.ecore#//description/CustomLayoutConfiguration/id"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute diagram.ecore#//description/CustomLayoutConfiguration/label"/> - <genFeatures notify="false" createChild="false" propertySortChoices="true" - ecoreFeature="ecore:EReference diagram.ecore#//description/CustomLayoutConfiguration/layoutOptions"/> + <genClasses ecoreClass="diagram.ecore#//description/GenericLayout"> + <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute diagram.ecore#//description/GenericLayout/ID"/> + <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute diagram.ecore#//description/GenericLayout/label"/> + <genFeatures property="Readonly" createChild="false" propertyMultiLine="true" + ecoreFeature="ecore:EAttribute diagram.ecore#//description/GenericLayout/description"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference diagram.ecore#//description/GenericLayout/layoutOptions"/> </genClasses> <genClasses ecoreClass="diagram.ecore#//description/LayoutOption"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute diagram.ecore#//description/LayoutOption/Name"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute diagram.ecore#//description/LayoutOption/value"/> + <genFeatures property="None" createChild="false" ecoreFeature="ecore:EAttribute diagram.ecore#//description/LayoutOption/id"/> + <genFeatures property="None" createChild="false" ecoreFeature="ecore:EAttribute diagram.ecore#//description/LayoutOption/label"/> + <genFeatures property="Readonly" createChild="false" propertyMultiLine="true" + ecoreFeature="ecore:EAttribute diagram.ecore#//description/LayoutOption/description"/> + </genClasses> + <genClasses image="false" ecoreClass="diagram.ecore#//description/BooleanLayoutOption"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute diagram.ecore#//description/BooleanLayoutOption/value"/> + </genClasses> + <genClasses image="false" ecoreClass="diagram.ecore#//description/StringLayoutOption"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute diagram.ecore#//description/StringLayoutOption/value"/> + </genClasses> + <genClasses image="false" ecoreClass="diagram.ecore#//description/IntegerLayoutOption"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute diagram.ecore#//description/IntegerLayoutOption/value"/> + </genClasses> + <genClasses image="false" ecoreClass="diagram.ecore#//description/DoubleLayoutOption"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute diagram.ecore#//description/DoubleLayoutOption/value"/> + </genClasses> + <genClasses image="false" ecoreClass="diagram.ecore#//description/EnumLayoutOption"> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference diagram.ecore#//description/EnumLayoutOption/value"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference diagram.ecore#//description/EnumLayoutOption/choices"/> + </genClasses> + <genClasses ecoreClass="diagram.ecore#//description/EnumLayoutValue"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute diagram.ecore#//description/EnumLayoutValue/name"/> + <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute diagram.ecore#//description/EnumLayoutValue/description"/> </genClasses> <genClasses ecoreClass="diagram.ecore#//description/MappingBasedDecoration"> <genFeatures notify="false" createChild="false" propertyCategory="General" diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/BooleanLayoutOption.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/BooleanLayoutOption.java new file mode 100644 index 0000000000..bc3b7aab07 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/BooleanLayoutOption.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Boolean Layout Option</b></em>'. <!-- + * end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.diagram.description.BooleanLayoutOption#isValue <em>Value</em>}</li> + * </ul> + * + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getBooleanLayoutOption() + * @model + * @generated + */ +public interface BooleanLayoutOption extends LayoutOption { + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Value</em>' attribute. + * @see #setValue(boolean) + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getBooleanLayoutOption_Value() + * @model + * @generated + */ + boolean isValue(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.diagram.description.BooleanLayoutOption#isValue <em>Value</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Value</em>' attribute. + * @see #isValue() + * @generated + */ + void setValue(boolean value); + +} // BooleanLayoutOption diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/CustomLayoutConfiguration.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/CustomLayoutConfiguration.java index 261817c207..b3e85c7597 100644 --- a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/CustomLayoutConfiguration.java +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/CustomLayoutConfiguration.java @@ -23,6 +23,7 @@ import org.eclipse.emf.common.util.EList; * <ul> * <li>{@link org.eclipse.sirius.diagram.description.CustomLayoutConfiguration#getId <em>Id</em>}</li> * <li>{@link org.eclipse.sirius.diagram.description.CustomLayoutConfiguration#getLabel <em>Label</em>}</li> + * <li>{@link org.eclipse.sirius.diagram.description.CustomLayoutConfiguration#getDescription <em>Description</em>}</li> * <li>{@link org.eclipse.sirius.diagram.description.CustomLayoutConfiguration#getLayoutOptions <em>Layout * Options</em>}</li> * </ul> @@ -86,19 +87,46 @@ public interface CustomLayoutConfiguration extends Layout { void setLabel(String value); /** - * Returns the value of the '<em><b>Layout Options</b></em>' reference list. The list contents are of type - * {@link org.eclipse.sirius.diagram.description.LayoutOption}. <!-- begin-user-doc --> + * Returns the value of the '<em><b>Description</b></em>' attribute. <!-- begin-user-doc --> * <p> - * If the meaning of the '<em>Layout Options</em>' reference list isn't clear, there really should be more of a - * description here... + * If the meaning of the '<em>Description</em>' attribute isn't clear, there really should be more of a description + * here... * </p> * <!-- end-user-doc --> * - * @return the value of the '<em>Layout Options</em>' reference list. - * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getCustomLayoutConfiguration_LayoutOptions() + * @return the value of the '<em>Description</em>' attribute. + * @see #setDescription(String) + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getCustomLayoutConfiguration_Description() * @model * @generated */ + String getDescription(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.diagram.description.CustomLayoutConfiguration#getDescription + * <em>Description</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Description</em>' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + + /** + * Returns the value of the '<em><b>Layout Options</b></em>' containment reference list. The list contents are of + * type {@link org.eclipse.sirius.diagram.description.LayoutOption}. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Layout Options</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>Layout Options</em>' containment reference list. + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getCustomLayoutConfiguration_LayoutOptions() + * @model containment="true" resolveProxies="true" + * @generated + */ EList<LayoutOption> getLayoutOptions(); } // CustomLayoutConfiguration diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/DescriptionFactory.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/DescriptionFactory.java index 232e28cc11..edbc415828 100644 --- a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/DescriptionFactory.java +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/DescriptionFactory.java @@ -163,12 +163,52 @@ public interface DescriptionFactory extends EFactory { CustomLayoutConfiguration createCustomLayoutConfiguration(); /** - * Returns a new object of class '<em>Layout Option</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * Returns a new object of class '<em>Boolean Layout Option</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> * - * @return a new object of class '<em>Layout Option</em>'. + * @return a new object of class '<em>Boolean Layout Option</em>'. * @generated */ - LayoutOption createLayoutOption(); + BooleanLayoutOption createBooleanLayoutOption(); + + /** + * Returns a new object of class '<em>String Layout Option</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>String Layout Option</em>'. + * @generated + */ + StringLayoutOption createStringLayoutOption(); + + /** + * Returns a new object of class '<em>Integer Layout Option</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Integer Layout Option</em>'. + * @generated + */ + IntegerLayoutOption createIntegerLayoutOption(); + + /** + * Returns a new object of class '<em>Double Layout Option</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Double Layout Option</em>'. + * @generated + */ + DoubleLayoutOption createDoubleLayoutOption(); + + /** + * Returns a new object of class '<em>Enum Layout Option</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Enum Layout Option</em>'. + * @generated + */ + EnumLayoutOption createEnumLayoutOption(); + + /** + * Returns a new object of class '<em>Enum Layout Value</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Enum Layout Value</em>'. + * @generated + */ + EnumLayoutValue createEnumLayoutValue(); /** * Returns a new object of class '<em>Mapping Based Decoration</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/DescriptionPackage.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/DescriptionPackage.java index 3cd2de0ec0..1bb27850c3 100644 --- a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/DescriptionPackage.java +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/DescriptionPackage.java @@ -68,7 +68,7 @@ public interface DescriptionPackage extends EPackage { * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getDragAndDropTargetDescription() * @generated */ - int DRAG_AND_DROP_TARGET_DESCRIPTION = 23; + int DRAG_AND_DROP_TARGET_DESCRIPTION = 29; /** * The feature id for the '<em><b>Drop Descriptions</b></em>' reference list. <!-- begin-user-doc --> <!-- @@ -2711,13 +2711,21 @@ public interface DescriptionPackage extends EPackage { int CUSTOM_LAYOUT_CONFIGURATION__LABEL = DescriptionPackage.LAYOUT_FEATURE_COUNT + 1; /** + * The feature id for the '<em><b>Description</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CUSTOM_LAYOUT_CONFIGURATION__DESCRIPTION = DescriptionPackage.LAYOUT_FEATURE_COUNT + 2; + + /** * The feature id for the '<em><b>Layout Options</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc * --> * * @generated * @ordered */ - int CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS = DescriptionPackage.LAYOUT_FEATURE_COUNT + 2; + int CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS = DescriptionPackage.LAYOUT_FEATURE_COUNT + 3; /** * The number of structural features of the '<em>Custom Layout Configuration</em>' class. <!-- begin-user-doc --> @@ -2726,7 +2734,7 @@ public interface DescriptionPackage extends EPackage { * @generated * @ordered */ - int CUSTOM_LAYOUT_CONFIGURATION_FEATURE_COUNT = DescriptionPackage.LAYOUT_FEATURE_COUNT + 3; + int CUSTOM_LAYOUT_CONFIGURATION_FEATURE_COUNT = DescriptionPackage.LAYOUT_FEATURE_COUNT + 4; /** * The meta object id for the '{@link org.eclipse.sirius.diagram.description.impl.LayoutOptionImpl <em>Layout @@ -2739,20 +2747,28 @@ public interface DescriptionPackage extends EPackage { int LAYOUT_OPTION = 19; /** - * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Id</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int LAYOUT_OPTION__NAME = 0; + int LAYOUT_OPTION__ID = 0; /** - * The feature id for the '<em><b>Value</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * The feature id for the '<em><b>Label</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated * @ordered */ - int LAYOUT_OPTION__VALUE = 1; + int LAYOUT_OPTION__LABEL = 1; + + /** + * The feature id for the '<em><b>Description</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int LAYOUT_OPTION__DESCRIPTION = 2; /** * The number of structural features of the '<em>Layout Option</em>' class. <!-- begin-user-doc --> <!-- @@ -2761,7 +2777,307 @@ public interface DescriptionPackage extends EPackage { * @generated * @ordered */ - int LAYOUT_OPTION_FEATURE_COUNT = 2; + int LAYOUT_OPTION_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link org.eclipse.sirius.diagram.description.impl.BooleanLayoutOptionImpl + * <em>Boolean Layout Option</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.diagram.description.impl.BooleanLayoutOptionImpl + * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getBooleanLayoutOption() + * @generated + */ + int BOOLEAN_LAYOUT_OPTION = 20; + + /** + * The feature id for the '<em><b>Id</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int BOOLEAN_LAYOUT_OPTION__ID = DescriptionPackage.LAYOUT_OPTION__ID; + + /** + * The feature id for the '<em><b>Label</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int BOOLEAN_LAYOUT_OPTION__LABEL = DescriptionPackage.LAYOUT_OPTION__LABEL; + + /** + * The feature id for the '<em><b>Description</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int BOOLEAN_LAYOUT_OPTION__DESCRIPTION = DescriptionPackage.LAYOUT_OPTION__DESCRIPTION; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int BOOLEAN_LAYOUT_OPTION__VALUE = DescriptionPackage.LAYOUT_OPTION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Boolean Layout Option</em>' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int BOOLEAN_LAYOUT_OPTION_FEATURE_COUNT = DescriptionPackage.LAYOUT_OPTION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.sirius.diagram.description.impl.StringLayoutOptionImpl <em>String + * Layout Option</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.diagram.description.impl.StringLayoutOptionImpl + * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getStringLayoutOption() + * @generated + */ + int STRING_LAYOUT_OPTION = 21; + + /** + * The feature id for the '<em><b>Id</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int STRING_LAYOUT_OPTION__ID = DescriptionPackage.LAYOUT_OPTION__ID; + + /** + * The feature id for the '<em><b>Label</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int STRING_LAYOUT_OPTION__LABEL = DescriptionPackage.LAYOUT_OPTION__LABEL; + + /** + * The feature id for the '<em><b>Description</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int STRING_LAYOUT_OPTION__DESCRIPTION = DescriptionPackage.LAYOUT_OPTION__DESCRIPTION; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int STRING_LAYOUT_OPTION__VALUE = DescriptionPackage.LAYOUT_OPTION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>String Layout Option</em>' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int STRING_LAYOUT_OPTION_FEATURE_COUNT = DescriptionPackage.LAYOUT_OPTION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.sirius.diagram.description.impl.IntegerLayoutOptionImpl + * <em>Integer Layout Option</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.diagram.description.impl.IntegerLayoutOptionImpl + * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getIntegerLayoutOption() + * @generated + */ + int INTEGER_LAYOUT_OPTION = 22; + + /** + * The feature id for the '<em><b>Id</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int INTEGER_LAYOUT_OPTION__ID = DescriptionPackage.LAYOUT_OPTION__ID; + + /** + * The feature id for the '<em><b>Label</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int INTEGER_LAYOUT_OPTION__LABEL = DescriptionPackage.LAYOUT_OPTION__LABEL; + + /** + * The feature id for the '<em><b>Description</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int INTEGER_LAYOUT_OPTION__DESCRIPTION = DescriptionPackage.LAYOUT_OPTION__DESCRIPTION; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int INTEGER_LAYOUT_OPTION__VALUE = DescriptionPackage.LAYOUT_OPTION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Integer Layout Option</em>' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int INTEGER_LAYOUT_OPTION_FEATURE_COUNT = DescriptionPackage.LAYOUT_OPTION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.sirius.diagram.description.impl.DoubleLayoutOptionImpl <em>Double + * Layout Option</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.diagram.description.impl.DoubleLayoutOptionImpl + * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getDoubleLayoutOption() + * @generated + */ + int DOUBLE_LAYOUT_OPTION = 23; + + /** + * The feature id for the '<em><b>Id</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int DOUBLE_LAYOUT_OPTION__ID = DescriptionPackage.LAYOUT_OPTION__ID; + + /** + * The feature id for the '<em><b>Label</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int DOUBLE_LAYOUT_OPTION__LABEL = DescriptionPackage.LAYOUT_OPTION__LABEL; + + /** + * The feature id for the '<em><b>Description</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int DOUBLE_LAYOUT_OPTION__DESCRIPTION = DescriptionPackage.LAYOUT_OPTION__DESCRIPTION; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int DOUBLE_LAYOUT_OPTION__VALUE = DescriptionPackage.LAYOUT_OPTION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Double Layout Option</em>' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int DOUBLE_LAYOUT_OPTION_FEATURE_COUNT = DescriptionPackage.LAYOUT_OPTION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.sirius.diagram.description.impl.EnumLayoutOptionImpl <em>Enum + * Layout Option</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.diagram.description.impl.EnumLayoutOptionImpl + * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getEnumLayoutOption() + * @generated + */ + int ENUM_LAYOUT_OPTION = 24; + + /** + * The feature id for the '<em><b>Id</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ENUM_LAYOUT_OPTION__ID = DescriptionPackage.LAYOUT_OPTION__ID; + + /** + * The feature id for the '<em><b>Label</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ENUM_LAYOUT_OPTION__LABEL = DescriptionPackage.LAYOUT_OPTION__LABEL; + + /** + * The feature id for the '<em><b>Description</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ENUM_LAYOUT_OPTION__DESCRIPTION = DescriptionPackage.LAYOUT_OPTION__DESCRIPTION; + + /** + * The feature id for the '<em><b>Value</b></em>' containment reference. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int ENUM_LAYOUT_OPTION__VALUE = DescriptionPackage.LAYOUT_OPTION_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Choices</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int ENUM_LAYOUT_OPTION__CHOICES = DescriptionPackage.LAYOUT_OPTION_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Enum Layout Option</em>' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int ENUM_LAYOUT_OPTION_FEATURE_COUNT = DescriptionPackage.LAYOUT_OPTION_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.sirius.diagram.description.impl.EnumLayoutValueImpl <em>Enum + * Layout Value</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.diagram.description.impl.EnumLayoutValueImpl + * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getEnumLayoutValue() + * @generated + */ + int ENUM_LAYOUT_VALUE = 25; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ENUM_LAYOUT_VALUE__NAME = 0; + + /** + * The feature id for the '<em><b>Description</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ENUM_LAYOUT_VALUE__DESCRIPTION = 1; + + /** + * The number of structural features of the '<em>Enum Layout Value</em>' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int ENUM_LAYOUT_VALUE_FEATURE_COUNT = 2; /** * The meta object id for the '{@link org.eclipse.sirius.diagram.description.impl.MappingBasedDecorationImpl @@ -2771,7 +3087,7 @@ public interface DescriptionPackage extends EPackage { * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getMappingBasedDecoration() * @generated */ - int MAPPING_BASED_DECORATION = 20; + int MAPPING_BASED_DECORATION = 26; /** * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> @@ -2850,7 +3166,7 @@ public interface DescriptionPackage extends EPackage { * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getLayer() * @generated */ - int LAYER = 21; + int LAYER = 27; /** * The feature id for the '<em><b>Documentation</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> @@ -3007,7 +3323,7 @@ public interface DescriptionPackage extends EPackage { * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getAdditionalLayer() * @generated */ - int ADDITIONAL_LAYER = 22; + int ADDITIONAL_LAYER = 28; /** * The feature id for the '<em><b>Documentation</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> @@ -3182,7 +3498,7 @@ public interface DescriptionPackage extends EPackage { * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getFoldingStyle() * @generated */ - int FOLDING_STYLE = 24; + int FOLDING_STYLE = 30; /** * The meta object id for the '{@link org.eclipse.sirius.diagram.description.LayoutDirection <em>Layout @@ -3192,7 +3508,7 @@ public interface DescriptionPackage extends EPackage { * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getLayoutDirection() * @generated */ - int LAYOUT_DIRECTION = 25; + int LAYOUT_DIRECTION = 31; /** * The meta object id for the '{@link org.eclipse.sirius.diagram.description.CenteringStyle <em>Centering @@ -3202,7 +3518,7 @@ public interface DescriptionPackage extends EPackage { * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getCenteringStyle() * @generated */ - int CENTERING_STYLE = 26; + int CENTERING_STYLE = 32; /** * Returns the meta object for class '{@link org.eclipse.sirius.diagram.description.DiagramDescription <em>Diagram @@ -4344,11 +4660,23 @@ public interface DescriptionPackage extends EPackage { EAttribute getCustomLayoutConfiguration_Label(); /** - * Returns the meta object for the reference list + * Returns the meta object for the attribute + * '{@link org.eclipse.sirius.diagram.description.CustomLayoutConfiguration#getDescription <em>Description</em>}'. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Description</em>'. + * @see org.eclipse.sirius.diagram.description.CustomLayoutConfiguration#getDescription() + * @see #getCustomLayoutConfiguration() + * @generated + */ + EAttribute getCustomLayoutConfiguration_Description(); + + /** + * Returns the meta object for the containment reference list * '{@link org.eclipse.sirius.diagram.description.CustomLayoutConfiguration#getLayoutOptions <em>Layout * Options</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> * - * @return the meta object for the reference list '<em>Layout Options</em>'. + * @return the meta object for the containment reference list '<em>Layout Options</em>'. * @see org.eclipse.sirius.diagram.description.CustomLayoutConfiguration#getLayoutOptions() * @see #getCustomLayoutConfiguration() * @generated @@ -4366,26 +4694,193 @@ public interface DescriptionPackage extends EPackage { EClass getLayoutOption(); /** - * Returns the meta object for the attribute '{@link org.eclipse.sirius.diagram.description.LayoutOption#getName - * <em>Name</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * Returns the meta object for the attribute '{@link org.eclipse.sirius.diagram.description.LayoutOption#getId + * <em>Id</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> * - * @return the meta object for the attribute '<em>Name</em>'. - * @see org.eclipse.sirius.diagram.description.LayoutOption#getName() + * @return the meta object for the attribute '<em>Id</em>'. + * @see org.eclipse.sirius.diagram.description.LayoutOption#getId() * @see #getLayoutOption() * @generated */ - EAttribute getLayoutOption_Name(); + EAttribute getLayoutOption_Id(); /** - * Returns the meta object for the attribute '{@link org.eclipse.sirius.diagram.description.LayoutOption#getValue - * <em>Value</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * Returns the meta object for the attribute '{@link org.eclipse.sirius.diagram.description.LayoutOption#getLabel + * <em>Label</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> * - * @return the meta object for the attribute '<em>Value</em>'. - * @see org.eclipse.sirius.diagram.description.LayoutOption#getValue() + * @return the meta object for the attribute '<em>Label</em>'. + * @see org.eclipse.sirius.diagram.description.LayoutOption#getLabel() + * @see #getLayoutOption() + * @generated + */ + EAttribute getLayoutOption_Label(); + + /** + * Returns the meta object for the attribute + * '{@link org.eclipse.sirius.diagram.description.LayoutOption#getDescription <em>Description</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Description</em>'. + * @see org.eclipse.sirius.diagram.description.LayoutOption#getDescription() * @see #getLayoutOption() * @generated */ - EAttribute getLayoutOption_Value(); + EAttribute getLayoutOption_Description(); + + /** + * Returns the meta object for class '{@link org.eclipse.sirius.diagram.description.BooleanLayoutOption <em>Boolean + * Layout Option</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Boolean Layout Option</em>'. + * @see org.eclipse.sirius.diagram.description.BooleanLayoutOption + * @generated + */ + EClass getBooleanLayoutOption(); + + /** + * Returns the meta object for the attribute + * '{@link org.eclipse.sirius.diagram.description.BooleanLayoutOption#isValue <em>Value</em>}'. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Value</em>'. + * @see org.eclipse.sirius.diagram.description.BooleanLayoutOption#isValue() + * @see #getBooleanLayoutOption() + * @generated + */ + EAttribute getBooleanLayoutOption_Value(); + + /** + * Returns the meta object for class '{@link org.eclipse.sirius.diagram.description.StringLayoutOption <em>String + * Layout Option</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>String Layout Option</em>'. + * @see org.eclipse.sirius.diagram.description.StringLayoutOption + * @generated + */ + EClass getStringLayoutOption(); + + /** + * Returns the meta object for the attribute + * '{@link org.eclipse.sirius.diagram.description.StringLayoutOption#getValue <em>Value</em>}'. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Value</em>'. + * @see org.eclipse.sirius.diagram.description.StringLayoutOption#getValue() + * @see #getStringLayoutOption() + * @generated + */ + EAttribute getStringLayoutOption_Value(); + + /** + * Returns the meta object for class '{@link org.eclipse.sirius.diagram.description.IntegerLayoutOption <em>Integer + * Layout Option</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Integer Layout Option</em>'. + * @see org.eclipse.sirius.diagram.description.IntegerLayoutOption + * @generated + */ + EClass getIntegerLayoutOption(); + + /** + * Returns the meta object for the attribute + * '{@link org.eclipse.sirius.diagram.description.IntegerLayoutOption#getValue <em>Value</em>}'. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Value</em>'. + * @see org.eclipse.sirius.diagram.description.IntegerLayoutOption#getValue() + * @see #getIntegerLayoutOption() + * @generated + */ + EAttribute getIntegerLayoutOption_Value(); + + /** + * Returns the meta object for class '{@link org.eclipse.sirius.diagram.description.DoubleLayoutOption <em>Double + * Layout Option</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Double Layout Option</em>'. + * @see org.eclipse.sirius.diagram.description.DoubleLayoutOption + * @generated + */ + EClass getDoubleLayoutOption(); + + /** + * Returns the meta object for the attribute + * '{@link org.eclipse.sirius.diagram.description.DoubleLayoutOption#getValue <em>Value</em>}'. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Value</em>'. + * @see org.eclipse.sirius.diagram.description.DoubleLayoutOption#getValue() + * @see #getDoubleLayoutOption() + * @generated + */ + EAttribute getDoubleLayoutOption_Value(); + + /** + * Returns the meta object for class '{@link org.eclipse.sirius.diagram.description.EnumLayoutOption <em>Enum Layout + * Option</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Enum Layout Option</em>'. + * @see org.eclipse.sirius.diagram.description.EnumLayoutOption + * @generated + */ + EClass getEnumLayoutOption(); + + /** + * Returns the meta object for the containment reference + * '{@link org.eclipse.sirius.diagram.description.EnumLayoutOption#getValue <em>Value</em>}'. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @return the meta object for the containment reference '<em>Value</em>'. + * @see org.eclipse.sirius.diagram.description.EnumLayoutOption#getValue() + * @see #getEnumLayoutOption() + * @generated + */ + EReference getEnumLayoutOption_Value(); + + /** + * Returns the meta object for the containment reference list + * '{@link org.eclipse.sirius.diagram.description.EnumLayoutOption#getChoices <em>Choices</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the containment reference list '<em>Choices</em>'. + * @see org.eclipse.sirius.diagram.description.EnumLayoutOption#getChoices() + * @see #getEnumLayoutOption() + * @generated + */ + EReference getEnumLayoutOption_Choices(); + + /** + * Returns the meta object for class '{@link org.eclipse.sirius.diagram.description.EnumLayoutValue <em>Enum Layout + * Value</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Enum Layout Value</em>'. + * @see org.eclipse.sirius.diagram.description.EnumLayoutValue + * @generated + */ + EClass getEnumLayoutValue(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.sirius.diagram.description.EnumLayoutValue#getName + * <em>Name</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Name</em>'. + * @see org.eclipse.sirius.diagram.description.EnumLayoutValue#getName() + * @see #getEnumLayoutValue() + * @generated + */ + EAttribute getEnumLayoutValue_Name(); + + /** + * Returns the meta object for the attribute + * '{@link org.eclipse.sirius.diagram.description.EnumLayoutValue#getDescription <em>Description</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Description</em>'. + * @see org.eclipse.sirius.diagram.description.EnumLayoutValue#getDescription() + * @see #getEnumLayoutValue() + * @generated + */ + EAttribute getEnumLayoutValue_Description(); /** * Returns the meta object for class '{@link org.eclipse.sirius.diagram.description.MappingBasedDecoration @@ -5498,8 +5993,16 @@ public interface DescriptionPackage extends EPackage { EAttribute CUSTOM_LAYOUT_CONFIGURATION__LABEL = DescriptionPackage.eINSTANCE.getCustomLayoutConfiguration_Label(); /** - * The meta object literal for the '<em><b>Layout Options</b></em>' reference list feature. <!-- begin-user-doc - * --> <!-- end-user-doc --> + * The meta object literal for the '<em><b>Description</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute CUSTOM_LAYOUT_CONFIGURATION__DESCRIPTION = DescriptionPackage.eINSTANCE.getCustomLayoutConfiguration_Description(); + + /** + * The meta object literal for the '<em><b>Layout Options</b></em>' containment reference list feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> * * @generated */ @@ -5516,12 +6019,74 @@ public interface DescriptionPackage extends EPackage { EClass LAYOUT_OPTION = DescriptionPackage.eINSTANCE.getLayoutOption(); /** - * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * The meta object literal for the '<em><b>Id</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute LAYOUT_OPTION__ID = DescriptionPackage.eINSTANCE.getLayoutOption_Id(); + + /** + * The meta object literal for the '<em><b>Label</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute LAYOUT_OPTION__LABEL = DescriptionPackage.eINSTANCE.getLayoutOption_Label(); + + /** + * The meta object literal for the '<em><b>Description</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute LAYOUT_OPTION__DESCRIPTION = DescriptionPackage.eINSTANCE.getLayoutOption_Description(); + + /** + * The meta object literal for the '{@link org.eclipse.sirius.diagram.description.impl.BooleanLayoutOptionImpl + * <em>Boolean Layout Option</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.diagram.description.impl.BooleanLayoutOptionImpl + * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getBooleanLayoutOption() + * @generated + */ + EClass BOOLEAN_LAYOUT_OPTION = DescriptionPackage.eINSTANCE.getBooleanLayoutOption(); + + /** + * The meta object literal for the '<em><b>Value</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute BOOLEAN_LAYOUT_OPTION__VALUE = DescriptionPackage.eINSTANCE.getBooleanLayoutOption_Value(); + + /** + * The meta object literal for the '{@link org.eclipse.sirius.diagram.description.impl.StringLayoutOptionImpl + * <em>String Layout Option</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.diagram.description.impl.StringLayoutOptionImpl + * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getStringLayoutOption() + * @generated + */ + EClass STRING_LAYOUT_OPTION = DescriptionPackage.eINSTANCE.getStringLayoutOption(); + + /** + * The meta object literal for the '<em><b>Value</b></em>' attribute feature. <!-- begin-user-doc --> <!-- * end-user-doc --> * * @generated */ - EAttribute LAYOUT_OPTION__NAME = DescriptionPackage.eINSTANCE.getLayoutOption_Name(); + EAttribute STRING_LAYOUT_OPTION__VALUE = DescriptionPackage.eINSTANCE.getStringLayoutOption_Value(); + + /** + * The meta object literal for the '{@link org.eclipse.sirius.diagram.description.impl.IntegerLayoutOptionImpl + * <em>Integer Layout Option</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.diagram.description.impl.IntegerLayoutOptionImpl + * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getIntegerLayoutOption() + * @generated + */ + EClass INTEGER_LAYOUT_OPTION = DescriptionPackage.eINSTANCE.getIntegerLayoutOption(); /** * The meta object literal for the '<em><b>Value</b></em>' attribute feature. <!-- begin-user-doc --> <!-- @@ -5529,7 +6094,77 @@ public interface DescriptionPackage extends EPackage { * * @generated */ - EAttribute LAYOUT_OPTION__VALUE = DescriptionPackage.eINSTANCE.getLayoutOption_Value(); + EAttribute INTEGER_LAYOUT_OPTION__VALUE = DescriptionPackage.eINSTANCE.getIntegerLayoutOption_Value(); + + /** + * The meta object literal for the '{@link org.eclipse.sirius.diagram.description.impl.DoubleLayoutOptionImpl + * <em>Double Layout Option</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.diagram.description.impl.DoubleLayoutOptionImpl + * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getDoubleLayoutOption() + * @generated + */ + EClass DOUBLE_LAYOUT_OPTION = DescriptionPackage.eINSTANCE.getDoubleLayoutOption(); + + /** + * The meta object literal for the '<em><b>Value</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute DOUBLE_LAYOUT_OPTION__VALUE = DescriptionPackage.eINSTANCE.getDoubleLayoutOption_Value(); + + /** + * The meta object literal for the '{@link org.eclipse.sirius.diagram.description.impl.EnumLayoutOptionImpl + * <em>Enum Layout Option</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.diagram.description.impl.EnumLayoutOptionImpl + * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getEnumLayoutOption() + * @generated + */ + EClass ENUM_LAYOUT_OPTION = DescriptionPackage.eINSTANCE.getEnumLayoutOption(); + + /** + * The meta object literal for the '<em><b>Value</b></em>' containment reference feature. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + EReference ENUM_LAYOUT_OPTION__VALUE = DescriptionPackage.eINSTANCE.getEnumLayoutOption_Value(); + + /** + * The meta object literal for the '<em><b>Choices</b></em>' containment reference list feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference ENUM_LAYOUT_OPTION__CHOICES = DescriptionPackage.eINSTANCE.getEnumLayoutOption_Choices(); + + /** + * The meta object literal for the '{@link org.eclipse.sirius.diagram.description.impl.EnumLayoutValueImpl + * <em>Enum Layout Value</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.diagram.description.impl.EnumLayoutValueImpl + * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getEnumLayoutValue() + * @generated + */ + EClass ENUM_LAYOUT_VALUE = DescriptionPackage.eINSTANCE.getEnumLayoutValue(); + + /** + * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute ENUM_LAYOUT_VALUE__NAME = DescriptionPackage.eINSTANCE.getEnumLayoutValue_Name(); + + /** + * The meta object literal for the '<em><b>Description</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute ENUM_LAYOUT_VALUE__DESCRIPTION = DescriptionPackage.eINSTANCE.getEnumLayoutValue_Description(); /** * The meta object literal for the diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/DoubleLayoutOption.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/DoubleLayoutOption.java new file mode 100644 index 0000000000..e20477c594 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/DoubleLayoutOption.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Double Layout Option</b></em>'. <!-- + * end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.diagram.description.DoubleLayoutOption#getValue <em>Value</em>}</li> + * </ul> + * + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getDoubleLayoutOption() + * @model + * @generated + */ +public interface DoubleLayoutOption extends LayoutOption { + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Value</em>' attribute. + * @see #setValue(double) + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getDoubleLayoutOption_Value() + * @model + * @generated + */ + double getValue(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.diagram.description.DoubleLayoutOption#getValue <em>Value</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Value</em>' attribute. + * @see #getValue() + * @generated + */ + void setValue(double value); + +} // DoubleLayoutOption diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/EnumLayoutOption.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/EnumLayoutOption.java new file mode 100644 index 0000000000..75c1537885 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/EnumLayoutOption.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description; + +import org.eclipse.emf.common.util.EList; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Enum Layout Option</b></em>'. <!-- end-user-doc + * --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.diagram.description.EnumLayoutOption#getValue <em>Value</em>}</li> + * </ul> + * + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getEnumLayoutOption() + * @model abstract="true" + * @generated + */ +public interface EnumLayoutOption extends LayoutOption { + /** + * Returns the value of the '<em><b>Value</b></em>' containment reference. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</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>Value</em>' containment reference. + * @see #setValue(EnumLayoutValue) + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getEnumLayoutOption_Value() + * @model containment="true" resolveProxies="true" + * @generated + */ + EnumLayoutValue getValue(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.diagram.description.EnumLayoutOption#getValue <em>Value</em>}' + * containment reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Value</em>' containment reference. + * @see #getValue() + * @generated + */ + void setValue(EnumLayoutValue value); + + /** + * Returns the value of the '<em><b>Choices</b></em>' containment reference list. The list contents are of type + * {@link org.eclipse.sirius.diagram.description.EnumLayoutValue}. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Choices</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>Choices</em>' containment reference list. + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getEnumLayoutOption_Choices() + * @model containment="true" resolveProxies="true" + * @generated + */ + EList<EnumLayoutValue> getChoices(); + +} // EnumLayoutOption diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/EnumLayoutValue.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/EnumLayoutValue.java new file mode 100644 index 0000000000..7bebabd901 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/EnumLayoutValue.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Enum Layout Value</b></em>'. <!-- end-user-doc + * --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.diagram.description.EnumLayoutValue#getValue <em>Value</em>}</li> + * </ul> + * + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getEnumLayoutValue() + * @model abstract="true" + * @generated + */ +public interface EnumLayoutValue extends EObject { + /** + * Returns the value of the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Name</em>' attribute. + * @see #setName(String) + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getEnumLayoutValue_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.diagram.description.EnumLayoutValue#getName <em>Name</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Name</em>' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the '<em><b>Description</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Description</em>' attribute isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Description</em>' attribute. + * @see #setDescription(String) + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getEnumLayoutValue_Description() + * @model + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.diagram.description.EnumLayoutValue#getDescription + * <em>Description</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Description</em>' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + +} // EnumLayoutValue diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/GenericLayout.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/GenericLayout.java index bc76a2bb09..d0f6473024 100644 --- a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/GenericLayout.java +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/GenericLayout.java @@ -22,6 +22,7 @@ import org.eclipse.emf.common.util.EList; * <ul> * <li>{@link org.eclipse.sirius.diagram.description.GenericLayout#getID <em>ID</em>}</li> * <li>{@link org.eclipse.sirius.diagram.description.GenericLayout#getLabel <em>Label</em>}</li> + * <li>{@link org.eclipse.sirius.diagram.description.GenericLayout#getDescription <em>Description</em>}</li> * <li>{@link org.eclipse.sirius.diagram.description.GenericLayout#getLayoutOptions <em>Layout Options</em>}</li> * </ul> * @@ -84,17 +85,44 @@ public interface GenericLayout extends Layout { void setLabel(String value); /** - * Returns the value of the '<em><b>Layout Options</b></em>' reference list. The list contents are of type - * {@link org.eclipse.sirius.diagram.description.LayoutOption}. <!-- begin-user-doc --> + * Returns the value of the '<em><b>Description</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Description</em>' attribute isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Description</em>' attribute. + * @see #setDescription(String) + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getGenericLayout_Description() + * @model + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.diagram.description.GenericLayout#getDescription + * <em>Description</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Description</em>' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + + /** + * Returns the value of the '<em><b>Layout Options</b></em>' containment reference list. The list contents are of + * type {@link org.eclipse.sirius.diagram.description.LayoutOption}. <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Layout Options</em>' reference list isn't clear, there really should be more of a * description here... * </p> * <!-- end-user-doc --> * - * @return the value of the '<em>Layout Options</em>' reference list. + * @return the value of the '<em>Layout Options</em>' containment reference list. * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getGenericLayout_LayoutOptions() - * @model + * @model containment="true" resolveProxies="true" * @generated */ EList<LayoutOption> getLayoutOptions(); diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/IntegerLayoutOption.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/IntegerLayoutOption.java new file mode 100644 index 0000000000..b2c100864e --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/IntegerLayoutOption.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Integer Layout Option</b></em>'. <!-- + * end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.diagram.description.IntegerLayoutOption#getValue <em>Value</em>}</li> + * </ul> + * + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getIntegerLayoutOption() + * @model + * @generated + */ +public interface IntegerLayoutOption extends LayoutOption { + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Value</em>' attribute. + * @see #setValue(int) + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getIntegerLayoutOption_Value() + * @model + * @generated + */ + int getValue(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.diagram.description.IntegerLayoutOption#getValue + * <em>Value</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Value</em>' attribute. + * @see #getValue() + * @generated + */ + void setValue(int value); + +} // IntegerLayoutOption diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/LayoutOption.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/LayoutOption.java index 9a1b280612..50a917b83f 100644 --- a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/LayoutOption.java +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/LayoutOption.java @@ -20,66 +20,94 @@ import org.eclipse.emf.ecore.EObject; * The following features are supported: * </p> * <ul> - * <li>{@link org.eclipse.sirius.diagram.description.LayoutOption#getName <em>Name</em>}</li> - * <li>{@link org.eclipse.sirius.diagram.description.LayoutOption#getValue <em>Value</em>}</li> + * <li>{@link org.eclipse.sirius.diagram.description.LayoutOption#getId <em>Id</em>}</li> + * <li>{@link org.eclipse.sirius.diagram.description.LayoutOption#getLabel <em>Label</em>}</li> + * <li>{@link org.eclipse.sirius.diagram.description.LayoutOption#getDescription <em>Description</em>}</li> * </ul> * * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getLayoutOption() - * @model + * @model abstract="true" * @generated */ public interface LayoutOption extends EObject { /** - * Returns the value of the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> + * Returns the value of the '<em><b>Id</b></em>' attribute. <!-- begin-user-doc --> * <p> - * If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here... + * If the meaning of the '<em>Id</em>' attribute isn't clear, there really should be more of a description here... * </p> * <!-- end-user-doc --> * - * @return the value of the '<em>Name</em>' attribute. - * @see #setName(String) - * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getLayoutOption_Name() + * @return the value of the '<em>Id</em>' attribute. + * @see #setId(String) + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getLayoutOption_Id() * @model * @generated */ - String getName(); + String getId(); /** - * Sets the value of the '{@link org.eclipse.sirius.diagram.description.LayoutOption#getName <em>Name</em>}' - * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * Sets the value of the '{@link org.eclipse.sirius.diagram.description.LayoutOption#getId <em>Id</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> * * @param value - * the new value of the '<em>Name</em>' attribute. - * @see #getName() + * the new value of the '<em>Id</em>' attribute. + * @see #getId() * @generated */ - void setName(String value); + void setId(String value); /** - * Returns the value of the '<em><b>Value</b></em>' attribute. <!-- begin-user-doc --> + * Returns the value of the '<em><b>Label</b></em>' attribute. <!-- begin-user-doc --> * <p> - * If the meaning of the '<em>Value</em>' attribute isn't clear, there really should be more of a description + * If the meaning of the '<em>Label</em>' attribute isn't clear, there really should be more of a description * here... * </p> * <!-- end-user-doc --> * - * @return the value of the '<em>Value</em>' attribute. - * @see #setValue(String) - * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getLayoutOption_Value() + * @return the value of the '<em>Label</em>' attribute. + * @see #setLabel(String) + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getLayoutOption_Label() * @model * @generated */ - String getValue(); + String getLabel(); /** - * Sets the value of the '{@link org.eclipse.sirius.diagram.description.LayoutOption#getValue <em>Value</em>}' + * Sets the value of the '{@link org.eclipse.sirius.diagram.description.LayoutOption#getLabel <em>Label</em>}' * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * * @param value - * the new value of the '<em>Value</em>' attribute. - * @see #getValue() + * the new value of the '<em>Label</em>' attribute. + * @see #getLabel() + * @generated + */ + void setLabel(String value); + + /** + * Returns the value of the '<em><b>Description</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Description</em>' attribute isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Description</em>' attribute. + * @see #setDescription(String) + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getLayoutOption_Description() + * @model + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.diagram.description.LayoutOption#getDescription + * <em>Description</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Description</em>' attribute. + * @see #getDescription() * @generated */ - void setValue(String value); + void setDescription(String value); } // LayoutOption diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/StringLayoutOption.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/StringLayoutOption.java new file mode 100644 index 0000000000..166dc40917 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/StringLayoutOption.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>String Layout Option</b></em>'. <!-- + * end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.diagram.description.StringLayoutOption#getValue <em>Value</em>}</li> + * </ul> + * + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getStringLayoutOption() + * @model + * @generated + */ +public interface StringLayoutOption extends LayoutOption { + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Value</em>' attribute. + * @see #setValue(String) + * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getStringLayoutOption_Value() + * @model + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.diagram.description.StringLayoutOption#getValue <em>Value</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Value</em>' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + +} // StringLayoutOption diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/BooleanLayoutOptionImpl.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/BooleanLayoutOptionImpl.java new file mode 100644 index 0000000000..f1335dfbce --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/BooleanLayoutOptionImpl.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.sirius.diagram.description.BooleanLayoutOption; +import org.eclipse.sirius.diagram.description.DescriptionPackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Boolean Layout Option</b></em>'. <!-- + * end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.diagram.description.impl.BooleanLayoutOptionImpl#isValue <em>Value</em>}</li> + * </ul> + * + * @generated + */ +public class BooleanLayoutOptionImpl extends LayoutOptionImpl implements BooleanLayoutOption { + /** + * The default value of the '{@link #isValue() <em>Value</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @see #isValue() + * @generated + * @ordered + */ + protected static final boolean VALUE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isValue() <em>Value</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @see #isValue() + * @generated + * @ordered + */ + protected boolean value = BooleanLayoutOptionImpl.VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected BooleanLayoutOptionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return DescriptionPackage.Literals.BOOLEAN_LAYOUT_OPTION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isValue() { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setValue(boolean newValue) { + boolean oldValue = value; + value = newValue; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, DescriptionPackage.BOOLEAN_LAYOUT_OPTION__VALUE, oldValue, value)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case DescriptionPackage.BOOLEAN_LAYOUT_OPTION__VALUE: + return isValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case DescriptionPackage.BOOLEAN_LAYOUT_OPTION__VALUE: + setValue((Boolean) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case DescriptionPackage.BOOLEAN_LAYOUT_OPTION__VALUE: + setValue(BooleanLayoutOptionImpl.VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case DescriptionPackage.BOOLEAN_LAYOUT_OPTION__VALUE: + return value != BooleanLayoutOptionImpl.VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); //$NON-NLS-1$ + result.append(value); + result.append(')'); + return result.toString(); + } + +} // BooleanLayoutOptionImpl diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/CustomLayoutConfigurationImpl.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/CustomLayoutConfigurationImpl.java index 1cbe8da62b..8f5b5a6412 100644 --- a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/CustomLayoutConfigurationImpl.java +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/CustomLayoutConfigurationImpl.java @@ -14,10 +14,13 @@ package org.eclipse.sirius.diagram.description.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.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; import org.eclipse.sirius.diagram.description.CustomLayoutConfiguration; import org.eclipse.sirius.diagram.description.DescriptionPackage; import org.eclipse.sirius.diagram.description.LayoutOption; @@ -32,6 +35,8 @@ import org.eclipse.sirius.viewpoint.description.impl.DocumentedElementImpl; * <ul> * <li>{@link org.eclipse.sirius.diagram.description.impl.CustomLayoutConfigurationImpl#getId <em>Id</em>}</li> * <li>{@link org.eclipse.sirius.diagram.description.impl.CustomLayoutConfigurationImpl#getLabel <em>Label</em>}</li> + * <li>{@link org.eclipse.sirius.diagram.description.impl.CustomLayoutConfigurationImpl#getDescription + * <em>Description</em>}</li> * <li>{@link org.eclipse.sirius.diagram.description.impl.CustomLayoutConfigurationImpl#getLayoutOptions <em>Layout * Options</em>}</li> * </ul> @@ -78,8 +83,28 @@ public class CustomLayoutConfigurationImpl extends DocumentedElementImpl impleme protected String label = CustomLayoutConfigurationImpl.LABEL_EDEFAULT; /** - * The cached value of the '{@link #getLayoutOptions() <em>Layout Options</em>}' reference list. <!-- begin-user-doc - * --> <!-- end-user-doc --> + * The default value of the '{@link #getDescription() <em>Description</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = CustomLayoutConfigurationImpl.DESCRIPTION_EDEFAULT; + + /** + * The cached value of the '{@link #getLayoutOptions() <em>Layout Options</em>}' containment reference list. <!-- + * begin-user-doc --> <!-- end-user-doc --> * * @see #getLayoutOptions() * @generated @@ -160,9 +185,33 @@ public class CustomLayoutConfigurationImpl extends DocumentedElementImpl impleme * @generated */ @Override + public String getDescription() { + return description; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__DESCRIPTION, oldDescription, description)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public EList<LayoutOption> getLayoutOptions() { if (layoutOptions == null) { - layoutOptions = new EObjectResolvingEList<LayoutOption>(LayoutOption.class, this, DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS); + layoutOptions = new EObjectContainmentEList.Resolving<LayoutOption>(LayoutOption.class, this, DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS); } return layoutOptions; } @@ -173,12 +222,28 @@ public class CustomLayoutConfigurationImpl extends DocumentedElementImpl impleme * @generated */ @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS: + return ((InternalEList<?>) getLayoutOptions()).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 DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__ID: return getId(); case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LABEL: return getLabel(); + case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__DESCRIPTION: + return getDescription(); case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS: return getLayoutOptions(); } @@ -200,6 +265,9 @@ public class CustomLayoutConfigurationImpl extends DocumentedElementImpl impleme case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LABEL: setLabel((String) newValue); return; + case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__DESCRIPTION: + setDescription((String) newValue); + return; case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS: getLayoutOptions().clear(); getLayoutOptions().addAll((Collection<? extends LayoutOption>) newValue); @@ -222,6 +290,9 @@ public class CustomLayoutConfigurationImpl extends DocumentedElementImpl impleme case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LABEL: setLabel(CustomLayoutConfigurationImpl.LABEL_EDEFAULT); return; + case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__DESCRIPTION: + setDescription(CustomLayoutConfigurationImpl.DESCRIPTION_EDEFAULT); + return; case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS: getLayoutOptions().clear(); return; @@ -241,6 +312,8 @@ public class CustomLayoutConfigurationImpl extends DocumentedElementImpl impleme return CustomLayoutConfigurationImpl.ID_EDEFAULT == null ? id != null : !CustomLayoutConfigurationImpl.ID_EDEFAULT.equals(id); case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LABEL: return CustomLayoutConfigurationImpl.LABEL_EDEFAULT == null ? label != null : !CustomLayoutConfigurationImpl.LABEL_EDEFAULT.equals(label); + case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__DESCRIPTION: + return CustomLayoutConfigurationImpl.DESCRIPTION_EDEFAULT == null ? description != null : !CustomLayoutConfigurationImpl.DESCRIPTION_EDEFAULT.equals(description); case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS: return layoutOptions != null && !layoutOptions.isEmpty(); } @@ -263,6 +336,8 @@ public class CustomLayoutConfigurationImpl extends DocumentedElementImpl impleme result.append(id); result.append(", label: "); //$NON-NLS-1$ result.append(label); + result.append(", description: "); //$NON-NLS-1$ + result.append(description); result.append(')'); return result.toString(); } diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/DescriptionFactoryImpl.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/DescriptionFactoryImpl.java index 800beb9bcc..6039230888 100644 --- a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/DescriptionFactoryImpl.java +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/DescriptionFactoryImpl.java @@ -30,6 +30,7 @@ import org.eclipse.sirius.diagram.business.internal.metamodel.description.spec.L import org.eclipse.sirius.diagram.business.internal.metamodel.description.spec.NodeMappingImportSpec; import org.eclipse.sirius.diagram.business.internal.metamodel.description.spec.NodeMappingSpec; import org.eclipse.sirius.diagram.description.AdditionalLayer; +import org.eclipse.sirius.diagram.description.BooleanLayoutOption; import org.eclipse.sirius.diagram.description.CenteringStyle; import org.eclipse.sirius.diagram.description.CompositeLayout; import org.eclipse.sirius.diagram.description.ConditionalContainerStyleDescription; @@ -43,16 +44,20 @@ import org.eclipse.sirius.diagram.description.DescriptionPackage; import org.eclipse.sirius.diagram.description.DiagramDescription; import org.eclipse.sirius.diagram.description.DiagramExtensionDescription; import org.eclipse.sirius.diagram.description.DiagramImportDescription; +import org.eclipse.sirius.diagram.description.DoubleLayoutOption; import org.eclipse.sirius.diagram.description.EdgeMapping; import org.eclipse.sirius.diagram.description.EdgeMappingImport; +import org.eclipse.sirius.diagram.description.EnumLayoutOption; +import org.eclipse.sirius.diagram.description.EnumLayoutValue; import org.eclipse.sirius.diagram.description.FoldingStyle; +import org.eclipse.sirius.diagram.description.IntegerLayoutOption; import org.eclipse.sirius.diagram.description.Layer; import org.eclipse.sirius.diagram.description.LayoutDirection; -import org.eclipse.sirius.diagram.description.LayoutOption; import org.eclipse.sirius.diagram.description.MappingBasedDecoration; import org.eclipse.sirius.diagram.description.NodeMapping; import org.eclipse.sirius.diagram.description.NodeMappingImport; import org.eclipse.sirius.diagram.description.OrderedTreeLayout; +import org.eclipse.sirius.diagram.description.StringLayoutOption; /** * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!-- end-user-doc --> @@ -124,8 +129,18 @@ public class DescriptionFactoryImpl extends EFactoryImpl implements DescriptionF return createCompositeLayout(); case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION: return createCustomLayoutConfiguration(); - case DescriptionPackage.LAYOUT_OPTION: - return createLayoutOption(); + case DescriptionPackage.BOOLEAN_LAYOUT_OPTION: + return createBooleanLayoutOption(); + case DescriptionPackage.STRING_LAYOUT_OPTION: + return createStringLayoutOption(); + case DescriptionPackage.INTEGER_LAYOUT_OPTION: + return createIntegerLayoutOption(); + case DescriptionPackage.DOUBLE_LAYOUT_OPTION: + return createDoubleLayoutOption(); + case DescriptionPackage.ENUM_LAYOUT_OPTION: + return createEnumLayoutOption(); + case DescriptionPackage.ENUM_LAYOUT_VALUE: + return createEnumLayoutValue(); case DescriptionPackage.MAPPING_BASED_DECORATION: return createMappingBasedDecoration(); case DescriptionPackage.LAYER: @@ -359,9 +374,64 @@ public class DescriptionFactoryImpl extends EFactoryImpl implements DescriptionF * @generated */ @Override - public LayoutOption createLayoutOption() { - LayoutOptionImpl layoutOption = new LayoutOptionImpl(); - return layoutOption; + public BooleanLayoutOption createBooleanLayoutOption() { + BooleanLayoutOptionImpl booleanLayoutOption = new BooleanLayoutOptionImpl(); + return booleanLayoutOption; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public StringLayoutOption createStringLayoutOption() { + StringLayoutOptionImpl stringLayoutOption = new StringLayoutOptionImpl(); + return stringLayoutOption; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public IntegerLayoutOption createIntegerLayoutOption() { + IntegerLayoutOptionImpl integerLayoutOption = new IntegerLayoutOptionImpl(); + return integerLayoutOption; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public DoubleLayoutOption createDoubleLayoutOption() { + DoubleLayoutOptionImpl doubleLayoutOption = new DoubleLayoutOptionImpl(); + return doubleLayoutOption; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EnumLayoutOption createEnumLayoutOption() { + EnumLayoutOptionImpl enumLayoutOption = new EnumLayoutOptionImpl(); + return enumLayoutOption; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EnumLayoutValue createEnumLayoutValue() { + EnumLayoutValueImpl enumLayoutValue = new EnumLayoutValueImpl(); + return enumLayoutValue; } /** diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/DescriptionPackageImpl.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/DescriptionPackageImpl.java index c755188fcd..959b206b08 100644 --- a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/DescriptionPackageImpl.java +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/DescriptionPackageImpl.java @@ -22,6 +22,7 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; import org.eclipse.sirius.diagram.DiagramPackage; import org.eclipse.sirius.diagram.description.AbstractNodeMapping; import org.eclipse.sirius.diagram.description.AdditionalLayer; +import org.eclipse.sirius.diagram.description.BooleanLayoutOption; import org.eclipse.sirius.diagram.description.CenteringStyle; import org.eclipse.sirius.diagram.description.CompositeLayout; import org.eclipse.sirius.diagram.description.ConditionalContainerStyleDescription; @@ -36,11 +37,15 @@ import org.eclipse.sirius.diagram.description.DiagramDescription; import org.eclipse.sirius.diagram.description.DiagramElementMapping; import org.eclipse.sirius.diagram.description.DiagramExtensionDescription; import org.eclipse.sirius.diagram.description.DiagramImportDescription; +import org.eclipse.sirius.diagram.description.DoubleLayoutOption; import org.eclipse.sirius.diagram.description.DragAndDropTargetDescription; import org.eclipse.sirius.diagram.description.EdgeMapping; import org.eclipse.sirius.diagram.description.EdgeMappingImport; +import org.eclipse.sirius.diagram.description.EnumLayoutOption; +import org.eclipse.sirius.diagram.description.EnumLayoutValue; import org.eclipse.sirius.diagram.description.FoldingStyle; import org.eclipse.sirius.diagram.description.IEdgeMapping; +import org.eclipse.sirius.diagram.description.IntegerLayoutOption; import org.eclipse.sirius.diagram.description.Layer; import org.eclipse.sirius.diagram.description.Layout; import org.eclipse.sirius.diagram.description.LayoutDirection; @@ -49,6 +54,7 @@ import org.eclipse.sirius.diagram.description.MappingBasedDecoration; import org.eclipse.sirius.diagram.description.NodeMapping; import org.eclipse.sirius.diagram.description.NodeMappingImport; import org.eclipse.sirius.diagram.description.OrderedTreeLayout; +import org.eclipse.sirius.diagram.description.StringLayoutOption; import org.eclipse.sirius.diagram.description.concern.ConcernPackage; import org.eclipse.sirius.diagram.description.concern.impl.ConcernPackageImpl; import org.eclipse.sirius.diagram.description.filter.FilterPackage; @@ -212,6 +218,48 @@ public class DescriptionPackageImpl extends EPackageImpl implements DescriptionP * * @generated */ + private EClass booleanLayoutOptionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass stringLayoutOptionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass integerLayoutOptionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass doubleLayoutOptionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass enumLayoutOptionEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass enumLayoutValueEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ private EClass mappingBasedDecorationEClass = null; /** @@ -1329,8 +1377,18 @@ public class DescriptionPackageImpl extends EPackageImpl implements DescriptionP * @generated */ @Override + public EAttribute getCustomLayoutConfiguration_Description() { + return (EAttribute) customLayoutConfigurationEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public EReference getCustomLayoutConfiguration_LayoutOptions() { - return (EReference) customLayoutConfigurationEClass.getEStructuralFeatures().get(2); + return (EReference) customLayoutConfigurationEClass.getEStructuralFeatures().get(3); } /** @@ -1349,7 +1407,7 @@ public class DescriptionPackageImpl extends EPackageImpl implements DescriptionP * @generated */ @Override - public EAttribute getLayoutOption_Name() { + public EAttribute getLayoutOption_Id() { return (EAttribute) layoutOptionEClass.getEStructuralFeatures().get(0); } @@ -1359,7 +1417,7 @@ public class DescriptionPackageImpl extends EPackageImpl implements DescriptionP * @generated */ @Override - public EAttribute getLayoutOption_Value() { + public EAttribute getLayoutOption_Label() { return (EAttribute) layoutOptionEClass.getEStructuralFeatures().get(1); } @@ -1369,6 +1427,156 @@ public class DescriptionPackageImpl extends EPackageImpl implements DescriptionP * @generated */ @Override + public EAttribute getLayoutOption_Description() { + return (EAttribute) layoutOptionEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getBooleanLayoutOption() { + return booleanLayoutOptionEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getBooleanLayoutOption_Value() { + return (EAttribute) booleanLayoutOptionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getStringLayoutOption() { + return stringLayoutOptionEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getStringLayoutOption_Value() { + return (EAttribute) stringLayoutOptionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getIntegerLayoutOption() { + return integerLayoutOptionEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getIntegerLayoutOption_Value() { + return (EAttribute) integerLayoutOptionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getDoubleLayoutOption() { + return doubleLayoutOptionEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getDoubleLayoutOption_Value() { + return (EAttribute) doubleLayoutOptionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getEnumLayoutOption() { + return enumLayoutOptionEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getEnumLayoutOption_Value() { + return (EReference) enumLayoutOptionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getEnumLayoutOption_Choices() { + return (EReference) enumLayoutOptionEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getEnumLayoutValue() { + return enumLayoutValueEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getEnumLayoutValue_Name() { + return (EAttribute) enumLayoutValueEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getEnumLayoutValue_Description() { + return (EAttribute) enumLayoutValueEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public EClass getMappingBasedDecoration() { return mappingBasedDecorationEClass; } @@ -1739,11 +1947,33 @@ public class DescriptionPackageImpl extends EPackageImpl implements DescriptionP customLayoutConfigurationEClass = createEClass(DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION); createEAttribute(customLayoutConfigurationEClass, DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__ID); createEAttribute(customLayoutConfigurationEClass, DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LABEL); + createEAttribute(customLayoutConfigurationEClass, DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__DESCRIPTION); createEReference(customLayoutConfigurationEClass, DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS); layoutOptionEClass = createEClass(DescriptionPackage.LAYOUT_OPTION); - createEAttribute(layoutOptionEClass, DescriptionPackage.LAYOUT_OPTION__NAME); - createEAttribute(layoutOptionEClass, DescriptionPackage.LAYOUT_OPTION__VALUE); + createEAttribute(layoutOptionEClass, DescriptionPackage.LAYOUT_OPTION__ID); + createEAttribute(layoutOptionEClass, DescriptionPackage.LAYOUT_OPTION__LABEL); + createEAttribute(layoutOptionEClass, DescriptionPackage.LAYOUT_OPTION__DESCRIPTION); + + booleanLayoutOptionEClass = createEClass(DescriptionPackage.BOOLEAN_LAYOUT_OPTION); + createEAttribute(booleanLayoutOptionEClass, DescriptionPackage.BOOLEAN_LAYOUT_OPTION__VALUE); + + stringLayoutOptionEClass = createEClass(DescriptionPackage.STRING_LAYOUT_OPTION); + createEAttribute(stringLayoutOptionEClass, DescriptionPackage.STRING_LAYOUT_OPTION__VALUE); + + integerLayoutOptionEClass = createEClass(DescriptionPackage.INTEGER_LAYOUT_OPTION); + createEAttribute(integerLayoutOptionEClass, DescriptionPackage.INTEGER_LAYOUT_OPTION__VALUE); + + doubleLayoutOptionEClass = createEClass(DescriptionPackage.DOUBLE_LAYOUT_OPTION); + createEAttribute(doubleLayoutOptionEClass, DescriptionPackage.DOUBLE_LAYOUT_OPTION__VALUE); + + enumLayoutOptionEClass = createEClass(DescriptionPackage.ENUM_LAYOUT_OPTION); + createEReference(enumLayoutOptionEClass, DescriptionPackage.ENUM_LAYOUT_OPTION__VALUE); + createEReference(enumLayoutOptionEClass, DescriptionPackage.ENUM_LAYOUT_OPTION__CHOICES); + + enumLayoutValueEClass = createEClass(DescriptionPackage.ENUM_LAYOUT_VALUE); + createEAttribute(enumLayoutValueEClass, DescriptionPackage.ENUM_LAYOUT_VALUE__NAME); + createEAttribute(enumLayoutValueEClass, DescriptionPackage.ENUM_LAYOUT_VALUE__DESCRIPTION); mappingBasedDecorationEClass = createEClass(DescriptionPackage.MAPPING_BASED_DECORATION); createEReference(mappingBasedDecorationEClass, DescriptionPackage.MAPPING_BASED_DECORATION__MAPPINGS); @@ -1855,6 +2085,11 @@ public class DescriptionPackageImpl extends EPackageImpl implements DescriptionP orderedTreeLayoutEClass.getESuperTypes().add(this.getLayout()); compositeLayoutEClass.getESuperTypes().add(this.getLayout()); customLayoutConfigurationEClass.getESuperTypes().add(this.getLayout()); + booleanLayoutOptionEClass.getESuperTypes().add(this.getLayoutOption()); + stringLayoutOptionEClass.getESuperTypes().add(this.getLayoutOption()); + integerLayoutOptionEClass.getESuperTypes().add(this.getLayoutOption()); + doubleLayoutOptionEClass.getESuperTypes().add(this.getLayoutOption()); + enumLayoutOptionEClass.getESuperTypes().add(this.getLayoutOption()); mappingBasedDecorationEClass.getESuperTypes().add(theDescriptionPackage_1.getDecorationDescription()); layerEClass.getESuperTypes().add(theDescriptionPackage_1.getDocumentedElement()); layerEClass.getESuperTypes().add(theDescriptionPackage_1.getEndUserDocumentedElement()); @@ -2220,14 +2455,48 @@ public class DescriptionPackageImpl extends EPackageImpl implements DescriptionP EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); initEAttribute(getCustomLayoutConfiguration_Label(), theEcorePackage.getEString(), "label", null, 0, 1, CustomLayoutConfiguration.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$ EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEAttribute(getCustomLayoutConfiguration_Description(), theEcorePackage.getEString(), "description", null, 0, 1, CustomLayoutConfiguration.class, !EPackageImpl.IS_TRANSIENT, //$NON-NLS-1$ + !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); initEReference(getCustomLayoutConfiguration_LayoutOptions(), this.getLayoutOption(), null, "layoutOptions", null, 0, -1, CustomLayoutConfiguration.class, !EPackageImpl.IS_TRANSIENT, //$NON-NLS-1$ - !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_COMPOSITE, EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, + !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(layoutOptionEClass, LayoutOption.class, "LayoutOption", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEAttribute(getLayoutOption_Name(), ecorePackage.getEString(), "name", null, 0, 1, LayoutOption.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, //$NON-NLS-1$ + initEClass(layoutOptionEClass, LayoutOption.class, "LayoutOption", EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getLayoutOption_Id(), ecorePackage.getEString(), "id", null, 0, 1, LayoutOption.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, //$NON-NLS-1$ !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); - initEAttribute(getLayoutOption_Value(), theEcorePackage.getEString(), "value", null, 0, 1, LayoutOption.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$ + initEAttribute(getLayoutOption_Label(), ecorePackage.getEString(), "label", null, 0, 1, LayoutOption.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, //$NON-NLS-1$ + !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEAttribute(getLayoutOption_Description(), theEcorePackage.getEString(), "description", null, 0, 1, LayoutOption.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$ + EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + + initEClass(booleanLayoutOptionEClass, BooleanLayoutOption.class, "BooleanLayoutOption", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getBooleanLayoutOption_Value(), theEcorePackage.getEBoolean(), "value", null, 0, 1, BooleanLayoutOption.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$ + EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + + initEClass(stringLayoutOptionEClass, StringLayoutOption.class, "StringLayoutOption", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getStringLayoutOption_Value(), theEcorePackage.getEString(), "value", null, 0, 1, StringLayoutOption.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$ + EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + + initEClass(integerLayoutOptionEClass, IntegerLayoutOption.class, "IntegerLayoutOption", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getIntegerLayoutOption_Value(), ecorePackage.getEInt(), "value", null, 0, 1, IntegerLayoutOption.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$ + EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + + initEClass(doubleLayoutOptionEClass, DoubleLayoutOption.class, "DoubleLayoutOption", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getDoubleLayoutOption_Value(), theEcorePackage.getEDouble(), "value", null, 0, 1, DoubleLayoutOption.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$ + EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + + initEClass(enumLayoutOptionEClass, EnumLayoutOption.class, "EnumLayoutOption", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference(getEnumLayoutOption_Value(), this.getEnumLayoutValue(), null, "value", null, 0, 1, EnumLayoutOption.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$ + EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, + EPackageImpl.IS_ORDERED); + initEReference(getEnumLayoutOption_Choices(), this.getEnumLayoutValue(), null, "choices", null, 0, -1, EnumLayoutOption.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$ + EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, + EPackageImpl.IS_ORDERED); + + initEClass(enumLayoutValueEClass, EnumLayoutValue.class, "EnumLayoutValue", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getEnumLayoutValue_Name(), ecorePackage.getEString(), "name", null, 0, 1, EnumLayoutValue.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$ + EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEAttribute(getEnumLayoutValue_Description(), theEcorePackage.getEString(), "description", null, 0, 1, EnumLayoutValue.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$ EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); initEClass(mappingBasedDecorationEClass, MappingBasedDecoration.class, "MappingBasedDecoration", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, //$NON-NLS-1$ diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/DoubleLayoutOptionImpl.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/DoubleLayoutOptionImpl.java new file mode 100644 index 0000000000..d3e7769173 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/DoubleLayoutOptionImpl.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.sirius.diagram.description.DescriptionPackage; +import org.eclipse.sirius.diagram.description.DoubleLayoutOption; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Double Layout Option</b></em>'. <!-- + * end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.diagram.description.impl.DoubleLayoutOptionImpl#getValue <em>Value</em>}</li> + * </ul> + * + * @generated + */ +public class DoubleLayoutOptionImpl extends LayoutOptionImpl implements DoubleLayoutOption { + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final double VALUE_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @see #getValue() + * @generated + * @ordered + */ + protected double value = DoubleLayoutOptionImpl.VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected DoubleLayoutOptionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return DescriptionPackage.Literals.DOUBLE_LAYOUT_OPTION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public double getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setValue(double newValue) { + double oldValue = value; + value = newValue; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, DescriptionPackage.DOUBLE_LAYOUT_OPTION__VALUE, oldValue, value)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case DescriptionPackage.DOUBLE_LAYOUT_OPTION__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case DescriptionPackage.DOUBLE_LAYOUT_OPTION__VALUE: + setValue((Double) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case DescriptionPackage.DOUBLE_LAYOUT_OPTION__VALUE: + setValue(DoubleLayoutOptionImpl.VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case DescriptionPackage.DOUBLE_LAYOUT_OPTION__VALUE: + return value != DoubleLayoutOptionImpl.VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); //$NON-NLS-1$ + result.append(value); + result.append(')'); + return result.toString(); + } + +} // DoubleLayoutOptionImpl diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/EnumLayoutOptionImpl.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/EnumLayoutOptionImpl.java new file mode 100644 index 0000000000..fd45491860 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/EnumLayoutOptionImpl.java @@ -0,0 +1,261 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description.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.diagram.description.DescriptionPackage; +import org.eclipse.sirius.diagram.description.EnumLayoutOption; +import org.eclipse.sirius.diagram.description.EnumLayoutValue; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Enum Layout Option</b></em>'. <!-- end-user-doc + * --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.diagram.description.impl.EnumLayoutOptionImpl#getValue <em>Value</em>}</li> + * </ul> + * + * @generated + */ +public class EnumLayoutOptionImpl extends LayoutOptionImpl implements EnumLayoutOption { + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getValue() + * @generated + * @ordered + */ + protected EnumLayoutValue value; + + /** + * The cached value of the '{@link #getChoices() <em>Choices</em>}' containment reference list. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @see #getChoices() + * @generated + * @ordered + */ + protected EList<EnumLayoutValue> choices; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected EnumLayoutOptionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return DescriptionPackage.Literals.ENUM_LAYOUT_OPTION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EnumLayoutValue getValue() { + if (value != null && value.eIsProxy()) { + InternalEObject oldValue = (InternalEObject) value; + value = (EnumLayoutValue) eResolveProxy(oldValue); + if (value != oldValue) { + InternalEObject newValue = (InternalEObject) value; + NotificationChain msgs = oldValue.eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - DescriptionPackage.ENUM_LAYOUT_OPTION__VALUE, null, null); + if (newValue.eInternalContainer() == null) { + msgs = newValue.eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - DescriptionPackage.ENUM_LAYOUT_OPTION__VALUE, null, msgs); + } + if (msgs != null) { + msgs.dispatch(); + } + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.RESOLVE, DescriptionPackage.ENUM_LAYOUT_OPTION__VALUE, oldValue, value)); + } + } + } + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EnumLayoutValue basicGetValue() { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public NotificationChain basicSetValue(EnumLayoutValue newValue, NotificationChain msgs) { + EnumLayoutValue oldValue = value; + value = newValue; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DescriptionPackage.ENUM_LAYOUT_OPTION__VALUE, oldValue, newValue); + if (msgs == null) { + msgs = notification; + } else { + msgs.add(notification); + } + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setValue(EnumLayoutValue newValue) { + if (newValue != value) { + NotificationChain msgs = null; + if (value != null) { + msgs = ((InternalEObject) value).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - DescriptionPackage.ENUM_LAYOUT_OPTION__VALUE, null, msgs); + } + if (newValue != null) { + msgs = ((InternalEObject) newValue).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - DescriptionPackage.ENUM_LAYOUT_OPTION__VALUE, null, msgs); + } + msgs = basicSetValue(newValue, msgs); + if (msgs != null) { + msgs.dispatch(); + } + } else if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, DescriptionPackage.ENUM_LAYOUT_OPTION__VALUE, newValue, newValue)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EList<EnumLayoutValue> getChoices() { + if (choices == null) { + choices = new EObjectContainmentEList.Resolving<EnumLayoutValue>(EnumLayoutValue.class, this, DescriptionPackage.ENUM_LAYOUT_OPTION__CHOICES); + } + return choices; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case DescriptionPackage.ENUM_LAYOUT_OPTION__VALUE: + return basicSetValue(null, msgs); + case DescriptionPackage.ENUM_LAYOUT_OPTION__CHOICES: + return ((InternalEList<?>) getChoices()).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 DescriptionPackage.ENUM_LAYOUT_OPTION__VALUE: + if (resolve) { + return getValue(); + } + return basicGetValue(); + case DescriptionPackage.ENUM_LAYOUT_OPTION__CHOICES: + return getChoices(); + } + 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 DescriptionPackage.ENUM_LAYOUT_OPTION__VALUE: + setValue((EnumLayoutValue) newValue); + return; + case DescriptionPackage.ENUM_LAYOUT_OPTION__CHOICES: + getChoices().clear(); + getChoices().addAll((Collection<? extends EnumLayoutValue>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case DescriptionPackage.ENUM_LAYOUT_OPTION__VALUE: + setValue((EnumLayoutValue) null); + return; + case DescriptionPackage.ENUM_LAYOUT_OPTION__CHOICES: + getChoices().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case DescriptionPackage.ENUM_LAYOUT_OPTION__VALUE: + return value != null; + case DescriptionPackage.ENUM_LAYOUT_OPTION__CHOICES: + return choices != null && !choices.isEmpty(); + } + return super.eIsSet(featureID); + } + +} // EnumLayoutOptionImpl diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/EnumLayoutValueImpl.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/EnumLayoutValueImpl.java new file mode 100644 index 0000000000..c3bbbe760d --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/EnumLayoutValueImpl.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.sirius.diagram.description.DescriptionPackage; +import org.eclipse.sirius.diagram.description.EnumLayoutValue; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Enum Layout Value</b></em>'. <!-- end-user-doc + * --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.diagram.description.impl.EnumLayoutValueImpl#getValue <em>Value</em>}</li> + * </ul> + * + * @generated + */ +public class EnumLayoutValueImpl extends MinimalEObjectImpl.Container implements EnumLayoutValue { + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() <em>Name</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = EnumLayoutValueImpl.NAME_EDEFAULT; + + /** + * The default value of the '{@link #getDescription() <em>Description</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = EnumLayoutValueImpl.DESCRIPTION_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected EnumLayoutValueImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return DescriptionPackage.Literals.ENUM_LAYOUT_VALUE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, DescriptionPackage.ENUM_LAYOUT_VALUE__NAME, oldName, name)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getDescription() { + return description; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, DescriptionPackage.ENUM_LAYOUT_VALUE__DESCRIPTION, oldDescription, description)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case DescriptionPackage.ENUM_LAYOUT_VALUE__NAME: + return getName(); + case DescriptionPackage.ENUM_LAYOUT_VALUE__DESCRIPTION: + return getDescription(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case DescriptionPackage.ENUM_LAYOUT_VALUE__NAME: + setName((String) newValue); + return; + case DescriptionPackage.ENUM_LAYOUT_VALUE__DESCRIPTION: + setDescription((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case DescriptionPackage.ENUM_LAYOUT_VALUE__NAME: + setName(EnumLayoutValueImpl.NAME_EDEFAULT); + return; + case DescriptionPackage.ENUM_LAYOUT_VALUE__DESCRIPTION: + setDescription(EnumLayoutValueImpl.DESCRIPTION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case DescriptionPackage.ENUM_LAYOUT_VALUE__NAME: + return EnumLayoutValueImpl.NAME_EDEFAULT == null ? name != null : !EnumLayoutValueImpl.NAME_EDEFAULT.equals(name); + case DescriptionPackage.ENUM_LAYOUT_VALUE__DESCRIPTION: + return EnumLayoutValueImpl.DESCRIPTION_EDEFAULT == null ? description != null : !EnumLayoutValueImpl.DESCRIPTION_EDEFAULT.equals(description); + } + 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(" (name: "); //$NON-NLS-1$ + result.append(name); + result.append(", description: "); //$NON-NLS-1$ + result.append(description); + result.append(')'); + return result.toString(); + } + +} // EnumLayoutValueImpl diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/IntegerLayoutOptionImpl.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/IntegerLayoutOptionImpl.java new file mode 100644 index 0000000000..529a435bf0 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/IntegerLayoutOptionImpl.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.sirius.diagram.description.DescriptionPackage; +import org.eclipse.sirius.diagram.description.IntegerLayoutOption; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Integer Layout Option</b></em>'. <!-- + * end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.diagram.description.impl.IntegerLayoutOptionImpl#getValue <em>Value</em>}</li> + * </ul> + * + * @generated + */ +public class IntegerLayoutOptionImpl extends LayoutOptionImpl implements IntegerLayoutOption { + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final int VALUE_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @see #getValue() + * @generated + * @ordered + */ + protected int value = IntegerLayoutOptionImpl.VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected IntegerLayoutOptionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return DescriptionPackage.Literals.INTEGER_LAYOUT_OPTION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setValue(int newValue) { + int oldValue = value; + value = newValue; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, DescriptionPackage.INTEGER_LAYOUT_OPTION__VALUE, oldValue, value)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case DescriptionPackage.INTEGER_LAYOUT_OPTION__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case DescriptionPackage.INTEGER_LAYOUT_OPTION__VALUE: + setValue((Integer) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case DescriptionPackage.INTEGER_LAYOUT_OPTION__VALUE: + setValue(IntegerLayoutOptionImpl.VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case DescriptionPackage.INTEGER_LAYOUT_OPTION__VALUE: + return value != IntegerLayoutOptionImpl.VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); //$NON-NLS-1$ + result.append(value); + result.append(')'); + return result.toString(); + } + +} // IntegerLayoutOptionImpl diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/LayoutOptionImpl.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/LayoutOptionImpl.java index ff8b8df4b5..f436aa0c3f 100644 --- a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/LayoutOptionImpl.java +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/LayoutOptionImpl.java @@ -24,52 +24,71 @@ import org.eclipse.sirius.diagram.description.LayoutOption; * The following features are implemented: * </p> * <ul> - * <li>{@link org.eclipse.sirius.diagram.description.impl.LayoutOptionImpl#getName <em>Name</em>}</li> - * <li>{@link org.eclipse.sirius.diagram.description.impl.LayoutOptionImpl#getValue <em>Value</em>}</li> + * <li>{@link org.eclipse.sirius.diagram.description.impl.LayoutOptionImpl#getId <em>Id</em>}</li> + * <li>{@link org.eclipse.sirius.diagram.description.impl.LayoutOptionImpl#getLabel <em>Label</em>}</li> + * <li>{@link org.eclipse.sirius.diagram.description.impl.LayoutOptionImpl#getDescription <em>Description</em>}</li> * </ul> * * @generated */ -public class LayoutOptionImpl extends MinimalEObjectImpl.Container implements LayoutOption { +public abstract class LayoutOptionImpl extends MinimalEObjectImpl.Container implements LayoutOption { /** - * The default value of the '{@link #getName() <em>Name</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc - * --> + * The default value of the '{@link #getId() <em>Id</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * - * @see #getName() + * @see #getId() * @generated * @ordered */ - protected static final String NAME_EDEFAULT = null; + protected static final String ID_EDEFAULT = null; /** - * The cached value of the '{@link #getName() <em>Name</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc - * --> + * The cached value of the '{@link #getId() <em>Id</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> * - * @see #getName() + * @see #getId() * @generated * @ordered */ - protected String name = LayoutOptionImpl.NAME_EDEFAULT; + protected String id = LayoutOptionImpl.ID_EDEFAULT; /** - * The default value of the '{@link #getValue() <em>Value</em>}' attribute. <!-- begin-user-doc --> <!-- + * The default value of the '{@link #getLabel() <em>Label</em>}' attribute. <!-- begin-user-doc --> <!-- * end-user-doc --> * - * @see #getValue() + * @see #getLabel() * @generated * @ordered */ - protected static final String VALUE_EDEFAULT = null; + protected static final String LABEL_EDEFAULT = null; /** - * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * The cached value of the '{@link #getLabel() <em>Label</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc * --> * - * @see #getValue() + * @see #getLabel() + * @generated + * @ordered + */ + protected String label = LayoutOptionImpl.LABEL_EDEFAULT; + + /** + * The default value of the '{@link #getDescription() <em>Description</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getDescription() * @generated * @ordered */ - protected String value = LayoutOptionImpl.VALUE_EDEFAULT; + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = LayoutOptionImpl.DESCRIPTION_EDEFAULT; /** * <!-- begin-user-doc --> <!-- end-user-doc --> @@ -96,8 +115,32 @@ public class LayoutOptionImpl extends MinimalEObjectImpl.Container implements La * @generated */ @Override - public String getName() { - return name; + public String getId() { + return id; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setId(String newId) { + String oldId = id; + id = newId; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, DescriptionPackage.LAYOUT_OPTION__ID, oldId, id)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getLabel() { + return label; } /** @@ -106,11 +149,11 @@ public class LayoutOptionImpl extends MinimalEObjectImpl.Container implements La * @generated */ @Override - public void setName(String newName) { - String oldName = name; - name = newName; + public void setLabel(String newLabel) { + String oldLabel = label; + label = newLabel; if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, DescriptionPackage.LAYOUT_OPTION__NAME, oldName, name)); + eNotify(new ENotificationImpl(this, Notification.SET, DescriptionPackage.LAYOUT_OPTION__LABEL, oldLabel, label)); } } @@ -120,8 +163,8 @@ public class LayoutOptionImpl extends MinimalEObjectImpl.Container implements La * @generated */ @Override - public String getValue() { - return value; + public String getDescription() { + return description; } /** @@ -130,11 +173,11 @@ public class LayoutOptionImpl extends MinimalEObjectImpl.Container implements La * @generated */ @Override - public void setValue(String newValue) { - String oldValue = value; - value = newValue; + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; if (eNotificationRequired()) { - eNotify(new ENotificationImpl(this, Notification.SET, DescriptionPackage.LAYOUT_OPTION__VALUE, oldValue, value)); + eNotify(new ENotificationImpl(this, Notification.SET, DescriptionPackage.LAYOUT_OPTION__DESCRIPTION, oldDescription, description)); } } @@ -146,10 +189,12 @@ public class LayoutOptionImpl extends MinimalEObjectImpl.Container implements La @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case DescriptionPackage.LAYOUT_OPTION__NAME: - return getName(); - case DescriptionPackage.LAYOUT_OPTION__VALUE: - return getValue(); + case DescriptionPackage.LAYOUT_OPTION__ID: + return getId(); + case DescriptionPackage.LAYOUT_OPTION__LABEL: + return getLabel(); + case DescriptionPackage.LAYOUT_OPTION__DESCRIPTION: + return getDescription(); } return super.eGet(featureID, resolve, coreType); } @@ -162,11 +207,14 @@ public class LayoutOptionImpl extends MinimalEObjectImpl.Container implements La @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case DescriptionPackage.LAYOUT_OPTION__NAME: - setName((String) newValue); + case DescriptionPackage.LAYOUT_OPTION__ID: + setId((String) newValue); return; - case DescriptionPackage.LAYOUT_OPTION__VALUE: - setValue((String) newValue); + case DescriptionPackage.LAYOUT_OPTION__LABEL: + setLabel((String) newValue); + return; + case DescriptionPackage.LAYOUT_OPTION__DESCRIPTION: + setDescription((String) newValue); return; } super.eSet(featureID, newValue); @@ -180,11 +228,14 @@ public class LayoutOptionImpl extends MinimalEObjectImpl.Container implements La @Override public void eUnset(int featureID) { switch (featureID) { - case DescriptionPackage.LAYOUT_OPTION__NAME: - setName(LayoutOptionImpl.NAME_EDEFAULT); + case DescriptionPackage.LAYOUT_OPTION__ID: + setId(LayoutOptionImpl.ID_EDEFAULT); + return; + case DescriptionPackage.LAYOUT_OPTION__LABEL: + setLabel(LayoutOptionImpl.LABEL_EDEFAULT); return; - case DescriptionPackage.LAYOUT_OPTION__VALUE: - setValue(LayoutOptionImpl.VALUE_EDEFAULT); + case DescriptionPackage.LAYOUT_OPTION__DESCRIPTION: + setDescription(LayoutOptionImpl.DESCRIPTION_EDEFAULT); return; } super.eUnset(featureID); @@ -198,10 +249,12 @@ public class LayoutOptionImpl extends MinimalEObjectImpl.Container implements La @Override public boolean eIsSet(int featureID) { switch (featureID) { - case DescriptionPackage.LAYOUT_OPTION__NAME: - return LayoutOptionImpl.NAME_EDEFAULT == null ? name != null : !LayoutOptionImpl.NAME_EDEFAULT.equals(name); - case DescriptionPackage.LAYOUT_OPTION__VALUE: - return LayoutOptionImpl.VALUE_EDEFAULT == null ? value != null : !LayoutOptionImpl.VALUE_EDEFAULT.equals(value); + case DescriptionPackage.LAYOUT_OPTION__ID: + return LayoutOptionImpl.ID_EDEFAULT == null ? id != null : !LayoutOptionImpl.ID_EDEFAULT.equals(id); + case DescriptionPackage.LAYOUT_OPTION__LABEL: + return LayoutOptionImpl.LABEL_EDEFAULT == null ? label != null : !LayoutOptionImpl.LABEL_EDEFAULT.equals(label); + case DescriptionPackage.LAYOUT_OPTION__DESCRIPTION: + return LayoutOptionImpl.DESCRIPTION_EDEFAULT == null ? description != null : !LayoutOptionImpl.DESCRIPTION_EDEFAULT.equals(description); } return super.eIsSet(featureID); } @@ -218,10 +271,12 @@ public class LayoutOptionImpl extends MinimalEObjectImpl.Container implements La } StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); //$NON-NLS-1$ - result.append(name); - result.append(", value: "); //$NON-NLS-1$ - result.append(value); + result.append(" (id: "); //$NON-NLS-1$ + result.append(id); + result.append(", label: "); //$NON-NLS-1$ + result.append(label); + result.append(", description: "); //$NON-NLS-1$ + result.append(description); result.append(')'); return result.toString(); } diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/StringLayoutOptionImpl.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/StringLayoutOptionImpl.java new file mode 100644 index 0000000000..9f90fe80cc --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/StringLayoutOptionImpl.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES. + * 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.diagram.description.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.sirius.diagram.description.DescriptionPackage; +import org.eclipse.sirius.diagram.description.StringLayoutOption; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>String Layout Option</b></em>'. <!-- + * end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.sirius.diagram.description.impl.StringLayoutOptionImpl#getValue <em>Value</em>}</li> + * </ul> + * + * @generated + */ +public class StringLayoutOptionImpl extends LayoutOptionImpl implements StringLayoutOption { + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = StringLayoutOptionImpl.VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected StringLayoutOptionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return DescriptionPackage.Literals.STRING_LAYOUT_OPTION; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, DescriptionPackage.STRING_LAYOUT_OPTION__VALUE, oldValue, value)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case DescriptionPackage.STRING_LAYOUT_OPTION__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case DescriptionPackage.STRING_LAYOUT_OPTION__VALUE: + setValue((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case DescriptionPackage.STRING_LAYOUT_OPTION__VALUE: + setValue(StringLayoutOptionImpl.VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case DescriptionPackage.STRING_LAYOUT_OPTION__VALUE: + return StringLayoutOptionImpl.VALUE_EDEFAULT == null ? value != null : !StringLayoutOptionImpl.VALUE_EDEFAULT.equals(value); + } + 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(" (value: "); //$NON-NLS-1$ + result.append(value); + result.append(')'); + return result.toString(); + } + +} // StringLayoutOptionImpl diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/util/DescriptionAdapterFactory.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/util/DescriptionAdapterFactory.java index 4508977f80..497ef0ed4f 100644 --- a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/util/DescriptionAdapterFactory.java +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/util/DescriptionAdapterFactory.java @@ -17,6 +17,7 @@ import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; import org.eclipse.emf.ecore.EObject; import org.eclipse.sirius.diagram.description.AbstractNodeMapping; import org.eclipse.sirius.diagram.description.AdditionalLayer; +import org.eclipse.sirius.diagram.description.BooleanLayoutOption; import org.eclipse.sirius.diagram.description.CompositeLayout; import org.eclipse.sirius.diagram.description.ConditionalContainerStyleDescription; import org.eclipse.sirius.diagram.description.ConditionalEdgeStyleDescription; @@ -29,10 +30,14 @@ import org.eclipse.sirius.diagram.description.DiagramDescription; import org.eclipse.sirius.diagram.description.DiagramElementMapping; import org.eclipse.sirius.diagram.description.DiagramExtensionDescription; import org.eclipse.sirius.diagram.description.DiagramImportDescription; +import org.eclipse.sirius.diagram.description.DoubleLayoutOption; import org.eclipse.sirius.diagram.description.DragAndDropTargetDescription; import org.eclipse.sirius.diagram.description.EdgeMapping; import org.eclipse.sirius.diagram.description.EdgeMappingImport; +import org.eclipse.sirius.diagram.description.EnumLayoutOption; +import org.eclipse.sirius.diagram.description.EnumLayoutValue; import org.eclipse.sirius.diagram.description.IEdgeMapping; +import org.eclipse.sirius.diagram.description.IntegerLayoutOption; import org.eclipse.sirius.diagram.description.Layer; import org.eclipse.sirius.diagram.description.Layout; import org.eclipse.sirius.diagram.description.LayoutOption; @@ -40,6 +45,7 @@ import org.eclipse.sirius.diagram.description.MappingBasedDecoration; import org.eclipse.sirius.diagram.description.NodeMapping; import org.eclipse.sirius.diagram.description.NodeMappingImport; import org.eclipse.sirius.diagram.description.OrderedTreeLayout; +import org.eclipse.sirius.diagram.description.StringLayoutOption; import org.eclipse.sirius.viewpoint.description.AbstractMappingImport; import org.eclipse.sirius.viewpoint.description.ConditionalStyleDescription; import org.eclipse.sirius.viewpoint.description.DecorationDescription; @@ -204,6 +210,36 @@ public class DescriptionAdapterFactory extends AdapterFactoryImpl { } @Override + public Adapter caseBooleanLayoutOption(BooleanLayoutOption object) { + return createBooleanLayoutOptionAdapter(); + } + + @Override + public Adapter caseStringLayoutOption(StringLayoutOption object) { + return createStringLayoutOptionAdapter(); + } + + @Override + public Adapter caseIntegerLayoutOption(IntegerLayoutOption object) { + return createIntegerLayoutOptionAdapter(); + } + + @Override + public Adapter caseDoubleLayoutOption(DoubleLayoutOption object) { + return createDoubleLayoutOptionAdapter(); + } + + @Override + public Adapter caseEnumLayoutOption(EnumLayoutOption object) { + return createEnumLayoutOptionAdapter(); + } + + @Override + public Adapter caseEnumLayoutValue(EnumLayoutValue object) { + return createEnumLayoutValueAdapter(); + } + + @Override public Adapter caseMappingBasedDecoration(MappingBasedDecoration object) { return createMappingBasedDecorationAdapter(); } @@ -576,6 +612,90 @@ public class DescriptionAdapterFactory extends AdapterFactoryImpl { } /** + * Creates a new adapter for an object of class '{@link org.eclipse.sirius.diagram.description.BooleanLayoutOption + * <em>Boolean Layout Option</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.diagram.description.BooleanLayoutOption + * @generated + */ + public Adapter createBooleanLayoutOptionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.sirius.diagram.description.StringLayoutOption + * <em>String Layout Option</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.diagram.description.StringLayoutOption + * @generated + */ + public Adapter createStringLayoutOptionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.sirius.diagram.description.IntegerLayoutOption + * <em>Integer Layout Option</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.diagram.description.IntegerLayoutOption + * @generated + */ + public Adapter createIntegerLayoutOptionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.sirius.diagram.description.DoubleLayoutOption + * <em>Double Layout Option</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.diagram.description.DoubleLayoutOption + * @generated + */ + public Adapter createDoubleLayoutOptionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.sirius.diagram.description.EnumLayoutOption + * <em>Enum Layout Option</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.diagram.description.EnumLayoutOption + * @generated + */ + public Adapter createEnumLayoutOptionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.sirius.diagram.description.EnumLayoutValue + * <em>Enum Layout Value</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.diagram.description.EnumLayoutValue + * @generated + */ + public Adapter createEnumLayoutValueAdapter() { + return null; + } + + /** * Creates a new adapter for an object of class ' * {@link org.eclipse.sirius.diagram.description.MappingBasedDecoration <em>Mapping Based Decoration</em>}'. <!-- * begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to diff --git a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/util/DescriptionSwitch.java b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/util/DescriptionSwitch.java index 7c0e2767a0..81b8380d47 100644 --- a/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/util/DescriptionSwitch.java +++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/util/DescriptionSwitch.java @@ -17,6 +17,7 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.sirius.diagram.description.AbstractNodeMapping; import org.eclipse.sirius.diagram.description.AdditionalLayer; +import org.eclipse.sirius.diagram.description.BooleanLayoutOption; import org.eclipse.sirius.diagram.description.CompositeLayout; import org.eclipse.sirius.diagram.description.ConditionalContainerStyleDescription; import org.eclipse.sirius.diagram.description.ConditionalEdgeStyleDescription; @@ -29,10 +30,14 @@ import org.eclipse.sirius.diagram.description.DiagramDescription; import org.eclipse.sirius.diagram.description.DiagramElementMapping; import org.eclipse.sirius.diagram.description.DiagramExtensionDescription; import org.eclipse.sirius.diagram.description.DiagramImportDescription; +import org.eclipse.sirius.diagram.description.DoubleLayoutOption; import org.eclipse.sirius.diagram.description.DragAndDropTargetDescription; import org.eclipse.sirius.diagram.description.EdgeMapping; import org.eclipse.sirius.diagram.description.EdgeMappingImport; +import org.eclipse.sirius.diagram.description.EnumLayoutOption; +import org.eclipse.sirius.diagram.description.EnumLayoutValue; import org.eclipse.sirius.diagram.description.IEdgeMapping; +import org.eclipse.sirius.diagram.description.IntegerLayoutOption; import org.eclipse.sirius.diagram.description.Layer; import org.eclipse.sirius.diagram.description.Layout; import org.eclipse.sirius.diagram.description.LayoutOption; @@ -40,6 +45,7 @@ import org.eclipse.sirius.diagram.description.MappingBasedDecoration; import org.eclipse.sirius.diagram.description.NodeMapping; import org.eclipse.sirius.diagram.description.NodeMappingImport; import org.eclipse.sirius.diagram.description.OrderedTreeLayout; +import org.eclipse.sirius.diagram.description.StringLayoutOption; import org.eclipse.sirius.viewpoint.description.AbstractMappingImport; import org.eclipse.sirius.viewpoint.description.ConditionalStyleDescription; import org.eclipse.sirius.viewpoint.description.DecorationDescription; @@ -498,6 +504,69 @@ public class DescriptionSwitch<T> { } return result; } + case DescriptionPackage.BOOLEAN_LAYOUT_OPTION: { + BooleanLayoutOption booleanLayoutOption = (BooleanLayoutOption) theEObject; + T result = caseBooleanLayoutOption(booleanLayoutOption); + if (result == null) { + result = caseLayoutOption(booleanLayoutOption); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case DescriptionPackage.STRING_LAYOUT_OPTION: { + StringLayoutOption stringLayoutOption = (StringLayoutOption) theEObject; + T result = caseStringLayoutOption(stringLayoutOption); + if (result == null) { + result = caseLayoutOption(stringLayoutOption); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case DescriptionPackage.INTEGER_LAYOUT_OPTION: { + IntegerLayoutOption integerLayoutOption = (IntegerLayoutOption) theEObject; + T result = caseIntegerLayoutOption(integerLayoutOption); + if (result == null) { + result = caseLayoutOption(integerLayoutOption); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case DescriptionPackage.DOUBLE_LAYOUT_OPTION: { + DoubleLayoutOption doubleLayoutOption = (DoubleLayoutOption) theEObject; + T result = caseDoubleLayoutOption(doubleLayoutOption); + if (result == null) { + result = caseLayoutOption(doubleLayoutOption); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case DescriptionPackage.ENUM_LAYOUT_OPTION: { + EnumLayoutOption enumLayoutOption = (EnumLayoutOption) theEObject; + T result = caseEnumLayoutOption(enumLayoutOption); + if (result == null) { + result = caseLayoutOption(enumLayoutOption); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case DescriptionPackage.ENUM_LAYOUT_VALUE: { + EnumLayoutValue enumLayoutValue = (EnumLayoutValue) theEObject; + T result = caseEnumLayoutValue(enumLayoutValue); + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } case DescriptionPackage.MAPPING_BASED_DECORATION: { MappingBasedDecoration mappingBasedDecoration = (MappingBasedDecoration) theEObject; T result = caseMappingBasedDecoration(mappingBasedDecoration); @@ -856,6 +925,96 @@ public class DescriptionSwitch<T> { } /** + * Returns the result of interpreting the object as an instance of '<em>Boolean Layout Option</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>Boolean Layout Option</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseBooleanLayoutOption(BooleanLayoutOption object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>String Layout Option</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>String Layout Option</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseStringLayoutOption(StringLayoutOption object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Integer Layout Option</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>Integer Layout Option</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseIntegerLayoutOption(IntegerLayoutOption object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Double Layout Option</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>Double Layout Option</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDoubleLayoutOption(DoubleLayoutOption object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Enum Layout Option</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>Enum Layout Option</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEnumLayoutOption(EnumLayoutOption object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Enum Layout Value</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>Enum Layout Value</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEnumLayoutValue(EnumLayoutValue object) { + return null; + } + + /** * Returns the result of interpreting the object as an instance of '<em>Mapping Based Decoration</em>'. <!-- * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- * end-user-doc --> |
