diff options
Diffstat (limited to 'plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram')
63 files changed, 11841 insertions, 0 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/BasicMessageMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/BasicMessageMappingItemProvider.java new file mode 100644 index 0000000000..3f1befefef --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/BasicMessageMappingItemProvider.java @@ -0,0 +1,110 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.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.sirius.diagram.sequence.description.BasicMessageMapping; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.BasicMessageMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class BasicMessageMappingItemProvider extends MessageMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public BasicMessageMappingItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns BasicMessageMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/BasicMessageMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((BasicMessageMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_BasicMessageMapping_type") : getString("_UI_BasicMessageMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/CombinedFragmentMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/CombinedFragmentMappingItemProvider.java new file mode 100644 index 0000000000..22d96a0548 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/CombinedFragmentMappingItemProvider.java @@ -0,0 +1,150 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.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.sirius.description.DescriptionPackage; +import org.eclipse.sirius.diagram.sequence.description.CombinedFragmentMapping; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.CombinedFragmentMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class CombinedFragmentMappingItemProvider extends FrameMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public CombinedFragmentMappingItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns CombinedFragmentMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/CombinedFragmentMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((CombinedFragmentMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_CombinedFragmentMapping_type") : getString("_UI_CombinedFragmentMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * This returns the label text for + * {@link org.eclipse.emf.edit.command.CreateChildCommand}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String getCreateChildTextGen(Object owner, Object feature, Object child, Collection<?> selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = childFeature == DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS || childFeature == DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * This returns the label text for + * {@link org.eclipse.emf.edit.command.CreateChildCommand}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = childFeature == DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS || childFeature == DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeaturePrefixText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/CoveredLifelinesVariableItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/CoveredLifelinesVariableItemProvider.java new file mode 100644 index 0000000000..b76526fc85 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/CoveredLifelinesVariableItemProvider.java @@ -0,0 +1,123 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.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.sirius.description.tool.provider.AbstractVariableItemProvider; +import org.eclipse.sirius.diagram.sequence.description.CoveredLifelinesVariable; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.CoveredLifelinesVariable} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class CoveredLifelinesVariableItemProvider extends AbstractVariableItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public CoveredLifelinesVariableItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns CoveredLifelinesVariable.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/CoveredLifelinesVariable")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((CoveredLifelinesVariable) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_CoveredLifelinesVariable_type") : getString("_UI_CoveredLifelinesVariable_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/CreationMessageMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/CreationMessageMappingItemProvider.java new file mode 100644 index 0000000000..5714f50ddb --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/CreationMessageMappingItemProvider.java @@ -0,0 +1,110 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.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.sirius.diagram.sequence.description.CreationMessageMapping; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.CreationMessageMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class CreationMessageMappingItemProvider extends MessageMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public CreationMessageMappingItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns CreationMessageMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/CreationMessageMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((CreationMessageMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_CreationMessageMapping_type") : getString("_UI_CreationMessageMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/DelimitedEventMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/DelimitedEventMappingItemProvider.java new file mode 100644 index 0000000000..efd1deb484 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/DelimitedEventMappingItemProvider.java @@ -0,0 +1,138 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.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.ViewerNotification; + +import org.eclipse.sirius.diagram.sequence.description.DelimitedEventMapping; +import org.eclipse.sirius.diagram.sequence.description.DescriptionPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.DelimitedEventMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class DelimitedEventMappingItemProvider extends EventMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public DelimitedEventMappingItemProvider(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); + + addStartingEndFinderExpressionPropertyDescriptor(object); + addFinishingEndFinderExpressionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Starting End Finder Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addStartingEndFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_DelimitedEventMapping_startingEndFinderExpression_feature"), getString("_UI_DelimitedEventMapping_startingEndFinderExpression_description"), + DescriptionPackage.Literals.DELIMITED_EVENT_MAPPING__STARTING_END_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Finishing End Finder Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addFinishingEndFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_DelimitedEventMapping_finishingEndFinderExpression_feature"), getString("_UI_DelimitedEventMapping_finishingEndFinderExpression_description"), + DescriptionPackage.Literals.DELIMITED_EVENT_MAPPING__FINISHING_END_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), 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 = ((DelimitedEventMapping) object).getStartingEndFinderExpression(); + return label == null || label.length() == 0 ? getString("_UI_DelimitedEventMapping_type") : getString("_UI_DelimitedEventMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(DelimitedEventMapping.class)) { + case DescriptionPackage.DELIMITED_EVENT_MAPPING__STARTING_END_FINDER_EXPRESSION: + case DescriptionPackage.DELIMITED_EVENT_MAPPING__FINISHING_END_FINDER_EXPRESSION: + 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.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/DescriptionItemProviderAdapterFactory.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/DescriptionItemProviderAdapterFactory.java new file mode 100644 index 0000000000..b6b4633864 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/DescriptionItemProviderAdapterFactory.java @@ -0,0 +1,589 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.description.provider; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.sirius.diagram.sequence.description.util.DescriptionAdapterFactory; + +/** + * This is the factory that is used to provide the interfaces needed to support + * Viewers. The adapters generated by this factory convert EMF adapter + * notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The + * adapters also support Eclipse property sheets. Note that most of the adapters + * are shared among multiple instances. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class DescriptionItemProviderAdapterFactory extends DescriptionAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this + * adapter factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement + * {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by + * {@link #isFactoryForType isFactoryForType}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected Collection<Object> supportedTypes = new ArrayList<Object>(); + + /** + * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + public DescriptionItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.SequenceDiagramDescription} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected SequenceDiagramDescriptionItemProvider sequenceDiagramDescriptionItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.SequenceDiagramDescription} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createSequenceDiagramDescriptionAdapter() { + if (sequenceDiagramDescriptionItemProvider == null) { + sequenceDiagramDescriptionItemProvider = new SequenceDiagramDescriptionItemProvider(this); + } + + return sequenceDiagramDescriptionItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.InstanceRoleMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected InstanceRoleMappingItemProvider instanceRoleMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.InstanceRoleMapping} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createInstanceRoleMappingAdapter() { + if (instanceRoleMappingItemProvider == null) { + instanceRoleMappingItemProvider = new InstanceRoleMappingItemProvider(this); + } + + return instanceRoleMappingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.ExecutionMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ExecutionMappingItemProvider executionMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.ExecutionMapping} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createExecutionMappingAdapter() { + if (executionMappingItemProvider == null) { + executionMappingItemProvider = new ExecutionMappingItemProvider(this); + } + + return executionMappingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.StateMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected StateMappingItemProvider stateMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.StateMapping}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createStateMappingAdapter() { + if (stateMappingItemProvider == null) { + stateMappingItemProvider = new StateMappingItemProvider(this); + } + + return stateMappingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.EndOfLifeMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected EndOfLifeMappingItemProvider endOfLifeMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.EndOfLifeMapping} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createEndOfLifeMappingAdapter() { + if (endOfLifeMappingItemProvider == null) { + endOfLifeMappingItemProvider = new EndOfLifeMappingItemProvider(this); + } + + return endOfLifeMappingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.BasicMessageMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected BasicMessageMappingItemProvider basicMessageMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.BasicMessageMapping} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createBasicMessageMappingAdapter() { + if (basicMessageMappingItemProvider == null) { + basicMessageMappingItemProvider = new BasicMessageMappingItemProvider(this); + } + + return basicMessageMappingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.ReturnMessageMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ReturnMessageMappingItemProvider returnMessageMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.ReturnMessageMapping} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createReturnMessageMappingAdapter() { + if (returnMessageMappingItemProvider == null) { + returnMessageMappingItemProvider = new ReturnMessageMappingItemProvider(this); + } + + return returnMessageMappingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.CreationMessageMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected CreationMessageMappingItemProvider creationMessageMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.CreationMessageMapping} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createCreationMessageMappingAdapter() { + if (creationMessageMappingItemProvider == null) { + creationMessageMappingItemProvider = new CreationMessageMappingItemProvider(this); + } + + return creationMessageMappingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.DestructionMessageMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected DestructionMessageMappingItemProvider destructionMessageMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.DestructionMessageMapping} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createDestructionMessageMappingAdapter() { + if (destructionMessageMappingItemProvider == null) { + destructionMessageMappingItemProvider = new DestructionMessageMappingItemProvider(this); + } + + return destructionMessageMappingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.MessageEndVariable} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected MessageEndVariableItemProvider messageEndVariableItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.MessageEndVariable} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createMessageEndVariableAdapter() { + if (messageEndVariableItemProvider == null) { + messageEndVariableItemProvider = new MessageEndVariableItemProvider(this); + } + + return messageEndVariableItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.CoveredLifelinesVariable} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected CoveredLifelinesVariableItemProvider coveredLifelinesVariableItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.CoveredLifelinesVariable} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createCoveredLifelinesVariableAdapter() { + if (coveredLifelinesVariableItemProvider == null) { + coveredLifelinesVariableItemProvider = new CoveredLifelinesVariableItemProvider(this); + } + + return coveredLifelinesVariableItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.InteractionUseMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected InteractionUseMappingItemProvider interactionUseMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.InteractionUseMapping} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createInteractionUseMappingAdapter() { + if (interactionUseMappingItemProvider == null) { + interactionUseMappingItemProvider = new InteractionUseMappingItemProvider(this); + } + + return interactionUseMappingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.CombinedFragmentMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected CombinedFragmentMappingItemProvider combinedFragmentMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.CombinedFragmentMapping} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createCombinedFragmentMappingAdapter() { + if (combinedFragmentMappingItemProvider == null) { + combinedFragmentMappingItemProvider = new CombinedFragmentMappingItemProvider(this); + } + + return combinedFragmentMappingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.OperandMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected OperandMappingItemProvider operandMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.OperandMapping} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createOperandMappingAdapter() { + if (operandMappingItemProvider == null) { + operandMappingItemProvider = new OperandMappingItemProvider(this); + } + + return operandMappingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.ObservationPointMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ObservationPointMappingItemProvider observationPointMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.ObservationPointMapping} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createObservationPointMappingAdapter() { + if (observationPointMappingItemProvider == null) { + observationPointMappingItemProvider = new ObservationPointMappingItemProvider(this); + } + + return observationPointMappingItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the + * adapter. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to + * {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void dispose() { + if (sequenceDiagramDescriptionItemProvider != null) + sequenceDiagramDescriptionItemProvider.dispose(); + if (instanceRoleMappingItemProvider != null) + instanceRoleMappingItemProvider.dispose(); + if (executionMappingItemProvider != null) + executionMappingItemProvider.dispose(); + if (stateMappingItemProvider != null) + stateMappingItemProvider.dispose(); + if (endOfLifeMappingItemProvider != null) + endOfLifeMappingItemProvider.dispose(); + if (basicMessageMappingItemProvider != null) + basicMessageMappingItemProvider.dispose(); + if (returnMessageMappingItemProvider != null) + returnMessageMappingItemProvider.dispose(); + if (creationMessageMappingItemProvider != null) + creationMessageMappingItemProvider.dispose(); + if (destructionMessageMappingItemProvider != null) + destructionMessageMappingItemProvider.dispose(); + if (messageEndVariableItemProvider != null) + messageEndVariableItemProvider.dispose(); + if (coveredLifelinesVariableItemProvider != null) + coveredLifelinesVariableItemProvider.dispose(); + if (interactionUseMappingItemProvider != null) + interactionUseMappingItemProvider.dispose(); + if (combinedFragmentMappingItemProvider != null) + combinedFragmentMappingItemProvider.dispose(); + if (operandMappingItemProvider != null) + operandMappingItemProvider.dispose(); + if (observationPointMappingItemProvider != null) + observationPointMappingItemProvider.dispose(); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/DestructionMessageMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/DestructionMessageMappingItemProvider.java new file mode 100644 index 0000000000..c73d9243a0 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/DestructionMessageMappingItemProvider.java @@ -0,0 +1,110 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.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.sirius.diagram.sequence.description.DestructionMessageMapping; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.DestructionMessageMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class DestructionMessageMappingItemProvider extends MessageMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public DestructionMessageMappingItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns DestructionMessageMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/DestructionMessageMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((DestructionMessageMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_DestructionMessageMapping_type") : getString("_UI_DestructionMessageMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/EndOfLifeMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/EndOfLifeMappingItemProvider.java new file mode 100644 index 0000000000..e009176679 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/EndOfLifeMappingItemProvider.java @@ -0,0 +1,157 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.ecore.EObject; +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.sirius.description.DescriptionPackage; +import org.eclipse.sirius.description.provider.NodeMappingItemProvider; +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.EndOfLifeMapping; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.EndOfLifeMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class EndOfLifeMappingItemProvider extends NodeMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EndOfLifeMappingItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns EndOfLifeMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/EndOfLifeMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((EndOfLifeMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_EndOfLifeMapping_type") : getString("_UI_EndOfLifeMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, DescriptionFactory.eINSTANCE.createInstanceRoleMapping())); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, DescriptionFactory.eINSTANCE.createExecutionMapping())); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, DescriptionFactory.eINSTANCE.createStateMapping())); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, DescriptionFactory.eINSTANCE.createEndOfLifeMapping())); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, DescriptionFactory.eINSTANCE.createObservationPointMapping())); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + + /** + * This returns the label text for + * {@link org.eclipse.emf.edit.command.CreateChildCommand}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = childFeature == DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS; + qualify = qualify && childObject instanceof EObject && org.eclipse.sirius.diagram.sequence.description.DescriptionPackage.eINSTANCE.equals(((EObject) childObject).eClass().getEPackage()); + + if (qualify) { + return getString("_UI_CreateChild_text", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/EventMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/EventMappingItemProvider.java new file mode 100644 index 0000000000..ed92364b3d --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/EventMappingItemProvider.java @@ -0,0 +1,109 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.EventMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class EventMappingItemProvider 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 EventMappingItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_EventMapping_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/ExecutionMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/ExecutionMappingItemProvider.java new file mode 100644 index 0000000000..7a01ae5c0f --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/ExecutionMappingItemProvider.java @@ -0,0 +1,200 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.ecore.EObject; +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.ViewerNotification; + +import org.eclipse.sirius.description.provider.NodeMappingItemProvider; +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.DescriptionPackage; +import org.eclipse.sirius.diagram.sequence.description.ExecutionMapping; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.ExecutionMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class ExecutionMappingItemProvider extends NodeMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ExecutionMappingItemProvider(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); + + addStartingEndFinderExpressionPropertyDescriptor(object); + addFinishingEndFinderExpressionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Starting End Finder Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addStartingEndFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_DelimitedEventMapping_startingEndFinderExpression_feature"), getString("_UI_DelimitedEventMapping_startingEndFinderExpression_description"), + DescriptionPackage.Literals.DELIMITED_EVENT_MAPPING__STARTING_END_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Finishing End Finder Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addFinishingEndFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_DelimitedEventMapping_finishingEndFinderExpression_feature"), getString("_UI_DelimitedEventMapping_finishingEndFinderExpression_description"), + DescriptionPackage.Literals.DELIMITED_EVENT_MAPPING__FINISHING_END_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This returns ExecutionMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ExecutionMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ExecutionMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_ExecutionMapping_type") : getString("_UI_ExecutionMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ExecutionMapping.class)) { + case DescriptionPackage.EXECUTION_MAPPING__STARTING_END_FINDER_EXPRESSION: + case DescriptionPackage.EXECUTION_MAPPING__FINISHING_END_FINDER_EXPRESSION: + 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); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createInstanceRoleMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createExecutionMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createStateMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createEndOfLifeMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createObservationPointMapping())); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + + /** + * This returns the label text for + * {@link org.eclipse.emf.edit.command.CreateChildCommand}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = childFeature == org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS; + qualify = qualify && childObject instanceof EObject && DescriptionPackage.eINSTANCE.equals(((EObject) childObject).eClass().getEPackage()); + + if (qualify) { + return getString("_UI_CreateChild_text", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/FrameMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/FrameMappingItemProvider.java new file mode 100644 index 0000000000..75cfdb6993 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/FrameMappingItemProvider.java @@ -0,0 +1,275 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.ViewerNotification; + +import org.eclipse.sirius.description.provider.ContainerMappingItemProvider; +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.DescriptionPackage; +import org.eclipse.sirius.diagram.sequence.description.FrameMapping; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.FrameMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class FrameMappingItemProvider extends ContainerMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public FrameMappingItemProvider(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); + + addStartingEndFinderExpressionPropertyDescriptor(object); + addFinishingEndFinderExpressionPropertyDescriptor(object); + addCoveredLifelinesExpressionPropertyDescriptor(object); + addCenterLabelExpressionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Starting End Finder Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addStartingEndFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_DelimitedEventMapping_startingEndFinderExpression_feature"), getString("_UI_DelimitedEventMapping_startingEndFinderExpression_description"), + DescriptionPackage.Literals.DELIMITED_EVENT_MAPPING__STARTING_END_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Finishing End Finder Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addFinishingEndFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_DelimitedEventMapping_finishingEndFinderExpression_feature"), getString("_UI_DelimitedEventMapping_finishingEndFinderExpression_description"), + DescriptionPackage.Literals.DELIMITED_EVENT_MAPPING__FINISHING_END_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Covered Lifelines Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addCoveredLifelinesExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_FrameMapping_coveredLifelinesExpression_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_FrameMapping_coveredLifelinesExpression_feature", "_UI_FrameMapping_type"), + DescriptionPackage.Literals.FRAME_MAPPING__COVERED_LIFELINES_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Center Label Expression feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addCenterLabelExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_FrameMapping_centerLabelExpression_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_FrameMapping_centerLabelExpression_feature", "_UI_FrameMapping_type"), + DescriptionPackage.Literals.FRAME_MAPPING__CENTER_LABEL_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This returns FrameMapping.gif. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/FrameMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((FrameMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_FrameMapping_type") : getString("_UI_FrameMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(FrameMapping.class)) { + case DescriptionPackage.FRAME_MAPPING__STARTING_END_FINDER_EXPRESSION: + case DescriptionPackage.FRAME_MAPPING__FINISHING_END_FINDER_EXPRESSION: + case DescriptionPackage.FRAME_MAPPING__COVERED_LIFELINES_EXPRESSION: + case DescriptionPackage.FRAME_MAPPING__CENTER_LABEL_EXPRESSION: + 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); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createInstanceRoleMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createExecutionMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createStateMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createEndOfLifeMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createObservationPointMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createInstanceRoleMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createExecutionMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createStateMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createEndOfLifeMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createObservationPointMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_CONTAINER_MAPPINGS, + DescriptionFactory.eINSTANCE.createInteractionUseMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_CONTAINER_MAPPINGS, + DescriptionFactory.eINSTANCE.createCombinedFragmentMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_CONTAINER_MAPPINGS, + DescriptionFactory.eINSTANCE.createOperandMapping())); + } + + /** + * This returns the label text for + * {@link org.eclipse.emf.edit.command.CreateChildCommand}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String getCreateChildTextGen(Object owner, Object feature, Object child, Collection<?> selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = childFeature == org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS + || childFeature == org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * This returns the label text for + * {@link org.eclipse.emf.edit.command.CreateChildCommand}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = childFeature == org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS + || childFeature == org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeaturePrefixText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/InstanceRoleMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/InstanceRoleMappingItemProvider.java new file mode 100644 index 0000000000..d48ef58be0 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/InstanceRoleMappingItemProvider.java @@ -0,0 +1,156 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.ecore.EObject; +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.sirius.description.DescriptionPackage; +import org.eclipse.sirius.description.provider.NodeMappingItemProvider; +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.InstanceRoleMapping; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.InstanceRoleMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class InstanceRoleMappingItemProvider extends NodeMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public InstanceRoleMappingItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns InstanceRoleMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/InstanceRoleMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((InstanceRoleMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_InstanceRoleMapping_type") : getString("_UI_InstanceRoleMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, DescriptionFactory.eINSTANCE.createInstanceRoleMapping())); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, DescriptionFactory.eINSTANCE.createExecutionMapping())); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, DescriptionFactory.eINSTANCE.createStateMapping())); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, DescriptionFactory.eINSTANCE.createEndOfLifeMapping())); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, DescriptionFactory.eINSTANCE.createObservationPointMapping())); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + + /** + * This returns the label text for + * {@link org.eclipse.emf.edit.command.CreateChildCommand}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = childFeature == DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS; + qualify = qualify && childObject instanceof EObject && org.eclipse.sirius.diagram.sequence.description.DescriptionPackage.eINSTANCE.equals(((EObject) childObject).eClass().getEPackage()); + + if (qualify) { + return getString("_UI_CreateChild_text", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/InteractionUseMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/InteractionUseMappingItemProvider.java new file mode 100644 index 0000000000..e930342815 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/InteractionUseMappingItemProvider.java @@ -0,0 +1,150 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.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.sirius.description.DescriptionPackage; +import org.eclipse.sirius.diagram.sequence.description.InteractionUseMapping; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.InteractionUseMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class InteractionUseMappingItemProvider extends FrameMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public InteractionUseMappingItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns InteractionUseMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/InteractionUseMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((InteractionUseMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_InteractionUseMapping_type") : getString("_UI_InteractionUseMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * This returns the label text for + * {@link org.eclipse.emf.edit.command.CreateChildCommand}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String getCreateChildTextGen(Object owner, Object feature, Object child, Collection<?> selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = childFeature == DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS || childFeature == DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * This returns the label text for + * {@link org.eclipse.emf.edit.command.CreateChildCommand}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = childFeature == DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS || childFeature == DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeaturePrefixText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/MessageEndVariableItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/MessageEndVariableItemProvider.java new file mode 100644 index 0000000000..07d287496e --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/MessageEndVariableItemProvider.java @@ -0,0 +1,123 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.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.sirius.description.tool.provider.AbstractVariableItemProvider; +import org.eclipse.sirius.diagram.sequence.description.MessageEndVariable; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.MessageEndVariable} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class MessageEndVariableItemProvider extends AbstractVariableItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public MessageEndVariableItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns MessageEndVariable.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/MessageEndVariable")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((MessageEndVariable) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_MessageEndVariable_type") : getString("_UI_MessageEndVariable_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/MessageMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/MessageMappingItemProvider.java new file mode 100644 index 0000000000..81ddf9b24b --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/MessageMappingItemProvider.java @@ -0,0 +1,153 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.ViewerNotification; + +import org.eclipse.sirius.description.provider.EdgeMappingItemProvider; +import org.eclipse.sirius.diagram.sequence.description.DescriptionPackage; +import org.eclipse.sirius.diagram.sequence.description.MessageMapping; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.MessageMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class MessageMappingItemProvider extends EdgeMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public MessageMappingItemProvider(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); + + addSendingEndFinderExpressionPropertyDescriptor(object); + addReceivingEndFinderExpressionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Sending End Finder Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addSendingEndFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_MessageMapping_sendingEndFinderExpression_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_MessageMapping_sendingEndFinderExpression_feature", "_UI_MessageMapping_type"), + DescriptionPackage.Literals.MESSAGE_MAPPING__SENDING_END_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), + null)); + } + + /** + * This adds a property descriptor for the Receiving End Finder Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addReceivingEndFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_MessageMapping_receivingEndFinderExpression_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_MessageMapping_receivingEndFinderExpression_feature", "_UI_MessageMapping_type"), + DescriptionPackage.Literals.MESSAGE_MAPPING__RECEIVING_END_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), + 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 = ((MessageMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_MessageMapping_type") : getString("_UI_MessageMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(MessageMapping.class)) { + case DescriptionPackage.MESSAGE_MAPPING__SENDING_END_FINDER_EXPRESSION: + case DescriptionPackage.MESSAGE_MAPPING__RECEIVING_END_FINDER_EXPRESSION: + 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 SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/ObservationPointMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/ObservationPointMappingItemProvider.java new file mode 100644 index 0000000000..b4704e8df2 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/ObservationPointMappingItemProvider.java @@ -0,0 +1,135 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.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.sirius.description.DescriptionPackage; +import org.eclipse.sirius.description.provider.NodeMappingItemProvider; +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.ObservationPointMapping; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.ObservationPointMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class ObservationPointMappingItemProvider extends NodeMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ObservationPointMappingItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns ObservationPointMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ObservationPointMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ObservationPointMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_ObservationPointMapping_type") : getString("_UI_ObservationPointMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, DescriptionFactory.eINSTANCE.createInstanceRoleMapping())); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, DescriptionFactory.eINSTANCE.createExecutionMapping())); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, DescriptionFactory.eINSTANCE.createStateMapping())); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, DescriptionFactory.eINSTANCE.createEndOfLifeMapping())); + + newChildDescriptors.add(createChildParameter(DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, DescriptionFactory.eINSTANCE.createObservationPointMapping())); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/OperandMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/OperandMappingItemProvider.java new file mode 100644 index 0000000000..427c1d2758 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/OperandMappingItemProvider.java @@ -0,0 +1,243 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.ViewerNotification; + +import org.eclipse.sirius.description.provider.ContainerMappingItemProvider; +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.DescriptionPackage; +import org.eclipse.sirius.diagram.sequence.description.OperandMapping; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.OperandMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class OperandMappingItemProvider extends ContainerMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public OperandMappingItemProvider(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); + + addStartingEndFinderExpressionPropertyDescriptor(object); + addFinishingEndFinderExpressionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Starting End Finder Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addStartingEndFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_DelimitedEventMapping_startingEndFinderExpression_feature"), getString("_UI_DelimitedEventMapping_startingEndFinderExpression_description"), + DescriptionPackage.Literals.DELIMITED_EVENT_MAPPING__STARTING_END_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Finishing End Finder Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addFinishingEndFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_DelimitedEventMapping_finishingEndFinderExpression_feature"), getString("_UI_DelimitedEventMapping_finishingEndFinderExpression_description"), + DescriptionPackage.Literals.DELIMITED_EVENT_MAPPING__FINISHING_END_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This returns OperandMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/OperandMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((OperandMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_OperandMapping_type") : getString("_UI_OperandMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(OperandMapping.class)) { + case DescriptionPackage.OPERAND_MAPPING__STARTING_END_FINDER_EXPRESSION: + case DescriptionPackage.OPERAND_MAPPING__FINISHING_END_FINDER_EXPRESSION: + 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); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createInstanceRoleMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createExecutionMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createStateMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createEndOfLifeMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createObservationPointMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createInstanceRoleMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createExecutionMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createStateMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createEndOfLifeMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createObservationPointMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_CONTAINER_MAPPINGS, + DescriptionFactory.eINSTANCE.createInteractionUseMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_CONTAINER_MAPPINGS, + DescriptionFactory.eINSTANCE.createCombinedFragmentMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_CONTAINER_MAPPINGS, + DescriptionFactory.eINSTANCE.createOperandMapping())); + } + + /** + * This returns the label text for + * {@link org.eclipse.emf.edit.command.CreateChildCommand}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String getCreateChildTextGen(Object owner, Object feature, Object child, Collection<?> selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = childFeature == org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS + || childFeature == org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * This returns the label text for + * {@link org.eclipse.emf.edit.command.CreateChildCommand}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = childFeature == org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS + || childFeature == org.eclipse.sirius.description.DescriptionPackage.Literals.CONTAINER_MAPPING__SUB_NODE_MAPPINGS; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeaturePrefixText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/ReturnMessageMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/ReturnMessageMappingItemProvider.java new file mode 100644 index 0000000000..6f3e812835 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/ReturnMessageMappingItemProvider.java @@ -0,0 +1,135 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.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.ViewerNotification; + +import org.eclipse.sirius.diagram.sequence.description.DescriptionPackage; +import org.eclipse.sirius.diagram.sequence.description.ReturnMessageMapping; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.ReturnMessageMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class ReturnMessageMappingItemProvider extends MessageMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ReturnMessageMappingItemProvider(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); + + addInvocationMessageFinderExpressionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Invocation Message Finder + * Expression feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addInvocationMessageFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_ReturnMessageMapping_invocationMessageFinderExpression_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ReturnMessageMapping_invocationMessageFinderExpression_feature", "_UI_ReturnMessageMapping_type"), + DescriptionPackage.Literals.RETURN_MESSAGE_MAPPING__INVOCATION_MESSAGE_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This returns ReturnMessageMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ReturnMessageMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ReturnMessageMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_ReturnMessageMapping_type") : getString("_UI_ReturnMessageMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ReturnMessageMapping.class)) { + case DescriptionPackage.RETURN_MESSAGE_MAPPING__INVOCATION_MESSAGE_FINDER_EXPRESSION: + 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.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/SequenceDiagramDescriptionItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/SequenceDiagramDescriptionItemProvider.java new file mode 100644 index 0000000000..8673109ee4 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/SequenceDiagramDescriptionItemProvider.java @@ -0,0 +1,221 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.ViewerNotification; + +import org.eclipse.sirius.business.api.query.IdentifiedElementQuery; +import org.eclipse.sirius.description.provider.DiagramDescriptionItemProvider; +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.DescriptionPackage; +import org.eclipse.sirius.diagram.sequence.description.SequenceDiagramDescription; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.SequenceDiagramDescription} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class SequenceDiagramDescriptionItemProvider extends DiagramDescriptionItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public SequenceDiagramDescriptionItemProvider(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); + + addEndsOrderingPropertyDescriptor(object); + addInstanceRolesOrderingPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Ends Ordering feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addEndsOrderingPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_SequenceDiagramDescription_endsOrdering_feature"), getString("_UI_SequenceDiagramDescription_endsOrdering_description"), + DescriptionPackage.Literals.SEQUENCE_DIAGRAM_DESCRIPTION__ENDS_ORDERING, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Instance Roles Ordering feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addInstanceRolesOrderingPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_SequenceDiagramDescription_instanceRolesOrdering_feature"), getString("_UI_SequenceDiagramDescription_instanceRolesOrdering_description"), + DescriptionPackage.Literals.SEQUENCE_DIAGRAM_DESCRIPTION__INSTANCE_ROLES_ORDERING, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This returns SequenceDiagramDescription.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/SequenceDiagramDescription")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getText(Object object) { + final String label = new IdentifiedElementQuery((SequenceDiagramDescription) object).getLabel(); + return label == null || label.length() == 0 ? getString("_UI_SequenceDiagramDescription_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(SequenceDiagramDescription.class)) { + case DescriptionPackage.SEQUENCE_DIAGRAM_DESCRIPTION__ENDS_ORDERING: + case DescriptionPackage.SEQUENCE_DIAGRAM_DESCRIPTION__INSTANCE_ROLES_ORDERING: + 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); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createInstanceRoleMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createExecutionMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createStateMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createEndOfLifeMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createObservationPointMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__EDGE_MAPPINGS, + DescriptionFactory.eINSTANCE.createBasicMessageMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__EDGE_MAPPINGS, + DescriptionFactory.eINSTANCE.createReturnMessageMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__EDGE_MAPPINGS, + DescriptionFactory.eINSTANCE.createCreationMessageMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__EDGE_MAPPINGS, + DescriptionFactory.eINSTANCE.createDestructionMessageMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__CONTAINER_MAPPINGS, + DescriptionFactory.eINSTANCE.createInteractionUseMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__CONTAINER_MAPPINGS, + DescriptionFactory.eINSTANCE.createCombinedFragmentMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__CONTAINER_MAPPINGS, + DescriptionFactory.eINSTANCE.createOperandMapping())); + } + + /** + * 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 == org.eclipse.sirius.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__DEFAULT_LAYER + || childFeature == org.eclipse.sirius.description.DescriptionPackage.Literals.DIAGRAM_DESCRIPTION__OPTIONAL_LAYERS; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/SequenceEditPlugin.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/SequenceEditPlugin.java new file mode 100644 index 0000000000..0da1c46df6 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/SequenceEditPlugin.java @@ -0,0 +1,95 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.description.provider; + +import org.eclipse.emf.common.EMFPlugin; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.provider.EcoreEditPlugin; + +import org.eclipse.sirius.provider.SiriusEditPlugin; + +/** + * This is the central singleton for the Sequence edit plugin. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public final class SequenceEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + public static final SequenceEditPlugin INSTANCE = new SequenceEditPlugin(); + + /** + * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public SequenceEditPlugin() { + super(new ResourceLocator[] { EcoreEditPlugin.INSTANCE, SiriusEditPlugin.INSTANCE, }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse <b>Plugin</b>. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/StateMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/StateMappingItemProvider.java new file mode 100644 index 0000000000..8fe21314c2 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/provider/StateMappingItemProvider.java @@ -0,0 +1,200 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.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.ecore.EObject; +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.ViewerNotification; + +import org.eclipse.sirius.description.provider.NodeMappingItemProvider; +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.DescriptionPackage; +import org.eclipse.sirius.diagram.sequence.description.StateMapping; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.StateMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class StateMappingItemProvider extends NodeMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public StateMappingItemProvider(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); + + addStartingEndFinderExpressionPropertyDescriptor(object); + addFinishingEndFinderExpressionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Starting End Finder Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addStartingEndFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_DelimitedEventMapping_startingEndFinderExpression_feature"), getString("_UI_DelimitedEventMapping_startingEndFinderExpression_description"), + DescriptionPackage.Literals.DELIMITED_EVENT_MAPPING__STARTING_END_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Finishing End Finder Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addFinishingEndFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_DelimitedEventMapping_finishingEndFinderExpression_feature"), getString("_UI_DelimitedEventMapping_finishingEndFinderExpression_description"), + DescriptionPackage.Literals.DELIMITED_EVENT_MAPPING__FINISHING_END_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This returns StateMapping.gif. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/StateMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((StateMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_StateMapping_type") : getString("_UI_StateMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(StateMapping.class)) { + case DescriptionPackage.STATE_MAPPING__STARTING_END_FINDER_EXPRESSION: + case DescriptionPackage.STATE_MAPPING__FINISHING_END_FINDER_EXPRESSION: + 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); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createInstanceRoleMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createExecutionMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createStateMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createEndOfLifeMapping())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS, + DescriptionFactory.eINSTANCE.createObservationPointMapping())); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + + /** + * This returns the label text for + * {@link org.eclipse.emf.edit.command.CreateChildCommand}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = childFeature == org.eclipse.sirius.description.DescriptionPackage.Literals.ABSTRACT_NODE_MAPPING__BORDERED_NODE_MAPPINGS; + qualify = qualify && childObject instanceof EObject && DescriptionPackage.eINSTANCE.equals(((EObject) childObject).eClass().getEPackage()); + + if (qualify) { + return getString("_UI_CreateChild_text", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/CombinedFragmentCreationToolItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/CombinedFragmentCreationToolItemProvider.java new file mode 100644 index 0000000000..c9de01377e --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/CombinedFragmentCreationToolItemProvider.java @@ -0,0 +1,198 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.description.tool.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.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.ViewerNotification; + +import org.eclipse.sirius.description.tool.provider.ContainerCreationDescriptionItemProvider; +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.description.tool.CombinedFragmentCreationTool; +import org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.CombinedFragmentCreationTool} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class CombinedFragmentCreationToolItemProvider extends ContainerCreationDescriptionItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public CombinedFragmentCreationToolItemProvider(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(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR); + childrenFeatures.add(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR); + childrenFeatures.add(ToolPackage.Literals.COVERING_ELEMENT_CREATION_TOOL__COVERED_LIFELINES); + } + 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 CombinedFragmentCreationTool.gif. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/CombinedFragmentCreationTool")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((CombinedFragmentCreationTool) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_CombinedFragmentCreationTool_type") : getString("_UI_CombinedFragmentCreationTool_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(CombinedFragmentCreationTool.class)) { + case ToolPackage.COMBINED_FRAGMENT_CREATION_TOOL__STARTING_END_PREDECESSOR: + case ToolPackage.COMBINED_FRAGMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR: + case ToolPackage.COMBINED_FRAGMENT_CREATION_TOOL__COVERED_LIFELINES: + 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(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.COVERING_ELEMENT_CREATION_TOOL__COVERED_LIFELINES, DescriptionFactory.eINSTANCE.createCoveredLifelinesVariable())); + } + + /** + * 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 == ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR + || childFeature == ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/CoveringElementCreationToolItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/CoveringElementCreationToolItemProvider.java new file mode 100644 index 0000000000..e43917c7c6 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/CoveringElementCreationToolItemProvider.java @@ -0,0 +1,157 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.description.tool.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.description.tool.CoveringElementCreationTool; +import org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.CoveringElementCreationTool} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class CoveringElementCreationToolItemProvider 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 CoveringElementCreationToolItemProvider(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(ToolPackage.Literals.COVERING_ELEMENT_CREATION_TOOL__COVERED_LIFELINES); + } + 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) { + return getString("_UI_CoveringElementCreationTool_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(CoveringElementCreationTool.class)) { + case ToolPackage.COVERING_ELEMENT_CREATION_TOOL__COVERED_LIFELINES: + 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(ToolPackage.Literals.COVERING_ELEMENT_CREATION_TOOL__COVERED_LIFELINES, DescriptionFactory.eINSTANCE.createCoveredLifelinesVariable())); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/ExecutionCreationToolItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/ExecutionCreationToolItemProvider.java new file mode 100644 index 0000000000..dad6f090fc --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/ExecutionCreationToolItemProvider.java @@ -0,0 +1,194 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.description.tool.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.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.ViewerNotification; + +import org.eclipse.sirius.description.tool.provider.NodeCreationDescriptionItemProvider; +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.description.tool.ExecutionCreationTool; +import org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.ExecutionCreationTool} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class ExecutionCreationToolItemProvider extends NodeCreationDescriptionItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ExecutionCreationToolItemProvider(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(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR); + childrenFeatures.add(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR); + } + 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 ExecutionCreationTool.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ExecutionCreationTool")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ExecutionCreationTool) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_ExecutionCreationTool_type") : getString("_UI_ExecutionCreationTool_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ExecutionCreationTool.class)) { + case ToolPackage.EXECUTION_CREATION_TOOL__STARTING_END_PREDECESSOR: + case ToolPackage.EXECUTION_CREATION_TOOL__FINISHING_END_PREDECESSOR: + 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(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + } + + /** + * 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 == ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR + || childFeature == ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/InstanceRoleCreationToolItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/InstanceRoleCreationToolItemProvider.java new file mode 100644 index 0000000000..f18acded4c --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/InstanceRoleCreationToolItemProvider.java @@ -0,0 +1,169 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.description.tool.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.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.ViewerNotification; + +import org.eclipse.sirius.description.tool.ToolFactory; +import org.eclipse.sirius.description.tool.provider.NodeCreationDescriptionItemProvider; +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.description.tool.InstanceRoleCreationTool; +import org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.InstanceRoleCreationTool} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class InstanceRoleCreationToolItemProvider extends NodeCreationDescriptionItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public InstanceRoleCreationToolItemProvider(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(ToolPackage.Literals.INSTANCE_ROLE_CREATION_TOOL__PREDECESSOR); + } + 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 InstanceRoleCreationTool.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/InstanceRoleCreationTool")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((InstanceRoleCreationTool) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_InstanceRoleCreationTool_type") : getString("_UI_InstanceRoleCreationTool_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(InstanceRoleCreationTool.class)) { + case ToolPackage.INSTANCE_ROLE_CREATION_TOOL__PREDECESSOR: + 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(ToolPackage.Literals.INSTANCE_ROLE_CREATION_TOOL__PREDECESSOR, ToolFactory.eINSTANCE.createElementVariable())); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/InstanceRoleReorderToolItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/InstanceRoleReorderToolItemProvider.java new file mode 100644 index 0000000000..4033a15718 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/InstanceRoleReorderToolItemProvider.java @@ -0,0 +1,212 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.description.tool.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.sirius.description.tool.ToolFactory; +import org.eclipse.sirius.description.tool.provider.AbstractToolDescriptionItemProvider; +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.description.tool.InstanceRoleReorderTool; +import org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.InstanceRoleReorderTool} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class InstanceRoleReorderToolItemProvider extends AbstractToolDescriptionItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public InstanceRoleReorderToolItemProvider(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); + + addMappingsPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Mappings feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addMappingsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_InstanceRoleReorderTool_mappings_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_InstanceRoleReorderTool_mappings_feature", "_UI_InstanceRoleReorderTool_type"), + ToolPackage.Literals.INSTANCE_ROLE_REORDER_TOOL__MAPPINGS, true, false, true, null, 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(ToolPackage.Literals.INSTANCE_ROLE_REORDER_TOOL__PREDECESSOR_BEFORE); + childrenFeatures.add(ToolPackage.Literals.INSTANCE_ROLE_REORDER_TOOL__PREDECESSOR_AFTER); + childrenFeatures.add(ToolPackage.Literals.INSTANCE_ROLE_REORDER_TOOL__INSTANCE_ROLE_MOVED); + } + 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 InstanceRoleReorderTool.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/InstanceRoleReorderTool")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((InstanceRoleReorderTool) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_InstanceRoleReorderTool_type") : getString("_UI_InstanceRoleReorderTool_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(InstanceRoleReorderTool.class)) { + case ToolPackage.INSTANCE_ROLE_REORDER_TOOL__PREDECESSOR_BEFORE: + case ToolPackage.INSTANCE_ROLE_REORDER_TOOL__PREDECESSOR_AFTER: + case ToolPackage.INSTANCE_ROLE_REORDER_TOOL__INSTANCE_ROLE_MOVED: + 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(ToolPackage.Literals.INSTANCE_ROLE_REORDER_TOOL__PREDECESSOR_BEFORE, ToolFactory.eINSTANCE.createElementVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.INSTANCE_ROLE_REORDER_TOOL__PREDECESSOR_AFTER, ToolFactory.eINSTANCE.createElementVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.INSTANCE_ROLE_REORDER_TOOL__INSTANCE_ROLE_MOVED, ToolFactory.eINSTANCE.createInitialOperation())); + } + + /** + * 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 == ToolPackage.Literals.INSTANCE_ROLE_REORDER_TOOL__PREDECESSOR_BEFORE || childFeature == ToolPackage.Literals.INSTANCE_ROLE_REORDER_TOOL__PREDECESSOR_AFTER; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/InteractionUseCreationToolItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/InteractionUseCreationToolItemProvider.java new file mode 100644 index 0000000000..1285cfc1f9 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/InteractionUseCreationToolItemProvider.java @@ -0,0 +1,198 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.description.tool.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.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.ViewerNotification; + +import org.eclipse.sirius.description.tool.provider.ContainerCreationDescriptionItemProvider; +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.description.tool.InteractionUseCreationTool; +import org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.InteractionUseCreationTool} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class InteractionUseCreationToolItemProvider extends ContainerCreationDescriptionItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public InteractionUseCreationToolItemProvider(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(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR); + childrenFeatures.add(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR); + childrenFeatures.add(ToolPackage.Literals.COVERING_ELEMENT_CREATION_TOOL__COVERED_LIFELINES); + } + 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 InteractionUseCreationTool.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/InteractionUseCreationTool")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((InteractionUseCreationTool) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_InteractionUseCreationTool_type") : getString("_UI_InteractionUseCreationTool_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(InteractionUseCreationTool.class)) { + case ToolPackage.INTERACTION_USE_CREATION_TOOL__STARTING_END_PREDECESSOR: + case ToolPackage.INTERACTION_USE_CREATION_TOOL__FINISHING_END_PREDECESSOR: + case ToolPackage.INTERACTION_USE_CREATION_TOOL__COVERED_LIFELINES: + 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(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.COVERING_ELEMENT_CREATION_TOOL__COVERED_LIFELINES, DescriptionFactory.eINSTANCE.createCoveredLifelinesVariable())); + } + + /** + * 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 == ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR + || childFeature == ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/LifelineCreationToolItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/LifelineCreationToolItemProvider.java new file mode 100644 index 0000000000..41783eb2c2 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/LifelineCreationToolItemProvider.java @@ -0,0 +1,124 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.description.tool.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.sirius.description.tool.provider.ContainerCreationDescriptionItemProvider; +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.description.tool.LifelineCreationTool; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.LifelineCreationTool} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class LifelineCreationToolItemProvider extends ContainerCreationDescriptionItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public LifelineCreationToolItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns LifelineCreationTool.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/LifelineCreationTool")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((LifelineCreationTool) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_LifelineCreationTool_type") : getString("_UI_LifelineCreationTool_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/MessageCreationToolItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/MessageCreationToolItemProvider.java new file mode 100644 index 0000000000..3b6a0874b7 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/MessageCreationToolItemProvider.java @@ -0,0 +1,354 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.description.tool.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.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.ViewerNotification; + +import org.eclipse.sirius.description.DescriptionPackage; +import org.eclipse.sirius.description.tool.ToolFactory; +import org.eclipse.sirius.description.tool.ToolPackage; +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.tool.MessageCreationTool; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.MessageCreationTool} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class MessageCreationToolItemProvider extends SequenceDiagramToolDescriptionItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public MessageCreationToolItemProvider(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); + + addDocumentationPropertyDescriptor(object); + addNamePropertyDescriptor(object); + addLabelPropertyDescriptor(object); + addPreconditionPropertyDescriptor(object); + addForceRefreshPropertyDescriptor(object); + addEdgeMappingsPropertyDescriptor(object); + addIconPathPropertyDescriptor(object); + addExtraSourceMappingsPropertyDescriptor(object); + addExtraTargetMappingsPropertyDescriptor(object); + addConnectionStartPreconditionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Documentation feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addDocumentationPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_DocumentedElement_documentation_feature"), getString("_UI_DocumentedElement_documentation_description"), DescriptionPackage.Literals.DOCUMENTED_ELEMENT__DOCUMENTATION, + true, true, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DocumentationPropertyCategory"), null)); + } + + /** + * 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_IdentifiedElement_name_feature"), getString("_UI_IdentifiedElement_name_description"), DescriptionPackage.Literals.IDENTIFIED_ELEMENT__NAME, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), 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_IdentifiedElement_label_feature"), getString("_UI_IdentifiedElement_label_description"), DescriptionPackage.Literals.IDENTIFIED_ELEMENT__LABEL, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Precondition feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addPreconditionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_AbstractToolDescription_precondition_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_AbstractToolDescription_precondition_feature", "_UI_AbstractToolDescription_type"), + ToolPackage.Literals.ABSTRACT_TOOL_DESCRIPTION__PRECONDITION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Force Refresh feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addForceRefreshPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_AbstractToolDescription_forceRefresh_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_AbstractToolDescription_forceRefresh_feature", "_UI_AbstractToolDescription_type"), + ToolPackage.Literals.ABSTRACT_TOOL_DESCRIPTION__FORCE_REFRESH, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Edge Mappings feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addEdgeMappingsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_EdgeCreationDescription_edgeMappings_feature"), getString("_UI_EdgeCreationDescription_edgeMappings_description"), + ToolPackage.Literals.EDGE_CREATION_DESCRIPTION__EDGE_MAPPINGS, true, false, true, null, getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Icon Path feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addIconPathPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_EdgeCreationDescription_iconPath_feature"), getString("_UI_EdgeCreationDescription_iconPath_description"), ToolPackage.Literals.EDGE_CREATION_DESCRIPTION__ICON_PATH, + true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_AdvancedPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Extra Source Mappings feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addExtraSourceMappingsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_EdgeCreationDescription_extraSourceMappings_feature"), getString("_UI_EdgeCreationDescription_extraSourceMappings_description"), + ToolPackage.Literals.EDGE_CREATION_DESCRIPTION__EXTRA_SOURCE_MAPPINGS, true, false, true, null, getString("_UI_AdvancedPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Extra Target Mappings feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addExtraTargetMappingsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_EdgeCreationDescription_extraTargetMappings_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_EdgeCreationDescription_extraTargetMappings_feature", "_UI_EdgeCreationDescription_type"), + ToolPackage.Literals.EDGE_CREATION_DESCRIPTION__EXTRA_TARGET_MAPPINGS, true, false, true, null, getString("_UI_AdvancedPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Connection Start Precondition + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addConnectionStartPreconditionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_EdgeCreationDescription_connectionStartPrecondition_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_EdgeCreationDescription_connectionStartPrecondition_feature", "_UI_EdgeCreationDescription_type"), + ToolPackage.Literals.EDGE_CREATION_DESCRIPTION__CONNECTION_START_PRECONDITION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), 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(ToolPackage.Literals.ABSTRACT_TOOL_DESCRIPTION__FILTERS); + childrenFeatures.add(ToolPackage.Literals.EDGE_CREATION_DESCRIPTION__SOURCE_VARIABLE); + childrenFeatures.add(ToolPackage.Literals.EDGE_CREATION_DESCRIPTION__TARGET_VARIABLE); + childrenFeatures.add(ToolPackage.Literals.EDGE_CREATION_DESCRIPTION__SOURCE_VIEW_VARIABLE); + childrenFeatures.add(ToolPackage.Literals.EDGE_CREATION_DESCRIPTION__TARGET_VIEW_VARIABLE); + childrenFeatures.add(ToolPackage.Literals.EDGE_CREATION_DESCRIPTION__INITIAL_OPERATION); + childrenFeatures.add(org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR); + childrenFeatures.add(org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR); + } + 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 MessageCreationTool.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/MessageCreationTool")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((MessageCreationTool) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_MessageCreationTool_type") : getString("_UI_MessageCreationTool_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(MessageCreationTool.class)) { + case org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.MESSAGE_CREATION_TOOL__DOCUMENTATION: + case org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.MESSAGE_CREATION_TOOL__NAME: + case org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.MESSAGE_CREATION_TOOL__LABEL: + case org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.MESSAGE_CREATION_TOOL__PRECONDITION: + case org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.MESSAGE_CREATION_TOOL__FORCE_REFRESH: + case org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.MESSAGE_CREATION_TOOL__ICON_PATH: + case org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.MESSAGE_CREATION_TOOL__CONNECTION_START_PRECONDITION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.MESSAGE_CREATION_TOOL__FILTERS: + case org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.MESSAGE_CREATION_TOOL__SOURCE_VARIABLE: + case org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.MESSAGE_CREATION_TOOL__TARGET_VARIABLE: + case org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.MESSAGE_CREATION_TOOL__SOURCE_VIEW_VARIABLE: + case org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.MESSAGE_CREATION_TOOL__TARGET_VIEW_VARIABLE: + case org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.MESSAGE_CREATION_TOOL__INITIAL_OPERATION: + case org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.MESSAGE_CREATION_TOOL__STARTING_END_PREDECESSOR: + case org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.MESSAGE_CREATION_TOOL__FINISHING_END_PREDECESSOR: + 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(ToolPackage.Literals.ABSTRACT_TOOL_DESCRIPTION__FILTERS, ToolFactory.eINSTANCE.createToolFilterDescription())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.EDGE_CREATION_DESCRIPTION__SOURCE_VARIABLE, ToolFactory.eINSTANCE.createSourceEdgeCreationVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.EDGE_CREATION_DESCRIPTION__TARGET_VARIABLE, ToolFactory.eINSTANCE.createTargetEdgeCreationVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.EDGE_CREATION_DESCRIPTION__SOURCE_VIEW_VARIABLE, ToolFactory.eINSTANCE.createSourceEdgeViewCreationVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.EDGE_CREATION_DESCRIPTION__TARGET_VIEW_VARIABLE, ToolFactory.eINSTANCE.createTargetEdgeViewCreationVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.EDGE_CREATION_DESCRIPTION__INITIAL_OPERATION, ToolFactory.eINSTANCE.createInitEdgeCreationOperation())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR, + DescriptionFactory.eINSTANCE.createMessageEndVariable())); + + newChildDescriptors.add(createChildParameter(org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR, + DescriptionFactory.eINSTANCE.createMessageEndVariable())); + } + + /** + * 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 == org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR + || childFeature == org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/ObservationPointCreationToolItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/ObservationPointCreationToolItemProvider.java new file mode 100644 index 0000000000..a39a2a0675 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/ObservationPointCreationToolItemProvider.java @@ -0,0 +1,194 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.description.tool.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.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.ViewerNotification; + +import org.eclipse.sirius.description.tool.provider.NodeCreationDescriptionItemProvider; +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.description.tool.ObservationPointCreationTool; +import org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.ObservationPointCreationTool} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class ObservationPointCreationToolItemProvider extends NodeCreationDescriptionItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ObservationPointCreationToolItemProvider(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(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR); + childrenFeatures.add(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR); + } + 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 ObservationPointCreationTool.gif. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ObservationPointCreationTool")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ObservationPointCreationTool) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_ObservationPointCreationTool_type") : getString("_UI_ObservationPointCreationTool_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ObservationPointCreationTool.class)) { + case ToolPackage.OBSERVATION_POINT_CREATION_TOOL__STARTING_END_PREDECESSOR: + case ToolPackage.OBSERVATION_POINT_CREATION_TOOL__FINISHING_END_PREDECESSOR: + 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(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + } + + /** + * 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 == ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR + || childFeature == ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/OperandCreationToolItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/OperandCreationToolItemProvider.java new file mode 100644 index 0000000000..ce79a58aea --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/OperandCreationToolItemProvider.java @@ -0,0 +1,194 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.description.tool.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.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.ViewerNotification; + +import org.eclipse.sirius.description.tool.provider.ContainerCreationDescriptionItemProvider; +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.description.tool.OperandCreationTool; +import org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.OperandCreationTool} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class OperandCreationToolItemProvider extends ContainerCreationDescriptionItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public OperandCreationToolItemProvider(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(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR); + childrenFeatures.add(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR); + } + 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 OperandCreationTool.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/OperandCreationTool")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((OperandCreationTool) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_OperandCreationTool_type") : getString("_UI_OperandCreationTool_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(OperandCreationTool.class)) { + case ToolPackage.OPERAND_CREATION_TOOL__STARTING_END_PREDECESSOR: + case ToolPackage.OPERAND_CREATION_TOOL__FINISHING_END_PREDECESSOR: + 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(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + } + + /** + * 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 == ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR + || childFeature == ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/OrderedElementCreationToolItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/OrderedElementCreationToolItemProvider.java new file mode 100644 index 0000000000..8920a742fe --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/OrderedElementCreationToolItemProvider.java @@ -0,0 +1,182 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.description.tool.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.description.tool.OrderedElementCreationTool; +import org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.OrderedElementCreationTool} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class OrderedElementCreationToolItemProvider 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 OrderedElementCreationToolItemProvider(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(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR); + childrenFeatures.add(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR); + } + 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) { + return getString("_UI_OrderedElementCreationTool_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(OrderedElementCreationTool.class)) { + case ToolPackage.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR: + case ToolPackage.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR: + 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(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + } + + /** + * 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 == ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR + || childFeature == ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/ReorderToolItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/ReorderToolItemProvider.java new file mode 100644 index 0000000000..29d53f1166 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/ReorderToolItemProvider.java @@ -0,0 +1,221 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.description.tool.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.sirius.description.tool.ToolFactory; +import org.eclipse.sirius.description.tool.provider.AbstractToolDescriptionItemProvider; +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.description.tool.ReorderTool; +import org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.ReorderTool} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class ReorderToolItemProvider extends AbstractToolDescriptionItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ReorderToolItemProvider(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); + + addMappingsPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Mappings feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addMappingsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_ReorderTool_mappings_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ReorderTool_mappings_feature", "_UI_ReorderTool_type"), + ToolPackage.Literals.REORDER_TOOL__MAPPINGS, true, false, true, null, getString("_UI_GeneralPropertyCategory"), 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(ToolPackage.Literals.REORDER_TOOL__STARTING_END_PREDECESSOR_BEFORE); + childrenFeatures.add(ToolPackage.Literals.REORDER_TOOL__STARTING_END_PREDECESSOR_AFTER); + childrenFeatures.add(ToolPackage.Literals.REORDER_TOOL__FINISHING_END_PREDECESSOR_BEFORE); + childrenFeatures.add(ToolPackage.Literals.REORDER_TOOL__FINISHING_END_PREDECESSOR_AFTER); + childrenFeatures.add(ToolPackage.Literals.REORDER_TOOL__ON_EVENT_MOVED_OPERATION); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper + // feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns ReorderTool.gif. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ReorderTool")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ReorderTool) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_ReorderTool_type") : getString("_UI_ReorderTool_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ReorderTool.class)) { + case ToolPackage.REORDER_TOOL__STARTING_END_PREDECESSOR_BEFORE: + case ToolPackage.REORDER_TOOL__STARTING_END_PREDECESSOR_AFTER: + case ToolPackage.REORDER_TOOL__FINISHING_END_PREDECESSOR_BEFORE: + case ToolPackage.REORDER_TOOL__FINISHING_END_PREDECESSOR_AFTER: + case ToolPackage.REORDER_TOOL__ON_EVENT_MOVED_OPERATION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.REORDER_TOOL__STARTING_END_PREDECESSOR_BEFORE, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.REORDER_TOOL__STARTING_END_PREDECESSOR_AFTER, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.REORDER_TOOL__FINISHING_END_PREDECESSOR_BEFORE, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.REORDER_TOOL__FINISHING_END_PREDECESSOR_AFTER, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.REORDER_TOOL__ON_EVENT_MOVED_OPERATION, ToolFactory.eINSTANCE.createInitialOperation())); + } + + /** + * 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 == ToolPackage.Literals.REORDER_TOOL__STARTING_END_PREDECESSOR_BEFORE || childFeature == ToolPackage.Literals.REORDER_TOOL__STARTING_END_PREDECESSOR_AFTER + || childFeature == ToolPackage.Literals.REORDER_TOOL__FINISHING_END_PREDECESSOR_BEFORE || childFeature == ToolPackage.Literals.REORDER_TOOL__FINISHING_END_PREDECESSOR_AFTER; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/SequenceDiagramToolDescriptionItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/SequenceDiagramToolDescriptionItemProvider.java new file mode 100644 index 0000000000..e8e368d38a --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/SequenceDiagramToolDescriptionItemProvider.java @@ -0,0 +1,122 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.description.tool.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; + +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.SequenceDiagramToolDescription} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class SequenceDiagramToolDescriptionItemProvider 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 SequenceDiagramToolDescriptionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns SequenceDiagramToolDescription.gif. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/SequenceDiagramToolDescription")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_SequenceDiagramToolDescription_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/StateCreationToolItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/StateCreationToolItemProvider.java new file mode 100644 index 0000000000..4d4af3a67e --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/StateCreationToolItemProvider.java @@ -0,0 +1,194 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.description.tool.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.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.ViewerNotification; + +import org.eclipse.sirius.description.tool.provider.NodeCreationDescriptionItemProvider; +import org.eclipse.sirius.diagram.sequence.description.DescriptionFactory; +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.description.tool.StateCreationTool; +import org.eclipse.sirius.diagram.sequence.description.tool.ToolPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.StateCreationTool} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class StateCreationToolItemProvider extends NodeCreationDescriptionItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public StateCreationToolItemProvider(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(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR); + childrenFeatures.add(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR); + } + 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 StateCreationTool.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/StateCreationTool")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((StateCreationTool) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_StateCreationTool_type") : getString("_UI_StateCreationTool_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(StateCreationTool.class)) { + case ToolPackage.STATE_CREATION_TOOL__STARTING_END_PREDECESSOR: + case ToolPackage.STATE_CREATION_TOOL__FINISHING_END_PREDECESSOR: + 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(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + + newChildDescriptors.add(createChildParameter(ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR, DescriptionFactory.eINSTANCE.createMessageEndVariable())); + } + + /** + * 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 == ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__STARTING_END_PREDECESSOR + || childFeature == ToolPackage.Literals.ORDERED_ELEMENT_CREATION_TOOL__FINISHING_END_PREDECESSOR; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/ToolItemProviderAdapterFactory.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/ToolItemProviderAdapterFactory.java new file mode 100644 index 0000000000..c9e3776dcd --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/description/tool/provider/ToolItemProviderAdapterFactory.java @@ -0,0 +1,508 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.description.tool.provider; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.sirius.diagram.sequence.description.tool.util.ToolAdapterFactory; + +/** + * This is the factory that is used to provide the interfaces needed to support + * Viewers. The adapters generated by this factory convert EMF adapter + * notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The + * adapters also support Eclipse property sheets. Note that most of the adapters + * are shared among multiple instances. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class ToolItemProviderAdapterFactory extends ToolAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this + * adapter factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement + * {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by + * {@link #isFactoryForType isFactoryForType}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected Collection<Object> supportedTypes = new ArrayList<Object>(); + + /** + * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + public ToolItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.tool.SequenceDiagramToolDescription} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected SequenceDiagramToolDescriptionItemProvider sequenceDiagramToolDescriptionItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.SequenceDiagramToolDescription} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createSequenceDiagramToolDescriptionAdapter() { + if (sequenceDiagramToolDescriptionItemProvider == null) { + sequenceDiagramToolDescriptionItemProvider = new SequenceDiagramToolDescriptionItemProvider(this); + } + + return sequenceDiagramToolDescriptionItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.tool.InstanceRoleCreationTool} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected InstanceRoleCreationToolItemProvider instanceRoleCreationToolItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.InstanceRoleCreationTool} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createInstanceRoleCreationToolAdapter() { + if (instanceRoleCreationToolItemProvider == null) { + instanceRoleCreationToolItemProvider = new InstanceRoleCreationToolItemProvider(this); + } + + return instanceRoleCreationToolItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.tool.LifelineCreationTool} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected LifelineCreationToolItemProvider lifelineCreationToolItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.LifelineCreationTool} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createLifelineCreationToolAdapter() { + if (lifelineCreationToolItemProvider == null) { + lifelineCreationToolItemProvider = new LifelineCreationToolItemProvider(this); + } + + return lifelineCreationToolItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.tool.MessageCreationTool} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected MessageCreationToolItemProvider messageCreationToolItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.MessageCreationTool} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createMessageCreationToolAdapter() { + if (messageCreationToolItemProvider == null) { + messageCreationToolItemProvider = new MessageCreationToolItemProvider(this); + } + + return messageCreationToolItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.tool.ExecutionCreationTool} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ExecutionCreationToolItemProvider executionCreationToolItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.ExecutionCreationTool} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createExecutionCreationToolAdapter() { + if (executionCreationToolItemProvider == null) { + executionCreationToolItemProvider = new ExecutionCreationToolItemProvider(this); + } + + return executionCreationToolItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.tool.StateCreationTool} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected StateCreationToolItemProvider stateCreationToolItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.StateCreationTool} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createStateCreationToolAdapter() { + if (stateCreationToolItemProvider == null) { + stateCreationToolItemProvider = new StateCreationToolItemProvider(this); + } + + return stateCreationToolItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.tool.ReorderTool} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ReorderToolItemProvider reorderToolItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.ReorderTool} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createReorderToolAdapter() { + if (reorderToolItemProvider == null) { + reorderToolItemProvider = new ReorderToolItemProvider(this); + } + + return reorderToolItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.tool.InstanceRoleReorderTool} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected InstanceRoleReorderToolItemProvider instanceRoleReorderToolItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.InstanceRoleReorderTool} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createInstanceRoleReorderToolAdapter() { + if (instanceRoleReorderToolItemProvider == null) { + instanceRoleReorderToolItemProvider = new InstanceRoleReorderToolItemProvider(this); + } + + return instanceRoleReorderToolItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.tool.ObservationPointCreationTool} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ObservationPointCreationToolItemProvider observationPointCreationToolItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.ObservationPointCreationTool} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createObservationPointCreationToolAdapter() { + if (observationPointCreationToolItemProvider == null) { + observationPointCreationToolItemProvider = new ObservationPointCreationToolItemProvider(this); + } + + return observationPointCreationToolItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.tool.InteractionUseCreationTool} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected InteractionUseCreationToolItemProvider interactionUseCreationToolItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.InteractionUseCreationTool} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createInteractionUseCreationToolAdapter() { + if (interactionUseCreationToolItemProvider == null) { + interactionUseCreationToolItemProvider = new InteractionUseCreationToolItemProvider(this); + } + + return interactionUseCreationToolItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.tool.CombinedFragmentCreationTool} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected CombinedFragmentCreationToolItemProvider combinedFragmentCreationToolItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.CombinedFragmentCreationTool} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createCombinedFragmentCreationToolAdapter() { + if (combinedFragmentCreationToolItemProvider == null) { + combinedFragmentCreationToolItemProvider = new CombinedFragmentCreationToolItemProvider(this); + } + + return combinedFragmentCreationToolItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.description.tool.OperandCreationTool} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected OperandCreationToolItemProvider operandCreationToolItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.description.tool.OperandCreationTool} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createOperandCreationToolAdapter() { + if (operandCreationToolItemProvider == null) { + operandCreationToolItemProvider = new OperandCreationToolItemProvider(this); + } + + return operandCreationToolItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the + * adapter. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to + * {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void dispose() { + if (sequenceDiagramToolDescriptionItemProvider != null) + sequenceDiagramToolDescriptionItemProvider.dispose(); + if (instanceRoleCreationToolItemProvider != null) + instanceRoleCreationToolItemProvider.dispose(); + if (lifelineCreationToolItemProvider != null) + lifelineCreationToolItemProvider.dispose(); + if (messageCreationToolItemProvider != null) + messageCreationToolItemProvider.dispose(); + if (executionCreationToolItemProvider != null) + executionCreationToolItemProvider.dispose(); + if (stateCreationToolItemProvider != null) + stateCreationToolItemProvider.dispose(); + if (interactionUseCreationToolItemProvider != null) + interactionUseCreationToolItemProvider.dispose(); + if (combinedFragmentCreationToolItemProvider != null) + combinedFragmentCreationToolItemProvider.dispose(); + if (operandCreationToolItemProvider != null) + operandCreationToolItemProvider.dispose(); + if (observationPointCreationToolItemProvider != null) + observationPointCreationToolItemProvider.dispose(); + if (reorderToolItemProvider != null) + reorderToolItemProvider.dispose(); + if (instanceRoleReorderToolItemProvider != null) + instanceRoleReorderToolItemProvider.dispose(); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/CompoundEventEndItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/CompoundEventEndItemProvider.java new file mode 100644 index 0000000000..454e9e9276 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/CompoundEventEndItemProvider.java @@ -0,0 +1,123 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.ordering.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.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.sirius.diagram.sequence.ordering.OrderingPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.ordering.CompoundEventEnd} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class CompoundEventEndItemProvider extends EventEndItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public CompoundEventEndItemProvider(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); + + addEventEndsPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Event Ends feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addEventEndsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_CompoundEventEnd_eventEnds_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CompoundEventEnd_eventEnds_feature", "_UI_CompoundEventEnd_type"), + OrderingPackage.Literals.COMPOUND_EVENT_END__EVENT_ENDS, true, false, true, null, null, null)); + } + + /** + * This returns CompoundEventEnd.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/CompoundEventEnd")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_CompoundEventEnd_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/EventEndItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/EventEndItemProvider.java new file mode 100644 index 0000000000..9fbed8d125 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/EventEndItemProvider.java @@ -0,0 +1,135 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.ordering.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.ItemProviderAdapter; + +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.ordering.OrderingPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.ordering.EventEnd} object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class EventEndItemProvider 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 EventEndItemProvider(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); + + addSemanticEndPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Semantic End feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addSemanticEndPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_EventEnd_semanticEnd_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EventEnd_semanticEnd_feature", "_UI_EventEnd_type"), + OrderingPackage.Literals.EVENT_END__SEMANTIC_END, true, false, true, null, null, null)); + } + + /** + * This returns EventEnd.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/EventEnd")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_EventEnd_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/EventEndsOrderingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/EventEndsOrderingItemProvider.java new file mode 100644 index 0000000000..99ee3b9b84 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/EventEndsOrderingItemProvider.java @@ -0,0 +1,151 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.ordering.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.ItemProviderAdapter; + +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.ordering.OrderingPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.ordering.EventEndsOrdering} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class EventEndsOrderingItemProvider 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 EventEndsOrderingItemProvider(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); + + addSequenceDiagramPropertyDescriptor(object); + addEventEndsPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Sequence Diagram feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addSequenceDiagramPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_EventEndsOrdering_sequenceDiagram_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_EventEndsOrdering_sequenceDiagram_feature", "_UI_EventEndsOrdering_type"), + OrderingPackage.Literals.EVENT_ENDS_ORDERING__SEQUENCE_DIAGRAM, true, false, true, null, null, null)); + } + + /** + * This adds a property descriptor for the Event Ends feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addEventEndsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_EventEndsOrdering_eventEnds_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EventEndsOrdering_eventEnds_feature", "_UI_EventEndsOrdering_type"), + OrderingPackage.Literals.EVENT_ENDS_ORDERING__EVENT_ENDS, true, false, true, null, null, null)); + } + + /** + * This returns EventEndsOrdering.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/EventEndsOrdering")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_EventEndsOrdering_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/InstanceRolesOrderingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/InstanceRolesOrderingItemProvider.java new file mode 100644 index 0000000000..216153f64d --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/InstanceRolesOrderingItemProvider.java @@ -0,0 +1,138 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.ordering.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.ItemProviderAdapter; + +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.ordering.OrderingPackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.ordering.InstanceRolesOrdering} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class InstanceRolesOrderingItemProvider 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 InstanceRolesOrderingItemProvider(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); + + addSemanticInstanceRolesPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Semantic Instance Roles feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addSemanticInstanceRolesPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_InstanceRolesOrdering_semanticInstanceRoles_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_InstanceRolesOrdering_semanticInstanceRoles_feature", "_UI_InstanceRolesOrdering_type"), + OrderingPackage.Literals.INSTANCE_ROLES_ORDERING__SEMANTIC_INSTANCE_ROLES, true, false, true, null, null, null)); + } + + /** + * This returns InstanceRolesOrdering.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/InstanceRolesOrdering")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_InstanceRolesOrdering_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/OrderingItemProviderAdapterFactory.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/OrderingItemProviderAdapterFactory.java new file mode 100644 index 0000000000..d4988afbcb --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/OrderingItemProviderAdapterFactory.java @@ -0,0 +1,292 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.ordering.provider; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.sirius.diagram.sequence.ordering.util.OrderingAdapterFactory; + +/** + * This is the factory that is used to provide the interfaces needed to support + * Viewers. The adapters generated by this factory convert EMF adapter + * notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The + * adapters also support Eclipse property sheets. Note that most of the adapters + * are shared among multiple instances. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class OrderingItemProviderAdapterFactory extends OrderingAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this + * adapter factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement + * {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by + * {@link #isFactoryForType isFactoryForType}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected Collection<Object> supportedTypes = new ArrayList<Object>(); + + /** + * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + public OrderingItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.ordering.EventEndsOrdering} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected EventEndsOrderingItemProvider eventEndsOrderingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.ordering.EventEndsOrdering} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createEventEndsOrderingAdapter() { + if (eventEndsOrderingItemProvider == null) { + eventEndsOrderingItemProvider = new EventEndsOrderingItemProvider(this); + } + + return eventEndsOrderingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.ordering.SingleEventEnd} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected SingleEventEndItemProvider singleEventEndItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.ordering.SingleEventEnd}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createSingleEventEndAdapter() { + if (singleEventEndItemProvider == null) { + singleEventEndItemProvider = new SingleEventEndItemProvider(this); + } + + return singleEventEndItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.ordering.CompoundEventEnd} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected CompoundEventEndItemProvider compoundEventEndItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.ordering.CompoundEventEnd}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createCompoundEventEndAdapter() { + if (compoundEventEndItemProvider == null) { + compoundEventEndItemProvider = new CompoundEventEndItemProvider(this); + } + + return compoundEventEndItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.ordering.InstanceRolesOrdering} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected InstanceRolesOrderingItemProvider instanceRolesOrderingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.ordering.InstanceRolesOrdering} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createInstanceRolesOrderingAdapter() { + if (instanceRolesOrderingItemProvider == null) { + instanceRolesOrderingItemProvider = new InstanceRolesOrderingItemProvider(this); + } + + return instanceRolesOrderingItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the + * adapter. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to + * {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void dispose() { + if (eventEndsOrderingItemProvider != null) + eventEndsOrderingItemProvider.dispose(); + if (singleEventEndItemProvider != null) + singleEventEndItemProvider.dispose(); + if (compoundEventEndItemProvider != null) + compoundEventEndItemProvider.dispose(); + if (instanceRolesOrderingItemProvider != null) + instanceRolesOrderingItemProvider.dispose(); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/SingleEventEndItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/SingleEventEndItemProvider.java new file mode 100644 index 0000000000..7e5ba166b1 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/ordering/provider/SingleEventEndItemProvider.java @@ -0,0 +1,135 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.ordering.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.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.ViewerNotification; + +import org.eclipse.sirius.diagram.sequence.ordering.OrderingPackage; +import org.eclipse.sirius.diagram.sequence.ordering.SingleEventEnd; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.ordering.SingleEventEnd} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class SingleEventEndItemProvider extends EventEndItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public SingleEventEndItemProvider(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); + + addStartPropertyDescriptor(object); + addSemanticEventPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Start feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addStartPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_SingleEventEnd_start_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SingleEventEnd_start_feature", "_UI_SingleEventEnd_type"), + OrderingPackage.Literals.SINGLE_EVENT_END__START, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Semantic Event feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addSemanticEventPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_SingleEventEnd_semanticEvent_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SingleEventEnd_semanticEvent_feature", "_UI_SingleEventEnd_type"), + OrderingPackage.Literals.SINGLE_EVENT_END__SEMANTIC_EVENT, true, false, true, null, null, null)); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + SingleEventEnd singleEventEnd = (SingleEventEnd) object; + return getString("_UI_SingleEventEnd_type") + " " + singleEventEnd.isStart(); + } + + /** + * 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(SingleEventEnd.class)) { + case OrderingPackage.SINGLE_EVENT_END__START: + 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.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/provider/SequenceDDiagramItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/provider/SequenceDDiagramItemProvider.java new file mode 100644 index 0000000000..89d79ff70f --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/provider/SequenceDDiagramItemProvider.java @@ -0,0 +1,201 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.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.ViewerNotification; + +import org.eclipse.sirius.SiriusPackage; +import org.eclipse.sirius.diagram.sequence.SequenceDDiagram; +import org.eclipse.sirius.diagram.sequence.SequenceFactory; +import org.eclipse.sirius.diagram.sequence.SequencePackage; +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.ordering.OrderingFactory; +import org.eclipse.sirius.provider.DSemanticDiagramItemProvider; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.SequenceDDiagram} object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class SequenceDDiagramItemProvider extends DSemanticDiagramItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public SequenceDDiagramItemProvider(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(SequencePackage.Literals.SEQUENCE_DDIAGRAM__SEMANTIC_ORDERING); + childrenFeatures.add(SequencePackage.Literals.SEQUENCE_DDIAGRAM__GRAPHICAL_ORDERING); + childrenFeatures.add(SequencePackage.Literals.SEQUENCE_DDIAGRAM__INSTANCE_ROLE_SEMANTIC_ORDERING); + } + 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 SequenceDDiagram.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/SequenceDDiagram")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getText(Object object) { + String label = ((SequenceDDiagram) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_SequenceDDiagram_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(SequenceDDiagram.class)) { + case SequencePackage.SEQUENCE_DDIAGRAM__SEMANTIC_ORDERING: + case SequencePackage.SEQUENCE_DDIAGRAM__GRAPHICAL_ORDERING: + case SequencePackage.SEQUENCE_DDIAGRAM__INSTANCE_ROLE_SEMANTIC_ORDERING: + 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(SiriusPackage.Literals.DDIAGRAM__SUB_DIAGRAMS, SequenceFactory.eINSTANCE.createSequenceDDiagram())); + + newChildDescriptors.add(createChildParameter(SequencePackage.Literals.SEQUENCE_DDIAGRAM__SEMANTIC_ORDERING, OrderingFactory.eINSTANCE.createEventEndsOrdering())); + + newChildDescriptors.add(createChildParameter(SequencePackage.Literals.SEQUENCE_DDIAGRAM__GRAPHICAL_ORDERING, OrderingFactory.eINSTANCE.createEventEndsOrdering())); + + newChildDescriptors.add(createChildParameter(SequencePackage.Literals.SEQUENCE_DDIAGRAM__INSTANCE_ROLE_SEMANTIC_ORDERING, OrderingFactory.eINSTANCE.createInstanceRolesOrdering())); + } + + /** + * 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 == SequencePackage.Literals.SEQUENCE_DDIAGRAM__SEMANTIC_ORDERING || childFeature == SequencePackage.Literals.SEQUENCE_DDIAGRAM__GRAPHICAL_ORDERING; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/provider/SequenceItemProviderAdapterFactory.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/provider/SequenceItemProviderAdapterFactory.java new file mode 100644 index 0000000000..21288d6d9f --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/provider/SequenceItemProviderAdapterFactory.java @@ -0,0 +1,211 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.provider; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.sirius.diagram.sequence.util.SequenceAdapterFactory; + +/** + * This is the factory that is used to provide the interfaces needed to support + * Viewers. The adapters generated by this factory convert EMF adapter + * notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The + * adapters also support Eclipse property sheets. Note that most of the adapters + * are shared among multiple instances. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class SequenceItemProviderAdapterFactory extends SequenceAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this + * adapter factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement + * {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by + * {@link #isFactoryForType isFactoryForType}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected Collection<Object> supportedTypes = new ArrayList<Object>(); + + /** + * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + public SequenceItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.SequenceDDiagram} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected SequenceDDiagramItemProvider sequenceDDiagramItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.SequenceDDiagram}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createSequenceDDiagramAdapter() { + if (sequenceDDiagramItemProvider == null) { + sequenceDDiagramItemProvider = new SequenceDDiagramItemProvider(this); + } + + return sequenceDDiagramItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the + * adapter. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to + * {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void dispose() { + if (sequenceDDiagramItemProvider != null) + sequenceDDiagramItemProvider.dispose(); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TAbstractMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TAbstractMappingItemProvider.java new file mode 100644 index 0000000000..9d43c82655 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TAbstractMappingItemProvider.java @@ -0,0 +1,162 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.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.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.ViewerNotification; + +import org.eclipse.sirius.diagram.sequence.template.TAbstractMapping; +import org.eclipse.sirius.diagram.sequence.template.TemplatePackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TAbstractMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TAbstractMappingItemProvider extends TTransformerItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TAbstractMappingItemProvider(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); + addDomainClassPropertyDescriptor(object); + addSemanticCandidatesExpressionPropertyDescriptor(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_TAbstractMapping_name_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TAbstractMapping_name_feature", "_UI_TAbstractMapping_type"), + TemplatePackage.Literals.TABSTRACT_MAPPING__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Domain Class feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addDomainClassPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TAbstractMapping_domainClass_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TAbstractMapping_domainClass_feature", "_UI_TAbstractMapping_type"), + TemplatePackage.Literals.TABSTRACT_MAPPING__DOMAIN_CLASS, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Semantic Candidates Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addSemanticCandidatesExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TAbstractMapping_semanticCandidatesExpression_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_TAbstractMapping_semanticCandidatesExpression_feature", "_UI_TAbstractMapping_type"), + TemplatePackage.Literals.TABSTRACT_MAPPING__SEMANTIC_CANDIDATES_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This returns TAbstractMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TAbstractMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((TAbstractMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_TAbstractMapping_type") : getString("_UI_TAbstractMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TAbstractMapping.class)) { + case TemplatePackage.TABSTRACT_MAPPING__NAME: + case TemplatePackage.TABSTRACT_MAPPING__DOMAIN_CLASS: + case TemplatePackage.TABSTRACT_MAPPING__SEMANTIC_CANDIDATES_EXPRESSION: + 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.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TBasicMessageMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TBasicMessageMappingItemProvider.java new file mode 100644 index 0000000000..32dfe5e119 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TBasicMessageMappingItemProvider.java @@ -0,0 +1,125 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.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.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.sirius.diagram.sequence.template.TBasicMessageMapping; +import org.eclipse.sirius.diagram.sequence.template.TemplatePackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TBasicMessageMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TBasicMessageMappingItemProvider extends TSourceTargetMessageMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TBasicMessageMappingItemProvider(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); + + addTargetPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Target feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addTargetPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TBasicMessageMapping_target_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TBasicMessageMapping_target_feature", "_UI_TBasicMessageMapping_type"), + TemplatePackage.Literals.TBASIC_MESSAGE_MAPPING__TARGET, true, false, true, null, getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This returns TBasicMessageMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TBasicMessageMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getText(Object object) { + String label = ((TBasicMessageMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_TBasicMessageMapping_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TConditionalExecutionStyleItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TConditionalExecutionStyleItemProvider.java new file mode 100644 index 0000000000..5ba580a72e --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TConditionalExecutionStyleItemProvider.java @@ -0,0 +1,174 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.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.ViewerNotification; + +import org.eclipse.sirius.diagram.sequence.template.TConditionalExecutionStyle; +import org.eclipse.sirius.diagram.sequence.template.TemplateFactory; +import org.eclipse.sirius.diagram.sequence.template.TemplatePackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TConditionalExecutionStyle} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TConditionalExecutionStyleItemProvider extends TTransformerItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TConditionalExecutionStyleItemProvider(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); + + addPredicateExpressionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Predicate Expression feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addPredicateExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TConditionalExecutionStyle_predicateExpression_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_TConditionalExecutionStyle_predicateExpression_feature", "_UI_TConditionalExecutionStyle_type"), + TemplatePackage.Literals.TCONDITIONAL_EXECUTION_STYLE__PREDICATE_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to + * deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, + * {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in + * {@link #createCommand}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(TemplatePackage.Literals.TCONDITIONAL_EXECUTION_STYLE__STYLE); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper + // feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns TConditionalExecutionStyle.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TConditionalExecutionStyle")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getText(Object object) { + String label = ((TConditionalExecutionStyle) object).getPredicateExpression(); + return label == null || label.length() == 0 ? getString("_UI_TConditionalExecutionStyle_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TConditionalExecutionStyle.class)) { + case TemplatePackage.TCONDITIONAL_EXECUTION_STYLE__PREDICATE_EXPRESSION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case TemplatePackage.TCONDITIONAL_EXECUTION_STYLE__STYLE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TCONDITIONAL_EXECUTION_STYLE__STYLE, TemplateFactory.eINSTANCE.createTExecutionStyle())); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TConditionalLifelineStyleItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TConditionalLifelineStyleItemProvider.java new file mode 100644 index 0000000000..b30e376f22 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TConditionalLifelineStyleItemProvider.java @@ -0,0 +1,174 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.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.ViewerNotification; + +import org.eclipse.sirius.diagram.sequence.template.TConditionalLifelineStyle; +import org.eclipse.sirius.diagram.sequence.template.TemplateFactory; +import org.eclipse.sirius.diagram.sequence.template.TemplatePackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TConditionalLifelineStyle} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TConditionalLifelineStyleItemProvider extends TTransformerItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TConditionalLifelineStyleItemProvider(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); + + addPredicateExpressionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Predicate Expression feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addPredicateExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TConditionalLifelineStyle_predicateExpression_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_TConditionalLifelineStyle_predicateExpression_feature", "_UI_TConditionalLifelineStyle_type"), + TemplatePackage.Literals.TCONDITIONAL_LIFELINE_STYLE__PREDICATE_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to + * deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, + * {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in + * {@link #createCommand}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(TemplatePackage.Literals.TCONDITIONAL_LIFELINE_STYLE__STYLE); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper + // feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns TConditionalLifelineStyle.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TConditionalLifelineStyle")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getText(Object object) { + String label = ((TConditionalLifelineStyle) object).getPredicateExpression(); + return label == null || label.length() == 0 ? getString("_UI_TConditionalLifelineStyle_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TConditionalLifelineStyle.class)) { + case TemplatePackage.TCONDITIONAL_LIFELINE_STYLE__PREDICATE_EXPRESSION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case TemplatePackage.TCONDITIONAL_LIFELINE_STYLE__STYLE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TCONDITIONAL_LIFELINE_STYLE__STYLE, TemplateFactory.eINSTANCE.createTLifelineStyle())); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TConditionalMessageStyleItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TConditionalMessageStyleItemProvider.java new file mode 100644 index 0000000000..f591dc099e --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TConditionalMessageStyleItemProvider.java @@ -0,0 +1,174 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.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.ViewerNotification; + +import org.eclipse.sirius.diagram.sequence.template.TConditionalMessageStyle; +import org.eclipse.sirius.diagram.sequence.template.TemplateFactory; +import org.eclipse.sirius.diagram.sequence.template.TemplatePackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TConditionalMessageStyle} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TConditionalMessageStyleItemProvider extends TTransformerItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TConditionalMessageStyleItemProvider(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); + + addPredicateExpressionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Predicate Expression feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addPredicateExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TConditionalMessageStyle_predicateExpression_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_TConditionalMessageStyle_predicateExpression_feature", "_UI_TConditionalMessageStyle_type"), + TemplatePackage.Literals.TCONDITIONAL_MESSAGE_STYLE__PREDICATE_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to + * deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, + * {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in + * {@link #createCommand}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(TemplatePackage.Literals.TCONDITIONAL_MESSAGE_STYLE__STYLE); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper + // feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns TConditionalMessageStyle.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TConditionalMessageStyle")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getText(Object object) { + String label = ((TConditionalMessageStyle) object).getPredicateExpression(); + return label == null || label.length() == 0 ? getString("_UI_TConditionalMessageStyle_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TConditionalMessageStyle.class)) { + case TemplatePackage.TCONDITIONAL_MESSAGE_STYLE__PREDICATE_EXPRESSION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case TemplatePackage.TCONDITIONAL_MESSAGE_STYLE__STYLE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TCONDITIONAL_MESSAGE_STYLE__STYLE, TemplateFactory.eINSTANCE.createTMessageStyle())); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TCreationMessageMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TCreationMessageMappingItemProvider.java new file mode 100644 index 0000000000..26e9e03ea8 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TCreationMessageMappingItemProvider.java @@ -0,0 +1,126 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.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.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.sirius.diagram.sequence.template.TCreationMessageMapping; +import org.eclipse.sirius.diagram.sequence.template.TemplatePackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TCreationMessageMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TCreationMessageMappingItemProvider extends TSourceTargetMessageMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TCreationMessageMappingItemProvider(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); + + addTargetPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Target feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addTargetPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TCreationMessageMapping_target_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_TCreationMessageMapping_target_feature", "_UI_TCreationMessageMapping_type"), + TemplatePackage.Literals.TCREATION_MESSAGE_MAPPING__TARGET, true, false, true, null, getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This returns TCreationMessageMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TCreationMessageMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getText(Object object) { + String label = ((TCreationMessageMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_TCreationMessageMapping_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TDestructionMessageMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TDestructionMessageMappingItemProvider.java new file mode 100644 index 0000000000..f879ffab83 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TDestructionMessageMappingItemProvider.java @@ -0,0 +1,126 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.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.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.sirius.diagram.sequence.template.TDestructionMessageMapping; +import org.eclipse.sirius.diagram.sequence.template.TemplatePackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TDestructionMessageMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TDestructionMessageMappingItemProvider extends TSourceTargetMessageMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TDestructionMessageMappingItemProvider(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); + + addTargetPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Target feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addTargetPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TDestructionMessageMapping_target_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_TDestructionMessageMapping_target_feature", "_UI_TDestructionMessageMapping_type"), + TemplatePackage.Literals.TDESTRUCTION_MESSAGE_MAPPING__TARGET, true, false, true, null, null, null)); + } + + /** + * This returns TDestructionMessageMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TDestructionMessageMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getText(Object object) { + String label = ((TDestructionMessageMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_TDestructionMessageMapping_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TExecutionMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TExecutionMappingItemProvider.java new file mode 100644 index 0000000000..b2c529ec52 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TExecutionMappingItemProvider.java @@ -0,0 +1,211 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.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.ViewerNotification; + +import org.eclipse.sirius.diagram.sequence.template.TExecutionMapping; +import org.eclipse.sirius.diagram.sequence.template.TemplateFactory; +import org.eclipse.sirius.diagram.sequence.template.TemplatePackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TExecutionMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TExecutionMappingItemProvider extends TAbstractMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TExecutionMappingItemProvider(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); + + addStartingEndFinderExpressionPropertyDescriptor(object); + addFinishingEndFinderExpressionPropertyDescriptor(object); + addRecursivePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Starting End Finder Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addStartingEndFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TExecutionMapping_startingEndFinderExpression_feature"), getString("_UI_TExecutionMapping_startingEndFinderExpression_description"), + TemplatePackage.Literals.TEXECUTION_MAPPING__STARTING_END_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), + null)); + } + + /** + * This adds a property descriptor for the Finishing End Finder Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addFinishingEndFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TExecutionMapping_finishingEndFinderExpression_feature"), getString("_UI_TExecutionMapping_finishingEndFinderExpression_description"), + TemplatePackage.Literals.TEXECUTION_MAPPING__FINISHING_END_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), + null)); + } + + /** + * This adds a property descriptor for the Recursive feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addRecursivePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TExecutionMapping_recursive_feature"), getString("_UI_TExecutionMapping_recursive_description"), TemplatePackage.Literals.TEXECUTION_MAPPING__RECURSIVE, true, false, + false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), 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(TemplatePackage.Literals.TEXECUTION_MAPPING__EXECUTION_MAPPINGS); + childrenFeatures.add(TemplatePackage.Literals.TEXECUTION_MAPPING__STYLE); + childrenFeatures.add(TemplatePackage.Literals.TEXECUTION_MAPPING__CONDITIONAL_STYLES); + } + 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 TExecutionMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TExecutionMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getText(Object object) { + String label = ((TExecutionMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_TExecutionMapping_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TExecutionMapping.class)) { + case TemplatePackage.TEXECUTION_MAPPING__STARTING_END_FINDER_EXPRESSION: + case TemplatePackage.TEXECUTION_MAPPING__FINISHING_END_FINDER_EXPRESSION: + case TemplatePackage.TEXECUTION_MAPPING__RECURSIVE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case TemplatePackage.TEXECUTION_MAPPING__EXECUTION_MAPPINGS: + case TemplatePackage.TEXECUTION_MAPPING__STYLE: + case TemplatePackage.TEXECUTION_MAPPING__CONDITIONAL_STYLES: + 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(TemplatePackage.Literals.TEXECUTION_MAPPING__EXECUTION_MAPPINGS, TemplateFactory.eINSTANCE.createTExecutionMapping())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TEXECUTION_MAPPING__STYLE, TemplateFactory.eINSTANCE.createTExecutionStyle())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TEXECUTION_MAPPING__CONDITIONAL_STYLES, TemplateFactory.eINSTANCE.createTConditionalExecutionStyle())); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TExecutionStyleItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TExecutionStyleItemProvider.java new file mode 100644 index 0000000000..01462d6fa7 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TExecutionStyleItemProvider.java @@ -0,0 +1,160 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.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.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.ViewerNotification; + +import org.eclipse.sirius.diagram.sequence.template.TExecutionStyle; +import org.eclipse.sirius.diagram.sequence.template.TemplatePackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TExecutionStyle} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TExecutionStyleItemProvider extends TTransformerItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TExecutionStyleItemProvider(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); + + addBorderSizeComputationExpressionPropertyDescriptor(object); + addBorderColorPropertyDescriptor(object); + addBackgroundColorPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Border Size Computation + * Expression feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addBorderSizeComputationExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TExecutionStyle_borderSizeComputationExpression_feature"), getString("_UI_TExecutionStyle_borderSizeComputationExpression_description"), + TemplatePackage.Literals.TEXECUTION_STYLE__BORDER_SIZE_COMPUTATION_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Border Color feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addBorderColorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TExecutionStyle_borderColor_feature"), getString("_UI_TExecutionStyle_borderColor_description"), TemplatePackage.Literals.TEXECUTION_STYLE__BORDER_COLOR, true, false, + true, null, getString("_UI_ColorPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Background Color feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addBackgroundColorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TExecutionStyle_backgroundColor_feature"), getString("_UI_TExecutionStyle_backgroundColor_description"), TemplatePackage.Literals.TEXECUTION_STYLE__BACKGROUND_COLOR, + true, false, true, null, getString("_UI_ColorPropertyCategory"), null)); + } + + /** + * This returns TExecutionStyle.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TExecutionStyle")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getText(Object object) { + String label = ((TExecutionStyle) object).getBorderSizeComputationExpression(); + return label == null || label.length() == 0 ? getString("_UI_TExecutionStyle_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TExecutionStyle.class)) { + case TemplatePackage.TEXECUTION_STYLE__BORDER_SIZE_COMPUTATION_EXPRESSION: + 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.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TLifelineMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TLifelineMappingItemProvider.java new file mode 100644 index 0000000000..ee95c96a60 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TLifelineMappingItemProvider.java @@ -0,0 +1,242 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.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.ViewerNotification; + +import org.eclipse.sirius.description.style.StyleFactory; +import org.eclipse.sirius.diagram.sequence.template.TLifelineMapping; +import org.eclipse.sirius.diagram.sequence.template.TemplateFactory; +import org.eclipse.sirius.diagram.sequence.template.TemplatePackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TLifelineMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TLifelineMappingItemProvider extends TAbstractMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TLifelineMappingItemProvider(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); + + addEolVisibleExpressionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Eol Visible Expression feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addEolVisibleExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TLifelineMapping_eolVisibleExpression_feature"), getString("_UI_TLifelineMapping_eolVisibleExpression_description"), + TemplatePackage.Literals.TLIFELINE_MAPPING__EOL_VISIBLE_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), 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(TemplatePackage.Literals.TLIFELINE_MAPPING__EXECUTION_MAPPINGS); + childrenFeatures.add(TemplatePackage.Literals.TLIFELINE_MAPPING__INSTANCE_ROLE_STYLE); + childrenFeatures.add(TemplatePackage.Literals.TLIFELINE_MAPPING__LIFELINE_STYLE); + childrenFeatures.add(TemplatePackage.Literals.TLIFELINE_MAPPING__END_OF_LIFE_STYLE); + childrenFeatures.add(TemplatePackage.Literals.TLIFELINE_MAPPING__CONDITIONAL_LIFE_LINE_STYLES); + } + 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 TLifelineMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TLifelineMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getText(Object object) { + String label = ((TLifelineMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_TLifelineMapping_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TLifelineMapping.class)) { + case TemplatePackage.TLIFELINE_MAPPING__EOL_VISIBLE_EXPRESSION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case TemplatePackage.TLIFELINE_MAPPING__EXECUTION_MAPPINGS: + case TemplatePackage.TLIFELINE_MAPPING__INSTANCE_ROLE_STYLE: + case TemplatePackage.TLIFELINE_MAPPING__LIFELINE_STYLE: + case TemplatePackage.TLIFELINE_MAPPING__END_OF_LIFE_STYLE: + case TemplatePackage.TLIFELINE_MAPPING__CONDITIONAL_LIFE_LINE_STYLES: + 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(TemplatePackage.Literals.TLIFELINE_MAPPING__EXECUTION_MAPPINGS, TemplateFactory.eINSTANCE.createTExecutionMapping())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__INSTANCE_ROLE_STYLE, StyleFactory.eINSTANCE.createCustomStyleDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__INSTANCE_ROLE_STYLE, StyleFactory.eINSTANCE.createSquareDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__INSTANCE_ROLE_STYLE, StyleFactory.eINSTANCE.createLozengeNodeDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__INSTANCE_ROLE_STYLE, StyleFactory.eINSTANCE.createEllipseNodeDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__INSTANCE_ROLE_STYLE, StyleFactory.eINSTANCE.createBundledImageDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__INSTANCE_ROLE_STYLE, StyleFactory.eINSTANCE.createNoteDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__INSTANCE_ROLE_STYLE, StyleFactory.eINSTANCE.createDotDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__INSTANCE_ROLE_STYLE, StyleFactory.eINSTANCE.createGaugeCompositeStyleDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__INSTANCE_ROLE_STYLE, StyleFactory.eINSTANCE.createWorkspaceImageDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__LIFELINE_STYLE, TemplateFactory.eINSTANCE.createTLifelineStyle())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__END_OF_LIFE_STYLE, StyleFactory.eINSTANCE.createCustomStyleDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__END_OF_LIFE_STYLE, StyleFactory.eINSTANCE.createSquareDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__END_OF_LIFE_STYLE, StyleFactory.eINSTANCE.createLozengeNodeDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__END_OF_LIFE_STYLE, StyleFactory.eINSTANCE.createEllipseNodeDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__END_OF_LIFE_STYLE, StyleFactory.eINSTANCE.createBundledImageDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__END_OF_LIFE_STYLE, StyleFactory.eINSTANCE.createNoteDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__END_OF_LIFE_STYLE, StyleFactory.eINSTANCE.createDotDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__END_OF_LIFE_STYLE, StyleFactory.eINSTANCE.createGaugeCompositeStyleDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__END_OF_LIFE_STYLE, StyleFactory.eINSTANCE.createWorkspaceImageDescription())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TLIFELINE_MAPPING__CONDITIONAL_LIFE_LINE_STYLES, TemplateFactory.eINSTANCE.createTConditionalLifelineStyle())); + } + + /** + * 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 == TemplatePackage.Literals.TLIFELINE_MAPPING__INSTANCE_ROLE_STYLE || childFeature == TemplatePackage.Literals.TLIFELINE_MAPPING__END_OF_LIFE_STYLE; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TLifelineStyleItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TLifelineStyleItemProvider.java new file mode 100644 index 0000000000..a202689ced --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TLifelineStyleItemProvider.java @@ -0,0 +1,147 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.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.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.ViewerNotification; + +import org.eclipse.sirius.diagram.sequence.template.TLifelineStyle; +import org.eclipse.sirius.diagram.sequence.template.TemplatePackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TLifelineStyle} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TLifelineStyleItemProvider extends TTransformerItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TLifelineStyleItemProvider(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); + + addLifelineWidthComputationExpressionPropertyDescriptor(object); + addLifelineColorPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Lifeline Width Computation + * Expression feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addLifelineWidthComputationExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TLifelineStyle_lifelineWidthComputationExpression_feature"), getString("_UI_TLifelineStyle_lifelineWidthComputationExpression_description"), + TemplatePackage.Literals.TLIFELINE_STYLE__LIFELINE_WIDTH_COMPUTATION_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Lifeline Color feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addLifelineColorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TLifelineStyle_lifelineColor_feature"), getString("_UI_TLifelineStyle_lifelineColor_description"), TemplatePackage.Literals.TLIFELINE_STYLE__LIFELINE_COLOR, true, + false, true, null, getString("_UI_ColorPropertyCategory"), null)); + } + + /** + * This returns TLifelineStyle.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TLifelineStyle")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getText(Object object) { + String label = ((TLifelineStyle) object).getLifelineWidthComputationExpression(); + return label == null || label.length() == 0 ? getString("_UI_TLifelineStyle_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TLifelineStyle.class)) { + case TemplatePackage.TLIFELINE_STYLE__LIFELINE_WIDTH_COMPUTATION_EXPRESSION: + 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.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TMessageExtremityItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TMessageExtremityItemProvider.java new file mode 100644 index 0000000000..3b3119bc87 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TMessageExtremityItemProvider.java @@ -0,0 +1,111 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; + +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TMessageExtremity} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TMessageExtremityItemProvider 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 TMessageExtremityItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_TMessageExtremity_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TMessageMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TMessageMappingItemProvider.java new file mode 100644 index 0000000000..4aa05cf223 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TMessageMappingItemProvider.java @@ -0,0 +1,182 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.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.ViewerNotification; + +import org.eclipse.sirius.diagram.sequence.template.TMessageMapping; +import org.eclipse.sirius.diagram.sequence.template.TemplateFactory; +import org.eclipse.sirius.diagram.sequence.template.TemplatePackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TMessageMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TMessageMappingItemProvider extends TAbstractMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TMessageMappingItemProvider(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); + + addSendingEndFinderExpressionPropertyDescriptor(object); + addReceivingEndFinderExpressionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Sending End Finder Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addSendingEndFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TMessageMapping_sendingEndFinderExpression_feature"), getString("_UI_TMessageMapping_sendingEndFinderExpression_description"), + TemplatePackage.Literals.TMESSAGE_MAPPING__SENDING_END_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), + null)); + } + + /** + * This adds a property descriptor for the Receiving End Finder Expression + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addReceivingEndFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TMessageMapping_receivingEndFinderExpression_feature"), getString("_UI_TMessageMapping_receivingEndFinderExpression_description"), + TemplatePackage.Literals.TMESSAGE_MAPPING__RECEIVING_END_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), + 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(TemplatePackage.Literals.TMESSAGE_MAPPING__STYLE); + childrenFeatures.add(TemplatePackage.Literals.TMESSAGE_MAPPING__CONDITIONAL_STYLE); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper + // feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((TMessageMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_TMessageMapping_type") : getString("_UI_TMessageMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TMessageMapping.class)) { + case TemplatePackage.TMESSAGE_MAPPING__SENDING_END_FINDER_EXPRESSION: + case TemplatePackage.TMESSAGE_MAPPING__RECEIVING_END_FINDER_EXPRESSION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case TemplatePackage.TMESSAGE_MAPPING__STYLE: + case TemplatePackage.TMESSAGE_MAPPING__CONDITIONAL_STYLE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s + * describing the children that can be created under this object. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TMESSAGE_MAPPING__STYLE, TemplateFactory.eINSTANCE.createTMessageStyle())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TMESSAGE_MAPPING__CONDITIONAL_STYLE, TemplateFactory.eINSTANCE.createTConditionalMessageStyle())); + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TMessageStyleItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TMessageStyleItemProvider.java new file mode 100644 index 0000000000..add6e76484 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TMessageStyleItemProvider.java @@ -0,0 +1,190 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.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.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.ViewerNotification; + +import org.eclipse.sirius.LineStyle; +import org.eclipse.sirius.diagram.sequence.template.TMessageStyle; +import org.eclipse.sirius.diagram.sequence.template.TemplatePackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TMessageStyle} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TMessageStyleItemProvider extends TTransformerItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TMessageStyleItemProvider(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); + + addStrokeColorPropertyDescriptor(object); + addLineStylePropertyDescriptor(object); + addSourceArrowPropertyDescriptor(object); + addTargetArrowPropertyDescriptor(object); + addLabelExpressionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Stroke Color feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addStrokeColorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TMessageStyle_strokeColor_feature"), getString("_UI_TMessageStyle_strokeColor_description"), TemplatePackage.Literals.TMESSAGE_STYLE__STROKE_COLOR, true, false, true, + null, getString("_UI_ColorPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Line Style feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addLineStylePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TMessageStyle_lineStyle_feature"), getString("_UI_TMessageStyle_lineStyle_description"), TemplatePackage.Literals.TMESSAGE_STYLE__LINE_STYLE, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Source Arrow feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addSourceArrowPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TMessageStyle_sourceArrow_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TMessageStyle_sourceArrow_feature", "_UI_TMessageStyle_type"), + TemplatePackage.Literals.TMESSAGE_STYLE__SOURCE_ARROW, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Target Arrow feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addTargetArrowPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TMessageStyle_targetArrow_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TMessageStyle_targetArrow_feature", "_UI_TMessageStyle_type"), + TemplatePackage.Literals.TMESSAGE_STYLE__TARGET_ARROW, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Label Expression feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addLabelExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TMessageStyle_labelExpression_feature"), getString("_UI_TMessageStyle_labelExpression_description"), TemplatePackage.Literals.TMESSAGE_STYLE__LABEL_EXPRESSION, true, + false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_LabelPropertyCategory"), null)); + } + + /** + * This returns TMessageStyle.gif. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TMessageStyle")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getText(Object object) { + LineStyle labelValue = ((TMessageStyle) object).getLineStyle(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? getString("_UI_TMessageStyle_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TMessageStyle.class)) { + case TemplatePackage.TMESSAGE_STYLE__LINE_STYLE: + case TemplatePackage.TMESSAGE_STYLE__SOURCE_ARROW: + case TemplatePackage.TMESSAGE_STYLE__TARGET_ARROW: + case TemplatePackage.TMESSAGE_STYLE__LABEL_EXPRESSION: + 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.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TReturnMessageMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TReturnMessageMappingItemProvider.java new file mode 100644 index 0000000000..1bb940379e --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TReturnMessageMappingItemProvider.java @@ -0,0 +1,147 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.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.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.ViewerNotification; + +import org.eclipse.sirius.diagram.sequence.template.TReturnMessageMapping; +import org.eclipse.sirius.diagram.sequence.template.TemplatePackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TReturnMessageMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TReturnMessageMappingItemProvider extends TMessageMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TReturnMessageMappingItemProvider(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); + + addInvocationMappingPropertyDescriptor(object); + addInvocationMessageFinderExpressionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Invocation Mapping feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addInvocationMappingPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TReturnMessageMapping_invocationMapping_feature"), getString("_UI_TReturnMessageMapping_invocationMapping_description"), + TemplatePackage.Literals.TRETURN_MESSAGE_MAPPING__INVOCATION_MAPPING, true, false, true, null, getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Invocation Message Finder + * Expression feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addInvocationMessageFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TReturnMessageMapping_invocationMessageFinderExpression_feature"), getString("_UI_TReturnMessageMapping_invocationMessageFinderExpression_description"), + TemplatePackage.Literals.TRETURN_MESSAGE_MAPPING__INVOCATION_MESSAGE_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This returns TReturnMessageMapping.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TReturnMessageMapping")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getText(Object object) { + String label = ((TReturnMessageMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_TReturnMessageMapping_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TReturnMessageMapping.class)) { + case TemplatePackage.TRETURN_MESSAGE_MAPPING__INVOCATION_MESSAGE_FINDER_EXPRESSION: + 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.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TSequenceDiagramItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TSequenceDiagramItemProvider.java new file mode 100644 index 0000000000..17959d6383 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TSequenceDiagramItemProvider.java @@ -0,0 +1,214 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.sirius.description.provider.RepresentationTemplateItemProvider; +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.template.TSequenceDiagram; +import org.eclipse.sirius.diagram.sequence.template.TemplateFactory; +import org.eclipse.sirius.diagram.sequence.template.TemplatePackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TSequenceDiagram} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TSequenceDiagramItemProvider extends RepresentationTemplateItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TSequenceDiagramItemProvider(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); + + addDomainClassPropertyDescriptor(object); + addEndsOrderingPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Ends Ordering feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addEndsOrderingPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TSequenceDiagram_endsOrdering_feature"), getString("_UI_TSequenceDiagram_endsOrdering_description"), TemplatePackage.Literals.TSEQUENCE_DIAGRAM__ENDS_ORDERING, true, + false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Domain Class feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addDomainClassPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TSequenceDiagram_domainClass_feature"), getString("_UI_TSequenceDiagram_domainClass_description"), TemplatePackage.Literals.TSEQUENCE_DIAGRAM__DOMAIN_CLASS, true, + false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), 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 --> + * + * @not-generated changing the order of the get children feature to have a + * more meaningful result : generated at the bottom,specified + * at the top. + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(0, TemplatePackage.Literals.TSEQUENCE_DIAGRAM__LIFELINE_MAPPINGS); + childrenFeatures.add(0, TemplatePackage.Literals.TSEQUENCE_DIAGRAM__MESSAGE_MAPPINGS); + } + 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 TSequenceDiagram.gif. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TSequenceDiagram")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @not-generated + */ + @Override + public String getText(Object object) { + String label = ((TSequenceDiagram) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_TSequenceDiagram_type") : label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TSequenceDiagram.class)) { + case TemplatePackage.TSEQUENCE_DIAGRAM__OUTPUTS: + case TemplatePackage.TSEQUENCE_DIAGRAM__DOMAIN_CLASS: + case TemplatePackage.TSEQUENCE_DIAGRAM__ENDS_ORDERING: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case TemplatePackage.TSEQUENCE_DIAGRAM__LIFELINE_MAPPINGS: + case TemplatePackage.TSEQUENCE_DIAGRAM__MESSAGE_MAPPINGS: + 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(TemplatePackage.Literals.TSEQUENCE_DIAGRAM__LIFELINE_MAPPINGS, TemplateFactory.eINSTANCE.createTLifelineMapping())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TSEQUENCE_DIAGRAM__MESSAGE_MAPPINGS, TemplateFactory.eINSTANCE.createTBasicMessageMapping())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TSEQUENCE_DIAGRAM__MESSAGE_MAPPINGS, TemplateFactory.eINSTANCE.createTReturnMessageMapping())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TSEQUENCE_DIAGRAM__MESSAGE_MAPPINGS, TemplateFactory.eINSTANCE.createTCreationMessageMapping())); + + newChildDescriptors.add(createChildParameter(TemplatePackage.Literals.TSEQUENCE_DIAGRAM__MESSAGE_MAPPINGS, TemplateFactory.eINSTANCE.createTDestructionMessageMapping())); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TSourceTargetMessageMappingItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TSourceTargetMessageMappingItemProvider.java new file mode 100644 index 0000000000..9bd6d9f519 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TSourceTargetMessageMappingItemProvider.java @@ -0,0 +1,167 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.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.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.ViewerNotification; + +import org.eclipse.sirius.diagram.sequence.template.TSourceTargetMessageMapping; +import org.eclipse.sirius.diagram.sequence.template.TemplatePackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TSourceTargetMessageMapping} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TSourceTargetMessageMappingItemProvider extends TMessageMappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, + IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TSourceTargetMessageMappingItemProvider(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); + + addSourcePropertyDescriptor(object); + addSourceFinderExpressionPropertyDescriptor(object); + addTargetFinderExpressionPropertyDescriptor(object); + addUseDomainElementPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Source feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addSourcePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TSourceTargetMessageMapping_source_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_TSourceTargetMessageMapping_source_feature", "_UI_TSourceTargetMessageMapping_type"), + TemplatePackage.Literals.TSOURCE_TARGET_MESSAGE_MAPPING__SOURCE, true, false, true, null, getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Source Finder Expression feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addSourceFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TSourceTargetMessageMapping_sourceFinderExpression_feature"), getString("_UI_TSourceTargetMessageMapping_sourceFinderExpression_description"), + TemplatePackage.Literals.TSOURCE_TARGET_MESSAGE_MAPPING__SOURCE_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Target Finder Expression feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addTargetFinderExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TSourceTargetMessageMapping_targetFinderExpression_feature"), getString("_UI_TSourceTargetMessageMapping_targetFinderExpression_description"), + TemplatePackage.Literals.TSOURCE_TARGET_MESSAGE_MAPPING__TARGET_FINDER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + getString("_UI_GeneralPropertyCategory"), null)); + } + + /** + * This adds a property descriptor for the Use Domain Element feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addUseDomainElementPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TSourceTargetMessageMapping_useDomainElement_feature"), getString("_UI_TSourceTargetMessageMapping_useDomainElement_description"), + TemplatePackage.Literals.TSOURCE_TARGET_MESSAGE_MAPPING__USE_DOMAIN_ELEMENT, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, getString("_UI_GeneralPropertyCategory"), + 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 = ((TSourceTargetMessageMapping) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_TSourceTargetMessageMapping_type") : getString("_UI_TSourceTargetMessageMapping_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TSourceTargetMessageMapping.class)) { + case TemplatePackage.TSOURCE_TARGET_MESSAGE_MAPPING__SOURCE_FINDER_EXPRESSION: + case TemplatePackage.TSOURCE_TARGET_MESSAGE_MAPPING__TARGET_FINDER_EXPRESSION: + case TemplatePackage.TSOURCE_TARGET_MESSAGE_MAPPING__USE_DOMAIN_ELEMENT: + 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.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TTransformerItemProvider.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TTransformerItemProvider.java new file mode 100644 index 0000000000..b425ddf7d8 --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TTransformerItemProvider.java @@ -0,0 +1,131 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.sirius.diagram.sequence.description.provider.SequenceEditPlugin; +import org.eclipse.sirius.diagram.sequence.template.TTransformer; +import org.eclipse.sirius.diagram.sequence.template.TemplatePackage; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TTransformer} object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TTransformerItemProvider 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 TTransformerItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns TTransformer.gif. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TTransformer")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_TTransformer_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TTransformer.class)) { + case TemplatePackage.TTRANSFORMER__OUTPUTS: + 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 SequenceEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TemplateItemProviderAdapterFactory.java b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TemplateItemProviderAdapterFactory.java new file mode 100644 index 0000000000..3cba0cc47f --- /dev/null +++ b/plugins/org.eclipse.sirius.diagram.sequence.edit/src-gen/org/eclipse/sirius/diagram/sequence/template/provider/TemplateItemProviderAdapterFactory.java @@ -0,0 +1,589 @@ +/******************************************************************************* + * Copyright (c) 2007-2013 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.sequence.template.provider; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.sirius.diagram.sequence.template.util.TemplateAdapterFactory; + +/** + * This is the factory that is used to provide the interfaces needed to support + * Viewers. The adapters generated by this factory convert EMF adapter + * notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The + * adapters also support Eclipse property sheets. Note that most of the adapters + * are shared among multiple instances. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ +public class TemplateItemProviderAdapterFactory extends TemplateAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this + * adapter factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement + * {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by + * {@link #isFactoryForType isFactoryForType}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected Collection<Object> supportedTypes = new ArrayList<Object>(); + + /** + * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + public TemplateItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.template.TSequenceDiagram} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TSequenceDiagramItemProvider tSequenceDiagramItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TSequenceDiagram}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTSequenceDiagramAdapter() { + if (tSequenceDiagramItemProvider == null) { + tSequenceDiagramItemProvider = new TSequenceDiagramItemProvider(this); + } + + return tSequenceDiagramItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.template.TLifelineMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TLifelineMappingItemProvider tLifelineMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TLifelineMapping}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTLifelineMappingAdapter() { + if (tLifelineMappingItemProvider == null) { + tLifelineMappingItemProvider = new TLifelineMappingItemProvider(this); + } + + return tLifelineMappingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.template.TLifelineStyle} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TLifelineStyleItemProvider tLifelineStyleItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TLifelineStyle}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTLifelineStyleAdapter() { + if (tLifelineStyleItemProvider == null) { + tLifelineStyleItemProvider = new TLifelineStyleItemProvider(this); + } + + return tLifelineStyleItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.template.TConditionalLifelineStyle} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TConditionalLifelineStyleItemProvider tConditionalLifelineStyleItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TConditionalLifelineStyle} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTConditionalLifelineStyleAdapter() { + if (tConditionalLifelineStyleItemProvider == null) { + tConditionalLifelineStyleItemProvider = new TConditionalLifelineStyleItemProvider(this); + } + + return tConditionalLifelineStyleItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.template.TTransformer} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TTransformerItemProvider tTransformerItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TTransformer}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTTransformerAdapter() { + if (tTransformerItemProvider == null) { + tTransformerItemProvider = new TTransformerItemProvider(this); + } + + return tTransformerItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.template.TExecutionMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TExecutionMappingItemProvider tExecutionMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TExecutionMapping} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTExecutionMappingAdapter() { + if (tExecutionMappingItemProvider == null) { + tExecutionMappingItemProvider = new TExecutionMappingItemProvider(this); + } + + return tExecutionMappingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.template.TExecutionStyle} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TExecutionStyleItemProvider tExecutionStyleItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TExecutionStyle}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTExecutionStyleAdapter() { + if (tExecutionStyleItemProvider == null) { + tExecutionStyleItemProvider = new TExecutionStyleItemProvider(this); + } + + return tExecutionStyleItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.template.TConditionalExecutionStyle} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TConditionalExecutionStyleItemProvider tConditionalExecutionStyleItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TConditionalExecutionStyle} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTConditionalExecutionStyleAdapter() { + if (tConditionalExecutionStyleItemProvider == null) { + tConditionalExecutionStyleItemProvider = new TConditionalExecutionStyleItemProvider(this); + } + + return tConditionalExecutionStyleItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.template.TMessageStyle} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TMessageStyleItemProvider tMessageStyleItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TMessageStyle}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTMessageStyleAdapter() { + if (tMessageStyleItemProvider == null) { + tMessageStyleItemProvider = new TMessageStyleItemProvider(this); + } + + return tMessageStyleItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.template.TConditionalMessageStyle} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TConditionalMessageStyleItemProvider tConditionalMessageStyleItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TConditionalMessageStyle} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTConditionalMessageStyleAdapter() { + if (tConditionalMessageStyleItemProvider == null) { + tConditionalMessageStyleItemProvider = new TConditionalMessageStyleItemProvider(this); + } + + return tConditionalMessageStyleItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.template.TBasicMessageMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TBasicMessageMappingItemProvider tBasicMessageMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TBasicMessageMapping} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTBasicMessageMappingAdapter() { + if (tBasicMessageMappingItemProvider == null) { + tBasicMessageMappingItemProvider = new TBasicMessageMappingItemProvider(this); + } + + return tBasicMessageMappingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.template.TReturnMessageMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TReturnMessageMappingItemProvider tReturnMessageMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TReturnMessageMapping} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTReturnMessageMappingAdapter() { + if (tReturnMessageMappingItemProvider == null) { + tReturnMessageMappingItemProvider = new TReturnMessageMappingItemProvider(this); + } + + return tReturnMessageMappingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.template.TCreationMessageMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TCreationMessageMappingItemProvider tCreationMessageMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TCreationMessageMapping} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTCreationMessageMappingAdapter() { + if (tCreationMessageMappingItemProvider == null) { + tCreationMessageMappingItemProvider = new TCreationMessageMappingItemProvider(this); + } + + return tCreationMessageMappingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.template.TDestructionMessageMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TDestructionMessageMappingItemProvider tDestructionMessageMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TDestructionMessageMapping} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTDestructionMessageMappingAdapter() { + if (tDestructionMessageMappingItemProvider == null) { + tDestructionMessageMappingItemProvider = new TDestructionMessageMappingItemProvider(this); + } + + return tDestructionMessageMappingItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.diagram.sequence.template.TAbstractMapping} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TAbstractMappingItemProvider tAbstractMappingItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.diagram.sequence.template.TAbstractMapping}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTAbstractMappingAdapter() { + if (tAbstractMappingItemProvider == null) { + tAbstractMappingItemProvider = new TAbstractMappingItemProvider(this); + } + + return tAbstractMappingItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the + * adapter. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to + * {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void dispose() { + if (tTransformerItemProvider != null) + tTransformerItemProvider.dispose(); + if (tAbstractMappingItemProvider != null) + tAbstractMappingItemProvider.dispose(); + if (tSequenceDiagramItemProvider != null) + tSequenceDiagramItemProvider.dispose(); + if (tLifelineMappingItemProvider != null) + tLifelineMappingItemProvider.dispose(); + if (tLifelineStyleItemProvider != null) + tLifelineStyleItemProvider.dispose(); + if (tConditionalLifelineStyleItemProvider != null) + tConditionalLifelineStyleItemProvider.dispose(); + if (tExecutionMappingItemProvider != null) + tExecutionMappingItemProvider.dispose(); + if (tExecutionStyleItemProvider != null) + tExecutionStyleItemProvider.dispose(); + if (tConditionalExecutionStyleItemProvider != null) + tConditionalExecutionStyleItemProvider.dispose(); + if (tMessageStyleItemProvider != null) + tMessageStyleItemProvider.dispose(); + if (tConditionalMessageStyleItemProvider != null) + tConditionalMessageStyleItemProvider.dispose(); + if (tBasicMessageMappingItemProvider != null) + tBasicMessageMappingItemProvider.dispose(); + if (tReturnMessageMappingItemProvider != null) + tReturnMessageMappingItemProvider.dispose(); + if (tCreationMessageMappingItemProvider != null) + tCreationMessageMappingItemProvider.dispose(); + if (tDestructionMessageMappingItemProvider != null) + tDestructionMessageMappingItemProvider.dispose(); + } + +} |