Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpguilet2018-02-19 15:00:56 +0000
committerPierre Guilet2018-02-28 13:07:48 +0000
commit866e12d3c9c48529d32ef856956298f053bb8cdf (patch)
tree3522620e30929471c601a507fd67268392177d5f
parentf01381205081445332a3cb02a4fa99fd5b35d33b (diff)
downloadorg.eclipse.sirius-866e12d3c9c48529d32ef856956298f053bb8cdf.tar.gz
org.eclipse.sirius-866e12d3c9c48529d32ef856956298f053bb8cdf.tar.xz
org.eclipse.sirius-866e12d3c9c48529d32ef856956298f053bb8cdf.zip
[509070] Update diagram metamodel to add generic layout
The diagram metamodel now allows to define a layout algorithm to use when doing arrange all on a Sirius diagram. Bug: 509070 Change-Id: Ia51b352eb7c7bb3e44c06e2261db9a675ac8f21e Signed-off-by: pguilet <pierre.guilet@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/icons/full/obj16/CustomLayoutConfiguration.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/icons/full/obj16/LayoutOption.gifbin0 -> 129 bytes
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/plugin.properties11
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/CustomLayoutConfigurationItemProvider.java161
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DescriptionItemProviderAdapterFactory.java53
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DiagramDescriptionItemProvider.java6
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DiagramImportDescriptionItemProvider.java3
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/LayoutOptionItemProvider.java153
-rw-r--r--plugins/org.eclipse.sirius.diagram/model/diagram.ecore10
-rw-r--r--plugins/org.eclipse.sirius.diagram/model/diagram.genmodel10
-rw-r--r--plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/CustomLayoutConfiguration.java104
-rw-r--r--plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/DescriptionFactory.java17
-rw-r--r--plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/DescriptionPackage.java240
-rw-r--r--plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/GenericLayout.java102
-rw-r--r--plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/LayoutOption.java85
-rw-r--r--plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/CustomLayoutConfigurationImpl.java270
-rw-r--r--plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/DescriptionFactoryImpl.java28
-rw-r--r--plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/DescriptionPackageImpl.java112
-rw-r--r--plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/LayoutOptionImpl.java229
-rw-r--r--plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/util/DescriptionAdapterFactory.java40
-rw-r--r--plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/util/DescriptionSwitch.java53
-rw-r--r--plugins/org.eclipse.sirius.editor.diagram/src/org/eclipse/sirius/diagram/editor/tools/internal/menu/child/LayoutsMenuBuilder.java3
22 files changed, 1681 insertions, 9 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.ui/icons/full/obj16/CustomLayoutConfiguration.gif b/plugins/org.eclipse.sirius.diagram.ui/icons/full/obj16/CustomLayoutConfiguration.gif
new file mode 100644
index 0000000000..d92f34c8ae
--- /dev/null
+++ b/plugins/org.eclipse.sirius.diagram.ui/icons/full/obj16/CustomLayoutConfiguration.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.diagram.ui/icons/full/obj16/LayoutOption.gif b/plugins/org.eclipse.sirius.diagram.ui/icons/full/obj16/LayoutOption.gif
new file mode 100644
index 0000000000..c00aedf413
--- /dev/null
+++ b/plugins/org.eclipse.sirius.diagram.ui/icons/full/obj16/LayoutOption.gif
Binary files differ
diff --git a/plugins/org.eclipse.sirius.diagram.ui/plugin.properties b/plugins/org.eclipse.sirius.diagram.ui/plugin.properties
index daf0b8aaee..a1ebf7d88a 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/plugin.properties
+++ b/plugins/org.eclipse.sirius.diagram.ui/plugin.properties
@@ -1266,3 +1266,14 @@ _UI_DDiagram_isInShowingMode_feature = Is In Showing Mode
_UI_DiagramDescription_backgroundColor_feature = Background Color
_UI_BackgroundPropertyCategory = Background
_UI_DiagramDescription_backgroundColor_description = Color of the diagram background, white if unset.
+_UI_LayoutOption_type = Layout Option
+_UI_LayoutProviderById_ID_feature = ID
+_UI_LayoutProviderById_label_feature = Label
+_UI_LayoutProviderById_layoutOptions_feature = Layout Options
+_UI_LayoutOption_Name_feature = Name
+_UI_LayoutOption_value_feature = Value
+_UI_CustomLayoutConfiguration_type = Custom Layout Configuration
+_UI_CustomLayoutConfiguration_id_feature = Id
+_UI_CustomLayoutConfiguration_label_feature = Label
+_UI_CustomLayoutConfiguration_layoutOptions_feature = Layout Options
+_UI_LayoutOption_name_feature = Name
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
new file mode 100644
index 0000000000..1204d34b35
--- /dev/null
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/CustomLayoutConfigurationItemProvider.java
@@ -0,0 +1,161 @@
+/**
+ * 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.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.DescriptionPackage;
+import org.eclipse.sirius.diagram.ui.provider.DiagramUIPlugin;
+import org.eclipse.sirius.viewpoint.description.provider.DocumentedElementItemProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.sirius.diagram.description.CustomLayoutConfiguration}
+ * object. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class CustomLayoutConfigurationItemProvider extends DocumentedElementItemProvider {
+ /**
+ * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public CustomLayoutConfigurationItemProvider(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);
+
+ addIdPropertyDescriptor(object);
+ addLabelPropertyDescriptor(object);
+ addLayoutOptionsPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Id feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addIdPropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CustomLayoutConfiguration_id_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_CustomLayoutConfiguration_id_feature", "_UI_CustomLayoutConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ DescriptionPackage.Literals.CUSTOM_LAYOUT_CONFIGURATION__ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Label feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addLabelPropertyDescriptor(Object object) {
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CustomLayoutConfiguration_label_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_CustomLayoutConfiguration_label_feature", "_UI_CustomLayoutConfiguration_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ DescriptionPackage.Literals.CUSTOM_LAYOUT_CONFIGURATION__LABEL, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Layout Options 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));
+ }
+
+ /**
+ * This returns CustomLayoutConfiguration.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/CustomLayoutConfiguration")); //$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 = ((CustomLayoutConfiguration) object).getId();
+ return label == null || label.length() == 0 ? getString("_UI_CustomLayoutConfiguration_type") : //$NON-NLS-1$
+ getString("_UI_CustomLayoutConfiguration_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(CustomLayoutConfiguration.class)) {
+ case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__ID:
+ case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LABEL:
+ 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/DescriptionItemProviderAdapterFactory.java b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DescriptionItemProviderAdapterFactory.java
index 8897b8c54c..35a1614db4 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
@@ -424,6 +424,53 @@ public class DescriptionItemProviderAdapterFactory extends DescriptionAdapterFac
/**
* This keeps track of the one adapter used for all
+ * {@link org.eclipse.sirius.diagram.description.CustomLayoutConfiguration} instances. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected CustomLayoutConfigurationItemProvider customLayoutConfigurationItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.sirius.diagram.description.CustomLayoutConfiguration}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createCustomLayoutConfigurationAdapter() {
+ if (customLayoutConfigurationItemProvider == null) {
+ customLayoutConfigurationItemProvider = new CustomLayoutConfigurationItemProvider(this);
+ }
+
+ return customLayoutConfigurationItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.sirius.diagram.description.LayoutOption}
+ * instances. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected LayoutOptionItemProvider layoutOptionItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.sirius.diagram.description.LayoutOption}. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createLayoutOptionAdapter() {
+ if (layoutOptionItemProvider == null) {
+ layoutOptionItemProvider = new LayoutOptionItemProvider(this);
+ }
+
+ return layoutOptionItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all
* {@link org.eclipse.sirius.diagram.description.MappingBasedDecoration} instances. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
@@ -634,6 +681,12 @@ public class DescriptionItemProviderAdapterFactory extends DescriptionAdapterFac
if (compositeLayoutItemProvider != null) {
compositeLayoutItemProvider.dispose();
}
+ if (customLayoutConfigurationItemProvider != null) {
+ customLayoutConfigurationItemProvider.dispose();
+ }
+ if (layoutOptionItemProvider != null) {
+ layoutOptionItemProvider.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 a98e107633..c36b7f55e7 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
@@ -536,7 +536,8 @@ public class DiagramDescriptionItemProvider extends DragAndDropTargetDescription
ConcernSet concernSet = ConcernFactory.eINSTANCE.createConcernSet();
concernSet.getOwnedConcernDescriptions().add(ConcernFactory.eINSTANCE.createConcernDescription());
newChildDescriptors.add(createChildParameter(org.eclipse.sirius.diagram.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__CONCERNS, concernSet));
-
+ newChildDescriptors.add(
+ createChildParameter(org.eclipse.sirius.diagram.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__LAYOUT, DescriptionFactory.eINSTANCE.createCustomLayoutConfiguration()));
newChildDescriptors
.add(createChildParameter(org.eclipse.sirius.diagram.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__LAYOUT, DescriptionFactory.eINSTANCE.createOrderedTreeLayout()));
@@ -606,6 +607,9 @@ public class DiagramDescriptionItemProvider extends DragAndDropTargetDescription
.add(createChildParameter(org.eclipse.sirius.diagram.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__LAYOUT, DescriptionFactory.eINSTANCE.createCompositeLayout()));
newChildDescriptors.add(
+ createChildParameter(org.eclipse.sirius.diagram.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__LAYOUT, DescriptionFactory.eINSTANCE.createCustomLayoutConfiguration()));
+
+ newChildDescriptors.add(
createChildParameter(org.eclipse.sirius.diagram.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__DIAGRAM_INITIALISATION, ToolFactory.eINSTANCE.createInitialOperation()));
newChildDescriptors
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DiagramImportDescriptionItemProvider.java b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DiagramImportDescriptionItemProvider.java
index e4cd4e7805..9608274c1e 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DiagramImportDescriptionItemProvider.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/DiagramImportDescriptionItemProvider.java
@@ -617,6 +617,9 @@ public class DiagramImportDescriptionItemProvider extends DocumentedElementItemP
newChildDescriptors
.add(createChildParameter(org.eclipse.sirius.diagram.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__LAYOUT, DescriptionFactory.eINSTANCE.createCompositeLayout()));
+ newChildDescriptors.add(
+ createChildParameter(org.eclipse.sirius.diagram.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__LAYOUT, DescriptionFactory.eINSTANCE.createCustomLayoutConfiguration()));
+
newChildDescriptors.add(createChildParameter(org.eclipse.sirius.diagram.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__DIAGRAM_INITIALISATION,
org.eclipse.sirius.viewpoint.description.tool.ToolFactory.eINSTANCE.createInitialOperation()));
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
new file mode 100644
index 0000000000..59b9035fec
--- /dev/null
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-gen/org/eclipse/sirius/diagram/description/provider/LayoutOptionItemProvider.java
@@ -0,0 +1,153 @@
+/**
+ * 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.LayoutOption;
+import org.eclipse.sirius.diagram.ui.provider.DiagramUIPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.sirius.diagram.description.LayoutOption} object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class LayoutOptionItemProvider 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 LayoutOptionItemProvider(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);
+ addValuePropertyDescriptor(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_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) {
+ 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));
+ }
+
+ /**
+ * This returns LayoutOption.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/LayoutOption")); //$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 = ((LayoutOption) object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_LayoutOption_type") : //$NON-NLS-1$
+ getString("_UI_LayoutOption_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(LayoutOption.class)) {
+ case DescriptionPackage.LAYOUT_OPTION__NAME:
+ case DescriptionPackage.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);
+ }
+
+ /**
+ * 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/model/diagram.ecore b/plugins/org.eclipse.sirius.diagram/model/diagram.ecore
index ca65508503..29ad867497 100644
--- a/plugins/org.eclipse.sirius.diagram/model/diagram.ecore
+++ b/plugins/org.eclipse.sirius.diagram/model/diagram.ecore
@@ -1692,6 +1692,16 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="direction" lowerBound="1"
eType="#//description/LayoutDirection" defaultValueLiteral="topToBottom"/>
</eClassifiers>
+ <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:EReference" name="layoutOptions" upperBound="-1"
+ eType="#//description/LayoutOption"/>
+ </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"/>
+ <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: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 afacea05e5..4adf6a10c5 100644
--- a/plugins/org.eclipse.sirius.diagram/model/diagram.genmodel
+++ b/plugins/org.eclipse.sirius.diagram/model/diagram.genmodel
@@ -593,6 +593,16 @@
<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>
+ <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"/>
+ </genClasses>
<genClasses ecoreClass="diagram.ecore#//description/MappingBasedDecoration">
<genFeatures notify="false" createChild="false" propertyCategory="General"
propertyDescription="Mappings to decorate." propertySortChoices="true"
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
new file mode 100644
index 0000000000..261817c207
--- /dev/null
+++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/CustomLayoutConfiguration.java
@@ -0,0 +1,104 @@
+/**
+ * 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>Custom Layout Configuration</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <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#getLayoutOptions <em>Layout
+ * Options</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getCustomLayoutConfiguration()
+ * @model
+ * @generated
+ */
+public interface CustomLayoutConfiguration extends Layout {
+ /**
+ * Returns the value of the '<em><b>Id</b></em>' attribute. <!-- begin-user-doc -->
+ * <p>
+ * 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>Id</em>' attribute.
+ * @see #setId(String)
+ * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getCustomLayoutConfiguration_Id()
+ * @model
+ * @generated
+ */
+ String getId();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.sirius.diagram.description.CustomLayoutConfiguration#getId
+ * <em>Id</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Id</em>' attribute.
+ * @see #getId()
+ * @generated
+ */
+ void setId(String value);
+
+ /**
+ * Returns the value of the '<em><b>Label</b></em>' attribute. <!-- begin-user-doc -->
+ * <p>
+ * 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>Label</em>' attribute.
+ * @see #setLabel(String)
+ * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getCustomLayoutConfiguration_Label()
+ * @model
+ * @generated
+ */
+ String getLabel();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.sirius.diagram.description.CustomLayoutConfiguration#getLabel
+ * <em>Label</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Label</em>' attribute.
+ * @see #getLabel()
+ * @generated
+ */
+ 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 -->
+ * <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.
+ * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getCustomLayoutConfiguration_LayoutOptions()
+ * @model
+ * @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 22b33d8c34..232e28cc11 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
@@ -154,6 +154,23 @@ public interface DescriptionFactory extends EFactory {
CompositeLayout createCompositeLayout();
/**
+ * Returns a new object of class '<em>Custom Layout Configuration</em>'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return a new object of class '<em>Custom Layout Configuration</em>'.
+ * @generated
+ */
+ CustomLayoutConfiguration createCustomLayoutConfiguration();
+
+ /**
+ * Returns a new object of class '<em>Layout Option</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Layout Option</em>'.
+ * @generated
+ */
+ LayoutOption createLayoutOption();
+
+ /**
* Returns a new object of class '<em>Mapping Based Decoration</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return a new object of class '<em>Mapping Based Decoration</em>'.
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 2f458eda25..3cd2de0ec0 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 = 21;
+ int DRAG_AND_DROP_TARGET_DESCRIPTION = 23;
/**
* The feature id for the '<em><b>Drop Descriptions</b></em>' reference list. <!-- begin-user-doc --> <!--
@@ -2677,6 +2677,93 @@ public interface DescriptionPackage extends EPackage {
int COMPOSITE_LAYOUT_FEATURE_COUNT = DescriptionPackage.LAYOUT_FEATURE_COUNT + 2;
/**
+ * The meta object id for the '{@link org.eclipse.sirius.diagram.description.impl.CustomLayoutConfigurationImpl
+ * <em>Custom Layout Configuration</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.sirius.diagram.description.impl.CustomLayoutConfigurationImpl
+ * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getCustomLayoutConfiguration()
+ * @generated
+ */
+ int CUSTOM_LAYOUT_CONFIGURATION = 18;
+
+ /**
+ * The feature id for the '<em><b>Documentation</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CUSTOM_LAYOUT_CONFIGURATION__DOCUMENTATION = DescriptionPackage.LAYOUT__DOCUMENTATION;
+
+ /**
+ * The feature id for the '<em><b>Id</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CUSTOM_LAYOUT_CONFIGURATION__ID = DescriptionPackage.LAYOUT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Label</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CUSTOM_LAYOUT_CONFIGURATION__LABEL = DescriptionPackage.LAYOUT_FEATURE_COUNT + 1;
+
+ /**
+ * 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;
+
+ /**
+ * The number of structural features of the '<em>Custom Layout Configuration</em>' class. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CUSTOM_LAYOUT_CONFIGURATION_FEATURE_COUNT = DescriptionPackage.LAYOUT_FEATURE_COUNT + 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.sirius.diagram.description.impl.LayoutOptionImpl <em>Layout
+ * Option</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.sirius.diagram.description.impl.LayoutOptionImpl
+ * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getLayoutOption()
+ * @generated
+ */
+ int LAYOUT_OPTION = 19;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int LAYOUT_OPTION__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int LAYOUT_OPTION__VALUE = 1;
+
+ /**
+ * The number of structural features of the '<em>Layout Option</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int LAYOUT_OPTION_FEATURE_COUNT = 2;
+
+ /**
* The meta object id for the '{@link org.eclipse.sirius.diagram.description.impl.MappingBasedDecorationImpl
* <em>Mapping Based Decoration</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
*
@@ -2684,7 +2771,7 @@ public interface DescriptionPackage extends EPackage {
* @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getMappingBasedDecoration()
* @generated
*/
- int MAPPING_BASED_DECORATION = 18;
+ int MAPPING_BASED_DECORATION = 20;
/**
* The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -2763,7 +2850,7 @@ public interface DescriptionPackage extends EPackage {
* @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getLayer()
* @generated
*/
- int LAYER = 19;
+ int LAYER = 21;
/**
* The feature id for the '<em><b>Documentation</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -2920,7 +3007,7 @@ public interface DescriptionPackage extends EPackage {
* @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getAdditionalLayer()
* @generated
*/
- int ADDITIONAL_LAYER = 20;
+ int ADDITIONAL_LAYER = 22;
/**
* The feature id for the '<em><b>Documentation</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -3095,7 +3182,7 @@ public interface DescriptionPackage extends EPackage {
* @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getFoldingStyle()
* @generated
*/
- int FOLDING_STYLE = 22;
+ int FOLDING_STYLE = 24;
/**
* The meta object id for the '{@link org.eclipse.sirius.diagram.description.LayoutDirection <em>Layout
@@ -3105,7 +3192,7 @@ public interface DescriptionPackage extends EPackage {
* @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getLayoutDirection()
* @generated
*/
- int LAYOUT_DIRECTION = 23;
+ int LAYOUT_DIRECTION = 25;
/**
* The meta object id for the '{@link org.eclipse.sirius.diagram.description.CenteringStyle <em>Centering
@@ -3115,7 +3202,7 @@ public interface DescriptionPackage extends EPackage {
* @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getCenteringStyle()
* @generated
*/
- int CENTERING_STYLE = 24;
+ int CENTERING_STYLE = 26;
/**
* Returns the meta object for class '{@link org.eclipse.sirius.diagram.description.DiagramDescription <em>Diagram
@@ -4223,6 +4310,84 @@ public interface DescriptionPackage extends EPackage {
EAttribute getCompositeLayout_Direction();
/**
+ * Returns the meta object for class '{@link org.eclipse.sirius.diagram.description.CustomLayoutConfiguration
+ * <em>Custom Layout Configuration</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Custom Layout Configuration</em>'.
+ * @see org.eclipse.sirius.diagram.description.CustomLayoutConfiguration
+ * @generated
+ */
+ EClass getCustomLayoutConfiguration();
+
+ /**
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.diagram.description.CustomLayoutConfiguration#getId <em>Id</em>}'. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Id</em>'.
+ * @see org.eclipse.sirius.diagram.description.CustomLayoutConfiguration#getId()
+ * @see #getCustomLayoutConfiguration()
+ * @generated
+ */
+ EAttribute getCustomLayoutConfiguration_Id();
+
+ /**
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.diagram.description.CustomLayoutConfiguration#getLabel <em>Label</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Label</em>'.
+ * @see org.eclipse.sirius.diagram.description.CustomLayoutConfiguration#getLabel()
+ * @see #getCustomLayoutConfiguration()
+ * @generated
+ */
+ EAttribute getCustomLayoutConfiguration_Label();
+
+ /**
+ * Returns the meta object for the 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>'.
+ * @see org.eclipse.sirius.diagram.description.CustomLayoutConfiguration#getLayoutOptions()
+ * @see #getCustomLayoutConfiguration()
+ * @generated
+ */
+ EReference getCustomLayoutConfiguration_LayoutOptions();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.sirius.diagram.description.LayoutOption <em>Layout
+ * Option</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Layout Option</em>'.
+ * @see org.eclipse.sirius.diagram.description.LayoutOption
+ * @generated
+ */
+ 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 -->
+ *
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.sirius.diagram.description.LayoutOption#getName()
+ * @see #getLayoutOption()
+ * @generated
+ */
+ EAttribute getLayoutOption_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.sirius.diagram.description.LayoutOption#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.LayoutOption#getValue()
+ * @see #getLayoutOption()
+ * @generated
+ */
+ EAttribute getLayoutOption_Value();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.sirius.diagram.description.MappingBasedDecoration
* <em>Mapping Based Decoration</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
*
@@ -5307,6 +5472,67 @@ public interface DescriptionPackage extends EPackage {
/**
* The meta object literal for the
+ * '{@link org.eclipse.sirius.diagram.description.impl.CustomLayoutConfigurationImpl <em>Custom Layout
+ * Configuration</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.sirius.diagram.description.impl.CustomLayoutConfigurationImpl
+ * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getCustomLayoutConfiguration()
+ * @generated
+ */
+ EClass CUSTOM_LAYOUT_CONFIGURATION = DescriptionPackage.eINSTANCE.getCustomLayoutConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Id</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute CUSTOM_LAYOUT_CONFIGURATION__ID = DescriptionPackage.eINSTANCE.getCustomLayoutConfiguration_Id();
+
+ /**
+ * The meta object literal for the '<em><b>Label</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ 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 -->
+ *
+ * @generated
+ */
+ EReference CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS = DescriptionPackage.eINSTANCE.getCustomLayoutConfiguration_LayoutOptions();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.sirius.diagram.description.impl.LayoutOptionImpl
+ * <em>Layout Option</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.sirius.diagram.description.impl.LayoutOptionImpl
+ * @see org.eclipse.sirius.diagram.description.impl.DescriptionPackageImpl#getLayoutOption()
+ * @generated
+ */
+ EClass LAYOUT_OPTION = DescriptionPackage.eINSTANCE.getLayoutOption();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute LAYOUT_OPTION__NAME = DescriptionPackage.eINSTANCE.getLayoutOption_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute LAYOUT_OPTION__VALUE = DescriptionPackage.eINSTANCE.getLayoutOption_Value();
+
+ /**
+ * The meta object literal for the
* '{@link org.eclipse.sirius.diagram.description.impl.MappingBasedDecorationImpl <em>Mapping Based
* Decoration</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
*
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
new file mode 100644
index 0000000000..bc76a2bb09
--- /dev/null
+++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/GenericLayout.java
@@ -0,0 +1,102 @@
+/**
+ * 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>Generic Layout</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <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#getLayoutOptions <em>Layout Options</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getGenericLayout()
+ * @model
+ * @generated
+ */
+public interface GenericLayout extends Layout {
+ /**
+ * Returns the value of the '<em><b>ID</b></em>' attribute. <!-- begin-user-doc -->
+ * <p>
+ * 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>ID</em>' attribute.
+ * @see #setID(String)
+ * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getGenericLayout_ID()
+ * @model
+ * @generated
+ */
+ String getID();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.sirius.diagram.description.GenericLayout#getID <em>ID</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>ID</em>' attribute.
+ * @see #getID()
+ * @generated
+ */
+ void setID(String value);
+
+ /**
+ * Returns the value of the '<em><b>Label</b></em>' attribute. <!-- begin-user-doc -->
+ * <p>
+ * 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>Label</em>' attribute.
+ * @see #setLabel(String)
+ * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getGenericLayout_Label()
+ * @model
+ * @generated
+ */
+ String getLabel();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.sirius.diagram.description.GenericLayout#getLabel <em>Label</em>}'
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Label</em>' attribute.
+ * @see #getLabel()
+ * @generated
+ */
+ 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 -->
+ * <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.
+ * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getGenericLayout_LayoutOptions()
+ * @model
+ * @generated
+ */
+ EList<LayoutOption> getLayoutOptions();
+
+} // GenericLayout
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
new file mode 100644
index 0000000000..9a1b280612
--- /dev/null
+++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/LayoutOption.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>Layout Option</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * 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>
+ * </ul>
+ *
+ * @see org.eclipse.sirius.diagram.description.DescriptionPackage#getLayoutOption()
+ * @model
+ * @generated
+ */
+public interface LayoutOption 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#getLayoutOption_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.sirius.diagram.description.LayoutOption#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>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#getLayoutOption_Value()
+ * @model
+ * @generated
+ */
+ String getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.sirius.diagram.description.LayoutOption#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);
+
+} // LayoutOption
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
new file mode 100644
index 0000000000..1cbe8da62b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/CustomLayoutConfigurationImpl.java
@@ -0,0 +1,270 @@
+/**
+ * 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.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.sirius.diagram.description.CustomLayoutConfiguration;
+import org.eclipse.sirius.diagram.description.DescriptionPackage;
+import org.eclipse.sirius.diagram.description.LayoutOption;
+import org.eclipse.sirius.viewpoint.description.impl.DocumentedElementImpl;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Custom Layout Configuration</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <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#getLayoutOptions <em>Layout
+ * Options</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class CustomLayoutConfigurationImpl extends DocumentedElementImpl implements CustomLayoutConfiguration {
+ /**
+ * The default value of the '{@link #getId() <em>Id</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getId()
+ * @generated
+ * @ordered
+ */
+ protected static final String ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getId() <em>Id</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getId()
+ * @generated
+ * @ordered
+ */
+ protected String id = CustomLayoutConfigurationImpl.ID_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getLabel() <em>Label</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getLabel()
+ * @generated
+ * @ordered
+ */
+ protected static final String LABEL_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getLabel() <em>Label</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see #getLabel()
+ * @generated
+ * @ordered
+ */
+ 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 -->
+ *
+ * @see #getLayoutOptions()
+ * @generated
+ * @ordered
+ */
+ protected EList<LayoutOption> layoutOptions;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected CustomLayoutConfigurationImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DescriptionPackage.Literals.CUSTOM_LAYOUT_CONFIGURATION;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ 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.CUSTOM_LAYOUT_CONFIGURATION__ID, oldId, id));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setLabel(String newLabel) {
+ String oldLabel = label;
+ label = newLabel;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LABEL, oldLabel, label));
+ }
+ }
+
+ /**
+ * <!-- 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);
+ }
+ return layoutOptions;
+ }
+
+ /**
+ * <!-- 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__LAYOUT_OPTIONS:
+ return getLayoutOptions();
+ }
+ 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.CUSTOM_LAYOUT_CONFIGURATION__ID:
+ setId((String) newValue);
+ return;
+ case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LABEL:
+ setLabel((String) newValue);
+ return;
+ case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS:
+ getLayoutOptions().clear();
+ getLayoutOptions().addAll((Collection<? extends LayoutOption>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__ID:
+ setId(CustomLayoutConfigurationImpl.ID_EDEFAULT);
+ return;
+ case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LABEL:
+ setLabel(CustomLayoutConfigurationImpl.LABEL_EDEFAULT);
+ return;
+ case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LAYOUT_OPTIONS:
+ getLayoutOptions().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__ID:
+ 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__LAYOUT_OPTIONS:
+ return layoutOptions != null && !layoutOptions.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (id: "); //$NON-NLS-1$
+ result.append(id);
+ result.append(", label: "); //$NON-NLS-1$
+ result.append(label);
+ result.append(')');
+ return result.toString();
+ }
+
+} // CustomLayoutConfigurationImpl
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 b02f1562f0..800beb9bcc 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
@@ -37,6 +37,7 @@ import org.eclipse.sirius.diagram.description.ConditionalEdgeStyleDescription;
import org.eclipse.sirius.diagram.description.ConditionalNodeStyleDescription;
import org.eclipse.sirius.diagram.description.ContainerMapping;
import org.eclipse.sirius.diagram.description.ContainerMappingImport;
+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.description.DiagramDescription;
@@ -47,6 +48,7 @@ import org.eclipse.sirius.diagram.description.EdgeMappingImport;
import org.eclipse.sirius.diagram.description.FoldingStyle;
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;
@@ -120,6 +122,10 @@ public class DescriptionFactoryImpl extends EFactoryImpl implements DescriptionF
return createOrderedTreeLayout();
case DescriptionPackage.COMPOSITE_LAYOUT:
return createCompositeLayout();
+ case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION:
+ return createCustomLayoutConfiguration();
+ case DescriptionPackage.LAYOUT_OPTION:
+ return createLayoutOption();
case DescriptionPackage.MAPPING_BASED_DECORATION:
return createMappingBasedDecoration();
case DescriptionPackage.LAYER:
@@ -342,6 +348,28 @@ public class DescriptionFactoryImpl extends EFactoryImpl implements DescriptionF
* @generated
*/
@Override
+ public CustomLayoutConfiguration createCustomLayoutConfiguration() {
+ CustomLayoutConfigurationImpl customLayoutConfiguration = new CustomLayoutConfigurationImpl();
+ return customLayoutConfiguration;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public LayoutOption createLayoutOption() {
+ LayoutOptionImpl layoutOption = new LayoutOptionImpl();
+ return layoutOption;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
public MappingBasedDecoration createMappingBasedDecoration() {
MappingBasedDecorationImpl mappingBasedDecoration = new MappingBasedDecorationImpl();
return mappingBasedDecoration;
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 35cd651544..c755188fcd 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
@@ -29,6 +29,7 @@ import org.eclipse.sirius.diagram.description.ConditionalEdgeStyleDescription;
import org.eclipse.sirius.diagram.description.ConditionalNodeStyleDescription;
import org.eclipse.sirius.diagram.description.ContainerMapping;
import org.eclipse.sirius.diagram.description.ContainerMappingImport;
+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.description.DiagramDescription;
@@ -43,6 +44,7 @@ import org.eclipse.sirius.diagram.description.IEdgeMapping;
import org.eclipse.sirius.diagram.description.Layer;
import org.eclipse.sirius.diagram.description.Layout;
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;
@@ -196,6 +198,20 @@ public class DescriptionPackageImpl extends EPackageImpl implements DescriptionP
*
* @generated
*/
+ private EClass customLayoutConfigurationEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass layoutOptionEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
private EClass mappingBasedDecorationEClass = null;
/**
@@ -1283,6 +1299,76 @@ public class DescriptionPackageImpl extends EPackageImpl implements DescriptionP
* @generated
*/
@Override
+ public EClass getCustomLayoutConfiguration() {
+ return customLayoutConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getCustomLayoutConfiguration_Id() {
+ return (EAttribute) customLayoutConfigurationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getCustomLayoutConfiguration_Label() {
+ return (EAttribute) customLayoutConfigurationEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getCustomLayoutConfiguration_LayoutOptions() {
+ return (EReference) customLayoutConfigurationEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getLayoutOption() {
+ return layoutOptionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getLayoutOption_Name() {
+ return (EAttribute) layoutOptionEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getLayoutOption_Value() {
+ return (EAttribute) layoutOptionEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
public EClass getMappingBasedDecoration() {
return mappingBasedDecorationEClass;
}
@@ -1650,6 +1736,15 @@ public class DescriptionPackageImpl extends EPackageImpl implements DescriptionP
createEAttribute(compositeLayoutEClass, DescriptionPackage.COMPOSITE_LAYOUT__PADDING);
createEAttribute(compositeLayoutEClass, DescriptionPackage.COMPOSITE_LAYOUT__DIRECTION);
+ customLayoutConfigurationEClass = createEClass(DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION);
+ createEAttribute(customLayoutConfigurationEClass, DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__ID);
+ createEAttribute(customLayoutConfigurationEClass, DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION__LABEL);
+ 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);
+
mappingBasedDecorationEClass = createEClass(DescriptionPackage.MAPPING_BASED_DECORATION);
createEReference(mappingBasedDecorationEClass, DescriptionPackage.MAPPING_BASED_DECORATION__MAPPINGS);
@@ -1759,6 +1854,7 @@ public class DescriptionPackageImpl extends EPackageImpl implements DescriptionP
layoutEClass.getESuperTypes().add(theDescriptionPackage_1.getDocumentedElement());
orderedTreeLayoutEClass.getESuperTypes().add(this.getLayout());
compositeLayoutEClass.getESuperTypes().add(this.getLayout());
+ customLayoutConfigurationEClass.getESuperTypes().add(this.getLayout());
mappingBasedDecorationEClass.getESuperTypes().add(theDescriptionPackage_1.getDecorationDescription());
layerEClass.getESuperTypes().add(theDescriptionPackage_1.getDocumentedElement());
layerEClass.getESuperTypes().add(theDescriptionPackage_1.getEndUserDocumentedElement());
@@ -2118,6 +2214,22 @@ public class DescriptionPackageImpl extends EPackageImpl implements DescriptionP
initEAttribute(getCompositeLayout_Direction(), this.getLayoutDirection(), "direction", "topToBottom", 1, 1, CompositeLayout.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$//$NON-NLS-2$
EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEClass(customLayoutConfigurationEClass, CustomLayoutConfiguration.class, "CustomLayoutConfiguration", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, //$NON-NLS-1$
+ EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getCustomLayoutConfiguration_Id(), theEcorePackage.getEString(), "id", 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_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);
+ 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_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$
+ !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$
+ 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$
EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
initEReference(getMappingBasedDecoration_Mappings(), this.getDiagramElementMapping(), null, "mappings", null, 1, -1, MappingBasedDecoration.class, !EPackageImpl.IS_TRANSIENT, //$NON-NLS-1$
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
new file mode 100644
index 0000000000..ff8b8df4b5
--- /dev/null
+++ b/plugins/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/impl/LayoutOptionImpl.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.LayoutOption;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Layout Option</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * 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>
+ * </ul>
+ *
+ * @generated
+ */
+public class LayoutOptionImpl extends MinimalEObjectImpl.Container implements LayoutOption {
+ /**
+ * 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 = LayoutOptionImpl.NAME_EDEFAULT;
+
+ /**
+ * 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 = LayoutOptionImpl.VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected LayoutOptionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DescriptionPackage.Literals.LAYOUT_OPTION;
+ }
+
+ /**
+ * <!-- 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.LAYOUT_OPTION__NAME, oldName, name));
+ }
+ }
+
+ /**
+ * <!-- 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.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.LAYOUT_OPTION__NAME:
+ return getName();
+ case DescriptionPackage.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.LAYOUT_OPTION__NAME:
+ setName((String) newValue);
+ return;
+ case DescriptionPackage.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.LAYOUT_OPTION__NAME:
+ setName(LayoutOptionImpl.NAME_EDEFAULT);
+ return;
+ case DescriptionPackage.LAYOUT_OPTION__VALUE:
+ setValue(LayoutOptionImpl.VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @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);
+ }
+ 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(", value: "); //$NON-NLS-1$
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} // LayoutOptionImpl
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 bdf83edc30..4508977f80 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
@@ -23,6 +23,7 @@ import org.eclipse.sirius.diagram.description.ConditionalEdgeStyleDescription;
import org.eclipse.sirius.diagram.description.ConditionalNodeStyleDescription;
import org.eclipse.sirius.diagram.description.ContainerMapping;
import org.eclipse.sirius.diagram.description.ContainerMappingImport;
+import org.eclipse.sirius.diagram.description.CustomLayoutConfiguration;
import org.eclipse.sirius.diagram.description.DescriptionPackage;
import org.eclipse.sirius.diagram.description.DiagramDescription;
import org.eclipse.sirius.diagram.description.DiagramElementMapping;
@@ -34,6 +35,7 @@ import org.eclipse.sirius.diagram.description.EdgeMappingImport;
import org.eclipse.sirius.diagram.description.IEdgeMapping;
import org.eclipse.sirius.diagram.description.Layer;
import org.eclipse.sirius.diagram.description.Layout;
+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;
@@ -192,6 +194,16 @@ public class DescriptionAdapterFactory extends AdapterFactoryImpl {
}
@Override
+ public Adapter caseCustomLayoutConfiguration(CustomLayoutConfiguration object) {
+ return createCustomLayoutConfigurationAdapter();
+ }
+
+ @Override
+ public Adapter caseLayoutOption(LayoutOption object) {
+ return createLayoutOptionAdapter();
+ }
+
+ @Override
public Adapter caseMappingBasedDecoration(MappingBasedDecoration object) {
return createMappingBasedDecorationAdapter();
}
@@ -536,6 +548,34 @@ public class DescriptionAdapterFactory extends AdapterFactoryImpl {
}
/**
+ * Creates a new adapter for an object of class
+ * '{@link org.eclipse.sirius.diagram.description.CustomLayoutConfiguration <em>Custom Layout Configuration</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.CustomLayoutConfiguration
+ * @generated
+ */
+ public Adapter createCustomLayoutConfigurationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.sirius.diagram.description.LayoutOption
+ * <em>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.LayoutOption
+ * @generated
+ */
+ public Adapter createLayoutOptionAdapter() {
+ 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 f7c3412245..7c0e2767a0 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
@@ -23,6 +23,7 @@ import org.eclipse.sirius.diagram.description.ConditionalEdgeStyleDescription;
import org.eclipse.sirius.diagram.description.ConditionalNodeStyleDescription;
import org.eclipse.sirius.diagram.description.ContainerMapping;
import org.eclipse.sirius.diagram.description.ContainerMappingImport;
+import org.eclipse.sirius.diagram.description.CustomLayoutConfiguration;
import org.eclipse.sirius.diagram.description.DescriptionPackage;
import org.eclipse.sirius.diagram.description.DiagramDescription;
import org.eclipse.sirius.diagram.description.DiagramElementMapping;
@@ -34,6 +35,7 @@ import org.eclipse.sirius.diagram.description.EdgeMappingImport;
import org.eclipse.sirius.diagram.description.IEdgeMapping;
import org.eclipse.sirius.diagram.description.Layer;
import org.eclipse.sirius.diagram.description.Layout;
+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;
@@ -474,6 +476,28 @@ public class DescriptionSwitch<T> {
}
return result;
}
+ case DescriptionPackage.CUSTOM_LAYOUT_CONFIGURATION: {
+ CustomLayoutConfiguration customLayoutConfiguration = (CustomLayoutConfiguration) theEObject;
+ T result = caseCustomLayoutConfiguration(customLayoutConfiguration);
+ if (result == null) {
+ result = caseLayout(customLayoutConfiguration);
+ }
+ if (result == null) {
+ result = caseDocumentedElement(customLayoutConfiguration);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case DescriptionPackage.LAYOUT_OPTION: {
+ LayoutOption layoutOption = (LayoutOption) theEObject;
+ T result = caseLayoutOption(layoutOption);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
case DescriptionPackage.MAPPING_BASED_DECORATION: {
MappingBasedDecoration mappingBasedDecoration = (MappingBasedDecoration) theEObject;
T result = caseMappingBasedDecoration(mappingBasedDecoration);
@@ -803,6 +827,35 @@ public class DescriptionSwitch<T> {
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Custom Layout Configuration</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>Custom Layout Configuration</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCustomLayoutConfiguration(CustomLayoutConfiguration object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>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>Layout Option</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseLayoutOption(LayoutOption 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 -->
diff --git a/plugins/org.eclipse.sirius.editor.diagram/src/org/eclipse/sirius/diagram/editor/tools/internal/menu/child/LayoutsMenuBuilder.java b/plugins/org.eclipse.sirius.editor.diagram/src/org/eclipse/sirius/diagram/editor/tools/internal/menu/child/LayoutsMenuBuilder.java
index 343a012c6a..77d35a070c 100644
--- a/plugins/org.eclipse.sirius.editor.diagram/src/org/eclipse/sirius/diagram/editor/tools/internal/menu/child/LayoutsMenuBuilder.java
+++ b/plugins/org.eclipse.sirius.editor.diagram/src/org/eclipse/sirius/diagram/editor/tools/internal/menu/child/LayoutsMenuBuilder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2015 THALES GLOBAL SERVICES and others.
+ * Copyright (c) 2009, 2018 THALES GLOBAL SERVICES and others.
* 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
@@ -28,6 +28,7 @@ public class LayoutsMenuBuilder extends AbstractTypeRestrictingMenuBuilder {
super();
addValidType(DescriptionPackage.eINSTANCE.getOrderedTreeLayout());
addValidType(DescriptionPackage.eINSTANCE.getCompositeLayout());
+ addValidType(DescriptionPackage.eINSTANCE.getCustomLayoutConfiguration());
}

Back to the top