From e6fa20517f79fe3e3f1fa57ad8f926e11d1e599a Mon Sep 17 00:00:00 2001 From: Niko Huber <niko.huber@gmail.com> Date: Mon, 15 Jun 2015 20:17:52 +0200 Subject: [PATCH] fix for issue #7 in editors (linking resource cannot connect containers) --- .../plugin.properties | 4 + ...tiveResourceSpecificationItemProvider.java | 170 +- ...onfigurationSpecificationItemProvider.java | 98 +- ...onfigurationSpecificationItemProvider.java | 136 +- ...esourceConfigurationModelItemProvider.java | 112 + ...kingResourceSpecificationItemProvider.java | 238 +- ...OfParallelProcessingUnitsItemProvider.java | 158 +- .../PassiveResourceCapacityItemProvider.java | 158 +- ...siveResourceSpecificationItemProvider.java | 192 +- ...singResourceSpecificationItemProvider.java | 328 +- ...nfigurationItemProviderAdapterFactory.java | 360 +-- ...iteHardwareInfrastructureItemProvider.java | 186 +- .../ComputingInfrastructureItemProvider.java | 98 +- .../provider/ContainerItemProvider.java | 220 +- .../provider/DataCenterItemProvider.java | 190 +- .../DistributedDataCenterItemProvider.java | 166 +- .../HardwareInfrastructureItemProvider.java | 104 + .../NetworkingInfrastructureItemProvider.java | 98 +- .../provider/ResourcelandscapeEditPlugin.java | 90 +- ...celandscapeItemProviderAdapterFactory.java | 360 +-- .../RuntimeEnvironmentItemProvider.java | 146 +- .../StorageInfrastructureItemProvider.java | 98 +- .../plugin.xml | 79 + ...urceconfigurationActionBarContributor.java | 560 ++-- .../ResourceconfigurationEditor.java | 2775 ++++++++-------- .../ResourceconfigurationModelWizard.java | 793 +++-- ...ResourcelandscapeActionBarContributor.java | 560 ++-- .../presentation/ResourcelandscapeEditor.java | 2778 +++++++++-------- .../ResourcelandscapeEditorPlugin.java | 92 +- .../ResourcelandscapeModelWizard.java | 792 ++--- .../model/resourceconfiguration.ecore | 222 +- .../resourceconfiguration.ecore.oclinecore | 3 +- .../ActiveResourceSpecification.java | 40 +- .../CustomConfigurationSpecification.java | 34 +- .../LinkingResourceSpecification.java | 111 +- .../NumberOfParallelProcessingUnits.java | 60 +- .../PassiveResourceCapacity.java | 28 +- .../PassiveResourceSpecification.java | 56 +- .../ProcessingResourceSpecification.java | 154 +- .../ResourceconfigurationFactory.java | 88 +- .../ResourceconfigurationPackage.java | 1208 +++---- .../SchedulingPolicy.java | 308 +- .../impl/ActiveResourceSpecificationImpl.java | 220 +- .../impl/ConfigurationSpecificationImpl.java | 20 +- .../CustomConfigurationSpecificationImpl.java | 162 +- .../CustomResourceConfigurationModelImpl.java | 20 +- .../LinkingResourceSpecificationImpl.java | 447 +-- .../NumberOfParallelProcessingUnitsImpl.java | 302 +- .../impl/PassiveResourceCapacityImpl.java | 168 +- .../PassiveResourceSpecificationImpl.java | 274 +- .../ProcessingResourceSpecificationImpl.java | 570 ++-- .../ResourceconfigurationFactoryImpl.java | 254 +- .../ResourceconfigurationPackageImpl.java | 701 ++--- .../ResourceconfigurationAdapterFactory.java | 410 +-- .../util/ResourceconfigurationSwitch.java | 476 +-- 55 files changed, 9405 insertions(+), 9070 deletions(-) create mode 100644 edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/CustomResourceConfigurationModelItemProvider.java create mode 100644 edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/HardwareInfrastructureItemProvider.java diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/plugin.properties b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/plugin.properties index 1f319b0e..46bb7e34 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/plugin.properties +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/plugin.properties @@ -88,3 +88,7 @@ _UI_ContainerTemplate_referringContainers_feature = Referring Containers _UI_ResourcePoolConfiguration_type = Resource Pool Configuration _UI_ResourcePoolConfiguration_resourcePoolConfig_feature = Resource Pool Config _UI_ContainerTemplate_runningOn_feature = Running On +_UI_HardwareInfrastructure_type = Hardware Infrastructure +_UI_CustomResourceConfigurationModel_type = Custom Resource Configuration Model +_UI_HardwareInfrastructure_partOf_feature = Part Of +_UI_LinkingResourceSpecification_connectedContainer_feature = Connected Container diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/ActiveResourceSpecificationItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/ActiveResourceSpecificationItemProvider.java index d9e9057a..27427f97 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/ActiveResourceSpecificationItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/ActiveResourceSpecificationItemProvider.java @@ -31,134 +31,128 @@ import org.eclipse.emf.edit.provider.ViewerNotification; * @generated */ public class ActiveResourceSpecificationItemProvider - extends ConfigurationSpecificationItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends ConfigurationSpecificationItemProvider { /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ActiveResourceSpecificationItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - } - return itemPropertyDescriptors; - } + } + 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 --> + * 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 - */ + * @generated + */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { - if (childrenFeatures == null) { - super.getChildrenFeatures(object); - childrenFeatures.add(ResourceconfigurationPackage.Literals.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS); - childrenFeatures.add(ResourceconfigurationPackage.Literals.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES); - } - return childrenFeatures; - } + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ResourceconfigurationPackage.Literals.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS); + childrenFeatures.add(ResourceconfigurationPackage.Literals.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES); + } + return childrenFeatures; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @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. + // 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); - } + return super.getChildFeature(object, child); + } /** - * This returns ActiveResourceSpecification.gif. - * <!-- begin-user-doc --> + * This returns ActiveResourceSpecification.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/ActiveResourceSpecification")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/ActiveResourceSpecification")); + } /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((ActiveResourceSpecification)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_ActiveResourceSpecification_type") : - getString("_UI_ActiveResourceSpecification_type") + " " + label; - } + String label = ((ActiveResourceSpecification)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ActiveResourceSpecification_type") : + getString("_UI_ActiveResourceSpecification_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 --> + * 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 - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); + updateChildren(notification); - switch (notification.getFeatureID(ActiveResourceSpecification.class)) { - case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS: - case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(ActiveResourceSpecification.class)) { + case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS: + case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES: + 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 --> + * 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 - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - - newChildDescriptors.add - (createChildParameter - (ResourceconfigurationPackage.Literals.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS, - ResourceconfigurationFactory.eINSTANCE.createProcessingResourceSpecification())); - - newChildDescriptors.add - (createChildParameter - (ResourceconfigurationPackage.Literals.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES, - ResourceconfigurationFactory.eINSTANCE.createLinkingResourceSpecification())); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ResourceconfigurationPackage.Literals.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS, + ResourceconfigurationFactory.eINSTANCE.createProcessingResourceSpecification())); + + newChildDescriptors.add + (createChildParameter + (ResourceconfigurationPackage.Literals.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES, + ResourceconfigurationFactory.eINSTANCE.createLinkingResourceSpecification())); + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/ConfigurationSpecificationItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/ConfigurationSpecificationItemProvider.java index 54ea1a02..e7f696fb 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/ConfigurationSpecificationItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/ConfigurationSpecificationItemProvider.java @@ -32,86 +32,80 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider; * @generated */ public class ConfigurationSpecificationItemProvider - extends EntityItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends EntityItemProvider { /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ConfigurationSpecificationItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - } - return itemPropertyDescriptors; - } + } + return itemPropertyDescriptors; + } /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((ConfigurationSpecification)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_ConfigurationSpecification_type") : - getString("_UI_ConfigurationSpecification_type") + " " + label; - } + String label = ((ConfigurationSpecification)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ConfigurationSpecification_type") : + getString("_UI_ConfigurationSpecification_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 --> + * 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 - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(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 --> + * 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 - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public ResourceLocator getResourceLocator() { - return ResourcelandscapeEditPlugin.INSTANCE; - } + return ResourcelandscapeEditPlugin.INSTANCE; + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/CustomConfigurationSpecificationItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/CustomConfigurationSpecificationItemProvider.java index 566f7bd1..de83e2c5 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/CustomConfigurationSpecificationItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/CustomConfigurationSpecificationItemProvider.java @@ -28,109 +28,103 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider; * @generated */ public class CustomConfigurationSpecificationItemProvider - extends ConfigurationSpecificationItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends ConfigurationSpecificationItemProvider { /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public CustomConfigurationSpecificationItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addNonFunctionalPropertiesPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addNonFunctionalPropertiesPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Non Functional Properties feature. - * <!-- begin-user-doc --> + * This adds a property descriptor for the Non Functional Properties feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void addNonFunctionalPropertiesPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_CustomConfigurationSpecification_nonFunctionalProperties_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_CustomConfigurationSpecification_nonFunctionalProperties_feature", "_UI_CustomConfigurationSpecification_type"), - ResourceconfigurationPackage.Literals.CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES, - true, - false, - true, - null, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_CustomConfigurationSpecification_nonFunctionalProperties_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_CustomConfigurationSpecification_nonFunctionalProperties_feature", "_UI_CustomConfigurationSpecification_type"), + ResourceconfigurationPackage.Literals.CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES, + true, + false, + true, + null, + null, + null)); + } /** - * This returns CustomConfigurationSpecification.gif. - * <!-- begin-user-doc --> + * This returns CustomConfigurationSpecification.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/CustomConfigurationSpecification")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/CustomConfigurationSpecification")); + } /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((CustomConfigurationSpecification)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_CustomConfigurationSpecification_type") : - getString("_UI_CustomConfigurationSpecification_type") + " " + label; - } + String label = ((CustomConfigurationSpecification)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_CustomConfigurationSpecification_type") : + getString("_UI_CustomConfigurationSpecification_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 --> + * 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 - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(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 --> + * 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 - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/CustomResourceConfigurationModelItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/CustomResourceConfigurationModelItemProvider.java new file mode 100644 index 00000000..075892c9 --- /dev/null +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/CustomResourceConfigurationModelItemProvider.java @@ -0,0 +1,112 @@ +/** + * Copyright 2009-2012, Descartes Research Group, SDQ, IPD, KIT + */ +package edu.kit.ipd.descartes.mm.resourceconfiguration.provider; + + +import edu.kit.ipd.descartes.mm.resourcelandscape.provider.ResourcelandscapeEditPlugin; + +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 edu.kit.ipd.descartes.mm.resourceconfiguration.CustomResourceConfigurationModel} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ +public class CustomResourceConfigurationModelItemProvider + 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 CustomResourceConfigurationModelItemProvider(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_CustomResourceConfigurationModel_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 ResourcelandscapeEditPlugin.INSTANCE; + } + +} diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/LinkingResourceSpecificationItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/LinkingResourceSpecificationItemProvider.java index c3127cc0..5b165bbe 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/LinkingResourceSpecificationItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/LinkingResourceSpecificationItemProvider.java @@ -36,173 +36,167 @@ import org.eclipse.emf.edit.provider.ViewerNotification; * @generated */ public class LinkingResourceSpecificationItemProvider - extends EntityItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends EntityItemProvider { /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public LinkingResourceSpecificationItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addConnectedResourceSpecificationsPropertyDescriptor(object); - addBandwidthPropertyDescriptor(object); - addCommunicationLinkResourceTypePropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addConnectedContainerPropertyDescriptor(object); + addBandwidthPropertyDescriptor(object); + addCommunicationLinkResourceTypePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Connected Resource Specifications feature. - * <!-- begin-user-doc --> + * This adds a property descriptor for the Connected Container feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ - protected void addConnectedResourceSpecificationsPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_LinkingResourceSpecification_connectedResourceSpecifications_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_LinkingResourceSpecification_connectedResourceSpecifications_feature", "_UI_LinkingResourceSpecification_type"), - ResourceconfigurationPackage.Literals.LINKING_RESOURCE_SPECIFICATION__CONNECTED_RESOURCE_SPECIFICATIONS, - true, - false, - true, - null, - null, - null)); - } + * @generated + */ + protected void addConnectedContainerPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_LinkingResourceSpecification_connectedContainer_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_LinkingResourceSpecification_connectedContainer_feature", "_UI_LinkingResourceSpecification_type"), + ResourceconfigurationPackage.Literals.LINKING_RESOURCE_SPECIFICATION__CONNECTED_CONTAINER, + true, + false, + true, + null, + null, + null)); + } /** - * This adds a property descriptor for the Bandwidth feature. - * <!-- begin-user-doc --> + * This adds a property descriptor for the Bandwidth feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void addBandwidthPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_LinkingResourceSpecification_bandwidth_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_LinkingResourceSpecification_bandwidth_feature", "_UI_LinkingResourceSpecification_type"), - ResourceconfigurationPackage.Literals.LINKING_RESOURCE_SPECIFICATION__BANDWIDTH, - true, - false, - false, - ItemPropertyDescriptor.REAL_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_LinkingResourceSpecification_bandwidth_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_LinkingResourceSpecification_bandwidth_feature", "_UI_LinkingResourceSpecification_type"), + ResourceconfigurationPackage.Literals.LINKING_RESOURCE_SPECIFICATION__BANDWIDTH, + true, + false, + false, + ItemPropertyDescriptor.REAL_VALUE_IMAGE, + null, + null)); + } /** - * This adds a property descriptor for the Communication Link Resource Type feature. - * <!-- begin-user-doc --> + * This adds a property descriptor for the Communication Link Resource Type feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void addCommunicationLinkResourceTypePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_LinkingResourceSpecification_communicationLinkResourceType_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_LinkingResourceSpecification_communicationLinkResourceType_feature", "_UI_LinkingResourceSpecification_type"), - ResourceconfigurationPackage.Literals.LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE, - true, - false, - false, - null, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_LinkingResourceSpecification_communicationLinkResourceType_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_LinkingResourceSpecification_communicationLinkResourceType_feature", "_UI_LinkingResourceSpecification_type"), + ResourceconfigurationPackage.Literals.LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE, + true, + false, + false, + null, + null, + null)); + } /** - * This returns LinkingResourceSpecification.gif. - * <!-- begin-user-doc --> + * This returns LinkingResourceSpecification.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/LinkingResourceSpecification")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/LinkingResourceSpecification")); + } /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((LinkingResourceSpecification)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_LinkingResourceSpecification_type") : - getString("_UI_LinkingResourceSpecification_type") + " " + label; - } + String label = ((LinkingResourceSpecification)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_LinkingResourceSpecification_type") : + getString("_UI_LinkingResourceSpecification_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 --> + * 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 - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); + updateChildren(notification); - switch (notification.getFeatureID(LinkingResourceSpecification.class)) { - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__BANDWIDTH: - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(LinkingResourceSpecification.class)) { + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__BANDWIDTH: + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE: + 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 --> + * 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 - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public ResourceLocator getResourceLocator() { - return ResourcelandscapeEditPlugin.INSTANCE; - } + return ResourcelandscapeEditPlugin.INSTANCE; + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/NumberOfParallelProcessingUnitsItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/NumberOfParallelProcessingUnitsItemProvider.java index ccad46cd..fec947e9 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/NumberOfParallelProcessingUnitsItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/NumberOfParallelProcessingUnitsItemProvider.java @@ -36,126 +36,120 @@ import org.eclipse.emf.edit.provider.ViewerNotification; * @generated */ public class NumberOfParallelProcessingUnitsItemProvider - extends AdaptableEntityItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends AdaptableEntityItemProvider { /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public NumberOfParallelProcessingUnitsItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addNumberPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addNumberPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Number feature. - * <!-- begin-user-doc --> + * This adds a property descriptor for the Number feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void addNumberPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_NumberOfParallelProcessingUnits_number_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_NumberOfParallelProcessingUnits_number_feature", "_UI_NumberOfParallelProcessingUnits_type"), - ResourceconfigurationPackage.Literals.NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER, - true, - false, - false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_NumberOfParallelProcessingUnits_number_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_NumberOfParallelProcessingUnits_number_feature", "_UI_NumberOfParallelProcessingUnits_type"), + ResourceconfigurationPackage.Literals.NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } /** - * This returns NumberOfParallelProcessingUnits.gif. - * <!-- begin-user-doc --> + * This returns NumberOfParallelProcessingUnits.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/NumberOfParallelProcessingUnits")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/NumberOfParallelProcessingUnits")); + } /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((NumberOfParallelProcessingUnits)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_NumberOfParallelProcessingUnits_type") : - getString("_UI_NumberOfParallelProcessingUnits_type") + " " + label; - } + String label = ((NumberOfParallelProcessingUnits)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_NumberOfParallelProcessingUnits_type") : + getString("_UI_NumberOfParallelProcessingUnits_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 --> + * 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 - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); + updateChildren(notification); - switch (notification.getFeatureID(NumberOfParallelProcessingUnits.class)) { - case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(NumberOfParallelProcessingUnits.class)) { + case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER: + 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 --> + * 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 - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public ResourceLocator getResourceLocator() { - return ResourcelandscapeEditPlugin.INSTANCE; - } + return ResourcelandscapeEditPlugin.INSTANCE; + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/PassiveResourceCapacityItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/PassiveResourceCapacityItemProvider.java index e07a311a..0ed0ae2d 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/PassiveResourceCapacityItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/PassiveResourceCapacityItemProvider.java @@ -36,126 +36,120 @@ import org.eclipse.emf.edit.provider.ViewerNotification; * @generated */ public class PassiveResourceCapacityItemProvider - extends AdaptableEntityItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends AdaptableEntityItemProvider { /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public PassiveResourceCapacityItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addCapacityPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addCapacityPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Capacity feature. - * <!-- begin-user-doc --> + * This adds a property descriptor for the Capacity feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void addCapacityPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_PassiveResourceCapacity_capacity_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_PassiveResourceCapacity_capacity_feature", "_UI_PassiveResourceCapacity_type"), - ResourceconfigurationPackage.Literals.PASSIVE_RESOURCE_CAPACITY__CAPACITY, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_PassiveResourceCapacity_capacity_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PassiveResourceCapacity_capacity_feature", "_UI_PassiveResourceCapacity_type"), + ResourceconfigurationPackage.Literals.PASSIVE_RESOURCE_CAPACITY__CAPACITY, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } /** - * This returns PassiveResourceCapacity.gif. - * <!-- begin-user-doc --> + * This returns PassiveResourceCapacity.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/PassiveResourceCapacity")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/PassiveResourceCapacity")); + } /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((PassiveResourceCapacity)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_PassiveResourceCapacity_type") : - getString("_UI_PassiveResourceCapacity_type") + " " + label; - } + String label = ((PassiveResourceCapacity)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_PassiveResourceCapacity_type") : + getString("_UI_PassiveResourceCapacity_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 --> + * 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 - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); + updateChildren(notification); - switch (notification.getFeatureID(PassiveResourceCapacity.class)) { - case ResourceconfigurationPackage.PASSIVE_RESOURCE_CAPACITY__CAPACITY: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(PassiveResourceCapacity.class)) { + case ResourceconfigurationPackage.PASSIVE_RESOURCE_CAPACITY__CAPACITY: + 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 --> + * 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 - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public ResourceLocator getResourceLocator() { - return ResourcelandscapeEditPlugin.INSTANCE; - } + return ResourcelandscapeEditPlugin.INSTANCE; + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/PassiveResourceSpecificationItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/PassiveResourceSpecificationItemProvider.java index 8f647f4e..4ded33c4 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/PassiveResourceSpecificationItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/PassiveResourceSpecificationItemProvider.java @@ -32,150 +32,144 @@ import org.eclipse.emf.edit.provider.ViewerNotification; * @generated */ public class PassiveResourceSpecificationItemProvider - extends ConfigurationSpecificationItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends ConfigurationSpecificationItemProvider { /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public PassiveResourceSpecificationItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addPassiveResourceTypePropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addPassiveResourceTypePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Passive Resource Type feature. - * <!-- begin-user-doc --> + * This adds a property descriptor for the Passive Resource Type feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void addPassiveResourceTypePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_PassiveResourceSpecification_passiveResourceType_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_PassiveResourceSpecification_passiveResourceType_feature", "_UI_PassiveResourceSpecification_type"), - ResourceconfigurationPackage.Literals.PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE, - true, - false, - true, - null, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_PassiveResourceSpecification_passiveResourceType_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_PassiveResourceSpecification_passiveResourceType_feature", "_UI_PassiveResourceSpecification_type"), + ResourceconfigurationPackage.Literals.PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE, + 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 --> + * 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 - */ + * @generated + */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { - if (childrenFeatures == null) { - super.getChildrenFeatures(object); - childrenFeatures.add(ResourceconfigurationPackage.Literals.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY); - } - return childrenFeatures; - } + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ResourceconfigurationPackage.Literals.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY); + } + return childrenFeatures; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @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. + // 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); - } + return super.getChildFeature(object, child); + } /** - * This returns PassiveResourceSpecification.gif. - * <!-- begin-user-doc --> + * This returns PassiveResourceSpecification.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/PassiveResourceSpecification")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/PassiveResourceSpecification")); + } /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((PassiveResourceSpecification)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_PassiveResourceSpecification_type") : - getString("_UI_PassiveResourceSpecification_type") + " " + label; - } + String label = ((PassiveResourceSpecification)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_PassiveResourceSpecification_type") : + getString("_UI_PassiveResourceSpecification_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 --> + * 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 - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); + updateChildren(notification); - switch (notification.getFeatureID(PassiveResourceSpecification.class)) { - case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(PassiveResourceSpecification.class)) { + case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY: + 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 --> + * 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 - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); + super.collectNewChildDescriptors(newChildDescriptors, object); - newChildDescriptors.add - (createChildParameter - (ResourceconfigurationPackage.Literals.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY, - ResourceconfigurationFactory.eINSTANCE.createPassiveResourceCapacity())); - } + newChildDescriptors.add + (createChildParameter + (ResourceconfigurationPackage.Literals.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY, + ResourceconfigurationFactory.eINSTANCE.createPassiveResourceCapacity())); + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/ProcessingResourceSpecificationItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/ProcessingResourceSpecificationItemProvider.java index 69750a04..3dcf6e1e 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/ProcessingResourceSpecificationItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/ProcessingResourceSpecificationItemProvider.java @@ -39,235 +39,229 @@ import org.eclipse.emf.edit.provider.ViewerNotification; * @generated */ public class ProcessingResourceSpecificationItemProvider - extends EntityItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends EntityItemProvider { /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ProcessingResourceSpecificationItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addSchedulingPolicyPropertyDescriptor(object); - addProcessingRatePropertyDescriptor(object); - addActiveResourceTypePropertyDescriptor(object); - addParentResourceSpecificationPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addSchedulingPolicyPropertyDescriptor(object); + addProcessingRatePropertyDescriptor(object); + addActiveResourceTypePropertyDescriptor(object); + addParentResourceSpecificationPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Scheduling Policy feature. - * <!-- begin-user-doc --> + * This adds a property descriptor for the Scheduling Policy feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void addSchedulingPolicyPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ProcessingResourceSpecification_schedulingPolicy_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ProcessingResourceSpecification_schedulingPolicy_feature", "_UI_ProcessingResourceSpecification_type"), - ResourceconfigurationPackage.Literals.PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ProcessingResourceSpecification_schedulingPolicy_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ProcessingResourceSpecification_schedulingPolicy_feature", "_UI_ProcessingResourceSpecification_type"), + ResourceconfigurationPackage.Literals.PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } /** - * This adds a property descriptor for the Processing Rate feature. - * <!-- begin-user-doc --> + * This adds a property descriptor for the Processing Rate feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void addProcessingRatePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ProcessingResourceSpecification_processingRate_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ProcessingResourceSpecification_processingRate_feature", "_UI_ProcessingResourceSpecification_type"), - ResourceconfigurationPackage.Literals.PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE, - true, - false, - false, - ItemPropertyDescriptor.REAL_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ProcessingResourceSpecification_processingRate_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ProcessingResourceSpecification_processingRate_feature", "_UI_ProcessingResourceSpecification_type"), + ResourceconfigurationPackage.Literals.PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE, + true, + false, + false, + ItemPropertyDescriptor.REAL_VALUE_IMAGE, + null, + null)); + } /** - * This adds a property descriptor for the Active Resource Type feature. - * <!-- begin-user-doc --> + * This adds a property descriptor for the Active Resource Type feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void addActiveResourceTypePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ProcessingResourceSpecification_activeResourceType_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ProcessingResourceSpecification_activeResourceType_feature", "_UI_ProcessingResourceSpecification_type"), - ResourceconfigurationPackage.Literals.PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE, - true, - false, - false, - null, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ProcessingResourceSpecification_activeResourceType_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ProcessingResourceSpecification_activeResourceType_feature", "_UI_ProcessingResourceSpecification_type"), + ResourceconfigurationPackage.Literals.PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE, + true, + false, + false, + null, + null, + null)); + } /** - * This adds a property descriptor for the Parent Resource Specification feature. - * <!-- begin-user-doc --> + * This adds a property descriptor for the Parent Resource Specification feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void addParentResourceSpecificationPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ProcessingResourceSpecification_parentResourceSpecification_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ProcessingResourceSpecification_parentResourceSpecification_feature", "_UI_ProcessingResourceSpecification_type"), - ResourceconfigurationPackage.Literals.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION, - true, - false, - true, - null, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ProcessingResourceSpecification_parentResourceSpecification_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ProcessingResourceSpecification_parentResourceSpecification_feature", "_UI_ProcessingResourceSpecification_type"), + ResourceconfigurationPackage.Literals.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION, + 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 --> + * 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 - */ + * @generated + */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { - if (childrenFeatures == null) { - super.getChildrenFeatures(object); - childrenFeatures.add(ResourceconfigurationPackage.Literals.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS); - } - return childrenFeatures; - } + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ResourceconfigurationPackage.Literals.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS); + } + return childrenFeatures; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @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. + // 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); - } + return super.getChildFeature(object, child); + } /** - * This returns ProcessingResourceSpecification.gif. - * <!-- begin-user-doc --> + * This returns ProcessingResourceSpecification.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/ProcessingResourceSpecification")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/ProcessingResourceSpecification")); + } /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((ProcessingResourceSpecification)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_ProcessingResourceSpecification_type") : - getString("_UI_ProcessingResourceSpecification_type") + " " + label; - } + String label = ((ProcessingResourceSpecification)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ProcessingResourceSpecification_type") : + getString("_UI_ProcessingResourceSpecification_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 --> + * 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 - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); + updateChildren(notification); - switch (notification.getFeatureID(ProcessingResourceSpecification.class)) { - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY: - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE: - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(ProcessingResourceSpecification.class)) { + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY: + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE: + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS: + 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 --> + * 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 - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); + super.collectNewChildDescriptors(newChildDescriptors, object); - newChildDescriptors.add - (createChildParameter - (ResourceconfigurationPackage.Literals.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS, - ResourceconfigurationFactory.eINSTANCE.createNumberOfParallelProcessingUnits())); - } + newChildDescriptors.add + (createChildParameter + (ResourceconfigurationPackage.Literals.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS, + ResourceconfigurationFactory.eINSTANCE.createNumberOfParallelProcessingUnits())); + } /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public ResourceLocator getResourceLocator() { - return ResourcelandscapeEditPlugin.INSTANCE; - } + return ResourcelandscapeEditPlugin.INSTANCE; + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/ResourceconfigurationItemProviderAdapterFactory.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/ResourceconfigurationItemProviderAdapterFactory.java index 569a5b41..1d8f215a 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/ResourceconfigurationItemProviderAdapterFactory.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourceconfiguration/provider/ResourceconfigurationItemProviderAdapterFactory.java @@ -35,310 +35,310 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider; */ public class ResourceconfigurationItemProviderAdapterFactory extends ResourceconfigurationAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { /** - * This keeps track of the root adapter factory that delegates to this adapter factory. - * <!-- begin-user-doc --> + * This keeps track of the root adapter factory that delegates to this adapter factory. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ComposedAdapterFactory parentAdapterFactory; /** - * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. - * <!-- begin-user-doc --> + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IChangeNotifier changeNotifier = new ChangeNotifier(); /** - * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. - * <!-- begin-user-doc --> + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<Object> supportedTypes = new ArrayList<Object>(); /** - * This constructs an instance. - * <!-- begin-user-doc --> + * This constructs an instance. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourceconfigurationItemProviderAdapterFactory() { - supportedTypes.add(IEditingDomainItemProvider.class); - supportedTypes.add(IStructuredItemContentProvider.class); - supportedTypes.add(ITreeItemContentProvider.class); - supportedTypes.add(IItemLabelProvider.class); - supportedTypes.add(IItemPropertySource.class); - } + 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 edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ProcessingResourceSpecificationItemProvider processingResourceSpecificationItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createProcessingResourceSpecificationAdapter() { - if (processingResourceSpecificationItemProvider == null) { - processingResourceSpecificationItemProvider = new ProcessingResourceSpecificationItemProvider(this); - } + if (processingResourceSpecificationItemProvider == null) { + processingResourceSpecificationItemProvider = new ProcessingResourceSpecificationItemProvider(this); + } - return processingResourceSpecificationItemProvider; - } + return processingResourceSpecificationItemProvider; + } /** - * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected NumberOfParallelProcessingUnitsItemProvider numberOfParallelProcessingUnitsItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createNumberOfParallelProcessingUnitsAdapter() { - if (numberOfParallelProcessingUnitsItemProvider == null) { - numberOfParallelProcessingUnitsItemProvider = new NumberOfParallelProcessingUnitsItemProvider(this); - } + if (numberOfParallelProcessingUnitsItemProvider == null) { + numberOfParallelProcessingUnitsItemProvider = new NumberOfParallelProcessingUnitsItemProvider(this); + } - return numberOfParallelProcessingUnitsItemProvider; - } + return numberOfParallelProcessingUnitsItemProvider; + } /** - * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected LinkingResourceSpecificationItemProvider linkingResourceSpecificationItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createLinkingResourceSpecificationAdapter() { - if (linkingResourceSpecificationItemProvider == null) { - linkingResourceSpecificationItemProvider = new LinkingResourceSpecificationItemProvider(this); - } + if (linkingResourceSpecificationItemProvider == null) { + linkingResourceSpecificationItemProvider = new LinkingResourceSpecificationItemProvider(this); + } - return linkingResourceSpecificationItemProvider; - } + return linkingResourceSpecificationItemProvider; + } /** - * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ActiveResourceSpecificationItemProvider activeResourceSpecificationItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createActiveResourceSpecificationAdapter() { - if (activeResourceSpecificationItemProvider == null) { - activeResourceSpecificationItemProvider = new ActiveResourceSpecificationItemProvider(this); - } + if (activeResourceSpecificationItemProvider == null) { + activeResourceSpecificationItemProvider = new ActiveResourceSpecificationItemProvider(this); + } - return activeResourceSpecificationItemProvider; - } + return activeResourceSpecificationItemProvider; + } /** - * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected CustomConfigurationSpecificationItemProvider customConfigurationSpecificationItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createCustomConfigurationSpecificationAdapter() { - if (customConfigurationSpecificationItemProvider == null) { - customConfigurationSpecificationItemProvider = new CustomConfigurationSpecificationItemProvider(this); - } + if (customConfigurationSpecificationItemProvider == null) { + customConfigurationSpecificationItemProvider = new CustomConfigurationSpecificationItemProvider(this); + } - return customConfigurationSpecificationItemProvider; - } + return customConfigurationSpecificationItemProvider; + } /** - * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected PassiveResourceSpecificationItemProvider passiveResourceSpecificationItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createPassiveResourceSpecificationAdapter() { - if (passiveResourceSpecificationItemProvider == null) { - passiveResourceSpecificationItemProvider = new PassiveResourceSpecificationItemProvider(this); - } + if (passiveResourceSpecificationItemProvider == null) { + passiveResourceSpecificationItemProvider = new PassiveResourceSpecificationItemProvider(this); + } - return passiveResourceSpecificationItemProvider; - } + return passiveResourceSpecificationItemProvider; + } /** - * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected PassiveResourceCapacityItemProvider passiveResourceCapacityItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createPassiveResourceCapacityAdapter() { - if (passiveResourceCapacityItemProvider == null) { - passiveResourceCapacityItemProvider = new PassiveResourceCapacityItemProvider(this); - } + if (passiveResourceCapacityItemProvider == null) { + passiveResourceCapacityItemProvider = new PassiveResourceCapacityItemProvider(this); + } - return passiveResourceCapacityItemProvider; - } + return passiveResourceCapacityItemProvider; + } /** - * This returns the root adapter factory that contains this factory. - * <!-- begin-user-doc --> + * This returns the root adapter factory that contains this factory. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ComposeableAdapterFactory getRootAdapterFactory() { - return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); - } + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } /** - * This sets the composed adapter factory that contains this factory. - * <!-- begin-user-doc --> + * This sets the composed adapter factory that contains this factory. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { - this.parentAdapterFactory = parentAdapterFactory; - } + this.parentAdapterFactory = parentAdapterFactory; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public boolean isFactoryForType(Object type) { - return supportedTypes.contains(type) || super.isFactoryForType(type); - } + return supportedTypes.contains(type) || super.isFactoryForType(type); + } /** - * This implementation substitutes the factory itself as the key for the adapter. - * <!-- begin-user-doc --> + * This implementation substitutes the factory itself as the key for the adapter. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter adapt(Notifier notifier, Object type) { - return super.adapt(notifier, this); - } + return super.adapt(notifier, this); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @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; - } - } + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) { + return adapter; + } + } - return null; - } + return null; + } /** - * This adds a listener. - * <!-- begin-user-doc --> + * This adds a listener. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void addListener(INotifyChangedListener notifyChangedListener) { - changeNotifier.addListener(notifyChangedListener); - } + changeNotifier.addListener(notifyChangedListener); + } /** - * This removes a listener. - * <!-- begin-user-doc --> + * This removes a listener. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void removeListener(INotifyChangedListener notifyChangedListener) { - changeNotifier.removeListener(notifyChangedListener); - } + changeNotifier.removeListener(notifyChangedListener); + } /** - * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. - * <!-- begin-user-doc --> + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void fireNotifyChanged(Notification notification) { - changeNotifier.fireNotifyChanged(notification); + changeNotifier.fireNotifyChanged(notification); - if (parentAdapterFactory != null) { - parentAdapterFactory.fireNotifyChanged(notification); - } - } + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } /** - * This disposes all of the item providers created by this factory. - * <!-- begin-user-doc --> + * This disposes all of the item providers created by this factory. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void dispose() { - if (processingResourceSpecificationItemProvider != null) processingResourceSpecificationItemProvider.dispose(); - if (numberOfParallelProcessingUnitsItemProvider != null) numberOfParallelProcessingUnitsItemProvider.dispose(); - if (linkingResourceSpecificationItemProvider != null) linkingResourceSpecificationItemProvider.dispose(); - if (activeResourceSpecificationItemProvider != null) activeResourceSpecificationItemProvider.dispose(); - if (customConfigurationSpecificationItemProvider != null) customConfigurationSpecificationItemProvider.dispose(); - if (passiveResourceSpecificationItemProvider != null) passiveResourceSpecificationItemProvider.dispose(); - if (passiveResourceCapacityItemProvider != null) passiveResourceCapacityItemProvider.dispose(); - } + if (processingResourceSpecificationItemProvider != null) processingResourceSpecificationItemProvider.dispose(); + if (numberOfParallelProcessingUnitsItemProvider != null) numberOfParallelProcessingUnitsItemProvider.dispose(); + if (linkingResourceSpecificationItemProvider != null) linkingResourceSpecificationItemProvider.dispose(); + if (activeResourceSpecificationItemProvider != null) activeResourceSpecificationItemProvider.dispose(); + if (customConfigurationSpecificationItemProvider != null) customConfigurationSpecificationItemProvider.dispose(); + if (passiveResourceSpecificationItemProvider != null) passiveResourceSpecificationItemProvider.dispose(); + if (passiveResourceCapacityItemProvider != null) passiveResourceCapacityItemProvider.dispose(); + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/CompositeHardwareInfrastructureItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/CompositeHardwareInfrastructureItemProvider.java index 22f4ec2b..c713dee6 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/CompositeHardwareInfrastructureItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/CompositeHardwareInfrastructureItemProvider.java @@ -31,142 +31,136 @@ import org.eclipse.emf.edit.provider.ViewerNotification; * @generated */ public class CompositeHardwareInfrastructureItemProvider - extends AbstractHardwareInfrastructureItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends HardwareInfrastructureItemProvider { /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public CompositeHardwareInfrastructureItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - } - return itemPropertyDescriptors; - } + } + 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 --> + * 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 - */ + * @generated + */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { - if (childrenFeatures == null) { - super.getChildrenFeatures(object); - childrenFeatures.add(ResourcelandscapePackage.Literals.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS); - } - return childrenFeatures; - } + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ResourcelandscapePackage.Literals.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS); + } + return childrenFeatures; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @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. + // 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); - } + return super.getChildFeature(object, child); + } /** - * This returns CompositeHardwareInfrastructure.gif. - * <!-- begin-user-doc --> + * This returns CompositeHardwareInfrastructure.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/CompositeHardwareInfrastructure")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/CompositeHardwareInfrastructure")); + } /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((CompositeHardwareInfrastructure)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_CompositeHardwareInfrastructure_type") : - getString("_UI_CompositeHardwareInfrastructure_type") + " " + label; - } + String label = ((CompositeHardwareInfrastructure)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_CompositeHardwareInfrastructure_type") : + getString("_UI_CompositeHardwareInfrastructure_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 --> + * 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 - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); + updateChildren(notification); - switch (notification.getFeatureID(CompositeHardwareInfrastructure.class)) { - case ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(CompositeHardwareInfrastructure.class)) { + case ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS: + 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 --> + * 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 - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - - newChildDescriptors.add - (createChildParameter - (ResourcelandscapePackage.Literals.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS, - ResourcelandscapeFactory.eINSTANCE.createComputingInfrastructure())); - - newChildDescriptors.add - (createChildParameter - (ResourcelandscapePackage.Literals.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS, - ResourcelandscapeFactory.eINSTANCE.createNetworkingInfrastructure())); - - newChildDescriptors.add - (createChildParameter - (ResourcelandscapePackage.Literals.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS, - ResourcelandscapeFactory.eINSTANCE.createStorageInfrastructure())); - - newChildDescriptors.add - (createChildParameter - (ResourcelandscapePackage.Literals.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS, - ResourcelandscapeFactory.eINSTANCE.createCompositeHardwareInfrastructure())); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ResourcelandscapePackage.Literals.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS, + ResourcelandscapeFactory.eINSTANCE.createComputingInfrastructure())); + + newChildDescriptors.add + (createChildParameter + (ResourcelandscapePackage.Literals.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS, + ResourcelandscapeFactory.eINSTANCE.createNetworkingInfrastructure())); + + newChildDescriptors.add + (createChildParameter + (ResourcelandscapePackage.Literals.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS, + ResourcelandscapeFactory.eINSTANCE.createStorageInfrastructure())); + + newChildDescriptors.add + (createChildParameter + (ResourcelandscapePackage.Literals.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS, + ResourcelandscapeFactory.eINSTANCE.createCompositeHardwareInfrastructure())); + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/ComputingInfrastructureItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/ComputingInfrastructureItemProvider.java index f25dd86f..216ded70 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/ComputingInfrastructureItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/ComputingInfrastructureItemProvider.java @@ -26,86 +26,80 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider; * @generated */ public class ComputingInfrastructureItemProvider - extends ContainerItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends ContainerItemProvider { /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ComputingInfrastructureItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - } - return itemPropertyDescriptors; - } + } + return itemPropertyDescriptors; + } /** - * This returns ComputingInfrastructure.gif. - * <!-- begin-user-doc --> + * This returns ComputingInfrastructure.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/ComputingInfrastructure")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/ComputingInfrastructure")); + } /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((ComputingInfrastructure)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_ComputingInfrastructure_type") : - getString("_UI_ComputingInfrastructure_type") + " " + label; - } + String label = ((ComputingInfrastructure)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ComputingInfrastructure_type") : + getString("_UI_ComputingInfrastructure_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 --> + * 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 - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(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 --> + * 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 - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/ContainerItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/ContainerItemProvider.java index b03239e7..9c0df19d 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/ContainerItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/ContainerItemProvider.java @@ -38,167 +38,161 @@ import org.eclipse.emf.edit.provider.ViewerNotification; * @generated */ public class ContainerItemProvider - extends EntityItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends EntityItemProvider { /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ContainerItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addTemplatePropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addTemplatePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Template feature. - * <!-- begin-user-doc --> + * This adds a property descriptor for the Template feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void addTemplatePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Container_template_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Container_template_feature", "_UI_Container_type"), - ResourcelandscapePackage.Literals.CONTAINER__TEMPLATE, - true, - false, - true, - null, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Container_template_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Container_template_feature", "_UI_Container_type"), + ResourcelandscapePackage.Literals.CONTAINER__TEMPLATE, + 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 --> + * 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 - */ + * @generated + */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { - if (childrenFeatures == null) { - super.getChildrenFeatures(object); - childrenFeatures.add(ResourcelandscapePackage.Literals.CONTAINER__CONTAINS); - childrenFeatures.add(ResourcelandscapePackage.Literals.CONTAINER__CONFIG_SPEC); - } - return childrenFeatures; - } + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ResourcelandscapePackage.Literals.CONTAINER__CONTAINS); + childrenFeatures.add(ResourcelandscapePackage.Literals.CONTAINER__CONFIG_SPEC); + } + return childrenFeatures; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @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. + // 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); - } + return super.getChildFeature(object, child); + } /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((Container)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_Container_type") : - getString("_UI_Container_type") + " " + label; - } + String label = ((Container)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Container_type") : + getString("_UI_Container_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 --> + * 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 - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); + updateChildren(notification); - switch (notification.getFeatureID(Container.class)) { - case ResourcelandscapePackage.CONTAINER__CONTAINS: - case ResourcelandscapePackage.CONTAINER__CONFIG_SPEC: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(Container.class)) { + case ResourcelandscapePackage.CONTAINER__CONTAINS: + case ResourcelandscapePackage.CONTAINER__CONFIG_SPEC: + 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 --> + * 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 - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); + super.collectNewChildDescriptors(newChildDescriptors, object); - newChildDescriptors.add - (createChildParameter - (ResourcelandscapePackage.Literals.CONTAINER__CONTAINS, - ResourcelandscapeFactory.eINSTANCE.createRuntimeEnvironment())); + newChildDescriptors.add + (createChildParameter + (ResourcelandscapePackage.Literals.CONTAINER__CONTAINS, + ResourcelandscapeFactory.eINSTANCE.createRuntimeEnvironment())); - newChildDescriptors.add - (createChildParameter - (ResourcelandscapePackage.Literals.CONTAINER__CONFIG_SPEC, - ResourceconfigurationFactory.eINSTANCE.createActiveResourceSpecification())); + newChildDescriptors.add + (createChildParameter + (ResourcelandscapePackage.Literals.CONTAINER__CONFIG_SPEC, + ResourceconfigurationFactory.eINSTANCE.createActiveResourceSpecification())); - newChildDescriptors.add - (createChildParameter - (ResourcelandscapePackage.Literals.CONTAINER__CONFIG_SPEC, - ResourceconfigurationFactory.eINSTANCE.createCustomConfigurationSpecification())); + newChildDescriptors.add + (createChildParameter + (ResourcelandscapePackage.Literals.CONTAINER__CONFIG_SPEC, + ResourceconfigurationFactory.eINSTANCE.createCustomConfigurationSpecification())); - newChildDescriptors.add - (createChildParameter - (ResourcelandscapePackage.Literals.CONTAINER__CONFIG_SPEC, - ResourceconfigurationFactory.eINSTANCE.createPassiveResourceSpecification())); - } + newChildDescriptors.add + (createChildParameter + (ResourcelandscapePackage.Literals.CONTAINER__CONFIG_SPEC, + ResourceconfigurationFactory.eINSTANCE.createPassiveResourceSpecification())); + } /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public ResourceLocator getResourceLocator() { - return ResourcelandscapeEditPlugin.INSTANCE; - } + return ResourcelandscapeEditPlugin.INSTANCE; + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/DataCenterItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/DataCenterItemProvider.java index 45d07743..85e46f42 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/DataCenterItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/DataCenterItemProvider.java @@ -35,153 +35,147 @@ import org.eclipse.emf.edit.provider.ViewerNotification; * @generated */ public class DataCenterItemProvider - extends EntityItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends EntityItemProvider { /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public DataCenterItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - } - return itemPropertyDescriptors; - } + } + 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 --> + * 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 - */ + * @generated + */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { - if (childrenFeatures == null) { - super.getChildrenFeatures(object); - childrenFeatures.add(ResourcelandscapePackage.Literals.DATA_CENTER__CONTAINS); - } - return childrenFeatures; - } + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ResourcelandscapePackage.Literals.DATA_CENTER__CONTAINS); + } + return childrenFeatures; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @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. + // 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); - } + return super.getChildFeature(object, child); + } /** - * This returns DataCenter.gif. - * <!-- begin-user-doc --> + * This returns DataCenter.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/DataCenter")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/DataCenter")); + } /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((DataCenter)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_DataCenter_type") : - getString("_UI_DataCenter_type") + " " + label; - } + String label = ((DataCenter)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_DataCenter_type") : + getString("_UI_DataCenter_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 --> + * 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 - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); + updateChildren(notification); - switch (notification.getFeatureID(DataCenter.class)) { - case ResourcelandscapePackage.DATA_CENTER__CONTAINS: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(DataCenter.class)) { + case ResourcelandscapePackage.DATA_CENTER__CONTAINS: + 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 --> + * 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 - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); + super.collectNewChildDescriptors(newChildDescriptors, object); - newChildDescriptors.add - (createChildParameter - (ResourcelandscapePackage.Literals.DATA_CENTER__CONTAINS, - ResourcelandscapeFactory.eINSTANCE.createComputingInfrastructure())); + newChildDescriptors.add + (createChildParameter + (ResourcelandscapePackage.Literals.DATA_CENTER__CONTAINS, + ResourcelandscapeFactory.eINSTANCE.createComputingInfrastructure())); - newChildDescriptors.add - (createChildParameter - (ResourcelandscapePackage.Literals.DATA_CENTER__CONTAINS, - ResourcelandscapeFactory.eINSTANCE.createNetworkingInfrastructure())); + newChildDescriptors.add + (createChildParameter + (ResourcelandscapePackage.Literals.DATA_CENTER__CONTAINS, + ResourcelandscapeFactory.eINSTANCE.createNetworkingInfrastructure())); - newChildDescriptors.add - (createChildParameter - (ResourcelandscapePackage.Literals.DATA_CENTER__CONTAINS, - ResourcelandscapeFactory.eINSTANCE.createStorageInfrastructure())); + newChildDescriptors.add + (createChildParameter + (ResourcelandscapePackage.Literals.DATA_CENTER__CONTAINS, + ResourcelandscapeFactory.eINSTANCE.createStorageInfrastructure())); - newChildDescriptors.add - (createChildParameter - (ResourcelandscapePackage.Literals.DATA_CENTER__CONTAINS, - ResourcelandscapeFactory.eINSTANCE.createCompositeHardwareInfrastructure())); - } + newChildDescriptors.add + (createChildParameter + (ResourcelandscapePackage.Literals.DATA_CENTER__CONTAINS, + ResourcelandscapeFactory.eINSTANCE.createCompositeHardwareInfrastructure())); + } /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public ResourceLocator getResourceLocator() { - return ResourcelandscapeEditPlugin.INSTANCE; - } + return ResourcelandscapeEditPlugin.INSTANCE; + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/DistributedDataCenterItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/DistributedDataCenterItemProvider.java index 53e74acf..8dd0c9a8 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/DistributedDataCenterItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/DistributedDataCenterItemProvider.java @@ -35,138 +35,132 @@ import org.eclipse.emf.edit.provider.ViewerNotification; * @generated */ public class DistributedDataCenterItemProvider - extends EntityItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends EntityItemProvider { /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public DistributedDataCenterItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - } - return itemPropertyDescriptors; - } + } + 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 --> + * 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 - */ + * @generated + */ @Override public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { - if (childrenFeatures == null) { - super.getChildrenFeatures(object); - childrenFeatures.add(ResourcelandscapePackage.Literals.DISTRIBUTED_DATA_CENTER__CONSISTS_OF); - } - return childrenFeatures; - } + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ResourcelandscapePackage.Literals.DISTRIBUTED_DATA_CENTER__CONSISTS_OF); + } + return childrenFeatures; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @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. + // 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); - } + return super.getChildFeature(object, child); + } /** - * This returns DistributedDataCenter.gif. - * <!-- begin-user-doc --> + * This returns DistributedDataCenter.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/DistributedDataCenter")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/DistributedDataCenter")); + } /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((DistributedDataCenter)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_DistributedDataCenter_type") : - getString("_UI_DistributedDataCenter_type") + " " + label; - } + String label = ((DistributedDataCenter)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_DistributedDataCenter_type") : + getString("_UI_DistributedDataCenter_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 --> + * 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 - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); + updateChildren(notification); - switch (notification.getFeatureID(DistributedDataCenter.class)) { - case ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(DistributedDataCenter.class)) { + case ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF: + 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 --> + * 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 - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); + super.collectNewChildDescriptors(newChildDescriptors, object); - newChildDescriptors.add - (createChildParameter - (ResourcelandscapePackage.Literals.DISTRIBUTED_DATA_CENTER__CONSISTS_OF, - ResourcelandscapeFactory.eINSTANCE.createDataCenter())); - } + newChildDescriptors.add + (createChildParameter + (ResourcelandscapePackage.Literals.DISTRIBUTED_DATA_CENTER__CONSISTS_OF, + ResourcelandscapeFactory.eINSTANCE.createDataCenter())); + } /** - * Return the resource locator for this item provider's resources. - * <!-- begin-user-doc --> + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public ResourceLocator getResourceLocator() { - return ResourcelandscapeEditPlugin.INSTANCE; - } + return ResourcelandscapeEditPlugin.INSTANCE; + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/HardwareInfrastructureItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/HardwareInfrastructureItemProvider.java new file mode 100644 index 00000000..ad9183f2 --- /dev/null +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/HardwareInfrastructureItemProvider.java @@ -0,0 +1,104 @@ +/** + * Copyright 2009-2012, Descartes Research Group, SDQ, IPD, KIT + */ +package edu.kit.ipd.descartes.mm.resourcelandscape.provider; + + +import edu.kit.ipd.descartes.core.provider.EntityItemProvider; + +import edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure; + +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.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ +public class HardwareInfrastructureItemProvider extends EntityItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public HardwareInfrastructureItemProvider(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) { + String label = ((HardwareInfrastructure)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_HardwareInfrastructure_type") : + getString("_UI_HardwareInfrastructure_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 ResourcelandscapeEditPlugin.INSTANCE; + } + +} diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/NetworkingInfrastructureItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/NetworkingInfrastructureItemProvider.java index bb5c0644..2092d195 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/NetworkingInfrastructureItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/NetworkingInfrastructureItemProvider.java @@ -26,86 +26,80 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider; * @generated */ public class NetworkingInfrastructureItemProvider - extends ContainerItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends ContainerItemProvider { /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public NetworkingInfrastructureItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - } - return itemPropertyDescriptors; - } + } + return itemPropertyDescriptors; + } /** - * This returns NetworkingInfrastructure.gif. - * <!-- begin-user-doc --> + * This returns NetworkingInfrastructure.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/NetworkingInfrastructure")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/NetworkingInfrastructure")); + } /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((NetworkingInfrastructure)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_NetworkingInfrastructure_type") : - getString("_UI_NetworkingInfrastructure_type") + " " + label; - } + String label = ((NetworkingInfrastructure)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_NetworkingInfrastructure_type") : + getString("_UI_NetworkingInfrastructure_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 --> + * 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 - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(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 --> + * 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 - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/ResourcelandscapeEditPlugin.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/ResourcelandscapeEditPlugin.java index 15cf54a0..7b83f6df 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/ResourcelandscapeEditPlugin.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/ResourcelandscapeEditPlugin.java @@ -19,78 +19,78 @@ import org.eclipse.emf.common.util.ResourceLocator; */ public final class ResourcelandscapeEditPlugin extends EMFPlugin { /** - * Keep track of the singleton. - * <!-- begin-user-doc --> + * Keep track of the singleton. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static final ResourcelandscapeEditPlugin INSTANCE = new ResourcelandscapeEditPlugin(); /** - * Keep track of the singleton. - * <!-- begin-user-doc --> + * Keep track of the singleton. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private static Implementation plugin; /** - * Create the instance. - * <!-- begin-user-doc --> + * Create the instance. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourcelandscapeEditPlugin() { - super - (new ResourceLocator [] { - CoreEditPlugin.INSTANCE, - IdentifierEditPlugin.INSTANCE, - }); - } + super + (new ResourceLocator [] { + CoreEditPlugin.INSTANCE, + IdentifierEditPlugin.INSTANCE, + }); + } /** - * Returns the singleton instance of the Eclipse plugin. - * <!-- begin-user-doc --> + * Returns the singleton instance of the Eclipse plugin. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the singleton instance. - * @generated - */ + * @return the singleton instance. + * @generated + */ @Override public ResourceLocator getPluginResourceLocator() { - return plugin; - } + return plugin; + } /** - * Returns the singleton instance of the Eclipse plugin. - * <!-- begin-user-doc --> + * Returns the singleton instance of the Eclipse plugin. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the singleton instance. - * @generated - */ + * @return the singleton instance. + * @generated + */ public static Implementation getPlugin() { - return plugin; - } + return plugin; + } /** - * The actual implementation of the Eclipse <b>Plugin</b>. - * <!-- begin-user-doc --> + * The actual implementation of the Eclipse <b>Plugin</b>. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static class Implementation extends EclipsePlugin { /** - * Creates an instance. - * <!-- begin-user-doc --> + * Creates an instance. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public Implementation() { - super(); + super(); - // Remember the static instance. - // - plugin = this; - } + // Remember the static instance. + // + plugin = this; + } } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/ResourcelandscapeItemProviderAdapterFactory.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/ResourcelandscapeItemProviderAdapterFactory.java index 1adfd9f9..7dd19ae2 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/ResourcelandscapeItemProviderAdapterFactory.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/ResourcelandscapeItemProviderAdapterFactory.java @@ -35,310 +35,310 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider; */ public class ResourcelandscapeItemProviderAdapterFactory extends ResourcelandscapeAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { /** - * This keeps track of the root adapter factory that delegates to this adapter factory. - * <!-- begin-user-doc --> + * This keeps track of the root adapter factory that delegates to this adapter factory. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ComposedAdapterFactory parentAdapterFactory; /** - * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. - * <!-- begin-user-doc --> + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IChangeNotifier changeNotifier = new ChangeNotifier(); /** - * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. - * <!-- begin-user-doc --> + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<Object> supportedTypes = new ArrayList<Object>(); /** - * This constructs an instance. - * <!-- begin-user-doc --> + * This constructs an instance. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourcelandscapeItemProviderAdapterFactory() { - supportedTypes.add(IEditingDomainItemProvider.class); - supportedTypes.add(IStructuredItemContentProvider.class); - supportedTypes.add(ITreeItemContentProvider.class); - supportedTypes.add(IItemLabelProvider.class); - supportedTypes.add(IItemPropertySource.class); - } + 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 edu.kit.ipd.descartes.mm.resourcelandscape.ComputingInfrastructure} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcelandscape.ComputingInfrastructure} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ComputingInfrastructureItemProvider computingInfrastructureItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcelandscape.ComputingInfrastructure}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcelandscape.ComputingInfrastructure}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createComputingInfrastructureAdapter() { - if (computingInfrastructureItemProvider == null) { - computingInfrastructureItemProvider = new ComputingInfrastructureItemProvider(this); - } + if (computingInfrastructureItemProvider == null) { + computingInfrastructureItemProvider = new ComputingInfrastructureItemProvider(this); + } - return computingInfrastructureItemProvider; - } + return computingInfrastructureItemProvider; + } /** - * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcelandscape.NetworkingInfrastructure} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcelandscape.NetworkingInfrastructure} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected NetworkingInfrastructureItemProvider networkingInfrastructureItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcelandscape.NetworkingInfrastructure}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcelandscape.NetworkingInfrastructure}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createNetworkingInfrastructureAdapter() { - if (networkingInfrastructureItemProvider == null) { - networkingInfrastructureItemProvider = new NetworkingInfrastructureItemProvider(this); - } + if (networkingInfrastructureItemProvider == null) { + networkingInfrastructureItemProvider = new NetworkingInfrastructureItemProvider(this); + } - return networkingInfrastructureItemProvider; - } + return networkingInfrastructureItemProvider; + } /** - * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcelandscape.StorageInfrastructure} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcelandscape.StorageInfrastructure} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected StorageInfrastructureItemProvider storageInfrastructureItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcelandscape.StorageInfrastructure}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcelandscape.StorageInfrastructure}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createStorageInfrastructureAdapter() { - if (storageInfrastructureItemProvider == null) { - storageInfrastructureItemProvider = new StorageInfrastructureItemProvider(this); - } + if (storageInfrastructureItemProvider == null) { + storageInfrastructureItemProvider = new StorageInfrastructureItemProvider(this); + } - return storageInfrastructureItemProvider; - } + return storageInfrastructureItemProvider; + } /** - * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected RuntimeEnvironmentItemProvider runtimeEnvironmentItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createRuntimeEnvironmentAdapter() { - if (runtimeEnvironmentItemProvider == null) { - runtimeEnvironmentItemProvider = new RuntimeEnvironmentItemProvider(this); - } + if (runtimeEnvironmentItemProvider == null) { + runtimeEnvironmentItemProvider = new RuntimeEnvironmentItemProvider(this); + } - return runtimeEnvironmentItemProvider; - } + return runtimeEnvironmentItemProvider; + } /** - * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected DataCenterItemProvider dataCenterItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createDataCenterAdapter() { - if (dataCenterItemProvider == null) { - dataCenterItemProvider = new DataCenterItemProvider(this); - } + if (dataCenterItemProvider == null) { + dataCenterItemProvider = new DataCenterItemProvider(this); + } - return dataCenterItemProvider; - } + return dataCenterItemProvider; + } /** - * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected DistributedDataCenterItemProvider distributedDataCenterItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createDistributedDataCenterAdapter() { - if (distributedDataCenterItemProvider == null) { - distributedDataCenterItemProvider = new DistributedDataCenterItemProvider(this); - } + if (distributedDataCenterItemProvider == null) { + distributedDataCenterItemProvider = new DistributedDataCenterItemProvider(this); + } - return distributedDataCenterItemProvider; - } + return distributedDataCenterItemProvider; + } /** - * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcelandscape.CompositeHardwareInfrastructure} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcelandscape.CompositeHardwareInfrastructure} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected CompositeHardwareInfrastructureItemProvider compositeHardwareInfrastructureItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcelandscape.CompositeHardwareInfrastructure}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcelandscape.CompositeHardwareInfrastructure}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createCompositeHardwareInfrastructureAdapter() { - if (compositeHardwareInfrastructureItemProvider == null) { - compositeHardwareInfrastructureItemProvider = new CompositeHardwareInfrastructureItemProvider(this); - } + if (compositeHardwareInfrastructureItemProvider == null) { + compositeHardwareInfrastructureItemProvider = new CompositeHardwareInfrastructureItemProvider(this); + } - return compositeHardwareInfrastructureItemProvider; - } + return compositeHardwareInfrastructureItemProvider; + } /** - * This returns the root adapter factory that contains this factory. - * <!-- begin-user-doc --> + * This returns the root adapter factory that contains this factory. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ComposeableAdapterFactory getRootAdapterFactory() { - return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); - } + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } /** - * This sets the composed adapter factory that contains this factory. - * <!-- begin-user-doc --> + * This sets the composed adapter factory that contains this factory. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { - this.parentAdapterFactory = parentAdapterFactory; - } + this.parentAdapterFactory = parentAdapterFactory; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public boolean isFactoryForType(Object type) { - return supportedTypes.contains(type) || super.isFactoryForType(type); - } + return supportedTypes.contains(type) || super.isFactoryForType(type); + } /** - * This implementation substitutes the factory itself as the key for the adapter. - * <!-- begin-user-doc --> + * This implementation substitutes the factory itself as the key for the adapter. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter adapt(Notifier notifier, Object type) { - return super.adapt(notifier, this); - } + return super.adapt(notifier, this); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @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; - } - } + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) { + return adapter; + } + } - return null; - } + return null; + } /** - * This adds a listener. - * <!-- begin-user-doc --> + * This adds a listener. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void addListener(INotifyChangedListener notifyChangedListener) { - changeNotifier.addListener(notifyChangedListener); - } + changeNotifier.addListener(notifyChangedListener); + } /** - * This removes a listener. - * <!-- begin-user-doc --> + * This removes a listener. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void removeListener(INotifyChangedListener notifyChangedListener) { - changeNotifier.removeListener(notifyChangedListener); - } + changeNotifier.removeListener(notifyChangedListener); + } /** - * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. - * <!-- begin-user-doc --> + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void fireNotifyChanged(Notification notification) { - changeNotifier.fireNotifyChanged(notification); + changeNotifier.fireNotifyChanged(notification); - if (parentAdapterFactory != null) { - parentAdapterFactory.fireNotifyChanged(notification); - } - } + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } /** - * This disposes all of the item providers created by this factory. - * <!-- begin-user-doc --> + * This disposes all of the item providers created by this factory. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void dispose() { - if (computingInfrastructureItemProvider != null) computingInfrastructureItemProvider.dispose(); - if (networkingInfrastructureItemProvider != null) networkingInfrastructureItemProvider.dispose(); - if (storageInfrastructureItemProvider != null) storageInfrastructureItemProvider.dispose(); - if (runtimeEnvironmentItemProvider != null) runtimeEnvironmentItemProvider.dispose(); - if (dataCenterItemProvider != null) dataCenterItemProvider.dispose(); - if (distributedDataCenterItemProvider != null) distributedDataCenterItemProvider.dispose(); - if (compositeHardwareInfrastructureItemProvider != null) compositeHardwareInfrastructureItemProvider.dispose(); - } + if (computingInfrastructureItemProvider != null) computingInfrastructureItemProvider.dispose(); + if (networkingInfrastructureItemProvider != null) networkingInfrastructureItemProvider.dispose(); + if (storageInfrastructureItemProvider != null) storageInfrastructureItemProvider.dispose(); + if (runtimeEnvironmentItemProvider != null) runtimeEnvironmentItemProvider.dispose(); + if (dataCenterItemProvider != null) dataCenterItemProvider.dispose(); + if (distributedDataCenterItemProvider != null) distributedDataCenterItemProvider.dispose(); + if (compositeHardwareInfrastructureItemProvider != null) compositeHardwareInfrastructureItemProvider.dispose(); + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/RuntimeEnvironmentItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/RuntimeEnvironmentItemProvider.java index 6fdb007d..ee7806a7 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/RuntimeEnvironmentItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/RuntimeEnvironmentItemProvider.java @@ -30,115 +30,109 @@ import org.eclipse.emf.edit.provider.ViewerNotification; * @generated */ public class RuntimeEnvironmentItemProvider - extends ContainerItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends ContainerItemProvider { /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public RuntimeEnvironmentItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - addOfClassPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addOfClassPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Of Class feature. - * <!-- begin-user-doc --> + * This adds a property descriptor for the Of Class feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void addOfClassPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_RuntimeEnvironment_ofClass_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_RuntimeEnvironment_ofClass_feature", "_UI_RuntimeEnvironment_type"), - ResourcelandscapePackage.Literals.RUNTIME_ENVIRONMENT__OF_CLASS, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_RuntimeEnvironment_ofClass_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_RuntimeEnvironment_ofClass_feature", "_UI_RuntimeEnvironment_type"), + ResourcelandscapePackage.Literals.RUNTIME_ENVIRONMENT__OF_CLASS, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } /** - * This returns RuntimeEnvironment.gif. - * <!-- begin-user-doc --> + * This returns RuntimeEnvironment.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/RuntimeEnvironment")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/RuntimeEnvironment")); + } /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((RuntimeEnvironment)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_RuntimeEnvironment_type") : - getString("_UI_RuntimeEnvironment_type") + " " + label; - } + String label = ((RuntimeEnvironment)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_RuntimeEnvironment_type") : + getString("_UI_RuntimeEnvironment_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 --> + * 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 - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); + updateChildren(notification); - switch (notification.getFeatureID(RuntimeEnvironment.class)) { - case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__OF_CLASS: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(RuntimeEnvironment.class)) { + case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__OF_CLASS: + 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 --> + * 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 - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/StorageInfrastructureItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/StorageInfrastructureItemProvider.java index 7c1ff861..9e6a28ff 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/StorageInfrastructureItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcelandscape/provider/StorageInfrastructureItemProvider.java @@ -26,86 +26,80 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider; * @generated */ public class StorageInfrastructureItemProvider - extends ContainerItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends ContainerItemProvider { /** - * This constructs an instance from a factory and a notifier. - * <!-- begin-user-doc --> + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public StorageInfrastructureItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * This returns the property descriptors for the adapted class. - * <!-- begin-user-doc --> + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); - } - return itemPropertyDescriptors; - } + } + return itemPropertyDescriptors; + } /** - * This returns StorageInfrastructure.gif. - * <!-- begin-user-doc --> + * This returns StorageInfrastructure.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/StorageInfrastructure")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/StorageInfrastructure")); + } /** - * This returns the label text for the adapted class. - * <!-- begin-user-doc --> + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String getText(Object object) { - String label = ((StorageInfrastructure)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_StorageInfrastructure_type") : - getString("_UI_StorageInfrastructure_type") + " " + label; - } + String label = ((StorageInfrastructure)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_StorageInfrastructure_type") : + getString("_UI_StorageInfrastructure_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 --> + * 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 - */ + * @generated + */ @Override public void notifyChanged(Notification notification) { - updateChildren(notification); - super.notifyChanged(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 --> + * 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 - */ + * @generated + */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } + super.collectNewChildDescriptors(newChildDescriptors, object); + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/plugin.xml b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/plugin.xml index 1bf0f477..f0618597 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/plugin.xml +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/plugin.xml @@ -27,7 +27,52 @@ </wizard> </extension> + <extension point="org.eclipse.ui.newWizards"> + <!-- @generated resourcelandscape --> + <category + id="org.eclipse.emf.ecore.Wizard.category.ID" + name="%_UI_Wizard_category"/> + <wizard + id="edu.kit.ipd.descartes.mm.resourcelandscape.presentation.ResourcelandscapeModelWizardID" + name="%_UI_ResourcelandscapeModelWizard_label" + class="edu.kit.ipd.descartes.mm.resourcelandscape.presentation.ResourcelandscapeModelWizard" + category="org.eclipse.emf.ecore.Wizard.category.ID" + icon="icons/full/obj16/ResourcelandscapeModelFile.gif"> + <description>%_UI_ResourcelandscapeModelWizard_description</description> + <selection class="org.eclipse.core.resources.IResource"/> + </wizard> + </extension> + + <extension point="org.eclipse.ui.editors"> + <!-- @generated resourcelandscape --> + <editor + id="edu.kit.ipd.descartes.mm.resourceconfiguration.presentation.ResourceconfigurationEditorID" + name="%_UI_ResourceconfigurationEditor_label" + icon="icons/full/obj16/ResourceconfigurationModelFile.gif" + extensions="resourceconfiguration" + class="edu.kit.ipd.descartes.mm.resourceconfiguration.presentation.ResourceconfigurationEditor" + contributorClass="edu.kit.ipd.descartes.mm.resourceconfiguration.presentation.ResourceconfigurationActionBarContributor"> + </editor> + </extension> + + <extension point="org.eclipse.ui.newWizards"> + <!-- @generated resourcelandscape --> + <category + id="org.eclipse.emf.ecore.Wizard.category.ID" + name="%_UI_Wizard_category"/> + <wizard + id="edu.kit.ipd.descartes.mm.containerrepository.presentation.ContainerrepositoryModelWizardID" + name="%_UI_ContainerrepositoryModelWizard_label" + class="edu.kit.ipd.descartes.mm.containerrepository.presentation.ContainerrepositoryModelWizard" + category="org.eclipse.emf.ecore.Wizard.category.ID" + icon="icons/full/obj16/ContainerrepositoryModelFile.gif"> + <description>%_UI_ContainerrepositoryModelWizard_description</description> + <selection class="org.eclipse.core.resources.IResource"/> + </wizard> + </extension> + +null <extension point="org.eclipse.ui.editors"> <editor id="edu.kit.ipd.descartes.mm.resourcelandscape.presentation.ResourcelandscapeEditorID" name="%_UI_ResourcelandscapeEditor_label" @@ -38,6 +83,23 @@ </editor> </extension> + <extension point="org.eclipse.ui.newWizards"> + <!-- @generated resourcelandscape --> + <category + id="org.eclipse.emf.ecore.Wizard.category.ID" + name="%_UI_Wizard_category"/> + <wizard + id="edu.kit.ipd.descartes.mm.resourceconfiguration.presentation.ResourceconfigurationModelWizardID" + name="%_UI_ResourceconfigurationModelWizard_label" + class="edu.kit.ipd.descartes.mm.resourceconfiguration.presentation.ResourceconfigurationModelWizard" + category="org.eclipse.emf.ecore.Wizard.category.ID" + icon="icons/full/obj16/ResourceconfigurationModelFile.gif"> + <description>%_UI_ResourceconfigurationModelWizard_description</description> + <selection class="org.eclipse.core.resources.IResource"/> + </wizard> + </extension> + +null <!-- <extension point="org.eclipse.ui.newWizards"> <category id="tools.descartes.dml.category" @@ -100,6 +162,23 @@ </editor> </extension> + <extension point="org.eclipse.ui.newWizards"> + <!-- @generated resourcelandscape --> + <category + id="org.eclipse.emf.ecore.Wizard.category.ID" + name="%_UI_Wizard_category"/> + <wizard + id="edu.kit.ipd.descartes.mm.resourcetype.presentation.ResourcetypeModelWizardID" + name="%_UI_ResourcetypeModelWizard_label" + class="edu.kit.ipd.descartes.mm.resourcetype.presentation.ResourcetypeModelWizard" + category="org.eclipse.emf.ecore.Wizard.category.ID" + icon="icons/full/obj16/ResourcetypeModelFile.gif"> + <description>%_UI_ResourcetypeModelWizard_description</description> + <selection class="org.eclipse.core.resources.IResource"/> + </wizard> + </extension> + +null <extension point="org.eclipse.ui.newWizards"> <category id="tools.descartes.dml.category" diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourceconfiguration/presentation/ResourceconfigurationActionBarContributor.java b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourceconfiguration/presentation/ResourceconfigurationActionBarContributor.java index ae6bccb8..5dec3094 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourceconfiguration/presentation/ResourceconfigurationActionBarContributor.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourceconfiguration/presentation/ResourceconfigurationActionBarContributor.java @@ -52,375 +52,375 @@ public class ResourceconfigurationActionBarContributor extends EditingDomainActionBarContributor implements ISelectionChangedListener { /** - * This keeps track of the active editor. - * <!-- begin-user-doc --> + * This keeps track of the active editor. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IEditorPart activeEditorPart; /** - * This keeps track of the current selection provider. - * <!-- begin-user-doc --> + * This keeps track of the current selection provider. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ISelectionProvider selectionProvider; /** - * This action opens the Properties view. - * <!-- begin-user-doc --> + * This action opens the Properties view. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IAction showPropertiesViewAction = new Action(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) { - @Override - public void run() { - try { - getPage().showView("org.eclipse.ui.views.PropertySheet"); - } - catch (PartInitException exception) { - ResourcelandscapeEditorPlugin.INSTANCE.log(exception); - } - } - }; + @Override + public void run() { + try { + getPage().showView("org.eclipse.ui.views.PropertySheet"); + } + catch (PartInitException exception) { + ResourcelandscapeEditorPlugin.INSTANCE.log(exception); + } + } + }; /** - * This action refreshes the viewer of the current editor if the editor - * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}. - * <!-- begin-user-doc --> + * This action refreshes the viewer of the current editor if the editor + * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IAction refreshViewerAction = new Action(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) { - @Override - public boolean isEnabled() { - return activeEditorPart instanceof IViewerProvider; - } - - @Override - public void run() { - if (activeEditorPart instanceof IViewerProvider) { - Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer(); - if (viewer != null) { - viewer.refresh(); - } - } - } - }; + @Override + public boolean isEnabled() { + return activeEditorPart instanceof IViewerProvider; + } + + @Override + public void run() { + if (activeEditorPart instanceof IViewerProvider) { + Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer(); + if (viewer != null) { + viewer.refresh(); + } + } + } + }; /** - * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor - * generated for the current selection by the item provider. - * <!-- begin-user-doc --> + * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor + * generated for the current selection by the item provider. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<IAction> createChildActions; /** - * This is the menu manager into which menu contribution items should be added for CreateChild actions. - * <!-- begin-user-doc --> + * This is the menu manager into which menu contribution items should be added for CreateChild actions. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IMenuManager createChildMenuManager; /** - * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor - * generated for the current selection by the item provider. - * <!-- begin-user-doc --> + * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor + * generated for the current selection by the item provider. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<IAction> createSiblingActions; /** - * This is the menu manager into which menu contribution items should be added for CreateSibling actions. - * <!-- begin-user-doc --> + * This is the menu manager into which menu contribution items should be added for CreateSibling actions. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IMenuManager createSiblingMenuManager; /** - * This creates an instance of the contributor. - * <!-- begin-user-doc --> + * This creates an instance of the contributor. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourceconfigurationActionBarContributor() { - super(ADDITIONS_LAST_STYLE); - loadResourceAction = new LoadResourceAction(); - validateAction = new ValidateAction(); - controlAction = new ControlAction(); - } + super(ADDITIONS_LAST_STYLE); + loadResourceAction = new LoadResourceAction(); + validateAction = new ValidateAction(); + controlAction = new ControlAction(); + } /** - * This adds Separators for editor additions to the tool bar. - * <!-- begin-user-doc --> + * This adds Separators for editor additions to the tool bar. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void contributeToToolBar(IToolBarManager toolBarManager) { - toolBarManager.add(new Separator("resourceconfiguration-settings")); - toolBarManager.add(new Separator("resourceconfiguration-additions")); - } + toolBarManager.add(new Separator("resourceconfiguration-settings")); + toolBarManager.add(new Separator("resourceconfiguration-additions")); + } /** - * This adds to the menu bar a menu and some separators for editor additions, - * as well as the sub-menus for object creation items. - * <!-- begin-user-doc --> + * This adds to the menu bar a menu and some separators for editor additions, + * as well as the sub-menus for object creation items. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void contributeToMenu(IMenuManager menuManager) { - super.contributeToMenu(menuManager); - - IMenuManager submenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourceconfigurationEditor_menu"), "edu.kit.ipd.descartes.mm.resourceconfigurationMenuID"); - menuManager.insertAfter("additions", submenuManager); - submenuManager.add(new Separator("settings")); - submenuManager.add(new Separator("actions")); - submenuManager.add(new Separator("additions")); - submenuManager.add(new Separator("additions-end")); - - // Prepare for CreateChild item addition or removal. - // - createChildMenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); - submenuManager.insertBefore("additions", createChildMenuManager); - - // Prepare for CreateSibling item addition or removal. - // - createSiblingMenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); - submenuManager.insertBefore("additions", createSiblingMenuManager); - - // Force an update because Eclipse hides empty menus now. - // - submenuManager.addMenuListener - (new IMenuListener() { - public void menuAboutToShow(IMenuManager menuManager) { - menuManager.updateAll(true); - } - }); - - addGlobalActions(submenuManager); - } + super.contributeToMenu(menuManager); + + IMenuManager submenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourceconfigurationEditor_menu"), "edu.kit.ipd.descartes.mm.resourceconfigurationMenuID"); + menuManager.insertAfter("additions", submenuManager); + submenuManager.add(new Separator("settings")); + submenuManager.add(new Separator("actions")); + submenuManager.add(new Separator("additions")); + submenuManager.add(new Separator("additions-end")); + + // Prepare for CreateChild item addition or removal. + // + createChildMenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + submenuManager.insertBefore("additions", createChildMenuManager); + + // Prepare for CreateSibling item addition or removal. + // + createSiblingMenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + submenuManager.insertBefore("additions", createSiblingMenuManager); + + // Force an update because Eclipse hides empty menus now. + // + submenuManager.addMenuListener + (new IMenuListener() { + public void menuAboutToShow(IMenuManager menuManager) { + menuManager.updateAll(true); + } + }); + + addGlobalActions(submenuManager); + } /** - * When the active editor changes, this remembers the change and registers with it as a selection provider. - * <!-- begin-user-doc --> + * When the active editor changes, this remembers the change and registers with it as a selection provider. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void setActiveEditor(IEditorPart part) { - super.setActiveEditor(part); - activeEditorPart = part; - - // Switch to the new selection provider. - // - if (selectionProvider != null) { - selectionProvider.removeSelectionChangedListener(this); - } - if (part == null) { - selectionProvider = null; - } - else { - selectionProvider = part.getSite().getSelectionProvider(); - selectionProvider.addSelectionChangedListener(this); - - // Fake a selection changed event to update the menus. - // - if (selectionProvider.getSelection() != null) { - selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection())); - } - } - } + super.setActiveEditor(part); + activeEditorPart = part; + + // Switch to the new selection provider. + // + if (selectionProvider != null) { + selectionProvider.removeSelectionChangedListener(this); + } + if (part == null) { + selectionProvider = null; + } + else { + selectionProvider = part.getSite().getSelectionProvider(); + selectionProvider.addSelectionChangedListener(this); + + // Fake a selection changed event to update the menus. + // + if (selectionProvider.getSelection() != null) { + selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection())); + } + } + } /** - * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener}, - * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings - * that can be added to the selected object and updating the menus accordingly. - * <!-- begin-user-doc --> + * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener}, + * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings + * that can be added to the selected object and updating the menus accordingly. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void selectionChanged(SelectionChangedEvent event) { - // Remove any menu items for old selection. - // - if (createChildMenuManager != null) { - depopulateManager(createChildMenuManager, createChildActions); - } - if (createSiblingMenuManager != null) { - depopulateManager(createSiblingMenuManager, createSiblingActions); - } - - // Query the new selection for appropriate new child/sibling descriptors - // - Collection<?> newChildDescriptors = null; - Collection<?> newSiblingDescriptors = null; - - ISelection selection = event.getSelection(); - if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) { - Object object = ((IStructuredSelection)selection).getFirstElement(); - - EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain(); - - newChildDescriptors = domain.getNewChildDescriptors(object, null); - newSiblingDescriptors = domain.getNewChildDescriptors(null, object); - } - - // Generate actions for selection; populate and redraw the menus. - // - createChildActions = generateCreateChildActions(newChildDescriptors, selection); - createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection); - - if (createChildMenuManager != null) { - populateManager(createChildMenuManager, createChildActions, null); - createChildMenuManager.update(true); - } - if (createSiblingMenuManager != null) { - populateManager(createSiblingMenuManager, createSiblingActions, null); - createSiblingMenuManager.update(true); - } - } + // Remove any menu items for old selection. + // + if (createChildMenuManager != null) { + depopulateManager(createChildMenuManager, createChildActions); + } + if (createSiblingMenuManager != null) { + depopulateManager(createSiblingMenuManager, createSiblingActions); + } + + // Query the new selection for appropriate new child/sibling descriptors + // + Collection<?> newChildDescriptors = null; + Collection<?> newSiblingDescriptors = null; + + ISelection selection = event.getSelection(); + if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) { + Object object = ((IStructuredSelection)selection).getFirstElement(); + + EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain(); + + newChildDescriptors = domain.getNewChildDescriptors(object, null); + newSiblingDescriptors = domain.getNewChildDescriptors(null, object); + } + + // Generate actions for selection; populate and redraw the menus. + // + createChildActions = generateCreateChildActions(newChildDescriptors, selection); + createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection); + + if (createChildMenuManager != null) { + populateManager(createChildMenuManager, createChildActions, null); + createChildMenuManager.update(true); + } + if (createSiblingMenuManager != null) { + populateManager(createSiblingMenuManager, createSiblingActions, null); + createSiblingMenuManager.update(true); + } + } /** - * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>, - * and returns the collection of these actions. - * <!-- begin-user-doc --> + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>, + * and returns the collection of these actions. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection) { - Collection<IAction> actions = new ArrayList<IAction>(); - if (descriptors != null) { - for (Object descriptor : descriptors) { - actions.add(new CreateChildAction(activeEditorPart, selection, descriptor)); - } - } - return actions; - } + Collection<IAction> actions = new ArrayList<IAction>(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateChildAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } /** - * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in <code>descriptors</code>, - * and returns the collection of these actions. - * <!-- begin-user-doc --> + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in <code>descriptors</code>, + * and returns the collection of these actions. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection) { - Collection<IAction> actions = new ArrayList<IAction>(); - if (descriptors != null) { - for (Object descriptor : descriptors) { - actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor)); - } - } - return actions; - } + Collection<IAction> actions = new ArrayList<IAction>(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } /** - * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s - * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection, - * by inserting them before the specified contribution item <code>contributionID</code>. - * If <code>contributionID</code> is <code>null</code>, they are simply added. - * <!-- begin-user-doc --> + * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s + * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection, + * by inserting them before the specified contribution item <code>contributionID</code>. + * If <code>contributionID</code> is <code>null</code>, they are simply added. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) { - if (actions != null) { - for (IAction action : actions) { - if (contributionID != null) { - manager.insertBefore(contributionID, action); - } - else { - manager.add(action); - } - } - } - } + if (actions != null) { + for (IAction action : actions) { + if (contributionID != null) { + manager.insertBefore(contributionID, action); + } + else { + manager.add(action); + } + } + } + } /** - * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s - * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection. - * <!-- begin-user-doc --> + * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s + * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) { - if (actions != null) { - IContributionItem[] items = manager.getItems(); - for (int i = 0; i < items.length; i++) { - // Look into SubContributionItems - // - IContributionItem contributionItem = items[i]; - while (contributionItem instanceof SubContributionItem) { - contributionItem = ((SubContributionItem)contributionItem).getInnerItem(); - } - - // Delete the ActionContributionItems with matching action. - // - if (contributionItem instanceof ActionContributionItem) { - IAction action = ((ActionContributionItem)contributionItem).getAction(); - if (actions.contains(action)) { - manager.remove(contributionItem); - } - } - } - } - } + if (actions != null) { + IContributionItem[] items = manager.getItems(); + for (int i = 0; i < items.length; i++) { + // Look into SubContributionItems + // + IContributionItem contributionItem = items[i]; + while (contributionItem instanceof SubContributionItem) { + contributionItem = ((SubContributionItem)contributionItem).getInnerItem(); + } + + // Delete the ActionContributionItems with matching action. + // + if (contributionItem instanceof ActionContributionItem) { + IAction action = ((ActionContributionItem)contributionItem).getAction(); + if (actions.contains(action)) { + manager.remove(contributionItem); + } + } + } + } + } /** - * This populates the pop-up menu before it appears. - * <!-- begin-user-doc --> + * This populates the pop-up menu before it appears. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void menuAboutToShow(IMenuManager menuManager) { - super.menuAboutToShow(menuManager); - MenuManager submenuManager = null; + super.menuAboutToShow(menuManager); + MenuManager submenuManager = null; - submenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); - populateManager(submenuManager, createChildActions, null); - menuManager.insertBefore("edit", submenuManager); + submenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + populateManager(submenuManager, createChildActions, null); + menuManager.insertBefore("edit", submenuManager); - submenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); - populateManager(submenuManager, createSiblingActions, null); - menuManager.insertBefore("edit", submenuManager); - } + submenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + populateManager(submenuManager, createSiblingActions, null); + menuManager.insertBefore("edit", submenuManager); + } /** - * This inserts global actions before the "additions-end" separator. - * <!-- begin-user-doc --> + * This inserts global actions before the "additions-end" separator. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected void addGlobalActions(IMenuManager menuManager) { - menuManager.insertAfter("additions-end", new Separator("ui-actions")); - menuManager.insertAfter("ui-actions", showPropertiesViewAction); + menuManager.insertAfter("additions-end", new Separator("ui-actions")); + menuManager.insertAfter("ui-actions", showPropertiesViewAction); - refreshViewerAction.setEnabled(refreshViewerAction.isEnabled()); - menuManager.insertAfter("ui-actions", refreshViewerAction); + refreshViewerAction.setEnabled(refreshViewerAction.isEnabled()); + menuManager.insertAfter("ui-actions", refreshViewerAction); - super.addGlobalActions(menuManager); - } + super.addGlobalActions(menuManager); + } /** - * This ensures that a delete action will clean up all references to deleted objects. - * <!-- begin-user-doc --> + * This ensures that a delete action will clean up all references to deleted objects. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected boolean removeAllReferencesOnDelete() { - return true; - } + return true; + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourceconfiguration/presentation/ResourceconfigurationEditor.java b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourceconfiguration/presentation/ResourceconfigurationEditor.java index 9bc32335..e70a4c6d 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourceconfiguration/presentation/ResourceconfigurationEditor.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourceconfiguration/presentation/ResourceconfigurationEditor.java @@ -41,6 +41,7 @@ import org.eclipse.jface.action.Separator; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.dialogs.ProgressMonitorDialog; +import org.eclipse.jface.util.LocalSelectionTransfer; import org.eclipse.jface.viewers.ColumnWeightData; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; @@ -60,6 +61,7 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CTabFolder; import org.eclipse.swt.dnd.DND; +import org.eclipse.swt.dnd.FileTransfer; import org.eclipse.swt.dnd.Transfer; import org.eclipse.swt.events.ControlAdapter; @@ -181,1650 +183,1655 @@ public class ResourceconfigurationEditor extends MultiPageEditorPart implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker { /** - * This keeps track of the editing domain that is used to track all changes to the model. - * <!-- begin-user-doc --> + * This keeps track of the editing domain that is used to track all changes to the model. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected AdapterFactoryEditingDomain editingDomain; /** - * This is the one adapter factory used for providing views of the model. - * <!-- begin-user-doc --> + * This is the one adapter factory used for providing views of the model. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ComposedAdapterFactory adapterFactory; /** - * This is the content outline page. - * <!-- begin-user-doc --> + * This is the content outline page. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IContentOutlinePage contentOutlinePage; /** - * This is a kludge... - * <!-- begin-user-doc --> + * This is a kludge... + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IStatusLineManager contentOutlineStatusLineManager; /** - * This is the content outline page's viewer. - * <!-- begin-user-doc --> + * This is the content outline page's viewer. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected TreeViewer contentOutlineViewer; /** - * This is the property sheet page. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected PropertySheetPage propertySheetPage; + * This is the property sheet page. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected List<PropertySheetPage> propertySheetPages = new ArrayList<PropertySheetPage>(); - /** - * This is the viewer that shadows the selection in the content outline. - * The parent relation must be correctly defined for this to work. - * <!-- begin-user-doc --> + /** + * This is the viewer that shadows the selection in the content outline. + * The parent relation must be correctly defined for this to work. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected TreeViewer selectionViewer; /** - * This inverts the roll of parent and child in the content provider and show parents as a tree. - * <!-- begin-user-doc --> + * This inverts the roll of parent and child in the content provider and show parents as a tree. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected TreeViewer parentViewer; /** - * This shows how a tree view works. - * <!-- begin-user-doc --> + * This shows how a tree view works. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected TreeViewer treeViewer; /** - * This shows how a list view works. - * A list viewer doesn't support icons. - * <!-- begin-user-doc --> + * This shows how a list view works. + * A list viewer doesn't support icons. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ListViewer listViewer; /** - * This shows how a table view works. - * A table can be used as a list with icons. - * <!-- begin-user-doc --> + * This shows how a table view works. + * A table can be used as a list with icons. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected TableViewer tableViewer; /** - * This shows how a tree view with columns works. - * <!-- begin-user-doc --> + * This shows how a tree view with columns works. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected TreeViewer treeViewerWithColumns; /** - * This keeps track of the active viewer pane, in the book. - * <!-- begin-user-doc --> + * This keeps track of the active viewer pane, in the book. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ViewerPane currentViewerPane; /** - * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer. - * <!-- begin-user-doc --> + * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Viewer currentViewer; /** - * This listens to which ever viewer is active. - * <!-- begin-user-doc --> + * This listens to which ever viewer is active. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ISelectionChangedListener selectionChangedListener; /** - * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor. - * <!-- begin-user-doc --> + * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<ISelectionChangedListener> selectionChangedListeners = new ArrayList<ISelectionChangedListener>(); /** - * This keeps track of the selection of the editor as a whole. - * <!-- begin-user-doc --> + * This keeps track of the selection of the editor as a whole. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ISelection editorSelection = StructuredSelection.EMPTY; /** - * The MarkerHelper is responsible for creating workspace resource markers presented - * in Eclipse's Problems View. - * <!-- begin-user-doc --> + * The MarkerHelper is responsible for creating workspace resource markers presented + * in Eclipse's Problems View. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected MarkerHelper markerHelper = new EditUIMarkerHelper(); /** - * This listens for when the outline becomes active - * <!-- begin-user-doc --> + * This listens for when the outline becomes active + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IPartListener partListener = new IPartListener() { - public void partActivated(IWorkbenchPart p) { - if (p instanceof ContentOutline) { - if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) { - getActionBarContributor().setActiveEditor(ResourceconfigurationEditor.this); - - setCurrentViewer(contentOutlineViewer); - } - } - else if (p instanceof PropertySheet) { - if (((PropertySheet)p).getCurrentPage() == propertySheetPage) { - getActionBarContributor().setActiveEditor(ResourceconfigurationEditor.this); - handleActivate(); - } - } - else if (p == ResourceconfigurationEditor.this) { - handleActivate(); - } - } - public void partBroughtToTop(IWorkbenchPart p) { - // Ignore. - } - public void partClosed(IWorkbenchPart p) { - // Ignore. - } - public void partDeactivated(IWorkbenchPart p) { - // Ignore. - } - public void partOpened(IWorkbenchPart p) { - // Ignore. - } - }; - - /** - * Resources that have been removed since last activation. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + public void partActivated(IWorkbenchPart p) { + if (p instanceof ContentOutline) { + if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) { + getActionBarContributor().setActiveEditor(ResourceconfigurationEditor.this); + + setCurrentViewer(contentOutlineViewer); + } + } + else if (p instanceof PropertySheet) { + if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) { + getActionBarContributor().setActiveEditor(ResourceconfigurationEditor.this); + handleActivate(); + } + } + else if (p == ResourceconfigurationEditor.this) { + handleActivate(); + } + } + public void partBroughtToTop(IWorkbenchPart p) { + // Ignore. + } + public void partClosed(IWorkbenchPart p) { + // Ignore. + } + public void partDeactivated(IWorkbenchPart p) { + // Ignore. + } + public void partOpened(IWorkbenchPart p) { + // Ignore. + } + }; + + /** + * Resources that have been removed since last activation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected Collection<Resource> removedResources = new ArrayList<Resource>(); /** - * Resources that have been changed since last activation. - * <!-- begin-user-doc --> + * Resources that have been changed since last activation. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<Resource> changedResources = new ArrayList<Resource>(); /** - * Resources that have been saved. - * <!-- begin-user-doc --> + * Resources that have been saved. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<Resource> savedResources = new ArrayList<Resource>(); /** - * Map to store the diagnostic associated with a resource. - * <!-- begin-user-doc --> + * Map to store the diagnostic associated with a resource. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Map<Resource, Diagnostic> resourceToDiagnosticMap = new LinkedHashMap<Resource, Diagnostic>(); /** - * Controls whether the problem indication should be updated. - * <!-- begin-user-doc --> + * Controls whether the problem indication should be updated. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected boolean updateProblemIndication = true; /** - * Adapter used to update the problem indication when resources are demanded loaded. - * <!-- begin-user-doc --> + * Adapter used to update the problem indication when resources are demanded loaded. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected EContentAdapter problemIndicationAdapter = new EContentAdapter() { - @Override - public void notifyChanged(Notification notification) { - if (notification.getNotifier() instanceof Resource) { - switch (notification.getFeatureID(Resource.class)) { - case Resource.RESOURCE__IS_LOADED: - case Resource.RESOURCE__ERRORS: - case Resource.RESOURCE__WARNINGS: { - Resource resource = (Resource)notification.getNotifier(); - Diagnostic diagnostic = analyzeResourceProblems(resource, null); - if (diagnostic.getSeverity() != Diagnostic.OK) { - resourceToDiagnosticMap.put(resource, diagnostic); - } - else { - resourceToDiagnosticMap.remove(resource); - } - - if (updateProblemIndication) { - getSite().getShell().getDisplay().asyncExec - (new Runnable() { - public void run() { - updateProblemIndication(); - } - }); - } - break; - } - } - } - else { - super.notifyChanged(notification); - } - } - - @Override - protected void setTarget(Resource target) { - basicSetTarget(target); - } - - @Override - protected void unsetTarget(Resource target) { - basicUnsetTarget(target); - } - }; - - /** - * This listens for workspace changes. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + @Override + public void notifyChanged(Notification notification) { + if (notification.getNotifier() instanceof Resource) { + switch (notification.getFeatureID(Resource.class)) { + case Resource.RESOURCE__IS_LOADED: + case Resource.RESOURCE__ERRORS: + case Resource.RESOURCE__WARNINGS: { + Resource resource = (Resource)notification.getNotifier(); + Diagnostic diagnostic = analyzeResourceProblems(resource, null); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, diagnostic); + } + else { + resourceToDiagnosticMap.remove(resource); + } + + if (updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + break; + } + } + } + else { + super.notifyChanged(notification); + } + } + + @Override + protected void setTarget(Resource target) { + basicSetTarget(target); + } + + @Override + protected void unsetTarget(Resource target) { + basicUnsetTarget(target); + resourceToDiagnosticMap.remove(target); + if (updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + } + }; + + /** + * This listens for workspace changes. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected IResourceChangeListener resourceChangeListener = new IResourceChangeListener() { - public void resourceChanged(IResourceChangeEvent event) { - IResourceDelta delta = event.getDelta(); - try { - class ResourceDeltaVisitor implements IResourceDeltaVisitor { - protected ResourceSet resourceSet = editingDomain.getResourceSet(); - protected Collection<Resource> changedResources = new ArrayList<Resource>(); - protected Collection<Resource> removedResources = new ArrayList<Resource>(); - - public boolean visit(IResourceDelta delta) { - if (delta.getResource().getType() == IResource.FILE) { - if (delta.getKind() == IResourceDelta.REMOVED || - delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) { - Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false); - if (resource != null) { - if (delta.getKind() == IResourceDelta.REMOVED) { - removedResources.add(resource); - } - else if (!savedResources.remove(resource)) { - changedResources.add(resource); - } - } - } - } - - return true; - } - - public Collection<Resource> getChangedResources() { - return changedResources; - } - - public Collection<Resource> getRemovedResources() { - return removedResources; - } - } - - final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor(); - delta.accept(visitor); - - if (!visitor.getRemovedResources().isEmpty()) { - getSite().getShell().getDisplay().asyncExec - (new Runnable() { - public void run() { - removedResources.addAll(visitor.getRemovedResources()); - if (!isDirty()) { - getSite().getPage().closeEditor(ResourceconfigurationEditor.this, false); - } - } - }); - } - - if (!visitor.getChangedResources().isEmpty()) { - getSite().getShell().getDisplay().asyncExec - (new Runnable() { - public void run() { - changedResources.addAll(visitor.getChangedResources()); - if (getSite().getPage().getActiveEditor() == ResourceconfigurationEditor.this) { - handleActivate(); - } - } - }); - } - } - catch (CoreException exception) { - ResourcelandscapeEditorPlugin.INSTANCE.log(exception); - } - } - }; - - /** - * Handles activation of the editor or it's associated views. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + public void resourceChanged(IResourceChangeEvent event) { + IResourceDelta delta = event.getDelta(); + try { + class ResourceDeltaVisitor implements IResourceDeltaVisitor { + protected ResourceSet resourceSet = editingDomain.getResourceSet(); + protected Collection<Resource> changedResources = new ArrayList<Resource>(); + protected Collection<Resource> removedResources = new ArrayList<Resource>(); + + public boolean visit(IResourceDelta delta) { + if (delta.getResource().getType() == IResource.FILE) { + if (delta.getKind() == IResourceDelta.REMOVED || + delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) { + Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false); + if (resource != null) { + if (delta.getKind() == IResourceDelta.REMOVED) { + removedResources.add(resource); + } + else if (!savedResources.remove(resource)) { + changedResources.add(resource); + } + } + } + return false; + } + + return true; + } + + public Collection<Resource> getChangedResources() { + return changedResources; + } + + public Collection<Resource> getRemovedResources() { + return removedResources; + } + } + + final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor(); + delta.accept(visitor); + + if (!visitor.getRemovedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + removedResources.addAll(visitor.getRemovedResources()); + if (!isDirty()) { + getSite().getPage().closeEditor(ResourceconfigurationEditor.this, false); + } + } + }); + } + + if (!visitor.getChangedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + changedResources.addAll(visitor.getChangedResources()); + if (getSite().getPage().getActiveEditor() == ResourceconfigurationEditor.this) { + handleActivate(); + } + } + }); + } + } + catch (CoreException exception) { + ResourcelandscapeEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * Handles activation of the editor or it's associated views. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected void handleActivate() { - // Recompute the read only state. - // - if (editingDomain.getResourceToReadOnlyMap() != null) { - editingDomain.getResourceToReadOnlyMap().clear(); - - // Refresh any actions that may become enabled or disabled. - // - setSelection(getSelection()); - } - - if (!removedResources.isEmpty()) { - if (handleDirtyConflict()) { - getSite().getPage().closeEditor(ResourceconfigurationEditor.this, false); - } - else { - removedResources.clear(); - changedResources.clear(); - savedResources.clear(); - } - } - else if (!changedResources.isEmpty()) { - changedResources.removeAll(savedResources); - handleChangedResources(); - changedResources.clear(); - savedResources.clear(); - } - } - - /** - * Handles what to do with changed resources on activation. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + // Recompute the read only state. + // + if (editingDomain.getResourceToReadOnlyMap() != null) { + editingDomain.getResourceToReadOnlyMap().clear(); + + // Refresh any actions that may become enabled or disabled. + // + setSelection(getSelection()); + } + + if (!removedResources.isEmpty()) { + if (handleDirtyConflict()) { + getSite().getPage().closeEditor(ResourceconfigurationEditor.this, false); + } + else { + removedResources.clear(); + changedResources.clear(); + savedResources.clear(); + } + } + else if (!changedResources.isEmpty()) { + changedResources.removeAll(savedResources); + handleChangedResources(); + changedResources.clear(); + savedResources.clear(); + } + } + + /** + * Handles what to do with changed resources on activation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected void handleChangedResources() { - if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) { - if (isDirty()) { - changedResources.addAll(editingDomain.getResourceSet().getResources()); - } - editingDomain.getCommandStack().flush(); - - updateProblemIndication = false; - for (Resource resource : changedResources) { - if (resource.isLoaded()) { - resource.unload(); - try { - resource.load(Collections.EMPTY_MAP); - } - catch (IOException exception) { - if (!resourceToDiagnosticMap.containsKey(resource)) { - resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); - } - } - } - } - - if (AdapterFactoryEditingDomain.isStale(editorSelection)) { - setSelection(StructuredSelection.EMPTY); - } - - updateProblemIndication = true; - updateProblemIndication(); - } - } + if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) { + if (isDirty()) { + changedResources.addAll(editingDomain.getResourceSet().getResources()); + } + editingDomain.getCommandStack().flush(); + + updateProblemIndication = false; + for (Resource resource : changedResources) { + if (resource.isLoaded()) { + resource.unload(); + try { + resource.load(Collections.EMPTY_MAP); + } + catch (IOException exception) { + if (!resourceToDiagnosticMap.containsKey(resource)) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + } + } + } + + if (AdapterFactoryEditingDomain.isStale(editorSelection)) { + setSelection(StructuredSelection.EMPTY); + } + + updateProblemIndication = true; + updateProblemIndication(); + } + } /** - * Updates the problems indication with the information described in the specified diagnostic. - * <!-- begin-user-doc --> + * Updates the problems indication with the information described in the specified diagnostic. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void updateProblemIndication() { - if (updateProblemIndication) { - BasicDiagnostic diagnostic = - new BasicDiagnostic - (Diagnostic.OK, - "edu.kit.ipd.descartes.mm.resourcelandscape.editor", - 0, - null, - new Object [] { editingDomain.getResourceSet() }); - for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) { - if (childDiagnostic.getSeverity() != Diagnostic.OK) { - diagnostic.add(childDiagnostic); - } - } - - int lastEditorPage = getPageCount() - 1; - if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) { - ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic); - if (diagnostic.getSeverity() != Diagnostic.OK) { - setActivePage(lastEditorPage); - } - } - else if (diagnostic.getSeverity() != Diagnostic.OK) { - ProblemEditorPart problemEditorPart = new ProblemEditorPart(); - problemEditorPart.setDiagnostic(diagnostic); - problemEditorPart.setMarkerHelper(markerHelper); - try { - addPage(++lastEditorPage, problemEditorPart, getEditorInput()); - setPageText(lastEditorPage, problemEditorPart.getPartName()); - setActivePage(lastEditorPage); - showTabs(); - } - catch (PartInitException exception) { - ResourcelandscapeEditorPlugin.INSTANCE.log(exception); - } - } - - if (markerHelper.hasMarkers(editingDomain.getResourceSet())) { - markerHelper.deleteMarkers(editingDomain.getResourceSet()); - if (diagnostic.getSeverity() != Diagnostic.OK) { - try { - markerHelper.createMarkers(diagnostic); - } - catch (CoreException exception) { - ResourcelandscapeEditorPlugin.INSTANCE.log(exception); - } - } - } - } - } - - /** - * Shows a dialog that asks if conflicting changes should be discarded. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + if (updateProblemIndication) { + BasicDiagnostic diagnostic = + new BasicDiagnostic + (Diagnostic.OK, + "edu.kit.ipd.descartes.mm.resourcelandscape.editor", + 0, + null, + new Object [] { editingDomain.getResourceSet() }); + for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) { + if (childDiagnostic.getSeverity() != Diagnostic.OK) { + diagnostic.add(childDiagnostic); + } + } + + int lastEditorPage = getPageCount() - 1; + if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) { + ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic); + if (diagnostic.getSeverity() != Diagnostic.OK) { + setActivePage(lastEditorPage); + } + } + else if (diagnostic.getSeverity() != Diagnostic.OK) { + ProblemEditorPart problemEditorPart = new ProblemEditorPart(); + problemEditorPart.setDiagnostic(diagnostic); + problemEditorPart.setMarkerHelper(markerHelper); + try { + addPage(++lastEditorPage, problemEditorPart, getEditorInput()); + setPageText(lastEditorPage, problemEditorPart.getPartName()); + setActivePage(lastEditorPage); + showTabs(); + } + catch (PartInitException exception) { + ResourcelandscapeEditorPlugin.INSTANCE.log(exception); + } + } + + if (markerHelper.hasMarkers(editingDomain.getResourceSet())) { + markerHelper.deleteMarkers(editingDomain.getResourceSet()); + if (diagnostic.getSeverity() != Diagnostic.OK) { + try { + markerHelper.createMarkers(diagnostic); + } + catch (CoreException exception) { + ResourcelandscapeEditorPlugin.INSTANCE.log(exception); + } + } + } + } + } + + /** + * Shows a dialog that asks if conflicting changes should be discarded. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected boolean handleDirtyConflict() { - return - MessageDialog.openQuestion - (getSite().getShell(), - getString("_UI_FileConflict_label"), - getString("_WARN_FileConflict")); - } + return + MessageDialog.openQuestion + (getSite().getShell(), + getString("_UI_FileConflict_label"), + getString("_WARN_FileConflict")); + } /** - * This creates a model editor. - * <!-- begin-user-doc --> + * This creates a model editor. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourceconfigurationEditor() { - super(); - initializeEditingDomain(); - } + super(); + initializeEditingDomain(); + } /** - * This sets up the editing domain for the model editor. - * <!-- begin-user-doc --> + * This sets up the editing domain for the model editor. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void initializeEditingDomain() { - // Create an adapter factory that yields item providers. - // - adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); - - adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); - adapterFactory.addAdapterFactory(new ResourcelandscapeItemProviderAdapterFactory()); - adapterFactory.addAdapterFactory(new ResourceconfigurationItemProviderAdapterFactory()); - adapterFactory.addAdapterFactory(new ContainerrepositoryItemProviderAdapterFactory()); - adapterFactory.addAdapterFactory(new ResourcetypeItemProviderAdapterFactory()); - adapterFactory.addAdapterFactory(new CoreItemProviderAdapterFactory()); - adapterFactory.addAdapterFactory(new IdentifierItemProviderAdapterFactory()); - adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); - - // Create the command stack that will notify this editor as commands are executed. - // - BasicCommandStack commandStack = new BasicCommandStack(); - - // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus. - // - commandStack.addCommandStackListener - (new CommandStackListener() { - public void commandStackChanged(final EventObject event) { - getContainer().getDisplay().asyncExec - (new Runnable() { - public void run() { - firePropertyChange(IEditorPart.PROP_DIRTY); - - // Try to select the affected objects. - // - Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand(); - if (mostRecentCommand != null) { - setSelectionToViewer(mostRecentCommand.getAffectedObjects()); - } - if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed()) { - propertySheetPage.refresh(); - } - } - }); - } - }); - - // Create the editing domain with a special command stack. - // - editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>()); - } - - /** - * This is here for the listener to be able to call it. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + // Create an adapter factory that yields item providers. + // + adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); + + adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ResourcelandscapeItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ResourceconfigurationItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ContainerrepositoryItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ResourcetypeItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new CoreItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new IdentifierItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); + + // Create the command stack that will notify this editor as commands are executed. + // + BasicCommandStack commandStack = new BasicCommandStack(); + + // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus. + // + commandStack.addCommandStackListener + (new CommandStackListener() { + public void commandStackChanged(final EventObject event) { + getContainer().getDisplay().asyncExec + (new Runnable() { + public void run() { + firePropertyChange(IEditorPart.PROP_DIRTY); + + // Try to select the affected objects. + // + Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand(); + if (mostRecentCommand != null) { + setSelectionToViewer(mostRecentCommand.getAffectedObjects()); + } + for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) { + PropertySheetPage propertySheetPage = i.next(); + if (propertySheetPage.getControl().isDisposed()) { + i.remove(); + } + else { + propertySheetPage.refresh(); + } + } + } + }); + } + }); + + // Create the editing domain with a special command stack. + // + editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>()); + } + + /** + * This is here for the listener to be able to call it. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ @Override protected void firePropertyChange(int action) { - super.firePropertyChange(action); - } + super.firePropertyChange(action); + } /** - * This sets the selection into whichever viewer is active. - * <!-- begin-user-doc --> + * This sets the selection into whichever viewer is active. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setSelectionToViewer(Collection<?> collection) { - final Collection<?> theSelection = collection; - // Make sure it's okay. - // - if (theSelection != null && !theSelection.isEmpty()) { - Runnable runnable = - new Runnable() { - public void run() { - // Try to select the items in the current content viewer of the editor. - // - if (currentViewer != null) { - currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true); - } - } - }; - getSite().getShell().getDisplay().asyncExec(runnable); - } - } - - /** - * This returns the editing domain as required by the {@link IEditingDomainProvider} interface. - * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain} - * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + final Collection<?> theSelection = collection; + // Make sure it's okay. + // + if (theSelection != null && !theSelection.isEmpty()) { + Runnable runnable = + new Runnable() { + public void run() { + // Try to select the items in the current content viewer of the editor. + // + if (currentViewer != null) { + currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true); + } + } + }; + getSite().getShell().getDisplay().asyncExec(runnable); + } + } + + /** + * This returns the editing domain as required by the {@link IEditingDomainProvider} interface. + * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain} + * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public EditingDomain getEditingDomain() { - return editingDomain; - } + return editingDomain; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object [] getElements(Object object) { - Object parent = super.getParent(object); - return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); - } + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object [] getChildren(Object object) { - Object parent = super.getParent(object); - return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); - } + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public boolean hasChildren(Object object) { - Object parent = super.getParent(object); - return parent != null; - } + Object parent = super.getParent(object); + return parent != null; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getParent(Object object) { - return null; - } + return null; + } } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setCurrentViewerPane(ViewerPane viewerPane) { - if (currentViewerPane != viewerPane) { - if (currentViewerPane != null) { - currentViewerPane.showFocus(false); - } - currentViewerPane = viewerPane; - } - setCurrentViewer(currentViewerPane.getViewer()); - } - - /** - * This makes sure that one content viewer, either for the current page or the outline view, if it has focus, - * is the current one. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + if (currentViewerPane != viewerPane) { + if (currentViewerPane != null) { + currentViewerPane.showFocus(false); + } + currentViewerPane = viewerPane; + } + setCurrentViewer(currentViewerPane.getViewer()); + } + + /** + * This makes sure that one content viewer, either for the current page or the outline view, if it has focus, + * is the current one. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public void setCurrentViewer(Viewer viewer) { - // If it is changing... - // - if (currentViewer != viewer) { - if (selectionChangedListener == null) { - // Create the listener on demand. - // - selectionChangedListener = - new ISelectionChangedListener() { - // This just notifies those things that are affected by the section. - // - public void selectionChanged(SelectionChangedEvent selectionChangedEvent) { - setSelection(selectionChangedEvent.getSelection()); - } - }; - } - - // Stop listening to the old one. - // - if (currentViewer != null) { - currentViewer.removeSelectionChangedListener(selectionChangedListener); - } - - // Start listening to the new one. - // - if (viewer != null) { - viewer.addSelectionChangedListener(selectionChangedListener); - } - - // Remember it. - // - currentViewer = viewer; - - // Set the editors selection based on the current viewer's selection. - // - setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection()); - } - } - - /** - * This returns the viewer as required by the {@link IViewerProvider} interface. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + // If it is changing... + // + if (currentViewer != viewer) { + if (selectionChangedListener == null) { + // Create the listener on demand. + // + selectionChangedListener = + new ISelectionChangedListener() { + // This just notifies those things that are affected by the section. + // + public void selectionChanged(SelectionChangedEvent selectionChangedEvent) { + setSelection(selectionChangedEvent.getSelection()); + } + }; + } + + // Stop listening to the old one. + // + if (currentViewer != null) { + currentViewer.removeSelectionChangedListener(selectionChangedListener); + } + + // Start listening to the new one. + // + if (viewer != null) { + viewer.addSelectionChangedListener(selectionChangedListener); + } + + // Remember it. + // + currentViewer = viewer; + + // Set the editors selection based on the current viewer's selection. + // + setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection()); + } + } + + /** + * This returns the viewer as required by the {@link IViewerProvider} interface. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public Viewer getViewer() { - return currentViewer; - } + return currentViewer; + } /** - * This creates a context menu for the viewer and adds a listener as well registering the menu for extension. - * <!-- begin-user-doc --> + * This creates a context menu for the viewer and adds a listener as well registering the menu for extension. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void createContextMenuFor(StructuredViewer viewer) { - MenuManager contextMenu = new MenuManager("#PopUp"); - contextMenu.add(new Separator("additions")); - contextMenu.setRemoveAllWhenShown(true); - contextMenu.addMenuListener(this); - Menu menu= contextMenu.createContextMenu(viewer.getControl()); - viewer.getControl().setMenu(menu); - getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer)); - - int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; - Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance() }; - viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer)); - viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer)); - } - - /** - * This is the method called to load a resource into the editing domain's resource set based on the editor's input. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + MenuManager contextMenu = new MenuManager("#PopUp"); + contextMenu.add(new Separator("additions")); + contextMenu.setRemoveAllWhenShown(true); + contextMenu.addMenuListener(this); + Menu menu= contextMenu.createContextMenu(viewer.getControl()); + viewer.getControl().setMenu(menu); + getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer)); + + int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; + Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() }; + viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer)); + viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer)); + } + + /** + * This is the method called to load a resource into the editing domain's resource set based on the editor's input. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public void createModel() { - URI resourceURI = EditUIUtil.getURI(getEditorInput()); - Exception exception = null; - Resource resource = null; - try { - // Load the resource through the editing domain. - // - resource = editingDomain.getResourceSet().getResource(resourceURI, true); - } - catch (Exception e) { - exception = e; - resource = editingDomain.getResourceSet().getResource(resourceURI, false); - } - - Diagnostic diagnostic = analyzeResourceProblems(resource, exception); - if (diagnostic.getSeverity() != Diagnostic.OK) { - resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); - } - editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter); - } - - /** - * Returns a diagnostic describing the errors and warnings listed in the resource - * and the specified exception (if any). - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + URI resourceURI = EditUIUtil.getURI(getEditorInput()); + Exception exception = null; + Resource resource = null; + try { + // Load the resource through the editing domain. + // + resource = editingDomain.getResourceSet().getResource(resourceURI, true); + } + catch (Exception e) { + exception = e; + resource = editingDomain.getResourceSet().getResource(resourceURI, false); + } + + Diagnostic diagnostic = analyzeResourceProblems(resource, exception); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter); + } + + /** + * Returns a diagnostic describing the errors and warnings listed in the resource + * and the specified exception (if any). + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { - if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) { - BasicDiagnostic basicDiagnostic = - new BasicDiagnostic - (Diagnostic.ERROR, - "edu.kit.ipd.descartes.mm.resourcelandscape.editor", - 0, - getString("_UI_CreateModelError_message", resource.getURI()), - new Object [] { exception == null ? (Object)resource : exception }); - basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); - return basicDiagnostic; - } - else if (exception != null) { - return - new BasicDiagnostic - (Diagnostic.ERROR, - "edu.kit.ipd.descartes.mm.resourcelandscape.editor", - 0, - getString("_UI_CreateModelError_message", resource.getURI()), - new Object[] { exception }); - } - else { - return Diagnostic.OK_INSTANCE; - } - } - - /** - * This is the method used by the framework to install your own controls. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) { + BasicDiagnostic basicDiagnostic = + new BasicDiagnostic + (Diagnostic.ERROR, + "edu.kit.ipd.descartes.mm.resourcelandscape.editor", + 0, + getString("_UI_CreateModelError_message", resource.getURI()), + new Object [] { exception == null ? (Object)resource : exception }); + basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); + return basicDiagnostic; + } + else if (exception != null) { + return + new BasicDiagnostic + (Diagnostic.ERROR, + "edu.kit.ipd.descartes.mm.resourcelandscape.editor", + 0, + getString("_UI_CreateModelError_message", resource.getURI()), + new Object[] { exception }); + } + else { + return Diagnostic.OK_INSTANCE; + } + } + + /** + * This is the method used by the framework to install your own controls. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ @Override public void createPages() { - // Creates the model from the editor input - // - createModel(); - - // Only creates the other pages if there is something that can be edited - // - if (!getEditingDomain().getResourceSet().getResources().isEmpty()) { - // Create a page for the selection tree view. - // - { - ViewerPane viewerPane = - new ViewerPane(getSite().getPage(), ResourceconfigurationEditor.this) { - @Override - public Viewer createViewer(Composite composite) { - Tree tree = new Tree(composite, SWT.MULTI); - TreeViewer newTreeViewer = new TreeViewer(tree); - return newTreeViewer; - } - @Override - public void requestActivation() { - super.requestActivation(); - setCurrentViewerPane(this); - } - }; - viewerPane.createControl(getContainer()); - - selectionViewer = (TreeViewer)viewerPane.getViewer(); - selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); - - selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); - selectionViewer.setInput(editingDomain.getResourceSet()); - selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); - viewerPane.setTitle(editingDomain.getResourceSet()); - - new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory); - - createContextMenuFor(selectionViewer); - int pageIndex = addPage(viewerPane.getControl()); - setPageText(pageIndex, getString("_UI_SelectionPage_label")); - } - - // Create a page for the parent tree view. - // - { - ViewerPane viewerPane = - new ViewerPane(getSite().getPage(), ResourceconfigurationEditor.this) { - @Override - public Viewer createViewer(Composite composite) { - Tree tree = new Tree(composite, SWT.MULTI); - TreeViewer newTreeViewer = new TreeViewer(tree); - return newTreeViewer; - } - @Override - public void requestActivation() { - super.requestActivation(); - setCurrentViewerPane(this); - } - }; - viewerPane.createControl(getContainer()); - - parentViewer = (TreeViewer)viewerPane.getViewer(); - parentViewer.setAutoExpandLevel(30); - parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory)); - parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); - - createContextMenuFor(parentViewer); - int pageIndex = addPage(viewerPane.getControl()); - setPageText(pageIndex, getString("_UI_ParentPage_label")); - } - - // This is the page for the list viewer - // - { - ViewerPane viewerPane = - new ViewerPane(getSite().getPage(), ResourceconfigurationEditor.this) { - @Override - public Viewer createViewer(Composite composite) { - return new ListViewer(composite); - } - @Override - public void requestActivation() { - super.requestActivation(); - setCurrentViewerPane(this); - } - }; - viewerPane.createControl(getContainer()); - listViewer = (ListViewer)viewerPane.getViewer(); - listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); - listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); - - createContextMenuFor(listViewer); - int pageIndex = addPage(viewerPane.getControl()); - setPageText(pageIndex, getString("_UI_ListPage_label")); - } - - // This is the page for the tree viewer - // - { - ViewerPane viewerPane = - new ViewerPane(getSite().getPage(), ResourceconfigurationEditor.this) { - @Override - public Viewer createViewer(Composite composite) { - return new TreeViewer(composite); - } - @Override - public void requestActivation() { - super.requestActivation(); - setCurrentViewerPane(this); - } - }; - viewerPane.createControl(getContainer()); - treeViewer = (TreeViewer)viewerPane.getViewer(); - treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); - treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); - - new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory); - - createContextMenuFor(treeViewer); - int pageIndex = addPage(viewerPane.getControl()); - setPageText(pageIndex, getString("_UI_TreePage_label")); - } - - // This is the page for the table viewer. - // - { - ViewerPane viewerPane = - new ViewerPane(getSite().getPage(), ResourceconfigurationEditor.this) { - @Override - public Viewer createViewer(Composite composite) { - return new TableViewer(composite); - } - @Override - public void requestActivation() { - super.requestActivation(); - setCurrentViewerPane(this); - } - }; - viewerPane.createControl(getContainer()); - tableViewer = (TableViewer)viewerPane.getViewer(); - - Table table = tableViewer.getTable(); - TableLayout layout = new TableLayout(); - table.setLayout(layout); - table.setHeaderVisible(true); - table.setLinesVisible(true); - - TableColumn objectColumn = new TableColumn(table, SWT.NONE); - layout.addColumnData(new ColumnWeightData(3, 100, true)); - objectColumn.setText(getString("_UI_ObjectColumn_label")); - objectColumn.setResizable(true); - - TableColumn selfColumn = new TableColumn(table, SWT.NONE); - layout.addColumnData(new ColumnWeightData(2, 100, true)); - selfColumn.setText(getString("_UI_SelfColumn_label")); - selfColumn.setResizable(true); - - tableViewer.setColumnProperties(new String [] {"a", "b"}); - tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); - tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); - - createContextMenuFor(tableViewer); - int pageIndex = addPage(viewerPane.getControl()); - setPageText(pageIndex, getString("_UI_TablePage_label")); - } - - // This is the page for the table tree viewer. - // - { - ViewerPane viewerPane = - new ViewerPane(getSite().getPage(), ResourceconfigurationEditor.this) { - @Override - public Viewer createViewer(Composite composite) { - return new TreeViewer(composite); - } - @Override - public void requestActivation() { - super.requestActivation(); - setCurrentViewerPane(this); - } - }; - viewerPane.createControl(getContainer()); - - treeViewerWithColumns = (TreeViewer)viewerPane.getViewer(); - - Tree tree = treeViewerWithColumns.getTree(); - tree.setLayoutData(new FillLayout()); - tree.setHeaderVisible(true); - tree.setLinesVisible(true); - - TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE); - objectColumn.setText(getString("_UI_ObjectColumn_label")); - objectColumn.setResizable(true); - objectColumn.setWidth(250); - - TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE); - selfColumn.setText(getString("_UI_SelfColumn_label")); - selfColumn.setResizable(true); - selfColumn.setWidth(200); - - treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); - treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); - treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); - - createContextMenuFor(treeViewerWithColumns); - int pageIndex = addPage(viewerPane.getControl()); - setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); - } - - getSite().getShell().getDisplay().asyncExec - (new Runnable() { - public void run() { - setActivePage(0); - } - }); - } - - // Ensures that this editor will only display the page's tab - // area if there are more than one page - // - getContainer().addControlListener - (new ControlAdapter() { - boolean guard = false; - @Override - public void controlResized(ControlEvent event) { - if (!guard) { - guard = true; - hideTabs(); - guard = false; - } - } - }); - - getSite().getShell().getDisplay().asyncExec - (new Runnable() { - public void run() { - updateProblemIndication(); - } - }); - } - - /** - * If there is just one page in the multi-page editor part, - * this hides the single tab at the bottom. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + // Creates the model from the editor input + // + createModel(); + + // Only creates the other pages if there is something that can be edited + // + if (!getEditingDomain().getResourceSet().getResources().isEmpty()) { + // Create a page for the selection tree view. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ResourceconfigurationEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + selectionViewer = (TreeViewer)viewerPane.getViewer(); + selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + + selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + selectionViewer.setInput(editingDomain.getResourceSet()); + selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + viewerPane.setTitle(editingDomain.getResourceSet()); + + new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory); + + createContextMenuFor(selectionViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_SelectionPage_label")); + } + + // Create a page for the parent tree view. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ResourceconfigurationEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + parentViewer = (TreeViewer)viewerPane.getViewer(); + parentViewer.setAutoExpandLevel(30); + parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory)); + parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(parentViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_ParentPage_label")); + } + + // This is the page for the list viewer + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ResourceconfigurationEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new ListViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + listViewer = (ListViewer)viewerPane.getViewer(); + listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(listViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_ListPage_label")); + } + + // This is the page for the tree viewer + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ResourceconfigurationEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + treeViewer = (TreeViewer)viewerPane.getViewer(); + treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory); + + createContextMenuFor(treeViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TreePage_label")); + } + + // This is the page for the table viewer. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ResourceconfigurationEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TableViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + tableViewer = (TableViewer)viewerPane.getViewer(); + + Table table = tableViewer.getTable(); + TableLayout layout = new TableLayout(); + table.setLayout(layout); + table.setHeaderVisible(true); + table.setLinesVisible(true); + + TableColumn objectColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(3, 100, true)); + objectColumn.setText(getString("_UI_ObjectColumn_label")); + objectColumn.setResizable(true); + + TableColumn selfColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(2, 100, true)); + selfColumn.setText(getString("_UI_SelfColumn_label")); + selfColumn.setResizable(true); + + tableViewer.setColumnProperties(new String [] {"a", "b"}); + tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(tableViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TablePage_label")); + } + + // This is the page for the table tree viewer. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ResourceconfigurationEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + treeViewerWithColumns = (TreeViewer)viewerPane.getViewer(); + + Tree tree = treeViewerWithColumns.getTree(); + tree.setLayoutData(new FillLayout()); + tree.setHeaderVisible(true); + tree.setLinesVisible(true); + + TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE); + objectColumn.setText(getString("_UI_ObjectColumn_label")); + objectColumn.setResizable(true); + objectColumn.setWidth(250); + + TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE); + selfColumn.setText(getString("_UI_SelfColumn_label")); + selfColumn.setResizable(true); + selfColumn.setWidth(200); + + treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); + treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(treeViewerWithColumns); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); + } + + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + setActivePage(0); + } + }); + } + + // Ensures that this editor will only display the page's tab + // area if there are more than one page + // + getContainer().addControlListener + (new ControlAdapter() { + boolean guard = false; + @Override + public void controlResized(ControlEvent event) { + if (!guard) { + guard = true; + hideTabs(); + guard = false; + } + } + }); + + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + + /** + * If there is just one page in the multi-page editor part, + * this hides the single tab at the bottom. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected void hideTabs() { - if (getPageCount() <= 1) { - setPageText(0, ""); - if (getContainer() instanceof CTabFolder) { - ((CTabFolder)getContainer()).setTabHeight(1); - Point point = getContainer().getSize(); - getContainer().setSize(point.x, point.y + 6); - } - } - } - - /** - * If there is more than one page in the multi-page editor part, - * this shows the tabs at the bottom. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + if (getPageCount() <= 1) { + setPageText(0, ""); + if (getContainer() instanceof CTabFolder) { + ((CTabFolder)getContainer()).setTabHeight(1); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y + 6); + } + } + } + + /** + * If there is more than one page in the multi-page editor part, + * this shows the tabs at the bottom. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected void showTabs() { - if (getPageCount() > 1) { - setPageText(0, getString("_UI_SelectionPage_label")); - if (getContainer() instanceof CTabFolder) { - ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT); - Point point = getContainer().getSize(); - getContainer().setSize(point.x, point.y - 6); - } - } - } - - /** - * This is used to track the active viewer. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + if (getPageCount() > 1) { + setPageText(0, getString("_UI_SelectionPage_label")); + if (getContainer() instanceof CTabFolder) { + ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y - 6); + } + } + } + + /** + * This is used to track the active viewer. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ @Override protected void pageChange(int pageIndex) { - super.pageChange(pageIndex); + super.pageChange(pageIndex); - if (contentOutlinePage != null) { - handleContentOutlineSelection(contentOutlinePage.getSelection()); - } - } + if (contentOutlinePage != null) { + handleContentOutlineSelection(contentOutlinePage.getSelection()); + } + } /** - * This is how the framework determines which interfaces we implement. - * <!-- begin-user-doc --> + * This is how the framework determines which interfaces we implement. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @SuppressWarnings("rawtypes") @Override public Object getAdapter(Class key) { - if (key.equals(IContentOutlinePage.class)) { - return showOutlineView() ? getContentOutlinePage() : null; - } - else if (key.equals(IPropertySheetPage.class)) { - return getPropertySheetPage(); - } - else if (key.equals(IGotoMarker.class)) { - return this; - } - else { - return super.getAdapter(key); - } - } - - /** - * This accesses a cached version of the content outliner. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + if (key.equals(IContentOutlinePage.class)) { + return showOutlineView() ? getContentOutlinePage() : null; + } + else if (key.equals(IPropertySheetPage.class)) { + return getPropertySheetPage(); + } + else if (key.equals(IGotoMarker.class)) { + return this; + } + else { + return super.getAdapter(key); + } + } + + /** + * This accesses a cached version of the content outliner. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public IContentOutlinePage getContentOutlinePage() { - if (contentOutlinePage == null) { - // The content outline is just a tree. - // - class MyContentOutlinePage extends ContentOutlinePage { - @Override - public void createControl(Composite parent) { - super.createControl(parent); - contentOutlineViewer = getTreeViewer(); - contentOutlineViewer.addSelectionChangedListener(this); - - // Set up the tree viewer. - // - contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); - contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); - contentOutlineViewer.setInput(editingDomain.getResourceSet()); - - // Make sure our popups work. - // - createContextMenuFor(contentOutlineViewer); - - if (!editingDomain.getResourceSet().getResources().isEmpty()) { - // Select the root object in the view. - // - contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); - } - } - - @Override - public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) { - super.makeContributions(menuManager, toolBarManager, statusLineManager); - contentOutlineStatusLineManager = statusLineManager; - } - - @Override - public void setActionBars(IActionBars actionBars) { - super.setActionBars(actionBars); - getActionBarContributor().shareGlobalActions(this, actionBars); - } - } - - contentOutlinePage = new MyContentOutlinePage(); - - // Listen to selection so that we can handle it is a special way. - // - contentOutlinePage.addSelectionChangedListener - (new ISelectionChangedListener() { - // This ensures that we handle selections correctly. - // - public void selectionChanged(SelectionChangedEvent event) { - handleContentOutlineSelection(event.getSelection()); - } - }); - } - - return contentOutlinePage; - } - - /** - * This accesses a cached version of the property sheet. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + if (contentOutlinePage == null) { + // The content outline is just a tree. + // + class MyContentOutlinePage extends ContentOutlinePage { + @Override + public void createControl(Composite parent) { + super.createControl(parent); + contentOutlineViewer = getTreeViewer(); + contentOutlineViewer.addSelectionChangedListener(this); + + // Set up the tree viewer. + // + contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + contentOutlineViewer.setInput(editingDomain.getResourceSet()); + + // Make sure our popups work. + // + createContextMenuFor(contentOutlineViewer); + + if (!editingDomain.getResourceSet().getResources().isEmpty()) { + // Select the root object in the view. + // + contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + } + } + + @Override + public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) { + super.makeContributions(menuManager, toolBarManager, statusLineManager); + contentOutlineStatusLineManager = statusLineManager; + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + } + + contentOutlinePage = new MyContentOutlinePage(); + + // Listen to selection so that we can handle it is a special way. + // + contentOutlinePage.addSelectionChangedListener + (new ISelectionChangedListener() { + // This ensures that we handle selections correctly. + // + public void selectionChanged(SelectionChangedEvent event) { + handleContentOutlineSelection(event.getSelection()); + } + }); + } + + return contentOutlinePage; + } + + /** + * This accesses a cached version of the property sheet. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public IPropertySheetPage getPropertySheetPage() { - if (propertySheetPage == null) { - propertySheetPage = - new ExtendedPropertySheetPage(editingDomain) { - @Override - public void setSelectionToViewer(List<?> selection) { - ResourceconfigurationEditor.this.setSelectionToViewer(selection); - ResourceconfigurationEditor.this.setFocus(); - } - - @Override - public void setActionBars(IActionBars actionBars) { - super.setActionBars(actionBars); - getActionBarContributor().shareGlobalActions(this, actionBars); - } - }; - propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory)); - } - - return propertySheetPage; - } - - /** - * This deals with how we want selection in the outliner to affect the other views. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + PropertySheetPage propertySheetPage = + new ExtendedPropertySheetPage(editingDomain) { + @Override + public void setSelectionToViewer(List<?> selection) { + ResourceconfigurationEditor.this.setSelectionToViewer(selection); + ResourceconfigurationEditor.this.setFocus(); + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + }; + propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory)); + propertySheetPages.add(propertySheetPage); + + return propertySheetPage; + } + + /** + * This deals with how we want selection in the outliner to affect the other views. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public void handleContentOutlineSelection(ISelection selection) { - if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) { - Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator(); - if (selectedElements.hasNext()) { - // Get the first selected element. - // - Object selectedElement = selectedElements.next(); - - // If it's the selection viewer, then we want it to select the same selection as this selection. - // - if (currentViewerPane.getViewer() == selectionViewer) { - ArrayList<Object> selectionList = new ArrayList<Object>(); - selectionList.add(selectedElement); - while (selectedElements.hasNext()) { - selectionList.add(selectedElements.next()); - } - - // Set the selection to the widget. - // - selectionViewer.setSelection(new StructuredSelection(selectionList)); - } - else { - // Set the input to the widget. - // - if (currentViewerPane.getViewer().getInput() != selectedElement) { - currentViewerPane.getViewer().setInput(selectedElement); - currentViewerPane.setTitle(selectedElement); - } - } - } - } - } - - /** - * This is for implementing {@link IEditorPart} and simply tests the command stack. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) { + Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator(); + if (selectedElements.hasNext()) { + // Get the first selected element. + // + Object selectedElement = selectedElements.next(); + + // If it's the selection viewer, then we want it to select the same selection as this selection. + // + if (currentViewerPane.getViewer() == selectionViewer) { + ArrayList<Object> selectionList = new ArrayList<Object>(); + selectionList.add(selectedElement); + while (selectedElements.hasNext()) { + selectionList.add(selectedElements.next()); + } + + // Set the selection to the widget. + // + selectionViewer.setSelection(new StructuredSelection(selectionList)); + } + else { + // Set the input to the widget. + // + if (currentViewerPane.getViewer().getInput() != selectedElement) { + currentViewerPane.getViewer().setInput(selectedElement); + currentViewerPane.setTitle(selectedElement); + } + } + } + } + } + + /** + * This is for implementing {@link IEditorPart} and simply tests the command stack. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ @Override public boolean isDirty() { - return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded(); - } + return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded(); + } /** - * This is for implementing {@link IEditorPart} and simply saves the model file. - * <!-- begin-user-doc --> + * This is for implementing {@link IEditorPart} and simply saves the model file. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void doSave(IProgressMonitor progressMonitor) { - // Save only resources that have actually changed. - // - final Map<Object, Object> saveOptions = new HashMap<Object, Object>(); - saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); - - // Do the work within an operation because this is a long running activity that modifies the workbench. - // - WorkspaceModifyOperation operation = - new WorkspaceModifyOperation() { - // This is the method that gets invoked when the operation runs. - // - @Override - public void execute(IProgressMonitor monitor) { - // Save the resources to the file system. - // - boolean first = true; - for (Resource resource : editingDomain.getResourceSet().getResources()) { - if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) { - try { - long timeStamp = resource.getTimeStamp(); - resource.save(saveOptions); - if (resource.getTimeStamp() != timeStamp) { - savedResources.add(resource); - } - } - catch (Exception exception) { - resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); - } - first = false; - } - } - } - }; - - updateProblemIndication = false; - try { - // This runs the options, and shows progress. - // - new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation); - - // Refresh the necessary state. - // - ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone(); - firePropertyChange(IEditorPart.PROP_DIRTY); - } - catch (Exception exception) { - // Something went wrong that shouldn't. - // - ResourcelandscapeEditorPlugin.INSTANCE.log(exception); - } - updateProblemIndication = true; - updateProblemIndication(); - } - - /** - * This returns whether something has been persisted to the URI of the specified resource. - * The implementation uses the URI converter from the editor's resource set to try to open an input stream. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + // Save only resources that have actually changed. + // + final Map<Object, Object> saveOptions = new HashMap<Object, Object>(); + saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); + saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED); + + // Do the work within an operation because this is a long running activity that modifies the workbench. + // + WorkspaceModifyOperation operation = + new WorkspaceModifyOperation() { + // This is the method that gets invoked when the operation runs. + // + @Override + public void execute(IProgressMonitor monitor) { + // Save the resources to the file system. + // + boolean first = true; + for (Resource resource : editingDomain.getResourceSet().getResources()) { + if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) { + try { + long timeStamp = resource.getTimeStamp(); + resource.save(saveOptions); + if (resource.getTimeStamp() != timeStamp) { + savedResources.add(resource); + } + } + catch (Exception exception) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + first = false; + } + } + } + }; + + updateProblemIndication = false; + try { + // This runs the options, and shows progress. + // + new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation); + + // Refresh the necessary state. + // + ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone(); + firePropertyChange(IEditorPart.PROP_DIRTY); + } + catch (Exception exception) { + // Something went wrong that shouldn't. + // + ResourcelandscapeEditorPlugin.INSTANCE.log(exception); + } + updateProblemIndication = true; + updateProblemIndication(); + } + + /** + * This returns whether something has been persisted to the URI of the specified resource. + * The implementation uses the URI converter from the editor's resource set to try to open an input stream. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected boolean isPersisted(Resource resource) { - boolean result = false; - try { - InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI()); - if (stream != null) { - result = true; - stream.close(); - } - } - catch (IOException e) { - // Ignore - } - return result; - } - - /** - * This always returns true because it is not currently supported. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + boolean result = false; + try { + InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI()); + if (stream != null) { + result = true; + stream.close(); + } + } + catch (IOException e) { + // Ignore + } + return result; + } + + /** + * This always returns true because it is not currently supported. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ @Override public boolean isSaveAsAllowed() { - return true; - } + return true; + } /** - * This also changes the editor's input. - * <!-- begin-user-doc --> + * This also changes the editor's input. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void doSaveAs() { - SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell()); - saveAsDialog.open(); - IPath path = saveAsDialog.getResult(); - if (path != null) { - IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); - if (file != null) { - doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file)); - } - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell()); + saveAsDialog.open(); + IPath path = saveAsDialog.getResult(); + if (path != null) { + IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); + if (file != null) { + doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file)); + } + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected void doSaveAs(URI uri, IEditorInput editorInput) { - (editingDomain.getResourceSet().getResources().get(0)).setURI(uri); - setInputWithNotify(editorInput); - setPartName(editorInput.getName()); - IProgressMonitor progressMonitor = - getActionBars().getStatusLineManager() != null ? - getActionBars().getStatusLineManager().getProgressMonitor() : - new NullProgressMonitor(); - doSave(progressMonitor); - } + (editingDomain.getResourceSet().getResources().get(0)).setURI(uri); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + IProgressMonitor progressMonitor = + getActionBars().getStatusLineManager() != null ? + getActionBars().getStatusLineManager().getProgressMonitor() : + new NullProgressMonitor(); + doSave(progressMonitor); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void gotoMarker(IMarker marker) { - try { - if (marker.getType().equals(EValidator.MARKER)) { - String uriAttribute = marker.getAttribute(EValidator.URI_ATTRIBUTE, null); - if (uriAttribute != null) { - URI uri = URI.createURI(uriAttribute); - EObject eObject = editingDomain.getResourceSet().getEObject(uri, true); - if (eObject != null) { - setSelectionToViewer(Collections.singleton(editingDomain.getWrapper(eObject))); - } - } - } - } - catch (CoreException exception) { - ResourcelandscapeEditorPlugin.INSTANCE.log(exception); - } - } + List<?> targetObjects = markerHelper.getTargetObjects(editingDomain, marker); + if (!targetObjects.isEmpty()) { + setSelectionToViewer(targetObjects); + } + } /** - * This is called during startup. - * <!-- begin-user-doc --> + * This is called during startup. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void init(IEditorSite site, IEditorInput editorInput) { - setSite(site); - setInputWithNotify(editorInput); - setPartName(editorInput.getName()); - site.setSelectionProvider(this); - site.getPage().addPartListener(partListener); - ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE); - } + setSite(site); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + site.setSelectionProvider(this); + site.getPage().addPartListener(partListener); + ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void setFocus() { - if (currentViewerPane != null) { - currentViewerPane.setFocus(); - } - else { - getControl(getActivePage()).setFocus(); - } - } + if (currentViewerPane != null) { + currentViewerPane.setFocus(); + } + else { + getControl(getActivePage()).setFocus(); + } + } /** - * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. - * <!-- begin-user-doc --> + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void addSelectionChangedListener(ISelectionChangedListener listener) { - selectionChangedListeners.add(listener); - } + selectionChangedListeners.add(listener); + } /** - * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. - * <!-- begin-user-doc --> + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void removeSelectionChangedListener(ISelectionChangedListener listener) { - selectionChangedListeners.remove(listener); - } + selectionChangedListeners.remove(listener); + } /** - * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection. - * <!-- begin-user-doc --> + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ISelection getSelection() { - return editorSelection; - } + return editorSelection; + } /** - * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection. - * Calling this result will notify the listeners. - * <!-- begin-user-doc --> + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection. + * Calling this result will notify the listeners. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setSelection(ISelection selection) { - editorSelection = selection; + editorSelection = selection; - for (ISelectionChangedListener listener : selectionChangedListeners) { - listener.selectionChanged(new SelectionChangedEvent(this, selection)); - } - setStatusLineManager(selection); - } + for (ISelectionChangedListener listener : selectionChangedListeners) { + listener.selectionChanged(new SelectionChangedEvent(this, selection)); + } + setStatusLineManager(selection); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setStatusLineManager(ISelection selection) { - IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ? - contentOutlineStatusLineManager : getActionBars().getStatusLineManager(); - - if (statusLineManager != null) { - if (selection instanceof IStructuredSelection) { - Collection<?> collection = ((IStructuredSelection)selection).toList(); - switch (collection.size()) { - case 0: { - statusLineManager.setMessage(getString("_UI_NoObjectSelected")); - break; - } - case 1: { - String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next()); - statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); - break; - } - default: { - statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); - break; - } - } - } - else { - statusLineManager.setMessage(""); - } - } - } - - /** - * This looks up a string in the plugin's plugin.properties file. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ? + contentOutlineStatusLineManager : getActionBars().getStatusLineManager(); + + if (statusLineManager != null) { + if (selection instanceof IStructuredSelection) { + Collection<?> collection = ((IStructuredSelection)selection).toList(); + switch (collection.size()) { + case 0: { + statusLineManager.setMessage(getString("_UI_NoObjectSelected")); + break; + } + case 1: { + String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next()); + statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); + break; + } + default: { + statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); + break; + } + } + } + else { + statusLineManager.setMessage(""); + } + } + } + + /** + * This looks up a string in the plugin's plugin.properties file. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ private static String getString(String key) { - return ResourcelandscapeEditorPlugin.INSTANCE.getString(key); - } + return ResourcelandscapeEditorPlugin.INSTANCE.getString(key); + } /** - * This looks up a string in plugin.properties, making a substitution. - * <!-- begin-user-doc --> + * This looks up a string in plugin.properties, making a substitution. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private static String getString(String key, Object s1) { - return ResourcelandscapeEditorPlugin.INSTANCE.getString(key, new Object [] { s1 }); - } + return ResourcelandscapeEditorPlugin.INSTANCE.getString(key, new Object [] { s1 }); + } /** - * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu. - * <!-- begin-user-doc --> + * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void menuAboutToShow(IMenuManager menuManager) { - ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager); - } + ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EditingDomainActionBarContributor getActionBarContributor() { - return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor(); - } + return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public IActionBars getActionBars() { - return getActionBarContributor().getActionBars(); - } + return getActionBarContributor().getActionBars(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public AdapterFactory getAdapterFactory() { - return adapterFactory; - } + return adapterFactory; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void dispose() { - updateProblemIndication = false; + updateProblemIndication = false; - ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener); + ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener); - getSite().getPage().removePartListener(partListener); + getSite().getPage().removePartListener(partListener); - adapterFactory.dispose(); + adapterFactory.dispose(); - if (getActionBarContributor().getActiveEditor() == this) { - getActionBarContributor().setActiveEditor(null); - } + if (getActionBarContributor().getActiveEditor() == this) { + getActionBarContributor().setActiveEditor(null); + } - if (propertySheetPage != null) { - propertySheetPage.dispose(); - } + for (PropertySheetPage propertySheetPage : propertySheetPages) { + propertySheetPage.dispose(); + } - if (contentOutlinePage != null) { - contentOutlinePage.dispose(); - } + if (contentOutlinePage != null) { + contentOutlinePage.dispose(); + } - super.dispose(); - } + super.dispose(); + } /** - * Returns whether the outline view should be presented to the user. - * <!-- begin-user-doc --> + * Returns whether the outline view should be presented to the user. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected boolean showOutlineView() { - return true; - } + return true; + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourceconfiguration/presentation/ResourceconfigurationModelWizard.java b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourceconfiguration/presentation/ResourceconfigurationModelWizard.java index d4fc5b9a..25ffec9f 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourceconfiguration/presentation/ResourceconfigurationModelWizard.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourceconfiguration/presentation/ResourceconfigurationModelWizard.java @@ -96,536 +96,535 @@ import org.eclipse.ui.PartInitException; */ public class ResourceconfigurationModelWizard extends Wizard implements INewWizard { /** - * The supported extensions for created files. - * <!-- begin-user-doc --> + * The supported extensions for created files. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static final List<String> FILE_EXTENSIONS = Collections.unmodifiableList(Arrays.asList(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourceconfigurationEditorFilenameExtensions").split("\\s*,\\s*"))); /** - * A formatted list of supported file extensions, suitable for display. - * <!-- begin-user-doc --> + * A formatted list of supported file extensions, suitable for display. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static final String FORMATTED_FILE_EXTENSIONS = ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourceconfigurationEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", "); /** - * This caches an instance of the model package. - * <!-- begin-user-doc --> + * This caches an instance of the model package. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ResourceconfigurationPackage resourceconfigurationPackage = ResourceconfigurationPackage.eINSTANCE; /** - * This caches an instance of the model factory. - * <!-- begin-user-doc --> + * This caches an instance of the model factory. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ResourceconfigurationFactory resourceconfigurationFactory = resourceconfigurationPackage.getResourceconfigurationFactory(); /** - * This is the file creation page. - * <!-- begin-user-doc --> + * This is the file creation page. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ResourceconfigurationModelWizardNewFileCreationPage newFileCreationPage; /** - * This is the initial object creation page. - * <!-- begin-user-doc --> + * This is the initial object creation page. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ResourceconfigurationModelWizardInitialObjectCreationPage initialObjectCreationPage; /** - * Remember the selection during initialization for populating the default container. - * <!-- begin-user-doc --> + * Remember the selection during initialization for populating the default container. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IStructuredSelection selection; /** - * Remember the workbench during initialization. - * <!-- begin-user-doc --> + * Remember the workbench during initialization. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IWorkbench workbench; /** - * Caches the names of the types that can be created as the root object. - * <!-- begin-user-doc --> + * Caches the names of the types that can be created as the root object. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected List<String> initialObjectNames; /** - * This just records the information. - * <!-- begin-user-doc --> + * This just records the information. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void init(IWorkbench workbench, IStructuredSelection selection) { - this.workbench = workbench; - this.selection = selection; - setWindowTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); - setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(ResourcelandscapeEditorPlugin.INSTANCE.getImage("full/wizban/NewResourceconfiguration"))); - } + this.workbench = workbench; + this.selection = selection; + setWindowTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); + setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(ResourcelandscapeEditorPlugin.INSTANCE.getImage("full/wizban/NewResourceconfiguration"))); + } /** - * Returns the names of the types that can be created as the root object. - * <!-- begin-user-doc --> + * Returns the names of the types that can be created as the root object. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<String> getInitialObjectNames() { - if (initialObjectNames == null) { - initialObjectNames = new ArrayList<String>(); - for (EClassifier eClassifier : resourceconfigurationPackage.getEClassifiers()) { - if (eClassifier instanceof EClass) { - EClass eClass = (EClass)eClassifier; - if (!eClass.isAbstract()) { - initialObjectNames.add(eClass.getName()); - } - } - } - Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); - } - return initialObjectNames; - } + if (initialObjectNames == null) { + initialObjectNames = new ArrayList<String>(); + for (EClassifier eClassifier : resourceconfigurationPackage.getEClassifiers()) { + if (eClassifier instanceof EClass) { + EClass eClass = (EClass)eClassifier; + if (!eClass.isAbstract()) { + initialObjectNames.add(eClass.getName()); + } + } + } + Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); + } + return initialObjectNames; + } /** - * Create a new model. - * <!-- begin-user-doc --> + * Create a new model. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected EObject createInitialModel() { - EClass eClass = (EClass)resourceconfigurationPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); - EObject rootObject = resourceconfigurationFactory.create(eClass); - return rootObject; - } + EClass eClass = (EClass)resourceconfigurationPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); + EObject rootObject = resourceconfigurationFactory.create(eClass); + return rootObject; + } /** - * Do the work after everything is specified. - * <!-- begin-user-doc --> + * Do the work after everything is specified. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public boolean performFinish() { - try { - // Remember the file. - // - final IFile modelFile = getModelFile(); - - // Do the work within an operation. - // - WorkspaceModifyOperation operation = - new WorkspaceModifyOperation() { - @Override - protected void execute(IProgressMonitor progressMonitor) { - try { - // Create a resource set - // - ResourceSet resourceSet = new ResourceSetImpl(); - - // Get the URI of the model file. - // - URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true); - - // Create a resource for this file. - // - Resource resource = resourceSet.createResource(fileURI); - - // Add the initial model object to the contents. - // - EObject rootObject = createInitialModel(); - if (rootObject != null) { - resource.getContents().add(rootObject); - } - - // Save the contents of the resource to the file system. - // - Map<Object, Object> options = new HashMap<Object, Object>(); - options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding()); - resource.save(options); - } - catch (Exception exception) { - ResourcelandscapeEditorPlugin.INSTANCE.log(exception); - } - finally { - progressMonitor.done(); - } - } - }; - - getContainer().run(false, false, operation); - - // Select the new file resource in the current view. - // - IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow(); - IWorkbenchPage page = workbenchWindow.getActivePage(); - final IWorkbenchPart activePart = page.getActivePart(); - if (activePart instanceof ISetSelectionTarget) { - final ISelection targetSelection = new StructuredSelection(modelFile); - getShell().getDisplay().asyncExec - (new Runnable() { - public void run() { - ((ISetSelectionTarget)activePart).selectReveal(targetSelection); - } - }); - } - - // Open an editor on the new file. - // - try { - page.openEditor - (new FileEditorInput(modelFile), - workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId()); - } - catch (PartInitException exception) { - MessageDialog.openError(workbenchWindow.getShell(), ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage()); - return false; - } - - return true; - } - catch (Exception exception) { - ResourcelandscapeEditorPlugin.INSTANCE.log(exception); - return false; - } - } + try { + // Remember the file. + // + final IFile modelFile = getModelFile(); + + // Do the work within an operation. + // + WorkspaceModifyOperation operation = + new WorkspaceModifyOperation() { + @Override + protected void execute(IProgressMonitor progressMonitor) { + try { + // Create a resource set + // + ResourceSet resourceSet = new ResourceSetImpl(); + + // Get the URI of the model file. + // + URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true); + + // Create a resource for this file. + // + Resource resource = resourceSet.createResource(fileURI); + + // Add the initial model object to the contents. + // + EObject rootObject = createInitialModel(); + if (rootObject != null) { + resource.getContents().add(rootObject); + } + + // Save the contents of the resource to the file system. + // + Map<Object, Object> options = new HashMap<Object, Object>(); + options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding()); + resource.save(options); + } + catch (Exception exception) { + ResourcelandscapeEditorPlugin.INSTANCE.log(exception); + } + finally { + progressMonitor.done(); + } + } + }; + + getContainer().run(false, false, operation); + + // Select the new file resource in the current view. + // + IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow(); + IWorkbenchPage page = workbenchWindow.getActivePage(); + final IWorkbenchPart activePart = page.getActivePart(); + if (activePart instanceof ISetSelectionTarget) { + final ISelection targetSelection = new StructuredSelection(modelFile); + getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + ((ISetSelectionTarget)activePart).selectReveal(targetSelection); + } + }); + } + + // Open an editor on the new file. + // + try { + page.openEditor + (new FileEditorInput(modelFile), + workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId()); + } + catch (PartInitException exception) { + MessageDialog.openError(workbenchWindow.getShell(), ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage()); + return false; + } + + return true; + } + catch (Exception exception) { + ResourcelandscapeEditorPlugin.INSTANCE.log(exception); + return false; + } + } /** - * This is the one page of the wizard. - * <!-- begin-user-doc --> + * This is the one page of the wizard. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public class ResourceconfigurationModelWizardNewFileCreationPage extends WizardNewFileCreationPage { /** - * Pass in the selection. - * <!-- begin-user-doc --> + * Pass in the selection. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourceconfigurationModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) { - super(pageId, selection); - } + super(pageId, selection); + } /** - * The framework calls this to see if the file is correct. - * <!-- begin-user-doc --> + * The framework calls this to see if the file is correct. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected boolean validatePage() { - if (super.validatePage()) { - String extension = new Path(getFileName()).getFileExtension(); - if (extension == null || !FILE_EXTENSIONS.contains(extension)) { - String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; - setErrorMessage(ResourcelandscapeEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS })); - return false; - } - return true; - } - return false; - } + if (super.validatePage()) { + String extension = new Path(getFileName()).getFileExtension(); + if (extension == null || !FILE_EXTENSIONS.contains(extension)) { + String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; + setErrorMessage(ResourcelandscapeEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS })); + return false; + } + return true; + } + return false; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public IFile getModelFile() { - return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName())); - } + return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName())); + } } /** - * This is the page where the type of object to create is selected. - * <!-- begin-user-doc --> + * This is the page where the type of object to create is selected. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public class ResourceconfigurationModelWizardInitialObjectCreationPage extends WizardPage { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Combo initialObjectField; /** - * @generated - * <!-- begin-user-doc --> + * @generated + * <!-- begin-user-doc --> * <!-- end-user-doc --> - */ + */ protected List<String> encodings; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Combo encodingField; /** - * Pass in the selection. - * <!-- begin-user-doc --> + * Pass in the selection. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourceconfigurationModelWizardInitialObjectCreationPage(String pageId) { - super(pageId); - } + super(pageId); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void createControl(Composite parent) { - Composite composite = new Composite(parent, SWT.NONE); - { - GridLayout layout = new GridLayout(); - layout.numColumns = 1; - layout.verticalSpacing = 12; - composite.setLayout(layout); - - GridData data = new GridData(); - data.verticalAlignment = GridData.FILL; - data.grabExcessVerticalSpace = true; - data.horizontalAlignment = GridData.FILL; - composite.setLayoutData(data); - } - - Label containerLabel = new Label(composite, SWT.LEFT); - { - containerLabel.setText(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ModelObject")); - - GridData data = new GridData(); - data.horizontalAlignment = GridData.FILL; - containerLabel.setLayoutData(data); - } - - initialObjectField = new Combo(composite, SWT.BORDER); - { - GridData data = new GridData(); - data.horizontalAlignment = GridData.FILL; - data.grabExcessHorizontalSpace = true; - initialObjectField.setLayoutData(data); - } - - for (String objectName : getInitialObjectNames()) { - initialObjectField.add(getLabel(objectName)); - } - - if (initialObjectField.getItemCount() == 1) { - initialObjectField.select(0); - } - initialObjectField.addModifyListener(validator); - - Label encodingLabel = new Label(composite, SWT.LEFT); - { - encodingLabel.setText(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_XMLEncoding")); - - GridData data = new GridData(); - data.horizontalAlignment = GridData.FILL; - encodingLabel.setLayoutData(data); - } - encodingField = new Combo(composite, SWT.BORDER); - { - GridData data = new GridData(); - data.horizontalAlignment = GridData.FILL; - data.grabExcessHorizontalSpace = true; - encodingField.setLayoutData(data); - } - - for (String encoding : getEncodings()) { - encodingField.add(encoding); - } - - encodingField.select(0); - encodingField.addModifyListener(validator); - - setPageComplete(validatePage()); - setControl(composite); - } + Composite composite = new Composite(parent, SWT.NONE); { + GridLayout layout = new GridLayout(); + layout.numColumns = 1; + layout.verticalSpacing = 12; + composite.setLayout(layout); + + GridData data = new GridData(); + data.verticalAlignment = GridData.FILL; + data.grabExcessVerticalSpace = true; + data.horizontalAlignment = GridData.FILL; + composite.setLayoutData(data); + } + + Label containerLabel = new Label(composite, SWT.LEFT); + { + containerLabel.setText(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ModelObject")); + + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + containerLabel.setLayoutData(data); + } + + initialObjectField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + initialObjectField.setLayoutData(data); + } + + for (String objectName : getInitialObjectNames()) { + initialObjectField.add(getLabel(objectName)); + } + + if (initialObjectField.getItemCount() == 1) { + initialObjectField.select(0); + } + initialObjectField.addModifyListener(validator); + + Label encodingLabel = new Label(composite, SWT.LEFT); + { + encodingLabel.setText(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_XMLEncoding")); + + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + encodingLabel.setLayoutData(data); + } + encodingField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + encodingField.setLayoutData(data); + } + + for (String encoding : getEncodings()) { + encodingField.add(encoding); + } + + encodingField.select(0); + encodingField.addModifyListener(validator); + + setPageComplete(validatePage()); + setControl(composite); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ModifyListener validator = new ModifyListener() { - public void modifyText(ModifyEvent e) { - setPageComplete(validatePage()); - } - }; + public void modifyText(ModifyEvent e) { + setPageComplete(validatePage()); + } + }; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected boolean validatePage() { - return getInitialObjectName() != null && getEncodings().contains(encodingField.getText()); - } + return getInitialObjectName() != null && getEncodings().contains(encodingField.getText()); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void setVisible(boolean visible) { - super.setVisible(visible); - if (visible) { - if (initialObjectField.getItemCount() == 1) { - initialObjectField.clearSelection(); - encodingField.setFocus(); - } - else { - encodingField.clearSelection(); - initialObjectField.setFocus(); - } - } - } + super.setVisible(visible); + if (visible) { + if (initialObjectField.getItemCount() == 1) { + initialObjectField.clearSelection(); + encodingField.setFocus(); + } + else { + encodingField.clearSelection(); + initialObjectField.setFocus(); + } + } + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public String getInitialObjectName() { - String label = initialObjectField.getText(); + String label = initialObjectField.getText(); - for (String name : getInitialObjectNames()) { - if (getLabel(name).equals(label)) { - return name; - } - } - return null; - } + for (String name : getInitialObjectNames()) { + if (getLabel(name).equals(label)) { + return name; + } + } + return null; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public String getEncoding() { - return encodingField.getText(); - } + return encodingField.getText(); + } /** - * Returns the label for the specified type name. - * <!-- begin-user-doc --> + * Returns the label for the specified type name. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected String getLabel(String typeName) { - try { - return ResourcelandscapeEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); - } - catch(MissingResourceException mre) { - ResourcelandscapeEditorPlugin.INSTANCE.log(mre); - } - return typeName; - } + try { + return ResourcelandscapeEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); + } + catch(MissingResourceException mre) { + ResourcelandscapeEditorPlugin.INSTANCE.log(mre); + } + return typeName; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<String> getEncodings() { - if (encodings == null) { - encodings = new ArrayList<String>(); - for (StringTokenizer stringTokenizer = new StringTokenizer(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) { - encodings.add(stringTokenizer.nextToken()); - } - } - return encodings; - } + if (encodings == null) { + encodings = new ArrayList<String>(); + for (StringTokenizer stringTokenizer = new StringTokenizer(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) { + encodings.add(stringTokenizer.nextToken()); + } + } + return encodings; + } } /** - * The framework calls this to create the contents of the wizard. - * <!-- begin-user-doc --> + * The framework calls this to create the contents of the wizard. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void addPages() { - // Create a page, set the title, and the initial model file name. - // - newFileCreationPage = new ResourceconfigurationModelWizardNewFileCreationPage("Whatever", selection); - newFileCreationPage.setTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourceconfigurationModelWizard_label")); - newFileCreationPage.setDescription(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourceconfigurationModelWizard_description")); - newFileCreationPage.setFileName(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourceconfigurationEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0)); - addPage(newFileCreationPage); - - // Try and get the resource selection to determine a current directory for the file dialog. - // - if (selection != null && !selection.isEmpty()) { - // Get the resource... - // - Object selectedElement = selection.iterator().next(); - if (selectedElement instanceof IResource) { - // Get the resource parent, if its a file. - // - IResource selectedResource = (IResource)selectedElement; - if (selectedResource.getType() == IResource.FILE) { - selectedResource = selectedResource.getParent(); - } - - // This gives us a directory... - // - if (selectedResource instanceof IFolder || selectedResource instanceof IProject) { - // Set this for the container. - // - newFileCreationPage.setContainerFullPath(selectedResource.getFullPath()); - - // Make up a unique new name here. - // - String defaultModelBaseFilename = ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourceconfigurationEditorFilenameDefaultBase"); - String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0); - String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension; - for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) { - modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension; - } - newFileCreationPage.setFileName(modelFilename); - } - } - } - initialObjectCreationPage = new ResourceconfigurationModelWizardInitialObjectCreationPage("Whatever2"); - initialObjectCreationPage.setTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourceconfigurationModelWizard_label")); - initialObjectCreationPage.setDescription(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description")); - addPage(initialObjectCreationPage); - } + // Create a page, set the title, and the initial model file name. + // + newFileCreationPage = new ResourceconfigurationModelWizardNewFileCreationPage("Whatever", selection); + newFileCreationPage.setTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourceconfigurationModelWizard_label")); + newFileCreationPage.setDescription(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourceconfigurationModelWizard_description")); + newFileCreationPage.setFileName(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourceconfigurationEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0)); + addPage(newFileCreationPage); + + // Try and get the resource selection to determine a current directory for the file dialog. + // + if (selection != null && !selection.isEmpty()) { + // Get the resource... + // + Object selectedElement = selection.iterator().next(); + if (selectedElement instanceof IResource) { + // Get the resource parent, if its a file. + // + IResource selectedResource = (IResource)selectedElement; + if (selectedResource.getType() == IResource.FILE) { + selectedResource = selectedResource.getParent(); + } + + // This gives us a directory... + // + if (selectedResource instanceof IFolder || selectedResource instanceof IProject) { + // Set this for the container. + // + newFileCreationPage.setContainerFullPath(selectedResource.getFullPath()); + + // Make up a unique new name here. + // + String defaultModelBaseFilename = ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourceconfigurationEditorFilenameDefaultBase"); + String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0); + String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension; + for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) { + modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension; + } + newFileCreationPage.setFileName(modelFilename); + } + } + } + initialObjectCreationPage = new ResourceconfigurationModelWizardInitialObjectCreationPage("Whatever2"); + initialObjectCreationPage.setTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourceconfigurationModelWizard_label")); + initialObjectCreationPage.setDescription(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description")); + addPage(initialObjectCreationPage); + } /** - * Get the file from the page. - * <!-- begin-user-doc --> + * Get the file from the page. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public IFile getModelFile() { - return newFileCreationPage.getModelFile(); - } + return newFileCreationPage.getModelFile(); + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcelandscape/presentation/ResourcelandscapeActionBarContributor.java b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcelandscape/presentation/ResourcelandscapeActionBarContributor.java index 1bc2d7c7..cf50d1b6 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcelandscape/presentation/ResourcelandscapeActionBarContributor.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcelandscape/presentation/ResourcelandscapeActionBarContributor.java @@ -50,375 +50,375 @@ public class ResourcelandscapeActionBarContributor extends EditingDomainActionBarContributor implements ISelectionChangedListener { /** - * This keeps track of the active editor. - * <!-- begin-user-doc --> + * This keeps track of the active editor. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IEditorPart activeEditorPart; /** - * This keeps track of the current selection provider. - * <!-- begin-user-doc --> + * This keeps track of the current selection provider. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ISelectionProvider selectionProvider; /** - * This action opens the Properties view. - * <!-- begin-user-doc --> + * This action opens the Properties view. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IAction showPropertiesViewAction = new Action(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) { - @Override - public void run() { - try { - getPage().showView("org.eclipse.ui.views.PropertySheet"); - } - catch (PartInitException exception) { - ResourcelandscapeEditorPlugin.INSTANCE.log(exception); - } - } - }; + @Override + public void run() { + try { + getPage().showView("org.eclipse.ui.views.PropertySheet"); + } + catch (PartInitException exception) { + ResourcelandscapeEditorPlugin.INSTANCE.log(exception); + } + } + }; /** - * This action refreshes the viewer of the current editor if the editor - * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}. - * <!-- begin-user-doc --> + * This action refreshes the viewer of the current editor if the editor + * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IAction refreshViewerAction = new Action(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) { - @Override - public boolean isEnabled() { - return activeEditorPart instanceof IViewerProvider; - } - - @Override - public void run() { - if (activeEditorPart instanceof IViewerProvider) { - Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer(); - if (viewer != null) { - viewer.refresh(); - } - } - } - }; + @Override + public boolean isEnabled() { + return activeEditorPart instanceof IViewerProvider; + } + + @Override + public void run() { + if (activeEditorPart instanceof IViewerProvider) { + Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer(); + if (viewer != null) { + viewer.refresh(); + } + } + } + }; /** - * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor - * generated for the current selection by the item provider. - * <!-- begin-user-doc --> + * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor + * generated for the current selection by the item provider. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<IAction> createChildActions; /** - * This is the menu manager into which menu contribution items should be added for CreateChild actions. - * <!-- begin-user-doc --> + * This is the menu manager into which menu contribution items should be added for CreateChild actions. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IMenuManager createChildMenuManager; /** - * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor - * generated for the current selection by the item provider. - * <!-- begin-user-doc --> + * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor + * generated for the current selection by the item provider. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<IAction> createSiblingActions; /** - * This is the menu manager into which menu contribution items should be added for CreateSibling actions. - * <!-- begin-user-doc --> + * This is the menu manager into which menu contribution items should be added for CreateSibling actions. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IMenuManager createSiblingMenuManager; /** - * This creates an instance of the contributor. - * <!-- begin-user-doc --> + * This creates an instance of the contributor. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourcelandscapeActionBarContributor() { - super(ADDITIONS_LAST_STYLE); - loadResourceAction = new LoadResourceAction(); - validateAction = new ValidateAction(); - controlAction = new ControlAction(); - } + super(ADDITIONS_LAST_STYLE); + loadResourceAction = new LoadResourceAction(); + validateAction = new ValidateAction(); + controlAction = new ControlAction(); + } /** - * This adds Separators for editor additions to the tool bar. - * <!-- begin-user-doc --> + * This adds Separators for editor additions to the tool bar. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void contributeToToolBar(IToolBarManager toolBarManager) { - toolBarManager.add(new Separator("resourcelandscape-settings")); - toolBarManager.add(new Separator("resourcelandscape-additions")); - } + toolBarManager.add(new Separator("resourcelandscape-settings")); + toolBarManager.add(new Separator("resourcelandscape-additions")); + } /** - * This adds to the menu bar a menu and some separators for editor additions, - * as well as the sub-menus for object creation items. - * <!-- begin-user-doc --> + * This adds to the menu bar a menu and some separators for editor additions, + * as well as the sub-menus for object creation items. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void contributeToMenu(IMenuManager menuManager) { - super.contributeToMenu(menuManager); - - IMenuManager submenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcelandscapeEditor_menu"), "edu.kit.ipd.descartes.mm.resourcelandscapeMenuID"); - menuManager.insertAfter("additions", submenuManager); - submenuManager.add(new Separator("settings")); - submenuManager.add(new Separator("actions")); - submenuManager.add(new Separator("additions")); - submenuManager.add(new Separator("additions-end")); - - // Prepare for CreateChild item addition or removal. - // - createChildMenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); - submenuManager.insertBefore("additions", createChildMenuManager); - - // Prepare for CreateSibling item addition or removal. - // - createSiblingMenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); - submenuManager.insertBefore("additions", createSiblingMenuManager); - - // Force an update because Eclipse hides empty menus now. - // - submenuManager.addMenuListener - (new IMenuListener() { - public void menuAboutToShow(IMenuManager menuManager) { - menuManager.updateAll(true); - } - }); - - addGlobalActions(submenuManager); - } + super.contributeToMenu(menuManager); + + IMenuManager submenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcelandscapeEditor_menu"), "edu.kit.ipd.descartes.mm.resourcelandscapeMenuID"); + menuManager.insertAfter("additions", submenuManager); + submenuManager.add(new Separator("settings")); + submenuManager.add(new Separator("actions")); + submenuManager.add(new Separator("additions")); + submenuManager.add(new Separator("additions-end")); + + // Prepare for CreateChild item addition or removal. + // + createChildMenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + submenuManager.insertBefore("additions", createChildMenuManager); + + // Prepare for CreateSibling item addition or removal. + // + createSiblingMenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + submenuManager.insertBefore("additions", createSiblingMenuManager); + + // Force an update because Eclipse hides empty menus now. + // + submenuManager.addMenuListener + (new IMenuListener() { + public void menuAboutToShow(IMenuManager menuManager) { + menuManager.updateAll(true); + } + }); + + addGlobalActions(submenuManager); + } /** - * When the active editor changes, this remembers the change and registers with it as a selection provider. - * <!-- begin-user-doc --> + * When the active editor changes, this remembers the change and registers with it as a selection provider. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void setActiveEditor(IEditorPart part) { - super.setActiveEditor(part); - activeEditorPart = part; - - // Switch to the new selection provider. - // - if (selectionProvider != null) { - selectionProvider.removeSelectionChangedListener(this); - } - if (part == null) { - selectionProvider = null; - } - else { - selectionProvider = part.getSite().getSelectionProvider(); - selectionProvider.addSelectionChangedListener(this); - - // Fake a selection changed event to update the menus. - // - if (selectionProvider.getSelection() != null) { - selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection())); - } - } - } + super.setActiveEditor(part); + activeEditorPart = part; + + // Switch to the new selection provider. + // + if (selectionProvider != null) { + selectionProvider.removeSelectionChangedListener(this); + } + if (part == null) { + selectionProvider = null; + } + else { + selectionProvider = part.getSite().getSelectionProvider(); + selectionProvider.addSelectionChangedListener(this); + + // Fake a selection changed event to update the menus. + // + if (selectionProvider.getSelection() != null) { + selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection())); + } + } + } /** - * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener}, - * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings - * that can be added to the selected object and updating the menus accordingly. - * <!-- begin-user-doc --> + * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener}, + * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings + * that can be added to the selected object and updating the menus accordingly. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void selectionChanged(SelectionChangedEvent event) { - // Remove any menu items for old selection. - // - if (createChildMenuManager != null) { - depopulateManager(createChildMenuManager, createChildActions); - } - if (createSiblingMenuManager != null) { - depopulateManager(createSiblingMenuManager, createSiblingActions); - } - - // Query the new selection for appropriate new child/sibling descriptors - // - Collection<?> newChildDescriptors = null; - Collection<?> newSiblingDescriptors = null; - - ISelection selection = event.getSelection(); - if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) { - Object object = ((IStructuredSelection)selection).getFirstElement(); - - EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain(); - - newChildDescriptors = domain.getNewChildDescriptors(object, null); - newSiblingDescriptors = domain.getNewChildDescriptors(null, object); - } - - // Generate actions for selection; populate and redraw the menus. - // - createChildActions = generateCreateChildActions(newChildDescriptors, selection); - createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection); - - if (createChildMenuManager != null) { - populateManager(createChildMenuManager, createChildActions, null); - createChildMenuManager.update(true); - } - if (createSiblingMenuManager != null) { - populateManager(createSiblingMenuManager, createSiblingActions, null); - createSiblingMenuManager.update(true); - } - } + // Remove any menu items for old selection. + // + if (createChildMenuManager != null) { + depopulateManager(createChildMenuManager, createChildActions); + } + if (createSiblingMenuManager != null) { + depopulateManager(createSiblingMenuManager, createSiblingActions); + } + + // Query the new selection for appropriate new child/sibling descriptors + // + Collection<?> newChildDescriptors = null; + Collection<?> newSiblingDescriptors = null; + + ISelection selection = event.getSelection(); + if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) { + Object object = ((IStructuredSelection)selection).getFirstElement(); + + EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain(); + + newChildDescriptors = domain.getNewChildDescriptors(object, null); + newSiblingDescriptors = domain.getNewChildDescriptors(null, object); + } + + // Generate actions for selection; populate and redraw the menus. + // + createChildActions = generateCreateChildActions(newChildDescriptors, selection); + createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection); + + if (createChildMenuManager != null) { + populateManager(createChildMenuManager, createChildActions, null); + createChildMenuManager.update(true); + } + if (createSiblingMenuManager != null) { + populateManager(createSiblingMenuManager, createSiblingActions, null); + createSiblingMenuManager.update(true); + } + } /** - * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>, - * and returns the collection of these actions. - * <!-- begin-user-doc --> + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>, + * and returns the collection of these actions. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection) { - Collection<IAction> actions = new ArrayList<IAction>(); - if (descriptors != null) { - for (Object descriptor : descriptors) { - actions.add(new CreateChildAction(activeEditorPart, selection, descriptor)); - } - } - return actions; - } + Collection<IAction> actions = new ArrayList<IAction>(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateChildAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } /** - * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in <code>descriptors</code>, - * and returns the collection of these actions. - * <!-- begin-user-doc --> + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in <code>descriptors</code>, + * and returns the collection of these actions. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection) { - Collection<IAction> actions = new ArrayList<IAction>(); - if (descriptors != null) { - for (Object descriptor : descriptors) { - actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor)); - } - } - return actions; - } + Collection<IAction> actions = new ArrayList<IAction>(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } /** - * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s - * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection, - * by inserting them before the specified contribution item <code>contributionID</code>. - * If <code>contributionID</code> is <code>null</code>, they are simply added. - * <!-- begin-user-doc --> + * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s + * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection, + * by inserting them before the specified contribution item <code>contributionID</code>. + * If <code>contributionID</code> is <code>null</code>, they are simply added. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) { - if (actions != null) { - for (IAction action : actions) { - if (contributionID != null) { - manager.insertBefore(contributionID, action); - } - else { - manager.add(action); - } - } - } - } + if (actions != null) { + for (IAction action : actions) { + if (contributionID != null) { + manager.insertBefore(contributionID, action); + } + else { + manager.add(action); + } + } + } + } /** - * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s - * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection. - * <!-- begin-user-doc --> + * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s + * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) { - if (actions != null) { - IContributionItem[] items = manager.getItems(); - for (int i = 0; i < items.length; i++) { - // Look into SubContributionItems - // - IContributionItem contributionItem = items[i]; - while (contributionItem instanceof SubContributionItem) { - contributionItem = ((SubContributionItem)contributionItem).getInnerItem(); - } - - // Delete the ActionContributionItems with matching action. - // - if (contributionItem instanceof ActionContributionItem) { - IAction action = ((ActionContributionItem)contributionItem).getAction(); - if (actions.contains(action)) { - manager.remove(contributionItem); - } - } - } - } - } + if (actions != null) { + IContributionItem[] items = manager.getItems(); + for (int i = 0; i < items.length; i++) { + // Look into SubContributionItems + // + IContributionItem contributionItem = items[i]; + while (contributionItem instanceof SubContributionItem) { + contributionItem = ((SubContributionItem)contributionItem).getInnerItem(); + } + + // Delete the ActionContributionItems with matching action. + // + if (contributionItem instanceof ActionContributionItem) { + IAction action = ((ActionContributionItem)contributionItem).getAction(); + if (actions.contains(action)) { + manager.remove(contributionItem); + } + } + } + } + } /** - * This populates the pop-up menu before it appears. - * <!-- begin-user-doc --> + * This populates the pop-up menu before it appears. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void menuAboutToShow(IMenuManager menuManager) { - super.menuAboutToShow(menuManager); - MenuManager submenuManager = null; + super.menuAboutToShow(menuManager); + MenuManager submenuManager = null; - submenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); - populateManager(submenuManager, createChildActions, null); - menuManager.insertBefore("edit", submenuManager); + submenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + populateManager(submenuManager, createChildActions, null); + menuManager.insertBefore("edit", submenuManager); - submenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); - populateManager(submenuManager, createSiblingActions, null); - menuManager.insertBefore("edit", submenuManager); - } + submenuManager = new MenuManager(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + populateManager(submenuManager, createSiblingActions, null); + menuManager.insertBefore("edit", submenuManager); + } /** - * This inserts global actions before the "additions-end" separator. - * <!-- begin-user-doc --> + * This inserts global actions before the "additions-end" separator. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected void addGlobalActions(IMenuManager menuManager) { - menuManager.insertAfter("additions-end", new Separator("ui-actions")); - menuManager.insertAfter("ui-actions", showPropertiesViewAction); + menuManager.insertAfter("additions-end", new Separator("ui-actions")); + menuManager.insertAfter("ui-actions", showPropertiesViewAction); - refreshViewerAction.setEnabled(refreshViewerAction.isEnabled()); - menuManager.insertAfter("ui-actions", refreshViewerAction); + refreshViewerAction.setEnabled(refreshViewerAction.isEnabled()); + menuManager.insertAfter("ui-actions", refreshViewerAction); - super.addGlobalActions(menuManager); - } + super.addGlobalActions(menuManager); + } /** - * This ensures that a delete action will clean up all references to deleted objects. - * <!-- begin-user-doc --> + * This ensures that a delete action will clean up all references to deleted objects. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected boolean removeAllReferencesOnDelete() { - return true; - } + return true; + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcelandscape/presentation/ResourcelandscapeEditor.java b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcelandscape/presentation/ResourcelandscapeEditor.java index 28dac8f8..8a8fa2fb 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcelandscape/presentation/ResourcelandscapeEditor.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcelandscape/presentation/ResourcelandscapeEditor.java @@ -41,6 +41,7 @@ import org.eclipse.jface.action.Separator; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.dialogs.ProgressMonitorDialog; +import org.eclipse.jface.util.LocalSelectionTransfer; import org.eclipse.jface.viewers.ColumnWeightData; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; @@ -60,6 +61,7 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CTabFolder; import org.eclipse.swt.dnd.DND; +import org.eclipse.swt.dnd.FileTransfer; import org.eclipse.swt.dnd.Transfer; import org.eclipse.swt.events.ControlAdapter; @@ -179,1653 +181,1655 @@ public class ResourcelandscapeEditor extends MultiPageEditorPart implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker { /** - * This keeps track of the editing domain that is used to track all changes to the model. - * <!-- begin-user-doc --> + * This keeps track of the editing domain that is used to track all changes to the model. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected AdapterFactoryEditingDomain editingDomain; /** - * This is the one adapter factory used for providing views of the model. - * <!-- begin-user-doc --> + * This is the one adapter factory used for providing views of the model. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ComposedAdapterFactory adapterFactory; /** - * This is the content outline page. - * <!-- begin-user-doc --> + * This is the content outline page. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IContentOutlinePage contentOutlinePage; /** - * This is a kludge... - * <!-- begin-user-doc --> + * This is a kludge... + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IStatusLineManager contentOutlineStatusLineManager; /** - * This is the content outline page's viewer. - * <!-- begin-user-doc --> + * This is the content outline page's viewer. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected TreeViewer contentOutlineViewer; /** - * This is the property sheet page. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected PropertySheetPage propertySheetPage; + * This is the property sheet page. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected List<PropertySheetPage> propertySheetPages = new ArrayList<PropertySheetPage>(); - /** - * This is the viewer that shadows the selection in the content outline. - * The parent relation must be correctly defined for this to work. - * <!-- begin-user-doc --> + /** + * This is the viewer that shadows the selection in the content outline. + * The parent relation must be correctly defined for this to work. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected TreeViewer selectionViewer; /** - * This inverts the roll of parent and child in the content provider and show parents as a tree. - * <!-- begin-user-doc --> + * This inverts the roll of parent and child in the content provider and show parents as a tree. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected TreeViewer parentViewer; /** - * This shows how a tree view works. - * <!-- begin-user-doc --> + * This shows how a tree view works. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected TreeViewer treeViewer; /** - * This shows how a list view works. - * A list viewer doesn't support icons. - * <!-- begin-user-doc --> + * This shows how a list view works. + * A list viewer doesn't support icons. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ListViewer listViewer; /** - * This shows how a table view works. - * A table can be used as a list with icons. - * <!-- begin-user-doc --> + * This shows how a table view works. + * A table can be used as a list with icons. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected TableViewer tableViewer; /** - * This shows how a tree view with columns works. - * <!-- begin-user-doc --> + * This shows how a tree view with columns works. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected TreeViewer treeViewerWithColumns; /** - * This keeps track of the active viewer pane, in the book. - * <!-- begin-user-doc --> + * This keeps track of the active viewer pane, in the book. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ViewerPane currentViewerPane; /** - * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer. - * <!-- begin-user-doc --> + * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Viewer currentViewer; /** - * This listens to which ever viewer is active. - * <!-- begin-user-doc --> + * This listens to which ever viewer is active. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ISelectionChangedListener selectionChangedListener; /** - * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor. - * <!-- begin-user-doc --> + * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<ISelectionChangedListener> selectionChangedListeners = new ArrayList<ISelectionChangedListener>(); /** - * This keeps track of the selection of the editor as a whole. - * <!-- begin-user-doc --> + * This keeps track of the selection of the editor as a whole. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ISelection editorSelection = StructuredSelection.EMPTY; /** - * The MarkerHelper is responsible for creating workspace resource markers presented - * in Eclipse's Problems View. - * <!-- begin-user-doc --> + * The MarkerHelper is responsible for creating workspace resource markers presented + * in Eclipse's Problems View. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected MarkerHelper markerHelper = new EditUIMarkerHelper(); /** - * This listens for when the outline becomes active - * <!-- begin-user-doc --> + * This listens for when the outline becomes active + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IPartListener partListener = new IPartListener() { - public void partActivated(IWorkbenchPart p) { - if (p instanceof ContentOutline) { - if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) { - getActionBarContributor().setActiveEditor(ResourcelandscapeEditor.this); - - setCurrentViewer(contentOutlineViewer); - } - } - else if (p instanceof PropertySheet) { - if (((PropertySheet)p).getCurrentPage() == propertySheetPage) { - getActionBarContributor().setActiveEditor(ResourcelandscapeEditor.this); - handleActivate(); - } - } - else if (p == ResourcelandscapeEditor.this) { - handleActivate(); - } - } - public void partBroughtToTop(IWorkbenchPart p) { - // Ignore. - } - public void partClosed(IWorkbenchPart p) { - // Ignore. - } - public void partDeactivated(IWorkbenchPart p) { - // Ignore. - } - public void partOpened(IWorkbenchPart p) { - // Ignore. - } - }; - - /** - * Resources that have been removed since last activation. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + public void partActivated(IWorkbenchPart p) { + if (p instanceof ContentOutline) { + if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) { + getActionBarContributor().setActiveEditor(ResourcelandscapeEditor.this); + + setCurrentViewer(contentOutlineViewer); + } + } + else if (p instanceof PropertySheet) { + if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) { + getActionBarContributor().setActiveEditor(ResourcelandscapeEditor.this); + handleActivate(); + } + } + else if (p == ResourcelandscapeEditor.this) { + handleActivate(); + } + } + public void partBroughtToTop(IWorkbenchPart p) { + // Ignore. + } + public void partClosed(IWorkbenchPart p) { + // Ignore. + } + public void partDeactivated(IWorkbenchPart p) { + // Ignore. + } + public void partOpened(IWorkbenchPart p) { + // Ignore. + } + }; + + /** + * Resources that have been removed since last activation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected Collection<Resource> removedResources = new ArrayList<Resource>(); /** - * Resources that have been changed since last activation. - * <!-- begin-user-doc --> + * Resources that have been changed since last activation. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<Resource> changedResources = new ArrayList<Resource>(); /** - * Resources that have been saved. - * <!-- begin-user-doc --> + * Resources that have been saved. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<Resource> savedResources = new ArrayList<Resource>(); /** - * Map to store the diagnostic associated with a resource. - * <!-- begin-user-doc --> + * Map to store the diagnostic associated with a resource. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Map<Resource, Diagnostic> resourceToDiagnosticMap = new LinkedHashMap<Resource, Diagnostic>(); /** - * Controls whether the problem indication should be updated. - * <!-- begin-user-doc --> + * Controls whether the problem indication should be updated. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected boolean updateProblemIndication = true; /** - * Adapter used to update the problem indication when resources are demanded loaded. - * <!-- begin-user-doc --> + * Adapter used to update the problem indication when resources are demanded loaded. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected EContentAdapter problemIndicationAdapter = new EContentAdapter() { - @Override - public void notifyChanged(Notification notification) { - if (notification.getNotifier() instanceof Resource) { - switch (notification.getFeatureID(Resource.class)) { - case Resource.RESOURCE__IS_LOADED: - case Resource.RESOURCE__ERRORS: - case Resource.RESOURCE__WARNINGS: { - Resource resource = (Resource)notification.getNotifier(); - Diagnostic diagnostic = analyzeResourceProblems(resource, null); - if (diagnostic.getSeverity() != Diagnostic.OK) { - resourceToDiagnosticMap.put(resource, diagnostic); - } - else { - resourceToDiagnosticMap.remove(resource); - } - - if (updateProblemIndication) { - getSite().getShell().getDisplay().asyncExec - (new Runnable() { - public void run() { - updateProblemIndication(); - } - }); - } - break; - } - } - } - else { - super.notifyChanged(notification); - } - } - - @Override - protected void setTarget(Resource target) { - basicSetTarget(target); - } - - @Override - protected void unsetTarget(Resource target) { - basicUnsetTarget(target); - } - }; - - /** - * This listens for workspace changes. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + @Override + public void notifyChanged(Notification notification) { + if (notification.getNotifier() instanceof Resource) { + switch (notification.getFeatureID(Resource.class)) { + case Resource.RESOURCE__IS_LOADED: + case Resource.RESOURCE__ERRORS: + case Resource.RESOURCE__WARNINGS: { + Resource resource = (Resource)notification.getNotifier(); + Diagnostic diagnostic = analyzeResourceProblems(resource, null); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, diagnostic); + } + else { + resourceToDiagnosticMap.remove(resource); + } + + if (updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + break; + } + } + } + else { + super.notifyChanged(notification); + } + } + + @Override + protected void setTarget(Resource target) { + basicSetTarget(target); + } + + @Override + protected void unsetTarget(Resource target) { + basicUnsetTarget(target); + resourceToDiagnosticMap.remove(target); + if (updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + } + }; + + /** + * This listens for workspace changes. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected IResourceChangeListener resourceChangeListener = new IResourceChangeListener() { - public void resourceChanged(IResourceChangeEvent event) { - IResourceDelta delta = event.getDelta(); - try { - class ResourceDeltaVisitor implements IResourceDeltaVisitor { - protected ResourceSet resourceSet = editingDomain.getResourceSet(); - protected Collection<Resource> changedResources = new ArrayList<Resource>(); - protected Collection<Resource> removedResources = new ArrayList<Resource>(); - - public boolean visit(IResourceDelta delta) { - if (delta.getResource().getType() == IResource.FILE) { - if (delta.getKind() == IResourceDelta.REMOVED || - delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) { - Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false); - if (resource != null) { - if (delta.getKind() == IResourceDelta.REMOVED) { - removedResources.add(resource); - } - else if (!savedResources.remove(resource)) { - changedResources.add(resource); - } - } - } - } - - return true; - } - - public Collection<Resource> getChangedResources() { - return changedResources; - } - - public Collection<Resource> getRemovedResources() { - return removedResources; - } - } - - final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor(); - delta.accept(visitor); - - if (!visitor.getRemovedResources().isEmpty()) { - getSite().getShell().getDisplay().asyncExec - (new Runnable() { - public void run() { - removedResources.addAll(visitor.getRemovedResources()); - if (!isDirty()) { - getSite().getPage().closeEditor(ResourcelandscapeEditor.this, false); - } - } - }); - } - - if (!visitor.getChangedResources().isEmpty()) { - getSite().getShell().getDisplay().asyncExec - (new Runnable() { - public void run() { - changedResources.addAll(visitor.getChangedResources()); - if (getSite().getPage().getActiveEditor() == ResourcelandscapeEditor.this) { - handleActivate(); - } - } - }); - } - } - catch (CoreException exception) { - ResourcelandscapeEditorPlugin.INSTANCE.log(exception); - } - } - }; - - /** - * Handles activation of the editor or it's associated views. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + public void resourceChanged(IResourceChangeEvent event) { + IResourceDelta delta = event.getDelta(); + try { + class ResourceDeltaVisitor implements IResourceDeltaVisitor { + protected ResourceSet resourceSet = editingDomain.getResourceSet(); + protected Collection<Resource> changedResources = new ArrayList<Resource>(); + protected Collection<Resource> removedResources = new ArrayList<Resource>(); + + public boolean visit(IResourceDelta delta) { + if (delta.getResource().getType() == IResource.FILE) { + if (delta.getKind() == IResourceDelta.REMOVED || + delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) { + Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false); + if (resource != null) { + if (delta.getKind() == IResourceDelta.REMOVED) { + removedResources.add(resource); + } + else if (!savedResources.remove(resource)) { + changedResources.add(resource); + } + } + } + return false; + } + + return true; + } + + public Collection<Resource> getChangedResources() { + return changedResources; + } + + public Collection<Resource> getRemovedResources() { + return removedResources; + } + } + + final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor(); + delta.accept(visitor); + + if (!visitor.getRemovedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + removedResources.addAll(visitor.getRemovedResources()); + if (!isDirty()) { + getSite().getPage().closeEditor(ResourcelandscapeEditor.this, false); + } + } + }); + } + + if (!visitor.getChangedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + changedResources.addAll(visitor.getChangedResources()); + if (getSite().getPage().getActiveEditor() == ResourcelandscapeEditor.this) { + handleActivate(); + } + } + }); + } + } + catch (CoreException exception) { + ResourcelandscapeEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * Handles activation of the editor or it's associated views. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected void handleActivate() { - // Recompute the read only state. - // - if (editingDomain.getResourceToReadOnlyMap() != null) { - editingDomain.getResourceToReadOnlyMap().clear(); - - // Refresh any actions that may become enabled or disabled. - // - setSelection(getSelection()); - } - - if (!removedResources.isEmpty()) { - if (handleDirtyConflict()) { - getSite().getPage().closeEditor(ResourcelandscapeEditor.this, false); - } - else { - removedResources.clear(); - changedResources.clear(); - savedResources.clear(); - } - } - else if (!changedResources.isEmpty()) { - changedResources.removeAll(savedResources); - handleChangedResources(); - changedResources.clear(); - savedResources.clear(); - } - } - - /** - * Handles what to do with changed resources on activation. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + // Recompute the read only state. + // + if (editingDomain.getResourceToReadOnlyMap() != null) { + editingDomain.getResourceToReadOnlyMap().clear(); + + // Refresh any actions that may become enabled or disabled. + // + setSelection(getSelection()); + } + + if (!removedResources.isEmpty()) { + if (handleDirtyConflict()) { + getSite().getPage().closeEditor(ResourcelandscapeEditor.this, false); + } + else { + removedResources.clear(); + changedResources.clear(); + savedResources.clear(); + } + } + else if (!changedResources.isEmpty()) { + changedResources.removeAll(savedResources); + handleChangedResources(); + changedResources.clear(); + savedResources.clear(); + } + } + + /** + * Handles what to do with changed resources on activation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected void handleChangedResources() { - if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) { - if (isDirty()) { - changedResources.addAll(editingDomain.getResourceSet().getResources()); - } - editingDomain.getCommandStack().flush(); - - updateProblemIndication = false; - for (Resource resource : changedResources) { - if (resource.isLoaded()) { - resource.unload(); - try { - resource.load(Collections.EMPTY_MAP); - } - catch (IOException exception) { - if (!resourceToDiagnosticMap.containsKey(resource)) { - resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); - } - } - } - } - - if (AdapterFactoryEditingDomain.isStale(editorSelection)) { - setSelection(StructuredSelection.EMPTY); - } - - updateProblemIndication = true; - updateProblemIndication(); - } - } + if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) { + if (isDirty()) { + changedResources.addAll(editingDomain.getResourceSet().getResources()); + } + editingDomain.getCommandStack().flush(); + + updateProblemIndication = false; + for (Resource resource : changedResources) { + if (resource.isLoaded()) { + resource.unload(); + try { + resource.load(Collections.EMPTY_MAP); + } + catch (IOException exception) { + if (!resourceToDiagnosticMap.containsKey(resource)) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + } + } + } + + if (AdapterFactoryEditingDomain.isStale(editorSelection)) { + setSelection(StructuredSelection.EMPTY); + } + + updateProblemIndication = true; + updateProblemIndication(); + } + } /** - * Updates the problems indication with the information described in the specified diagnostic. - * <!-- begin-user-doc --> + * Updates the problems indication with the information described in the specified diagnostic. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void updateProblemIndication() { - if (updateProblemIndication) { - BasicDiagnostic diagnostic = - new BasicDiagnostic - (Diagnostic.OK, - "edu.kit.ipd.descartes.mm.resourcelandscape.editor", - 0, - null, - new Object [] { editingDomain.getResourceSet() }); - for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) { - if (childDiagnostic.getSeverity() != Diagnostic.OK) { - diagnostic.add(childDiagnostic); - } - } - - int lastEditorPage = getPageCount() - 1; - if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) { - ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic); - if (diagnostic.getSeverity() != Diagnostic.OK) { - setActivePage(lastEditorPage); - } - } - else if (diagnostic.getSeverity() != Diagnostic.OK) { - ProblemEditorPart problemEditorPart = new ProblemEditorPart(); - problemEditorPart.setDiagnostic(diagnostic); - problemEditorPart.setMarkerHelper(markerHelper); - try { - addPage(++lastEditorPage, problemEditorPart, getEditorInput()); - setPageText(lastEditorPage, problemEditorPart.getPartName()); - setActivePage(lastEditorPage); - showTabs(); - } - catch (PartInitException exception) { - ResourcelandscapeEditorPlugin.INSTANCE.log(exception); - } - } - - if (markerHelper.hasMarkers(editingDomain.getResourceSet())) { - markerHelper.deleteMarkers(editingDomain.getResourceSet()); - if (diagnostic.getSeverity() != Diagnostic.OK) { - try { - markerHelper.createMarkers(diagnostic); - } - catch (CoreException exception) { - ResourcelandscapeEditorPlugin.INSTANCE.log(exception); - } - } - } - } - } - - /** - * Shows a dialog that asks if conflicting changes should be discarded. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + if (updateProblemIndication) { + BasicDiagnostic diagnostic = + new BasicDiagnostic + (Diagnostic.OK, + "edu.kit.ipd.descartes.mm.resourcelandscape.editor", + 0, + null, + new Object [] { editingDomain.getResourceSet() }); + for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) { + if (childDiagnostic.getSeverity() != Diagnostic.OK) { + diagnostic.add(childDiagnostic); + } + } + + int lastEditorPage = getPageCount() - 1; + if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) { + ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic); + if (diagnostic.getSeverity() != Diagnostic.OK) { + setActivePage(lastEditorPage); + } + } + else if (diagnostic.getSeverity() != Diagnostic.OK) { + ProblemEditorPart problemEditorPart = new ProblemEditorPart(); + problemEditorPart.setDiagnostic(diagnostic); + problemEditorPart.setMarkerHelper(markerHelper); + try { + addPage(++lastEditorPage, problemEditorPart, getEditorInput()); + setPageText(lastEditorPage, problemEditorPart.getPartName()); + setActivePage(lastEditorPage); + showTabs(); + } + catch (PartInitException exception) { + ResourcelandscapeEditorPlugin.INSTANCE.log(exception); + } + } + + if (markerHelper.hasMarkers(editingDomain.getResourceSet())) { + markerHelper.deleteMarkers(editingDomain.getResourceSet()); + if (diagnostic.getSeverity() != Diagnostic.OK) { + try { + markerHelper.createMarkers(diagnostic); + } + catch (CoreException exception) { + ResourcelandscapeEditorPlugin.INSTANCE.log(exception); + } + } + } + } + } + + /** + * Shows a dialog that asks if conflicting changes should be discarded. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected boolean handleDirtyConflict() { - return - MessageDialog.openQuestion - (getSite().getShell(), - getString("_UI_FileConflict_label"), - getString("_WARN_FileConflict")); - } + return + MessageDialog.openQuestion + (getSite().getShell(), + getString("_UI_FileConflict_label"), + getString("_WARN_FileConflict")); + } /** - * This creates a model editor. - * <!-- begin-user-doc --> + * This creates a model editor. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourcelandscapeEditor() { - super(); - initializeEditingDomain(); - } + super(); + initializeEditingDomain(); + } /** - * This sets up the editing domain for the model editor. - * <!-- begin-user-doc --> + * This sets up the editing domain for the model editor. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void initializeEditingDomain() { - // Create an adapter factory that yields item providers. - // - adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); - - adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); - adapterFactory.addAdapterFactory(new ResourcelandscapeItemProviderAdapterFactory()); - adapterFactory.addAdapterFactory(new ResourceconfigurationItemProviderAdapterFactory()); - adapterFactory.addAdapterFactory(new ContainerrepositoryItemProviderAdapterFactory()); - adapterFactory.addAdapterFactory(new ResourcetypeItemProviderAdapterFactory()); - adapterFactory.addAdapterFactory(new CoreItemProviderAdapterFactory()); - adapterFactory.addAdapterFactory(new IdentifierItemProviderAdapterFactory()); - adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); - - // Create the command stack that will notify this editor as commands are executed. - // - BasicCommandStack commandStack = new BasicCommandStack(); - - // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus. - // - commandStack.addCommandStackListener - (new CommandStackListener() { - public void commandStackChanged(final EventObject event) { - getContainer().getDisplay().asyncExec - (new Runnable() { - public void run() { - firePropertyChange(IEditorPart.PROP_DIRTY); - - // Try to select the affected objects. - // - Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand(); - if (mostRecentCommand != null) { - setSelectionToViewer(mostRecentCommand.getAffectedObjects()); - } - if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed()) { - propertySheetPage.refresh(); - } - } - }); - } - }); - - // Create the editing domain with a special command stack. - // - editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>()); - } - - /** - * This is here for the listener to be able to call it. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + // Create an adapter factory that yields item providers. + // + adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); + + adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ResourcelandscapeItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ResourceconfigurationItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ContainerrepositoryItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ResourcetypeItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new CoreItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new IdentifierItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); + + // Create the command stack that will notify this editor as commands are executed. + // + BasicCommandStack commandStack = new BasicCommandStack(); + + // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus. + // + commandStack.addCommandStackListener + (new CommandStackListener() { + public void commandStackChanged(final EventObject event) { + getContainer().getDisplay().asyncExec + (new Runnable() { + public void run() { + firePropertyChange(IEditorPart.PROP_DIRTY); + + // Try to select the affected objects. + // + Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand(); + if (mostRecentCommand != null) { + setSelectionToViewer(mostRecentCommand.getAffectedObjects()); + } + for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) { + PropertySheetPage propertySheetPage = i.next(); + if (propertySheetPage.getControl().isDisposed()) { + i.remove(); + } + else { + propertySheetPage.refresh(); + } + } + } + }); + } + }); + + // Create the editing domain with a special command stack. + // + editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>()); + } + + /** + * This is here for the listener to be able to call it. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ @Override protected void firePropertyChange(int action) { - super.firePropertyChange(action); - } + super.firePropertyChange(action); + } /** - * This sets the selection into whichever viewer is active. - * <!-- begin-user-doc --> + * This sets the selection into whichever viewer is active. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setSelectionToViewer(Collection<?> collection) { - final Collection<?> theSelection = collection; - // Make sure it's okay. - // - if (theSelection != null && !theSelection.isEmpty()) { - Runnable runnable = - new Runnable() { - public void run() { - // Try to select the items in the current content viewer of the editor. - // - if (currentViewer != null) { - currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true); - } - } - }; - getSite().getShell().getDisplay().asyncExec(runnable); - } - } - - /** - * This returns the editing domain as required by the {@link IEditingDomainProvider} interface. - * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain} - * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + final Collection<?> theSelection = collection; + // Make sure it's okay. + // + if (theSelection != null && !theSelection.isEmpty()) { + Runnable runnable = + new Runnable() { + public void run() { + // Try to select the items in the current content viewer of the editor. + // + if (currentViewer != null) { + currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true); + } + } + }; + getSite().getShell().getDisplay().asyncExec(runnable); + } + } + + /** + * This returns the editing domain as required by the {@link IEditingDomainProvider} interface. + * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain} + * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public EditingDomain getEditingDomain() { - return editingDomain; - } + return editingDomain; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } + super(adapterFactory); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object [] getElements(Object object) { - Object parent = super.getParent(object); - return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); - } + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object [] getChildren(Object object) { - Object parent = super.getParent(object); - return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); - } + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public boolean hasChildren(Object object) { - Object parent = super.getParent(object); - return parent != null; - } + Object parent = super.getParent(object); + return parent != null; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getParent(Object object) { - return null; - } + return null; + } } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setCurrentViewerPane(ViewerPane viewerPane) { - if (currentViewerPane != viewerPane) { - if (currentViewerPane != null) { - currentViewerPane.showFocus(false); - } - currentViewerPane = viewerPane; - } - setCurrentViewer(currentViewerPane.getViewer()); - } - - /** - * This makes sure that one content viewer, either for the current page or the outline view, if it has focus, - * is the current one. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + if (currentViewerPane != viewerPane) { + if (currentViewerPane != null) { + currentViewerPane.showFocus(false); + } + currentViewerPane = viewerPane; + } + setCurrentViewer(currentViewerPane.getViewer()); + } + + /** + * This makes sure that one content viewer, either for the current page or the outline view, if it has focus, + * is the current one. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public void setCurrentViewer(Viewer viewer) { - // If it is changing... - // - if (currentViewer != viewer) { - if (selectionChangedListener == null) { - // Create the listener on demand. - // - selectionChangedListener = - new ISelectionChangedListener() { - // This just notifies those things that are affected by the section. - // - public void selectionChanged(SelectionChangedEvent selectionChangedEvent) { - setSelection(selectionChangedEvent.getSelection()); - } - }; - } - - // Stop listening to the old one. - // - if (currentViewer != null) { - currentViewer.removeSelectionChangedListener(selectionChangedListener); - } - - // Start listening to the new one. - // - if (viewer != null) { - viewer.addSelectionChangedListener(selectionChangedListener); - } - - // Remember it. - // - currentViewer = viewer; - - // Set the editors selection based on the current viewer's selection. - // - setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection()); - } - } - - /** - * This returns the viewer as required by the {@link IViewerProvider} interface. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + // If it is changing... + // + if (currentViewer != viewer) { + if (selectionChangedListener == null) { + // Create the listener on demand. + // + selectionChangedListener = + new ISelectionChangedListener() { + // This just notifies those things that are affected by the section. + // + public void selectionChanged(SelectionChangedEvent selectionChangedEvent) { + setSelection(selectionChangedEvent.getSelection()); + } + }; + } + + // Stop listening to the old one. + // + if (currentViewer != null) { + currentViewer.removeSelectionChangedListener(selectionChangedListener); + } + + // Start listening to the new one. + // + if (viewer != null) { + viewer.addSelectionChangedListener(selectionChangedListener); + } + + // Remember it. + // + currentViewer = viewer; + + // Set the editors selection based on the current viewer's selection. + // + setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection()); + } + } + + /** + * This returns the viewer as required by the {@link IViewerProvider} interface. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public Viewer getViewer() { - return currentViewer; - } + return currentViewer; + } /** - * This creates a context menu for the viewer and adds a listener as well registering the menu for extension. - * <!-- begin-user-doc --> + * This creates a context menu for the viewer and adds a listener as well registering the menu for extension. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void createContextMenuFor(StructuredViewer viewer) { - MenuManager contextMenu = new MenuManager("#PopUp"); - contextMenu.add(new Separator("additions")); - contextMenu.setRemoveAllWhenShown(true); - contextMenu.addMenuListener(this); - Menu menu= contextMenu.createContextMenu(viewer.getControl()); - viewer.getControl().setMenu(menu); - getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer)); - - int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; - Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance() }; - viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer)); - viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer)); - } - - /** - * This is the method called to load a resource into the editing domain's resource set based on the editor's input. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + MenuManager contextMenu = new MenuManager("#PopUp"); + contextMenu.add(new Separator("additions")); + contextMenu.setRemoveAllWhenShown(true); + contextMenu.addMenuListener(this); + Menu menu= contextMenu.createContextMenu(viewer.getControl()); + viewer.getControl().setMenu(menu); + getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer)); + + int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; + Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() }; + viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer)); + viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer)); + } + + /** + * This is the method called to load a resource into the editing domain's resource set based on the editor's input. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public void createModel() { - URI resourceURI = EditUIUtil.getURI(getEditorInput()); - Exception exception = null; - Resource resource = null; - try { - // Load the resource through the editing domain. - // - resource = editingDomain.getResourceSet().getResource(resourceURI, true); - } - catch (Exception e) { - exception = e; - resource = editingDomain.getResourceSet().getResource(resourceURI, false); - } - - Diagnostic diagnostic = analyzeResourceProblems(resource, exception); - if (diagnostic.getSeverity() != Diagnostic.OK) { - resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); - } - editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter); - - // Add default resource types model. - editingDomain.loadResource("pathmap://DML_APPLICATIONLEVEL_MODELS/defaultresourcetypes.resourcetype"); - } - - /** - * Returns a diagnostic describing the errors and warnings listed in the resource - * and the specified exception (if any). - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + URI resourceURI = EditUIUtil.getURI(getEditorInput()); + Exception exception = null; + Resource resource = null; + try { + // Load the resource through the editing domain. + // + resource = editingDomain.getResourceSet().getResource(resourceURI, true); + } + catch (Exception e) { + exception = e; + resource = editingDomain.getResourceSet().getResource(resourceURI, false); + } + + Diagnostic diagnostic = analyzeResourceProblems(resource, exception); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter); + } + + /** + * Returns a diagnostic describing the errors and warnings listed in the resource + * and the specified exception (if any). + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { - if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) { - BasicDiagnostic basicDiagnostic = - new BasicDiagnostic - (Diagnostic.ERROR, - "edu.kit.ipd.descartes.mm.resourcelandscape.editor", - 0, - getString("_UI_CreateModelError_message", resource.getURI()), - new Object [] { exception == null ? (Object)resource : exception }); - basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); - return basicDiagnostic; - } - else if (exception != null) { - return - new BasicDiagnostic - (Diagnostic.ERROR, - "edu.kit.ipd.descartes.mm.resourcelandscape.editor", - 0, - getString("_UI_CreateModelError_message", resource.getURI()), - new Object[] { exception }); - } - else { - return Diagnostic.OK_INSTANCE; - } - } - - /** - * This is the method used by the framework to install your own controls. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) { + BasicDiagnostic basicDiagnostic = + new BasicDiagnostic + (Diagnostic.ERROR, + "edu.kit.ipd.descartes.mm.resourcelandscape.editor", + 0, + getString("_UI_CreateModelError_message", resource.getURI()), + new Object [] { exception == null ? (Object)resource : exception }); + basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); + return basicDiagnostic; + } + else if (exception != null) { + return + new BasicDiagnostic + (Diagnostic.ERROR, + "edu.kit.ipd.descartes.mm.resourcelandscape.editor", + 0, + getString("_UI_CreateModelError_message", resource.getURI()), + new Object[] { exception }); + } + else { + return Diagnostic.OK_INSTANCE; + } + } + + /** + * This is the method used by the framework to install your own controls. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ @Override public void createPages() { - // Creates the model from the editor input - // - createModel(); - - // Only creates the other pages if there is something that can be edited - // - if (!getEditingDomain().getResourceSet().getResources().isEmpty()) { - // Create a page for the selection tree view. - // - { - ViewerPane viewerPane = - new ViewerPane(getSite().getPage(), ResourcelandscapeEditor.this) { - @Override - public Viewer createViewer(Composite composite) { - Tree tree = new Tree(composite, SWT.MULTI); - TreeViewer newTreeViewer = new TreeViewer(tree); - return newTreeViewer; - } - @Override - public void requestActivation() { - super.requestActivation(); - setCurrentViewerPane(this); - } - }; - viewerPane.createControl(getContainer()); - - selectionViewer = (TreeViewer)viewerPane.getViewer(); - selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); - - selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); - selectionViewer.setInput(editingDomain.getResourceSet()); - selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); - viewerPane.setTitle(editingDomain.getResourceSet()); - - new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory); - - createContextMenuFor(selectionViewer); - int pageIndex = addPage(viewerPane.getControl()); - setPageText(pageIndex, getString("_UI_SelectionPage_label")); - } - - // Create a page for the parent tree view. - // - { - ViewerPane viewerPane = - new ViewerPane(getSite().getPage(), ResourcelandscapeEditor.this) { - @Override - public Viewer createViewer(Composite composite) { - Tree tree = new Tree(composite, SWT.MULTI); - TreeViewer newTreeViewer = new TreeViewer(tree); - return newTreeViewer; - } - @Override - public void requestActivation() { - super.requestActivation(); - setCurrentViewerPane(this); - } - }; - viewerPane.createControl(getContainer()); - - parentViewer = (TreeViewer)viewerPane.getViewer(); - parentViewer.setAutoExpandLevel(30); - parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory)); - parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); - - createContextMenuFor(parentViewer); - int pageIndex = addPage(viewerPane.getControl()); - setPageText(pageIndex, getString("_UI_ParentPage_label")); - } - - // This is the page for the list viewer - // - { - ViewerPane viewerPane = - new ViewerPane(getSite().getPage(), ResourcelandscapeEditor.this) { - @Override - public Viewer createViewer(Composite composite) { - return new ListViewer(composite); - } - @Override - public void requestActivation() { - super.requestActivation(); - setCurrentViewerPane(this); - } - }; - viewerPane.createControl(getContainer()); - listViewer = (ListViewer)viewerPane.getViewer(); - listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); - listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); - - createContextMenuFor(listViewer); - int pageIndex = addPage(viewerPane.getControl()); - setPageText(pageIndex, getString("_UI_ListPage_label")); - } - - // This is the page for the tree viewer - // - { - ViewerPane viewerPane = - new ViewerPane(getSite().getPage(), ResourcelandscapeEditor.this) { - @Override - public Viewer createViewer(Composite composite) { - return new TreeViewer(composite); - } - @Override - public void requestActivation() { - super.requestActivation(); - setCurrentViewerPane(this); - } - }; - viewerPane.createControl(getContainer()); - treeViewer = (TreeViewer)viewerPane.getViewer(); - treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); - treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); - - new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory); - - createContextMenuFor(treeViewer); - int pageIndex = addPage(viewerPane.getControl()); - setPageText(pageIndex, getString("_UI_TreePage_label")); - } - - // This is the page for the table viewer. - // - { - ViewerPane viewerPane = - new ViewerPane(getSite().getPage(), ResourcelandscapeEditor.this) { - @Override - public Viewer createViewer(Composite composite) { - return new TableViewer(composite); - } - @Override - public void requestActivation() { - super.requestActivation(); - setCurrentViewerPane(this); - } - }; - viewerPane.createControl(getContainer()); - tableViewer = (TableViewer)viewerPane.getViewer(); - - Table table = tableViewer.getTable(); - TableLayout layout = new TableLayout(); - table.setLayout(layout); - table.setHeaderVisible(true); - table.setLinesVisible(true); - - TableColumn objectColumn = new TableColumn(table, SWT.NONE); - layout.addColumnData(new ColumnWeightData(3, 100, true)); - objectColumn.setText(getString("_UI_ObjectColumn_label")); - objectColumn.setResizable(true); - - TableColumn selfColumn = new TableColumn(table, SWT.NONE); - layout.addColumnData(new ColumnWeightData(2, 100, true)); - selfColumn.setText(getString("_UI_SelfColumn_label")); - selfColumn.setResizable(true); - - tableViewer.setColumnProperties(new String [] {"a", "b"}); - tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); - tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); - - createContextMenuFor(tableViewer); - int pageIndex = addPage(viewerPane.getControl()); - setPageText(pageIndex, getString("_UI_TablePage_label")); - } - - // This is the page for the table tree viewer. - // - { - ViewerPane viewerPane = - new ViewerPane(getSite().getPage(), ResourcelandscapeEditor.this) { - @Override - public Viewer createViewer(Composite composite) { - return new TreeViewer(composite); - } - @Override - public void requestActivation() { - super.requestActivation(); - setCurrentViewerPane(this); - } - }; - viewerPane.createControl(getContainer()); - - treeViewerWithColumns = (TreeViewer)viewerPane.getViewer(); - - Tree tree = treeViewerWithColumns.getTree(); - tree.setLayoutData(new FillLayout()); - tree.setHeaderVisible(true); - tree.setLinesVisible(true); - - TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE); - objectColumn.setText(getString("_UI_ObjectColumn_label")); - objectColumn.setResizable(true); - objectColumn.setWidth(250); - - TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE); - selfColumn.setText(getString("_UI_SelfColumn_label")); - selfColumn.setResizable(true); - selfColumn.setWidth(200); - - treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); - treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); - treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); - - createContextMenuFor(treeViewerWithColumns); - int pageIndex = addPage(viewerPane.getControl()); - setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); - } - - getSite().getShell().getDisplay().asyncExec - (new Runnable() { - public void run() { - setActivePage(0); - } - }); - } - - // Ensures that this editor will only display the page's tab - // area if there are more than one page - // - getContainer().addControlListener - (new ControlAdapter() { - boolean guard = false; - @Override - public void controlResized(ControlEvent event) { - if (!guard) { - guard = true; - hideTabs(); - guard = false; - } - } - }); - - getSite().getShell().getDisplay().asyncExec - (new Runnable() { - public void run() { - updateProblemIndication(); - } - }); - } - - /** - * If there is just one page in the multi-page editor part, - * this hides the single tab at the bottom. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + // Creates the model from the editor input + // + createModel(); + + // Only creates the other pages if there is something that can be edited + // + if (!getEditingDomain().getResourceSet().getResources().isEmpty()) { + // Create a page for the selection tree view. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ResourcelandscapeEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + selectionViewer = (TreeViewer)viewerPane.getViewer(); + selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + + selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + selectionViewer.setInput(editingDomain.getResourceSet()); + selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + viewerPane.setTitle(editingDomain.getResourceSet()); + + new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory); + + createContextMenuFor(selectionViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_SelectionPage_label")); + } + + // Create a page for the parent tree view. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ResourcelandscapeEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + parentViewer = (TreeViewer)viewerPane.getViewer(); + parentViewer.setAutoExpandLevel(30); + parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory)); + parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(parentViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_ParentPage_label")); + } + + // This is the page for the list viewer + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ResourcelandscapeEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new ListViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + listViewer = (ListViewer)viewerPane.getViewer(); + listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(listViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_ListPage_label")); + } + + // This is the page for the tree viewer + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ResourcelandscapeEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + treeViewer = (TreeViewer)viewerPane.getViewer(); + treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory); + + createContextMenuFor(treeViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TreePage_label")); + } + + // This is the page for the table viewer. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ResourcelandscapeEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TableViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + tableViewer = (TableViewer)viewerPane.getViewer(); + + Table table = tableViewer.getTable(); + TableLayout layout = new TableLayout(); + table.setLayout(layout); + table.setHeaderVisible(true); + table.setLinesVisible(true); + + TableColumn objectColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(3, 100, true)); + objectColumn.setText(getString("_UI_ObjectColumn_label")); + objectColumn.setResizable(true); + + TableColumn selfColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(2, 100, true)); + selfColumn.setText(getString("_UI_SelfColumn_label")); + selfColumn.setResizable(true); + + tableViewer.setColumnProperties(new String [] {"a", "b"}); + tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(tableViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TablePage_label")); + } + + // This is the page for the table tree viewer. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ResourcelandscapeEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + treeViewerWithColumns = (TreeViewer)viewerPane.getViewer(); + + Tree tree = treeViewerWithColumns.getTree(); + tree.setLayoutData(new FillLayout()); + tree.setHeaderVisible(true); + tree.setLinesVisible(true); + + TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE); + objectColumn.setText(getString("_UI_ObjectColumn_label")); + objectColumn.setResizable(true); + objectColumn.setWidth(250); + + TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE); + selfColumn.setText(getString("_UI_SelfColumn_label")); + selfColumn.setResizable(true); + selfColumn.setWidth(200); + + treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); + treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(treeViewerWithColumns); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); + } + + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + setActivePage(0); + } + }); + } + + // Ensures that this editor will only display the page's tab + // area if there are more than one page + // + getContainer().addControlListener + (new ControlAdapter() { + boolean guard = false; + @Override + public void controlResized(ControlEvent event) { + if (!guard) { + guard = true; + hideTabs(); + guard = false; + } + } + }); + + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + + /** + * If there is just one page in the multi-page editor part, + * this hides the single tab at the bottom. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected void hideTabs() { - if (getPageCount() <= 1) { - setPageText(0, ""); - if (getContainer() instanceof CTabFolder) { - ((CTabFolder)getContainer()).setTabHeight(1); - Point point = getContainer().getSize(); - getContainer().setSize(point.x, point.y + 6); - } - } - } - - /** - * If there is more than one page in the multi-page editor part, - * this shows the tabs at the bottom. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + if (getPageCount() <= 1) { + setPageText(0, ""); + if (getContainer() instanceof CTabFolder) { + ((CTabFolder)getContainer()).setTabHeight(1); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y + 6); + } + } + } + + /** + * If there is more than one page in the multi-page editor part, + * this shows the tabs at the bottom. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected void showTabs() { - if (getPageCount() > 1) { - setPageText(0, getString("_UI_SelectionPage_label")); - if (getContainer() instanceof CTabFolder) { - ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT); - Point point = getContainer().getSize(); - getContainer().setSize(point.x, point.y - 6); - } - } - } - - /** - * This is used to track the active viewer. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + if (getPageCount() > 1) { + setPageText(0, getString("_UI_SelectionPage_label")); + if (getContainer() instanceof CTabFolder) { + ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y - 6); + } + } + } + + /** + * This is used to track the active viewer. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ @Override protected void pageChange(int pageIndex) { - super.pageChange(pageIndex); + super.pageChange(pageIndex); - if (contentOutlinePage != null) { - handleContentOutlineSelection(contentOutlinePage.getSelection()); - } - } + if (contentOutlinePage != null) { + handleContentOutlineSelection(contentOutlinePage.getSelection()); + } + } /** - * This is how the framework determines which interfaces we implement. - * <!-- begin-user-doc --> + * This is how the framework determines which interfaces we implement. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @SuppressWarnings("rawtypes") @Override public Object getAdapter(Class key) { - if (key.equals(IContentOutlinePage.class)) { - return showOutlineView() ? getContentOutlinePage() : null; - } - else if (key.equals(IPropertySheetPage.class)) { - return getPropertySheetPage(); - } - else if (key.equals(IGotoMarker.class)) { - return this; - } - else { - return super.getAdapter(key); - } - } - - /** - * This accesses a cached version of the content outliner. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + if (key.equals(IContentOutlinePage.class)) { + return showOutlineView() ? getContentOutlinePage() : null; + } + else if (key.equals(IPropertySheetPage.class)) { + return getPropertySheetPage(); + } + else if (key.equals(IGotoMarker.class)) { + return this; + } + else { + return super.getAdapter(key); + } + } + + /** + * This accesses a cached version of the content outliner. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public IContentOutlinePage getContentOutlinePage() { - if (contentOutlinePage == null) { - // The content outline is just a tree. - // - class MyContentOutlinePage extends ContentOutlinePage { - @Override - public void createControl(Composite parent) { - super.createControl(parent); - contentOutlineViewer = getTreeViewer(); - contentOutlineViewer.addSelectionChangedListener(this); - - // Set up the tree viewer. - // - contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); - contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); - contentOutlineViewer.setInput(editingDomain.getResourceSet()); - - // Make sure our popups work. - // - createContextMenuFor(contentOutlineViewer); - - if (!editingDomain.getResourceSet().getResources().isEmpty()) { - // Select the root object in the view. - // - contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); - } - } - - @Override - public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) { - super.makeContributions(menuManager, toolBarManager, statusLineManager); - contentOutlineStatusLineManager = statusLineManager; - } - - @Override - public void setActionBars(IActionBars actionBars) { - super.setActionBars(actionBars); - getActionBarContributor().shareGlobalActions(this, actionBars); - } - } - - contentOutlinePage = new MyContentOutlinePage(); - - // Listen to selection so that we can handle it is a special way. - // - contentOutlinePage.addSelectionChangedListener - (new ISelectionChangedListener() { - // This ensures that we handle selections correctly. - // - public void selectionChanged(SelectionChangedEvent event) { - handleContentOutlineSelection(event.getSelection()); - } - }); - } - - return contentOutlinePage; - } - - /** - * This accesses a cached version of the property sheet. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + if (contentOutlinePage == null) { + // The content outline is just a tree. + // + class MyContentOutlinePage extends ContentOutlinePage { + @Override + public void createControl(Composite parent) { + super.createControl(parent); + contentOutlineViewer = getTreeViewer(); + contentOutlineViewer.addSelectionChangedListener(this); + + // Set up the tree viewer. + // + contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + contentOutlineViewer.setInput(editingDomain.getResourceSet()); + + // Make sure our popups work. + // + createContextMenuFor(contentOutlineViewer); + + if (!editingDomain.getResourceSet().getResources().isEmpty()) { + // Select the root object in the view. + // + contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + } + } + + @Override + public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) { + super.makeContributions(menuManager, toolBarManager, statusLineManager); + contentOutlineStatusLineManager = statusLineManager; + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + } + + contentOutlinePage = new MyContentOutlinePage(); + + // Listen to selection so that we can handle it is a special way. + // + contentOutlinePage.addSelectionChangedListener + (new ISelectionChangedListener() { + // This ensures that we handle selections correctly. + // + public void selectionChanged(SelectionChangedEvent event) { + handleContentOutlineSelection(event.getSelection()); + } + }); + } + + return contentOutlinePage; + } + + /** + * This accesses a cached version of the property sheet. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public IPropertySheetPage getPropertySheetPage() { - if (propertySheetPage == null) { - propertySheetPage = - new ExtendedPropertySheetPage(editingDomain) { - @Override - public void setSelectionToViewer(List<?> selection) { - ResourcelandscapeEditor.this.setSelectionToViewer(selection); - ResourcelandscapeEditor.this.setFocus(); - } - - @Override - public void setActionBars(IActionBars actionBars) { - super.setActionBars(actionBars); - getActionBarContributor().shareGlobalActions(this, actionBars); - } - }; - propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory)); - } - - return propertySheetPage; - } - - /** - * This deals with how we want selection in the outliner to affect the other views. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + PropertySheetPage propertySheetPage = + new ExtendedPropertySheetPage(editingDomain) { + @Override + public void setSelectionToViewer(List<?> selection) { + ResourcelandscapeEditor.this.setSelectionToViewer(selection); + ResourcelandscapeEditor.this.setFocus(); + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + }; + propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory)); + propertySheetPages.add(propertySheetPage); + + return propertySheetPage; + } + + /** + * This deals with how we want selection in the outliner to affect the other views. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public void handleContentOutlineSelection(ISelection selection) { - if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) { - Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator(); - if (selectedElements.hasNext()) { - // Get the first selected element. - // - Object selectedElement = selectedElements.next(); - - // If it's the selection viewer, then we want it to select the same selection as this selection. - // - if (currentViewerPane.getViewer() == selectionViewer) { - ArrayList<Object> selectionList = new ArrayList<Object>(); - selectionList.add(selectedElement); - while (selectedElements.hasNext()) { - selectionList.add(selectedElements.next()); - } - - // Set the selection to the widget. - // - selectionViewer.setSelection(new StructuredSelection(selectionList)); - } - else { - // Set the input to the widget. - // - if (currentViewerPane.getViewer().getInput() != selectedElement) { - currentViewerPane.getViewer().setInput(selectedElement); - currentViewerPane.setTitle(selectedElement); - } - } - } - } - } - - /** - * This is for implementing {@link IEditorPart} and simply tests the command stack. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) { + Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator(); + if (selectedElements.hasNext()) { + // Get the first selected element. + // + Object selectedElement = selectedElements.next(); + + // If it's the selection viewer, then we want it to select the same selection as this selection. + // + if (currentViewerPane.getViewer() == selectionViewer) { + ArrayList<Object> selectionList = new ArrayList<Object>(); + selectionList.add(selectedElement); + while (selectedElements.hasNext()) { + selectionList.add(selectedElements.next()); + } + + // Set the selection to the widget. + // + selectionViewer.setSelection(new StructuredSelection(selectionList)); + } + else { + // Set the input to the widget. + // + if (currentViewerPane.getViewer().getInput() != selectedElement) { + currentViewerPane.getViewer().setInput(selectedElement); + currentViewerPane.setTitle(selectedElement); + } + } + } + } + } + + /** + * This is for implementing {@link IEditorPart} and simply tests the command stack. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ @Override public boolean isDirty() { - return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded(); - } + return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded(); + } /** - * This is for implementing {@link IEditorPart} and simply saves the model file. - * <!-- begin-user-doc --> + * This is for implementing {@link IEditorPart} and simply saves the model file. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void doSave(IProgressMonitor progressMonitor) { - // Save only resources that have actually changed. - // - final Map<Object, Object> saveOptions = new HashMap<Object, Object>(); - saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); - - // Do the work within an operation because this is a long running activity that modifies the workbench. - // - WorkspaceModifyOperation operation = - new WorkspaceModifyOperation() { - // This is the method that gets invoked when the operation runs. - // - @Override - public void execute(IProgressMonitor monitor) { - // Save the resources to the file system. - // - boolean first = true; - for (Resource resource : editingDomain.getResourceSet().getResources()) { - if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) { - try { - long timeStamp = resource.getTimeStamp(); - resource.save(saveOptions); - if (resource.getTimeStamp() != timeStamp) { - savedResources.add(resource); - } - } - catch (Exception exception) { - resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); - } - first = false; - } - } - } - }; - - updateProblemIndication = false; - try { - // This runs the options, and shows progress. - // - new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation); - - // Refresh the necessary state. - // - ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone(); - firePropertyChange(IEditorPart.PROP_DIRTY); - } - catch (Exception exception) { - // Something went wrong that shouldn't. - // - ResourcelandscapeEditorPlugin.INSTANCE.log(exception); - } - updateProblemIndication = true; - updateProblemIndication(); - } - - /** - * This returns whether something has been persisted to the URI of the specified resource. - * The implementation uses the URI converter from the editor's resource set to try to open an input stream. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + // Save only resources that have actually changed. + // + final Map<Object, Object> saveOptions = new HashMap<Object, Object>(); + saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); + saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED); + + // Do the work within an operation because this is a long running activity that modifies the workbench. + // + WorkspaceModifyOperation operation = + new WorkspaceModifyOperation() { + // This is the method that gets invoked when the operation runs. + // + @Override + public void execute(IProgressMonitor monitor) { + // Save the resources to the file system. + // + boolean first = true; + for (Resource resource : editingDomain.getResourceSet().getResources()) { + if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) { + try { + long timeStamp = resource.getTimeStamp(); + resource.save(saveOptions); + if (resource.getTimeStamp() != timeStamp) { + savedResources.add(resource); + } + } + catch (Exception exception) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + first = false; + } + } + } + }; + + updateProblemIndication = false; + try { + // This runs the options, and shows progress. + // + new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation); + + // Refresh the necessary state. + // + ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone(); + firePropertyChange(IEditorPart.PROP_DIRTY); + } + catch (Exception exception) { + // Something went wrong that shouldn't. + // + ResourcelandscapeEditorPlugin.INSTANCE.log(exception); + } + updateProblemIndication = true; + updateProblemIndication(); + } + + /** + * This returns whether something has been persisted to the URI of the specified resource. + * The implementation uses the URI converter from the editor's resource set to try to open an input stream. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected boolean isPersisted(Resource resource) { - boolean result = false; - try { - InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI()); - if (stream != null) { - result = true; - stream.close(); - } - } - catch (IOException e) { - // Ignore - } - return result; - } - - /** - * This always returns true because it is not currently supported. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + boolean result = false; + try { + InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI()); + if (stream != null) { + result = true; + stream.close(); + } + } + catch (IOException e) { + // Ignore + } + return result; + } + + /** + * This always returns true because it is not currently supported. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ @Override public boolean isSaveAsAllowed() { - return true; - } + return true; + } /** - * This also changes the editor's input. - * <!-- begin-user-doc --> + * This also changes the editor's input. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void doSaveAs() { - SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell()); - saveAsDialog.open(); - IPath path = saveAsDialog.getResult(); - if (path != null) { - IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); - if (file != null) { - doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file)); - } - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell()); + saveAsDialog.open(); + IPath path = saveAsDialog.getResult(); + if (path != null) { + IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); + if (file != null) { + doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file)); + } + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected void doSaveAs(URI uri, IEditorInput editorInput) { - (editingDomain.getResourceSet().getResources().get(0)).setURI(uri); - setInputWithNotify(editorInput); - setPartName(editorInput.getName()); - IProgressMonitor progressMonitor = - getActionBars().getStatusLineManager() != null ? - getActionBars().getStatusLineManager().getProgressMonitor() : - new NullProgressMonitor(); - doSave(progressMonitor); - } + (editingDomain.getResourceSet().getResources().get(0)).setURI(uri); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + IProgressMonitor progressMonitor = + getActionBars().getStatusLineManager() != null ? + getActionBars().getStatusLineManager().getProgressMonitor() : + new NullProgressMonitor(); + doSave(progressMonitor); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void gotoMarker(IMarker marker) { - try { - if (marker.getType().equals(EValidator.MARKER)) { - String uriAttribute = marker.getAttribute(EValidator.URI_ATTRIBUTE, null); - if (uriAttribute != null) { - URI uri = URI.createURI(uriAttribute); - EObject eObject = editingDomain.getResourceSet().getEObject(uri, true); - if (eObject != null) { - setSelectionToViewer(Collections.singleton(editingDomain.getWrapper(eObject))); - } - } - } - } - catch (CoreException exception) { - ResourcelandscapeEditorPlugin.INSTANCE.log(exception); - } - } + List<?> targetObjects = markerHelper.getTargetObjects(editingDomain, marker); + if (!targetObjects.isEmpty()) { + setSelectionToViewer(targetObjects); + } + } /** - * This is called during startup. - * <!-- begin-user-doc --> + * This is called during startup. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void init(IEditorSite site, IEditorInput editorInput) { - setSite(site); - setInputWithNotify(editorInput); - setPartName(editorInput.getName()); - site.setSelectionProvider(this); - site.getPage().addPartListener(partListener); - ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE); - } + setSite(site); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + site.setSelectionProvider(this); + site.getPage().addPartListener(partListener); + ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void setFocus() { - if (currentViewerPane != null) { - currentViewerPane.setFocus(); - } - else { - getControl(getActivePage()).setFocus(); - } - } + if (currentViewerPane != null) { + currentViewerPane.setFocus(); + } + else { + getControl(getActivePage()).setFocus(); + } + } /** - * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. - * <!-- begin-user-doc --> + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void addSelectionChangedListener(ISelectionChangedListener listener) { - selectionChangedListeners.add(listener); - } + selectionChangedListeners.add(listener); + } /** - * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. - * <!-- begin-user-doc --> + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void removeSelectionChangedListener(ISelectionChangedListener listener) { - selectionChangedListeners.remove(listener); - } + selectionChangedListeners.remove(listener); + } /** - * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection. - * <!-- begin-user-doc --> + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ISelection getSelection() { - return editorSelection; - } + return editorSelection; + } /** - * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection. - * Calling this result will notify the listeners. - * <!-- begin-user-doc --> + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection. + * Calling this result will notify the listeners. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setSelection(ISelection selection) { - editorSelection = selection; + editorSelection = selection; - for (ISelectionChangedListener listener : selectionChangedListeners) { - listener.selectionChanged(new SelectionChangedEvent(this, selection)); - } - setStatusLineManager(selection); - } + for (ISelectionChangedListener listener : selectionChangedListeners) { + listener.selectionChanged(new SelectionChangedEvent(this, selection)); + } + setStatusLineManager(selection); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setStatusLineManager(ISelection selection) { - IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ? - contentOutlineStatusLineManager : getActionBars().getStatusLineManager(); - - if (statusLineManager != null) { - if (selection instanceof IStructuredSelection) { - Collection<?> collection = ((IStructuredSelection)selection).toList(); - switch (collection.size()) { - case 0: { - statusLineManager.setMessage(getString("_UI_NoObjectSelected")); - break; - } - case 1: { - String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next()); - statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); - break; - } - default: { - statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); - break; - } - } - } - else { - statusLineManager.setMessage(""); - } - } - } - - /** - * This looks up a string in the plugin's plugin.properties file. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ? + contentOutlineStatusLineManager : getActionBars().getStatusLineManager(); + + if (statusLineManager != null) { + if (selection instanceof IStructuredSelection) { + Collection<?> collection = ((IStructuredSelection)selection).toList(); + switch (collection.size()) { + case 0: { + statusLineManager.setMessage(getString("_UI_NoObjectSelected")); + break; + } + case 1: { + String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next()); + statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); + break; + } + default: { + statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); + break; + } + } + } + else { + statusLineManager.setMessage(""); + } + } + } + + /** + * This looks up a string in the plugin's plugin.properties file. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ private static String getString(String key) { - return ResourcelandscapeEditorPlugin.INSTANCE.getString(key); - } + return ResourcelandscapeEditorPlugin.INSTANCE.getString(key); + } /** - * This looks up a string in plugin.properties, making a substitution. - * <!-- begin-user-doc --> + * This looks up a string in plugin.properties, making a substitution. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private static String getString(String key, Object s1) { - return ResourcelandscapeEditorPlugin.INSTANCE.getString(key, new Object [] { s1 }); - } + return ResourcelandscapeEditorPlugin.INSTANCE.getString(key, new Object [] { s1 }); + } /** - * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu. - * <!-- begin-user-doc --> + * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void menuAboutToShow(IMenuManager menuManager) { - ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager); - } + ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EditingDomainActionBarContributor getActionBarContributor() { - return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor(); - } + return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public IActionBars getActionBars() { - return getActionBarContributor().getActionBars(); - } + return getActionBarContributor().getActionBars(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public AdapterFactory getAdapterFactory() { - return adapterFactory; - } + return adapterFactory; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void dispose() { - updateProblemIndication = false; + updateProblemIndication = false; - ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener); + ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener); - getSite().getPage().removePartListener(partListener); + getSite().getPage().removePartListener(partListener); - adapterFactory.dispose(); + adapterFactory.dispose(); - if (getActionBarContributor().getActiveEditor() == this) { - getActionBarContributor().setActiveEditor(null); - } + if (getActionBarContributor().getActiveEditor() == this) { + getActionBarContributor().setActiveEditor(null); + } - if (propertySheetPage != null) { - propertySheetPage.dispose(); - } + for (PropertySheetPage propertySheetPage : propertySheetPages) { + propertySheetPage.dispose(); + } - if (contentOutlinePage != null) { - contentOutlinePage.dispose(); - } + if (contentOutlinePage != null) { + contentOutlinePage.dispose(); + } - super.dispose(); - } + super.dispose(); + } /** - * Returns whether the outline view should be presented to the user. - * <!-- begin-user-doc --> + * Returns whether the outline view should be presented to the user. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected boolean showOutlineView() { - return true; - } + return true; + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcelandscape/presentation/ResourcelandscapeEditorPlugin.java b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcelandscape/presentation/ResourcelandscapeEditorPlugin.java index b38530ea..1fe66b74 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcelandscape/presentation/ResourcelandscapeEditorPlugin.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcelandscape/presentation/ResourcelandscapeEditorPlugin.java @@ -21,78 +21,78 @@ import org.eclipse.emf.common.util.ResourceLocator; */ public final class ResourcelandscapeEditorPlugin extends EMFPlugin { /** - * Keep track of the singleton. - * <!-- begin-user-doc --> + * Keep track of the singleton. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static final ResourcelandscapeEditorPlugin INSTANCE = new ResourcelandscapeEditorPlugin(); /** - * Keep track of the singleton. - * <!-- begin-user-doc --> + * Keep track of the singleton. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private static Implementation plugin; /** - * Create the instance. - * <!-- begin-user-doc --> + * Create the instance. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourcelandscapeEditorPlugin() { - super - (new ResourceLocator [] { - CoreEditPlugin.INSTANCE, - IdentifierEditPlugin.INSTANCE, - }); - } + super + (new ResourceLocator [] { + CoreEditPlugin.INSTANCE, + IdentifierEditPlugin.INSTANCE, + }); + } /** - * Returns the singleton instance of the Eclipse plugin. - * <!-- begin-user-doc --> + * Returns the singleton instance of the Eclipse plugin. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the singleton instance. - * @generated - */ + * @return the singleton instance. + * @generated + */ @Override public ResourceLocator getPluginResourceLocator() { - return plugin; - } + return plugin; + } /** - * Returns the singleton instance of the Eclipse plugin. - * <!-- begin-user-doc --> + * Returns the singleton instance of the Eclipse plugin. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the singleton instance. - * @generated - */ + * @return the singleton instance. + * @generated + */ public static Implementation getPlugin() { - return plugin; - } + return plugin; + } /** - * The actual implementation of the Eclipse <b>Plugin</b>. - * <!-- begin-user-doc --> + * The actual implementation of the Eclipse <b>Plugin</b>. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static class Implementation extends EclipseUIPlugin { /** - * Creates an instance. - * <!-- begin-user-doc --> + * Creates an instance. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public Implementation() { - super(); - - // Remember the static instance. - // - plugin = this; - } + super(); + + // Remember the static instance. + // + plugin = this; + } } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcelandscape/presentation/ResourcelandscapeModelWizard.java b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcelandscape/presentation/ResourcelandscapeModelWizard.java index c25a2c55..309d7bd1 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcelandscape/presentation/ResourcelandscapeModelWizard.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcelandscape/presentation/ResourcelandscapeModelWizard.java @@ -94,535 +94,535 @@ import org.eclipse.ui.PartInitException; */ public class ResourcelandscapeModelWizard extends Wizard implements INewWizard { /** - * The supported extensions for created files. - * <!-- begin-user-doc --> + * The supported extensions for created files. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static final List<String> FILE_EXTENSIONS = Collections.unmodifiableList(Arrays.asList(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcelandscapeEditorFilenameExtensions").split("\\s*,\\s*"))); /** - * A formatted list of supported file extensions, suitable for display. - * <!-- begin-user-doc --> + * A formatted list of supported file extensions, suitable for display. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static final String FORMATTED_FILE_EXTENSIONS = ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcelandscapeEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", "); /** - * This caches an instance of the model package. - * <!-- begin-user-doc --> + * This caches an instance of the model package. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ResourcelandscapePackage resourcelandscapePackage = ResourcelandscapePackage.eINSTANCE; /** - * This caches an instance of the model factory. - * <!-- begin-user-doc --> + * This caches an instance of the model factory. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ResourcelandscapeFactory resourcelandscapeFactory = resourcelandscapePackage.getResourcelandscapeFactory(); /** - * This is the file creation page. - * <!-- begin-user-doc --> + * This is the file creation page. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ResourcelandscapeModelWizardNewFileCreationPage newFileCreationPage; /** - * This is the initial object creation page. - * <!-- begin-user-doc --> + * This is the initial object creation page. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ResourcelandscapeModelWizardInitialObjectCreationPage initialObjectCreationPage; /** - * Remember the selection during initialization for populating the default container. - * <!-- begin-user-doc --> + * Remember the selection during initialization for populating the default container. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IStructuredSelection selection; /** - * Remember the workbench during initialization. - * <!-- begin-user-doc --> + * Remember the workbench during initialization. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IWorkbench workbench; /** - * Caches the names of the types that can be created as the root object. - * <!-- begin-user-doc --> + * Caches the names of the types that can be created as the root object. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected List<String> initialObjectNames; /** - * This just records the information. - * <!-- begin-user-doc --> + * This just records the information. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void init(IWorkbench workbench, IStructuredSelection selection) { - this.workbench = workbench; - this.selection = selection; - setWindowTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); - setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(ResourcelandscapeEditorPlugin.INSTANCE.getImage("full/wizban/NewResourcelandscape"))); - } + this.workbench = workbench; + this.selection = selection; + setWindowTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); + setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(ResourcelandscapeEditorPlugin.INSTANCE.getImage("full/wizban/NewResourcelandscape"))); + } /** - * Returns the names of the types that can be created as the root object. - * <!-- begin-user-doc --> + * Returns the names of the types that can be created as the root object. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<String> getInitialObjectNames() { - if (initialObjectNames == null) { - initialObjectNames = new ArrayList<String>(); - for (EClassifier eClassifier : resourcelandscapePackage.getEClassifiers()) { - if (eClassifier instanceof EClass) { - EClass eClass = (EClass)eClassifier; - if (!eClass.isAbstract()) { - initialObjectNames.add(eClass.getName()); - } - } - } - Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); - } - return initialObjectNames; - } + if (initialObjectNames == null) { + initialObjectNames = new ArrayList<String>(); + for (EClassifier eClassifier : resourcelandscapePackage.getEClassifiers()) { + if (eClassifier instanceof EClass) { + EClass eClass = (EClass)eClassifier; + if (!eClass.isAbstract()) { + initialObjectNames.add(eClass.getName()); + } + } + } + Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); + } + return initialObjectNames; + } /** - * Create a new model. - * <!-- begin-user-doc --> + * Create a new model. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected EObject createInitialModel() { - EClass eClass = (EClass)resourcelandscapePackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); - EObject rootObject = resourcelandscapeFactory.create(eClass); - return rootObject; - } + EClass eClass = (EClass)resourcelandscapePackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); + EObject rootObject = resourcelandscapeFactory.create(eClass); + return rootObject; + } /** - * Do the work after everything is specified. - * <!-- begin-user-doc --> + * Do the work after everything is specified. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public boolean performFinish() { - try { - // Remember the file. - // - final IFile modelFile = getModelFile(); - - // Do the work within an operation. - // - WorkspaceModifyOperation operation = - new WorkspaceModifyOperation() { - @Override - protected void execute(IProgressMonitor progressMonitor) { - try { - // Create a resource set - // - ResourceSet resourceSet = new ResourceSetImpl(); - - // Get the URI of the model file. - // - URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true); - - // Create a resource for this file. - // - Resource resource = resourceSet.createResource(fileURI); - - // Add the initial model object to the contents. - // - EObject rootObject = createInitialModel(); - if (rootObject != null) { - resource.getContents().add(rootObject); - } - - // Save the contents of the resource to the file system. - // - Map<Object, Object> options = new HashMap<Object, Object>(); - options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding()); - resource.save(options); - } - catch (Exception exception) { - ResourcelandscapeEditorPlugin.INSTANCE.log(exception); - } - finally { - progressMonitor.done(); - } - } - }; - - getContainer().run(false, false, operation); - - // Select the new file resource in the current view. - // - IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow(); - IWorkbenchPage page = workbenchWindow.getActivePage(); - final IWorkbenchPart activePart = page.getActivePart(); - if (activePart instanceof ISetSelectionTarget) { - final ISelection targetSelection = new StructuredSelection(modelFile); - getShell().getDisplay().asyncExec - (new Runnable() { - public void run() { - ((ISetSelectionTarget)activePart).selectReveal(targetSelection); - } - }); - } - - // Open an editor on the new file. - // - try { - page.openEditor - (new FileEditorInput(modelFile), - workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId()); - } - catch (PartInitException exception) { - MessageDialog.openError(workbenchWindow.getShell(), ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage()); - return false; - } - - return true; - } - catch (Exception exception) { - ResourcelandscapeEditorPlugin.INSTANCE.log(exception); - return false; - } - } + try { + // Remember the file. + // + final IFile modelFile = getModelFile(); + + // Do the work within an operation. + // + WorkspaceModifyOperation operation = + new WorkspaceModifyOperation() { + @Override + protected void execute(IProgressMonitor progressMonitor) { + try { + // Create a resource set + // + ResourceSet resourceSet = new ResourceSetImpl(); + + // Get the URI of the model file. + // + URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true); + + // Create a resource for this file. + // + Resource resource = resourceSet.createResource(fileURI); + + // Add the initial model object to the contents. + // + EObject rootObject = createInitialModel(); + if (rootObject != null) { + resource.getContents().add(rootObject); + } + + // Save the contents of the resource to the file system. + // + Map<Object, Object> options = new HashMap<Object, Object>(); + options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding()); + resource.save(options); + } + catch (Exception exception) { + ResourcelandscapeEditorPlugin.INSTANCE.log(exception); + } + finally { + progressMonitor.done(); + } + } + }; + + getContainer().run(false, false, operation); + + // Select the new file resource in the current view. + // + IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow(); + IWorkbenchPage page = workbenchWindow.getActivePage(); + final IWorkbenchPart activePart = page.getActivePart(); + if (activePart instanceof ISetSelectionTarget) { + final ISelection targetSelection = new StructuredSelection(modelFile); + getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + ((ISetSelectionTarget)activePart).selectReveal(targetSelection); + } + }); + } + + // Open an editor on the new file. + // + try { + page.openEditor + (new FileEditorInput(modelFile), + workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId()); + } + catch (PartInitException exception) { + MessageDialog.openError(workbenchWindow.getShell(), ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage()); + return false; + } + + return true; + } + catch (Exception exception) { + ResourcelandscapeEditorPlugin.INSTANCE.log(exception); + return false; + } + } /** - * This is the one page of the wizard. - * <!-- begin-user-doc --> + * This is the one page of the wizard. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public class ResourcelandscapeModelWizardNewFileCreationPage extends WizardNewFileCreationPage { /** - * Pass in the selection. - * <!-- begin-user-doc --> + * Pass in the selection. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourcelandscapeModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) { - super(pageId, selection); - } + super(pageId, selection); + } /** - * The framework calls this to see if the file is correct. - * <!-- begin-user-doc --> + * The framework calls this to see if the file is correct. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected boolean validatePage() { - if (super.validatePage()) { - String extension = new Path(getFileName()).getFileExtension(); - if (extension == null || !FILE_EXTENSIONS.contains(extension)) { - String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; - setErrorMessage(ResourcelandscapeEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS })); - return false; - } - return true; - } - return false; - } + if (super.validatePage()) { + String extension = new Path(getFileName()).getFileExtension(); + if (extension == null || !FILE_EXTENSIONS.contains(extension)) { + String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; + setErrorMessage(ResourcelandscapeEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS })); + return false; + } + return true; + } + return false; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public IFile getModelFile() { - return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName())); - } + return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName())); + } } /** - * This is the page where the type of object to create is selected. - * <!-- begin-user-doc --> + * This is the page where the type of object to create is selected. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public class ResourcelandscapeModelWizardInitialObjectCreationPage extends WizardPage { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Combo initialObjectField; /** - * @generated - * <!-- begin-user-doc --> + * @generated + * <!-- begin-user-doc --> * <!-- end-user-doc --> - */ + */ protected List<String> encodings; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Combo encodingField; /** - * Pass in the selection. - * <!-- begin-user-doc --> + * Pass in the selection. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourcelandscapeModelWizardInitialObjectCreationPage(String pageId) { - super(pageId); - } + super(pageId); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void createControl(Composite parent) { - Composite composite = new Composite(parent, SWT.NONE); { - GridLayout layout = new GridLayout(); - layout.numColumns = 1; - layout.verticalSpacing = 12; - composite.setLayout(layout); - - GridData data = new GridData(); - data.verticalAlignment = GridData.FILL; - data.grabExcessVerticalSpace = true; - data.horizontalAlignment = GridData.FILL; - composite.setLayoutData(data); - } - - Label containerLabel = new Label(composite, SWT.LEFT); - { - containerLabel.setText(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ModelObject")); - - GridData data = new GridData(); - data.horizontalAlignment = GridData.FILL; - containerLabel.setLayoutData(data); - } - - initialObjectField = new Combo(composite, SWT.BORDER); - { - GridData data = new GridData(); - data.horizontalAlignment = GridData.FILL; - data.grabExcessHorizontalSpace = true; - initialObjectField.setLayoutData(data); - } - - for (String objectName : getInitialObjectNames()) { - initialObjectField.add(getLabel(objectName)); - } - - if (initialObjectField.getItemCount() == 1) { - initialObjectField.select(0); - } - initialObjectField.addModifyListener(validator); - - Label encodingLabel = new Label(composite, SWT.LEFT); - { - encodingLabel.setText(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_XMLEncoding")); - - GridData data = new GridData(); - data.horizontalAlignment = GridData.FILL; - encodingLabel.setLayoutData(data); - } - encodingField = new Combo(composite, SWT.BORDER); - { - GridData data = new GridData(); - data.horizontalAlignment = GridData.FILL; - data.grabExcessHorizontalSpace = true; - encodingField.setLayoutData(data); - } - - for (String encoding : getEncodings()) { - encodingField.add(encoding); - } - - encodingField.select(0); - encodingField.addModifyListener(validator); - - setPageComplete(validatePage()); - setControl(composite); - } + Composite composite = new Composite(parent, SWT.NONE); { + GridLayout layout = new GridLayout(); + layout.numColumns = 1; + layout.verticalSpacing = 12; + composite.setLayout(layout); + + GridData data = new GridData(); + data.verticalAlignment = GridData.FILL; + data.grabExcessVerticalSpace = true; + data.horizontalAlignment = GridData.FILL; + composite.setLayoutData(data); + } + + Label containerLabel = new Label(composite, SWT.LEFT); + { + containerLabel.setText(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ModelObject")); + + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + containerLabel.setLayoutData(data); + } + + initialObjectField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + initialObjectField.setLayoutData(data); + } + + for (String objectName : getInitialObjectNames()) { + initialObjectField.add(getLabel(objectName)); + } + + if (initialObjectField.getItemCount() == 1) { + initialObjectField.select(0); + } + initialObjectField.addModifyListener(validator); + + Label encodingLabel = new Label(composite, SWT.LEFT); + { + encodingLabel.setText(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_XMLEncoding")); + + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + encodingLabel.setLayoutData(data); + } + encodingField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + encodingField.setLayoutData(data); + } + + for (String encoding : getEncodings()) { + encodingField.add(encoding); + } + + encodingField.select(0); + encodingField.addModifyListener(validator); + + setPageComplete(validatePage()); + setControl(composite); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ModifyListener validator = new ModifyListener() { - public void modifyText(ModifyEvent e) { - setPageComplete(validatePage()); - } - }; + public void modifyText(ModifyEvent e) { + setPageComplete(validatePage()); + } + }; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected boolean validatePage() { - return getInitialObjectName() != null && getEncodings().contains(encodingField.getText()); - } + return getInitialObjectName() != null && getEncodings().contains(encodingField.getText()); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void setVisible(boolean visible) { - super.setVisible(visible); - if (visible) { - if (initialObjectField.getItemCount() == 1) { - initialObjectField.clearSelection(); - encodingField.setFocus(); - } - else { - encodingField.clearSelection(); - initialObjectField.setFocus(); - } - } - } + super.setVisible(visible); + if (visible) { + if (initialObjectField.getItemCount() == 1) { + initialObjectField.clearSelection(); + encodingField.setFocus(); + } + else { + encodingField.clearSelection(); + initialObjectField.setFocus(); + } + } + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public String getInitialObjectName() { - String label = initialObjectField.getText(); + String label = initialObjectField.getText(); - for (String name : getInitialObjectNames()) { - if (getLabel(name).equals(label)) { - return name; - } - } - return null; - } + for (String name : getInitialObjectNames()) { + if (getLabel(name).equals(label)) { + return name; + } + } + return null; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public String getEncoding() { - return encodingField.getText(); - } + return encodingField.getText(); + } /** - * Returns the label for the specified type name. - * <!-- begin-user-doc --> + * Returns the label for the specified type name. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected String getLabel(String typeName) { - try { - return ResourcelandscapeEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); - } - catch(MissingResourceException mre) { - ResourcelandscapeEditorPlugin.INSTANCE.log(mre); - } - return typeName; - } + try { + return ResourcelandscapeEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); + } + catch(MissingResourceException mre) { + ResourcelandscapeEditorPlugin.INSTANCE.log(mre); + } + return typeName; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected Collection<String> getEncodings() { - if (encodings == null) { - encodings = new ArrayList<String>(); - for (StringTokenizer stringTokenizer = new StringTokenizer(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) { - encodings.add(stringTokenizer.nextToken()); - } - } - return encodings; - } + if (encodings == null) { + encodings = new ArrayList<String>(); + for (StringTokenizer stringTokenizer = new StringTokenizer(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) { + encodings.add(stringTokenizer.nextToken()); + } + } + return encodings; + } } /** - * The framework calls this to create the contents of the wizard. - * <!-- begin-user-doc --> + * The framework calls this to create the contents of the wizard. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void addPages() { - // Create a page, set the title, and the initial model file name. - // - newFileCreationPage = new ResourcelandscapeModelWizardNewFileCreationPage("Whatever", selection); - newFileCreationPage.setTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcelandscapeModelWizard_label")); - newFileCreationPage.setDescription(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcelandscapeModelWizard_description")); - newFileCreationPage.setFileName(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcelandscapeEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0)); - addPage(newFileCreationPage); - - // Try and get the resource selection to determine a current directory for the file dialog. - // - if (selection != null && !selection.isEmpty()) { - // Get the resource... - // - Object selectedElement = selection.iterator().next(); - if (selectedElement instanceof IResource) { - // Get the resource parent, if its a file. - // - IResource selectedResource = (IResource)selectedElement; - if (selectedResource.getType() == IResource.FILE) { - selectedResource = selectedResource.getParent(); - } - - // This gives us a directory... - // - if (selectedResource instanceof IFolder || selectedResource instanceof IProject) { - // Set this for the container. - // - newFileCreationPage.setContainerFullPath(selectedResource.getFullPath()); - - // Make up a unique new name here. - // - String defaultModelBaseFilename = ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcelandscapeEditorFilenameDefaultBase"); - String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0); - String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension; - for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) { - modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension; - } - newFileCreationPage.setFileName(modelFilename); - } - } - } - initialObjectCreationPage = new ResourcelandscapeModelWizardInitialObjectCreationPage("Whatever2"); - initialObjectCreationPage.setTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcelandscapeModelWizard_label")); - initialObjectCreationPage.setDescription(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description")); - addPage(initialObjectCreationPage); - } + // Create a page, set the title, and the initial model file name. + // + newFileCreationPage = new ResourcelandscapeModelWizardNewFileCreationPage("Whatever", selection); + newFileCreationPage.setTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcelandscapeModelWizard_label")); + newFileCreationPage.setDescription(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcelandscapeModelWizard_description")); + newFileCreationPage.setFileName(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcelandscapeEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0)); + addPage(newFileCreationPage); + + // Try and get the resource selection to determine a current directory for the file dialog. + // + if (selection != null && !selection.isEmpty()) { + // Get the resource... + // + Object selectedElement = selection.iterator().next(); + if (selectedElement instanceof IResource) { + // Get the resource parent, if its a file. + // + IResource selectedResource = (IResource)selectedElement; + if (selectedResource.getType() == IResource.FILE) { + selectedResource = selectedResource.getParent(); + } + + // This gives us a directory... + // + if (selectedResource instanceof IFolder || selectedResource instanceof IProject) { + // Set this for the container. + // + newFileCreationPage.setContainerFullPath(selectedResource.getFullPath()); + + // Make up a unique new name here. + // + String defaultModelBaseFilename = ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcelandscapeEditorFilenameDefaultBase"); + String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0); + String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension; + for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) { + modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension; + } + newFileCreationPage.setFileName(modelFilename); + } + } + } + initialObjectCreationPage = new ResourcelandscapeModelWizardInitialObjectCreationPage("Whatever2"); + initialObjectCreationPage.setTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcelandscapeModelWizard_label")); + initialObjectCreationPage.setDescription(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description")); + addPage(initialObjectCreationPage); + } /** - * Get the file from the page. - * <!-- begin-user-doc --> + * Get the file from the page. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public IFile getModelFile() { - return newFileCreationPage.getModelFile(); - } + return newFileCreationPage.getModelFile(); + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/model/resourceconfiguration.ecore b/edu.kit.ipd.descartes.mm.resourcelandscape/model/resourceconfiguration.ecore index 713e4f1d..4c19b088 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/model/resourceconfiguration.ecore +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/model/resourceconfiguration.ecore @@ -1,71 +1,189 @@ <?xml version="1.0" encoding="UTF-8"?> -<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="resourceconfiguration" nsURI="http://www.descartes-research.net/metamodel/resourceconfiguration/1.0" +<ecore:EPackage + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" + name="resourceconfiguration" + nsURI="http://www.descartes-research.net/metamodel/resourceconfiguration/1.0" nsPrefix="resourceconfiguration"> - <eClassifiers xsi:type="ecore:EClass" name="ConfigurationSpecification" abstract="true" + <eClassifiers + xsi:type="ecore:EClass" + name="ConfigurationSpecification" + abstract="true" eSuperTypes="../../edu.kit.ipd.descartes.core/model/core.ecore#//Entity"/> - <eClassifiers xsi:type="ecore:EClass" name="ProcessingResourceSpecification" eSuperTypes="../../edu.kit.ipd.descartes.core/model/core.ecore#//Entity"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="schedulingPolicy" ordered="false" - lowerBound="1" eType="#//SchedulingPolicy"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="processingRate" ordered="false" - lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="activeResourceType" lowerBound="1" + <eClassifiers + xsi:type="ecore:EClass" + name="ProcessingResourceSpecification" + eSuperTypes="../../edu.kit.ipd.descartes.core/model/core.ecore#//Entity"> + <eStructuralFeatures + xsi:type="ecore:EAttribute" + name="schedulingPolicy" + ordered="false" + lowerBound="1" + eType="#//SchedulingPolicy"/> + <eStructuralFeatures + xsi:type="ecore:EAttribute" + name="processingRate" + ordered="false" + lowerBound="1" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/> + <eStructuralFeatures + xsi:type="ecore:EReference" + name="activeResourceType" + lowerBound="1" eType="ecore:EClass resourcetype.ecore#//ProcessingResourceType"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="parentResourceSpecification" - ordered="false" lowerBound="1" eType="#//ActiveResourceSpecification" eOpposite="#//ActiveResourceSpecification/processingResourceSpecifications"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="nrOfParProcUnits" ordered="false" - lowerBound="1" eType="#//NumberOfParallelProcessingUnits" containment="true" + <eStructuralFeatures + xsi:type="ecore:EReference" + name="parentResourceSpecification" + ordered="false" + lowerBound="1" + eType="#//ActiveResourceSpecification" + eOpposite="#//ActiveResourceSpecification/processingResourceSpecifications"/> + <eStructuralFeatures + xsi:type="ecore:EReference" + name="nrOfParProcUnits" + ordered="false" + lowerBound="1" + eType="#//NumberOfParallelProcessingUnits" + containment="true" eOpposite="#//NumberOfParallelProcessingUnits/processingResourceSpec"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="NumberOfParallelProcessingUnits" eSuperTypes="../../edu.kit.ipd.descartes.core/model/core.ecore#//AdaptableEntity"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="number" ordered="false" - lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="processingResourceSpec" - ordered="false" lowerBound="1" eType="#//ProcessingResourceSpecification" + <eClassifiers + xsi:type="ecore:EClass" + name="NumberOfParallelProcessingUnits" + eSuperTypes="../../edu.kit.ipd.descartes.core/model/core.ecore#//AdaptableEntity"> + <eStructuralFeatures + xsi:type="ecore:EAttribute" + name="number" + ordered="false" + lowerBound="1" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + <eStructuralFeatures + xsi:type="ecore:EReference" + name="processingResourceSpec" + ordered="false" + lowerBound="1" + eType="#//ProcessingResourceSpecification" eOpposite="#//ProcessingResourceSpecification/nrOfParProcUnits"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="LinkingResourceSpecification" eSuperTypes="../../edu.kit.ipd.descartes.core/model/core.ecore#//Entity"> - <eStructuralFeatures xsi:type="ecore:EReference" name="connectedResourceSpecifications" - ordered="false" lowerBound="2" upperBound="-1" eType="#//ActiveResourceSpecification"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="parentResourceConfiguration" - ordered="false" lowerBound="1" eType="#//ActiveResourceSpecification" eOpposite="#//ActiveResourceSpecification/linkingResources"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="bandwidth" ordered="false" - lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="communicationLinkResourceType" - lowerBound="1" eType="ecore:EClass resourcetype.ecore#//CommunicationLinkResourceType"/> + <eClassifiers + xsi:type="ecore:EClass" + name="LinkingResourceSpecification" + eSuperTypes="../../edu.kit.ipd.descartes.core/model/core.ecore#//Entity"> + <eStructuralFeatures + xsi:type="ecore:EReference" + name="connectedContainer" + ordered="false" + lowerBound="2" + upperBound="-1" + eType="ecore:EClass resourcelandscape.ecore#//Container"/> + <eStructuralFeatures + xsi:type="ecore:EReference" + name="parentResourceConfiguration" + ordered="false" + lowerBound="1" + eType="#//ActiveResourceSpecification" + eOpposite="#//ActiveResourceSpecification/linkingResources"/> + <eStructuralFeatures + xsi:type="ecore:EAttribute" + name="bandwidth" + ordered="false" + lowerBound="1" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/> + <eStructuralFeatures + xsi:type="ecore:EReference" + name="communicationLinkResourceType" + lowerBound="1" + eType="ecore:EClass resourcetype.ecore#//CommunicationLinkResourceType"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EEnum" name="SchedulingPolicy"> - <eLiterals name="DELAY"/> - <eLiterals name="FCFS" value="1"/> - <eLiterals name="PROCESSOR_SHARING" value="2"/> - <eLiterals name="RANDOM" value="3"/> - <eLiterals name="NA" value="4"/> + <eClassifiers + xsi:type="ecore:EEnum" + name="SchedulingPolicy"> + <eLiterals + name="DELAY"/> + <eLiterals + name="FCFS" + value="1"/> + <eLiterals + name="PROCESSOR_SHARING" + value="2"/> + <eLiterals + name="RANDOM" + value="3"/> + <eLiterals + name="NA" + value="4"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="ActiveResourceSpecification" eSuperTypes="#//ConfigurationSpecification"> - <eStructuralFeatures xsi:type="ecore:EReference" name="processingResourceSpecifications" - ordered="false" upperBound="-1" eType="#//ProcessingResourceSpecification" - containment="true" eOpposite="#//ProcessingResourceSpecification/parentResourceSpecification"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="linkingResources" ordered="false" - upperBound="-1" eType="#//LinkingResourceSpecification" containment="true" + <eClassifiers + xsi:type="ecore:EClass" + name="ActiveResourceSpecification" + eSuperTypes="#//ConfigurationSpecification"> + <eStructuralFeatures + xsi:type="ecore:EReference" + name="processingResourceSpecifications" + ordered="false" + upperBound="-1" + eType="#//ProcessingResourceSpecification" + containment="true" + eOpposite="#//ProcessingResourceSpecification/parentResourceSpecification"/> + <eStructuralFeatures + xsi:type="ecore:EReference" + name="linkingResources" + ordered="false" + upperBound="-1" + eType="#//LinkingResourceSpecification" + containment="true" eOpposite="#//LinkingResourceSpecification/parentResourceConfiguration"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="CustomConfigurationSpecification" eSuperTypes="#//ConfigurationSpecification"> - <eStructuralFeatures xsi:type="ecore:EReference" name="nonFunctionalProperties" - ordered="false" lowerBound="1" eType="#//CustomResourceConfigurationModel"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="The idea is to reference to e.g. other models which reflect the performance relevant aspects of this ConfigurationSpecification"/> + <eClassifiers + xsi:type="ecore:EClass" + name="CustomConfigurationSpecification" + eSuperTypes="#//ConfigurationSpecification"> + <eStructuralFeatures + xsi:type="ecore:EReference" + name="nonFunctionalProperties" + ordered="false" + lowerBound="1" + eType="#//CustomResourceConfigurationModel"> + <eAnnotations + source="http://www.eclipse.org/emf/2002/GenModel"> + <details + key="documentation" + value="The idea is to reference to e.g. other models which reflect the performance relevant aspects of this ConfigurationSpecification"/> </eAnnotations> </eStructuralFeatures> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="PassiveResourceSpecification" eSuperTypes="#//ConfigurationSpecification"> - <eStructuralFeatures xsi:type="ecore:EReference" name="capacity" ordered="false" - lowerBound="1" eType="#//PassiveResourceCapacity" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="passiveResourceType" lowerBound="1" + <eClassifiers + xsi:type="ecore:EClass" + name="PassiveResourceSpecification" + eSuperTypes="#//ConfigurationSpecification"> + <eStructuralFeatures + xsi:type="ecore:EReference" + name="capacity" + ordered="false" + lowerBound="1" + eType="#//PassiveResourceCapacity" + containment="true"/> + <eStructuralFeatures + xsi:type="ecore:EReference" + name="passiveResourceType" + lowerBound="1" eType="ecore:EClass resourcetype.ecore#//PassiveResourceType"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="PassiveResourceCapacity" eSuperTypes="../../edu.kit.ipd.descartes.core/model/core.ecore#//AdaptableEntity"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="capacity" ordered="false" - lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBigInteger"/> + <eClassifiers + xsi:type="ecore:EClass" + name="PassiveResourceCapacity" + eSuperTypes="../../edu.kit.ipd.descartes.core/model/core.ecore#//AdaptableEntity"> + <eStructuralFeatures + xsi:type="ecore:EAttribute" + name="capacity" + ordered="false" + lowerBound="1" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBigInteger"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="CustomResourceConfigurationModel" abstract="true"/> + <eClassifiers + xsi:type="ecore:EClass" + name="CustomResourceConfigurationModel" + abstract="true"/> </ecore:EPackage> diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/model/resourceconfiguration.ecore.oclinecore b/edu.kit.ipd.descartes.mm.resourcelandscape/model/resourceconfiguration.ecore.oclinecore index 301cf861..6fcb553c 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/model/resourceconfiguration.ecore.oclinecore +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/model/resourceconfiguration.ecore.oclinecore @@ -2,6 +2,7 @@ module _'resourceconfiguration.ecore' import ecore : 'http://www.eclipse.org/emf/2002/Ecore#/'; import core : '/resource/edu.kit.ipd.descartes.core/model/core.ecore#/'; import resourcetype : 'resourcetype.ecore#/'; +import resourcelandscape : 'resourcelandscape.ecore#/'; package resourceconfiguration : resourceconfiguration = 'http://www.descartes-research.net/metamodel/resourceconfiguration/0.1' @@ -22,7 +23,7 @@ package resourceconfiguration : resourceconfiguration = } class LinkingResourceSpecification extends core::Entity { - property connectedResourceSpecifications : ActiveResourceSpecification[2..*]; + property connectedResourceSpecifications : resourcelandscape::Container[2..*]; property parentResourceConfiguration#linkingResources : ActiveResourceSpecification[1]; attribute bandwidth : ecore::EDouble[1]; property communicationLinkResourceType : resourcetype::CommunicationLinkResourceType[1] { ordered }; diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/ActiveResourceSpecification.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/ActiveResourceSpecification.java index ade9571b..fc763ac6 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/ActiveResourceSpecification.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/ActiveResourceSpecification.java @@ -24,39 +24,39 @@ import org.eclipse.emf.common.util.EList; */ public interface ActiveResourceSpecification extends ConfigurationSpecification { /** - * Returns the value of the '<em><b>Processing Resource Specifications</b></em>' containment reference list. - * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification}. - * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getParentResourceSpecification <em>Parent Resource Specification</em>}'. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Processing Resource Specifications</b></em>' containment reference list. + * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification}. + * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getParentResourceSpecification <em>Parent Resource Specification</em>}'. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Processing Resource Specifications</em>' containment reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Processing Resource Specifications</em>' containment reference list. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getActiveResourceSpecification_ProcessingResourceSpecifications() - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getParentResourceSpecification - * @model opposite="parentResourceSpecification" containment="true" ordered="false" - * @generated - */ + * @return the value of the '<em>Processing Resource Specifications</em>' containment reference list. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getActiveResourceSpecification_ProcessingResourceSpecifications() + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getParentResourceSpecification + * @model opposite="parentResourceSpecification" containment="true" ordered="false" + * @generated + */ EList<ProcessingResourceSpecification> getProcessingResourceSpecifications(); /** - * Returns the value of the '<em><b>Linking Resources</b></em>' containment reference list. - * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification}. - * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getParentResourceConfiguration <em>Parent Resource Configuration</em>}'. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Linking Resources</b></em>' containment reference list. + * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification}. + * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getParentResourceConfiguration <em>Parent Resource Configuration</em>}'. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Linking Resources</em>' containment reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Linking Resources</em>' containment reference list. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getActiveResourceSpecification_LinkingResources() - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getParentResourceConfiguration - * @model opposite="parentResourceConfiguration" containment="true" ordered="false" - * @generated - */ + * @return the value of the '<em>Linking Resources</em>' containment reference list. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getActiveResourceSpecification_LinkingResources() + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getParentResourceConfiguration + * @model opposite="parentResourceConfiguration" containment="true" ordered="false" + * @generated + */ EList<LinkingResourceSpecification> getLinkingResources(); } // ActiveResourceSpecification diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/CustomConfigurationSpecification.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/CustomConfigurationSpecification.java index 55632014..6c69853c 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/CustomConfigurationSpecification.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/CustomConfigurationSpecification.java @@ -23,28 +23,28 @@ import org.eclipse.emf.ecore.EObject; */ public interface CustomConfigurationSpecification extends ConfigurationSpecification { /** - * Returns the value of the '<em><b>Non Functional Properties</b></em>' reference. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Non Functional Properties</b></em>' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * <!-- begin-model-doc --> - * The idea is to reference to e.g. other models which reflect the performance relevant aspects of this ConfigurationSpecification - * <!-- end-model-doc --> - * @return the value of the '<em>Non Functional Properties</em>' reference. - * @see #setNonFunctionalProperties(CustomResourceConfigurationModel) - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getCustomConfigurationSpecification_NonFunctionalProperties() - * @model required="true" ordered="false" - * @generated - */ + * <!-- begin-model-doc --> + * The idea is to reference to e.g. other models which reflect the performance relevant aspects of this ConfigurationSpecification + * <!-- end-model-doc --> + * @return the value of the '<em>Non Functional Properties</em>' reference. + * @see #setNonFunctionalProperties(CustomResourceConfigurationModel) + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getCustomConfigurationSpecification_NonFunctionalProperties() + * @model required="true" ordered="false" + * @generated + */ CustomResourceConfigurationModel getNonFunctionalProperties(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification#getNonFunctionalProperties <em>Non Functional Properties</em>}' reference. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification#getNonFunctionalProperties <em>Non Functional Properties</em>}' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Non Functional Properties</em>' reference. - * @see #getNonFunctionalProperties() - * @generated - */ + * @param value the new value of the '<em>Non Functional Properties</em>' reference. + * @see #getNonFunctionalProperties() + * @generated + */ void setNonFunctionalProperties(CustomResourceConfigurationModel value); } // CustomConfigurationSpecification diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/LinkingResourceSpecification.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/LinkingResourceSpecification.java index 26b0a366..42fe1a98 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/LinkingResourceSpecification.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/LinkingResourceSpecification.java @@ -5,6 +5,7 @@ package edu.kit.ipd.descartes.mm.resourceconfiguration; import edu.kit.ipd.descartes.core.Entity; +import edu.kit.ipd.descartes.mm.resourcelandscape.Container; import edu.kit.ipd.descartes.mm.resourcetype.CommunicationLinkResourceType; import org.eclipse.emf.common.util.EList; @@ -17,7 +18,7 @@ import org.eclipse.emf.common.util.EList; * <p> * The following features are supported: * <ul> - * <li>{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getConnectedResourceSpecifications <em>Connected Resource Specifications</em>}</li> + * <li>{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getConnectedContainer <em>Connected Container</em>}</li> * <li>{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getParentResourceConfiguration <em>Parent Resource Configuration</em>}</li> * <li>{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getBandwidth <em>Bandwidth</em>}</li> * <li>{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getCommunicationLinkResourceType <em>Communication Link Resource Type</em>}</li> @@ -30,99 +31,99 @@ import org.eclipse.emf.common.util.EList; */ public interface LinkingResourceSpecification extends Entity { /** - * Returns the value of the '<em><b>Connected Resource Specifications</b></em>' reference list. - * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification}. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Connected Container</b></em>' reference list. + * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourcelandscape.Container}. + * <!-- begin-user-doc --> * <p> - * If the meaning of the '<em>Connected Resource Specifications</em>' reference list isn't clear, + * If the meaning of the '<em>Connected Container</em>' reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Connected Resource Specifications</em>' reference list. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getLinkingResourceSpecification_ConnectedResourceSpecifications() - * @model lower="2" ordered="false" - * @generated - */ - EList<ActiveResourceSpecification> getConnectedResourceSpecifications(); + * @return the value of the '<em>Connected Container</em>' reference list. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getLinkingResourceSpecification_ConnectedContainer() + * @model lower="2" ordered="false" + * @generated + */ + EList<Container> getConnectedContainer(); /** - * Returns the value of the '<em><b>Parent Resource Configuration</b></em>' container reference. - * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification#getLinkingResources <em>Linking Resources</em>}'. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Parent Resource Configuration</b></em>' container reference. + * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification#getLinkingResources <em>Linking Resources</em>}'. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Parent Resource Configuration</em>' container reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Parent Resource Configuration</em>' container reference. - * @see #setParentResourceConfiguration(ActiveResourceSpecification) - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getLinkingResourceSpecification_ParentResourceConfiguration() - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification#getLinkingResources - * @model opposite="linkingResources" required="true" transient="false" ordered="false" - * @generated - */ + * @return the value of the '<em>Parent Resource Configuration</em>' container reference. + * @see #setParentResourceConfiguration(ActiveResourceSpecification) + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getLinkingResourceSpecification_ParentResourceConfiguration() + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification#getLinkingResources + * @model opposite="linkingResources" required="true" transient="false" ordered="false" + * @generated + */ ActiveResourceSpecification getParentResourceConfiguration(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getParentResourceConfiguration <em>Parent Resource Configuration</em>}' container reference. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getParentResourceConfiguration <em>Parent Resource Configuration</em>}' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Parent Resource Configuration</em>' container reference. - * @see #getParentResourceConfiguration() - * @generated - */ + * @param value the new value of the '<em>Parent Resource Configuration</em>' container reference. + * @see #getParentResourceConfiguration() + * @generated + */ void setParentResourceConfiguration(ActiveResourceSpecification value); /** - * Returns the value of the '<em><b>Bandwidth</b></em>' attribute. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Bandwidth</b></em>' attribute. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Bandwidth</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Bandwidth</em>' attribute. - * @see #setBandwidth(double) - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getLinkingResourceSpecification_Bandwidth() - * @model required="true" ordered="false" - * @generated - */ + * @return the value of the '<em>Bandwidth</em>' attribute. + * @see #setBandwidth(double) + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getLinkingResourceSpecification_Bandwidth() + * @model required="true" ordered="false" + * @generated + */ double getBandwidth(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getBandwidth <em>Bandwidth</em>}' attribute. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getBandwidth <em>Bandwidth</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Bandwidth</em>' attribute. - * @see #getBandwidth() - * @generated - */ + * @param value the new value of the '<em>Bandwidth</em>' attribute. + * @see #getBandwidth() + * @generated + */ void setBandwidth(double value); /** - * Returns the value of the '<em><b>Communication Link Resource Type</b></em>' reference. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Communication Link Resource Type</b></em>' reference. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Communication Link Resource Type</em>' reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Communication Link Resource Type</em>' reference. - * @see #setCommunicationLinkResourceType(CommunicationLinkResourceType) - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getLinkingResourceSpecification_CommunicationLinkResourceType() - * @model required="true" - * @generated - */ + * @return the value of the '<em>Communication Link Resource Type</em>' reference. + * @see #setCommunicationLinkResourceType(CommunicationLinkResourceType) + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getLinkingResourceSpecification_CommunicationLinkResourceType() + * @model required="true" + * @generated + */ CommunicationLinkResourceType getCommunicationLinkResourceType(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getCommunicationLinkResourceType <em>Communication Link Resource Type</em>}' reference. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getCommunicationLinkResourceType <em>Communication Link Resource Type</em>}' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Communication Link Resource Type</em>' reference. - * @see #getCommunicationLinkResourceType() - * @generated - */ + * @param value the new value of the '<em>Communication Link Resource Type</em>' reference. + * @see #getCommunicationLinkResourceType() + * @generated + */ void setCommunicationLinkResourceType(CommunicationLinkResourceType value); } // LinkingResourceSpecification diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/NumberOfParallelProcessingUnits.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/NumberOfParallelProcessingUnits.java index dedde522..3ab3f039 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/NumberOfParallelProcessingUnits.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/NumberOfParallelProcessingUnits.java @@ -24,57 +24,57 @@ import edu.kit.ipd.descartes.core.AdaptableEntity; */ public interface NumberOfParallelProcessingUnits extends AdaptableEntity { /** - * Returns the value of the '<em><b>Number</b></em>' attribute. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Number</b></em>' attribute. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Number</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Number</em>' attribute. - * @see #setNumber(int) - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getNumberOfParallelProcessingUnits_Number() - * @model required="true" ordered="false" - * @generated - */ + * @return the value of the '<em>Number</em>' attribute. + * @see #setNumber(int) + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getNumberOfParallelProcessingUnits_Number() + * @model required="true" ordered="false" + * @generated + */ int getNumber(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits#getNumber <em>Number</em>}' attribute. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits#getNumber <em>Number</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Number</em>' attribute. - * @see #getNumber() - * @generated - */ + * @param value the new value of the '<em>Number</em>' attribute. + * @see #getNumber() + * @generated + */ void setNumber(int value); /** - * Returns the value of the '<em><b>Processing Resource Spec</b></em>' container reference. - * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getNrOfParProcUnits <em>Nr Of Par Proc Units</em>}'. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Processing Resource Spec</b></em>' container reference. + * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getNrOfParProcUnits <em>Nr Of Par Proc Units</em>}'. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Processing Resource Spec</em>' container reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Processing Resource Spec</em>' container reference. - * @see #setProcessingResourceSpec(ProcessingResourceSpecification) - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getNumberOfParallelProcessingUnits_ProcessingResourceSpec() - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getNrOfParProcUnits - * @model opposite="nrOfParProcUnits" required="true" transient="false" ordered="false" - * @generated - */ + * @return the value of the '<em>Processing Resource Spec</em>' container reference. + * @see #setProcessingResourceSpec(ProcessingResourceSpecification) + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getNumberOfParallelProcessingUnits_ProcessingResourceSpec() + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getNrOfParProcUnits + * @model opposite="nrOfParProcUnits" required="true" transient="false" ordered="false" + * @generated + */ ProcessingResourceSpecification getProcessingResourceSpec(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits#getProcessingResourceSpec <em>Processing Resource Spec</em>}' container reference. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits#getProcessingResourceSpec <em>Processing Resource Spec</em>}' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Processing Resource Spec</em>' container reference. - * @see #getProcessingResourceSpec() - * @generated - */ + * @param value the new value of the '<em>Processing Resource Spec</em>' container reference. + * @see #getProcessingResourceSpec() + * @generated + */ void setProcessingResourceSpec(ProcessingResourceSpecification value); } // NumberOfParallelProcessingUnits diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/PassiveResourceCapacity.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/PassiveResourceCapacity.java index 651b8ff4..1adc2996 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/PassiveResourceCapacity.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/PassiveResourceCapacity.java @@ -25,29 +25,29 @@ import java.math.BigInteger; */ public interface PassiveResourceCapacity extends AdaptableEntity { /** - * Returns the value of the '<em><b>Capacity</b></em>' attribute. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Capacity</b></em>' attribute. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Capacity</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Capacity</em>' attribute. - * @see #setCapacity(BigInteger) - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getPassiveResourceCapacity_Capacity() - * @model required="true" ordered="false" - * @generated - */ + * @return the value of the '<em>Capacity</em>' attribute. + * @see #setCapacity(BigInteger) + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getPassiveResourceCapacity_Capacity() + * @model required="true" ordered="false" + * @generated + */ BigInteger getCapacity(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity#getCapacity <em>Capacity</em>}' attribute. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity#getCapacity <em>Capacity</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Capacity</em>' attribute. - * @see #getCapacity() - * @generated - */ + * @param value the new value of the '<em>Capacity</em>' attribute. + * @see #getCapacity() + * @generated + */ void setCapacity(BigInteger value); } // PassiveResourceCapacity diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/PassiveResourceSpecification.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/PassiveResourceSpecification.java index 1e0e0d29..b761fbbe 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/PassiveResourceSpecification.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/PassiveResourceSpecification.java @@ -24,55 +24,55 @@ import edu.kit.ipd.descartes.mm.resourcetype.PassiveResourceType; */ public interface PassiveResourceSpecification extends ConfigurationSpecification { /** - * Returns the value of the '<em><b>Capacity</b></em>' containment reference. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Capacity</b></em>' containment reference. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Capacity</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Capacity</em>' containment reference. - * @see #setCapacity(PassiveResourceCapacity) - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getPassiveResourceSpecification_Capacity() - * @model containment="true" required="true" ordered="false" - * @generated - */ + * @return the value of the '<em>Capacity</em>' containment reference. + * @see #setCapacity(PassiveResourceCapacity) + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getPassiveResourceSpecification_Capacity() + * @model containment="true" required="true" ordered="false" + * @generated + */ PassiveResourceCapacity getCapacity(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification#getCapacity <em>Capacity</em>}' containment reference. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification#getCapacity <em>Capacity</em>}' containment reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Capacity</em>' containment reference. - * @see #getCapacity() - * @generated - */ + * @param value the new value of the '<em>Capacity</em>' containment reference. + * @see #getCapacity() + * @generated + */ void setCapacity(PassiveResourceCapacity value); /** - * Returns the value of the '<em><b>Passive Resource Type</b></em>' reference. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Passive Resource Type</b></em>' reference. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Passive Resource Type</em>' reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Passive Resource Type</em>' reference. - * @see #setPassiveResourceType(PassiveResourceType) - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getPassiveResourceSpecification_PassiveResourceType() - * @model required="true" - * @generated - */ + * @return the value of the '<em>Passive Resource Type</em>' reference. + * @see #setPassiveResourceType(PassiveResourceType) + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getPassiveResourceSpecification_PassiveResourceType() + * @model required="true" + * @generated + */ PassiveResourceType getPassiveResourceType(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification#getPassiveResourceType <em>Passive Resource Type</em>}' reference. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification#getPassiveResourceType <em>Passive Resource Type</em>}' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Passive Resource Type</em>' reference. - * @see #getPassiveResourceType() - * @generated - */ + * @param value the new value of the '<em>Passive Resource Type</em>' reference. + * @see #getPassiveResourceType() + * @generated + */ void setPassiveResourceType(PassiveResourceType value); } // PassiveResourceSpecification diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/ProcessingResourceSpecification.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/ProcessingResourceSpecification.java index aa5608df..69737a0b 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/ProcessingResourceSpecification.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/ProcessingResourceSpecification.java @@ -29,140 +29,140 @@ import edu.kit.ipd.descartes.mm.resourcetype.ProcessingResourceType; */ public interface ProcessingResourceSpecification extends Entity { /** - * Returns the value of the '<em><b>Scheduling Policy</b></em>' attribute. - * The literals are from the enumeration {@link edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy}. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Scheduling Policy</b></em>' attribute. + * The literals are from the enumeration {@link edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy}. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Scheduling Policy</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Scheduling Policy</em>' attribute. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy - * @see #setSchedulingPolicy(SchedulingPolicy) - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getProcessingResourceSpecification_SchedulingPolicy() - * @model required="true" ordered="false" - * @generated - */ + * @return the value of the '<em>Scheduling Policy</em>' attribute. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy + * @see #setSchedulingPolicy(SchedulingPolicy) + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getProcessingResourceSpecification_SchedulingPolicy() + * @model required="true" ordered="false" + * @generated + */ SchedulingPolicy getSchedulingPolicy(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getSchedulingPolicy <em>Scheduling Policy</em>}' attribute. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getSchedulingPolicy <em>Scheduling Policy</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Scheduling Policy</em>' attribute. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy - * @see #getSchedulingPolicy() - * @generated - */ + * @param value the new value of the '<em>Scheduling Policy</em>' attribute. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy + * @see #getSchedulingPolicy() + * @generated + */ void setSchedulingPolicy(SchedulingPolicy value); /** - * Returns the value of the '<em><b>Processing Rate</b></em>' attribute. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Processing Rate</b></em>' attribute. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Processing Rate</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Processing Rate</em>' attribute. - * @see #setProcessingRate(double) - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getProcessingResourceSpecification_ProcessingRate() - * @model required="true" ordered="false" - * @generated - */ + * @return the value of the '<em>Processing Rate</em>' attribute. + * @see #setProcessingRate(double) + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getProcessingResourceSpecification_ProcessingRate() + * @model required="true" ordered="false" + * @generated + */ double getProcessingRate(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getProcessingRate <em>Processing Rate</em>}' attribute. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getProcessingRate <em>Processing Rate</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Processing Rate</em>' attribute. - * @see #getProcessingRate() - * @generated - */ + * @param value the new value of the '<em>Processing Rate</em>' attribute. + * @see #getProcessingRate() + * @generated + */ void setProcessingRate(double value); /** - * Returns the value of the '<em><b>Active Resource Type</b></em>' reference. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Active Resource Type</b></em>' reference. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Active Resource Type</em>' reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Active Resource Type</em>' reference. - * @see #setActiveResourceType(ProcessingResourceType) - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getProcessingResourceSpecification_ActiveResourceType() - * @model required="true" - * @generated - */ + * @return the value of the '<em>Active Resource Type</em>' reference. + * @see #setActiveResourceType(ProcessingResourceType) + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getProcessingResourceSpecification_ActiveResourceType() + * @model required="true" + * @generated + */ ProcessingResourceType getActiveResourceType(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getActiveResourceType <em>Active Resource Type</em>}' reference. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getActiveResourceType <em>Active Resource Type</em>}' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Active Resource Type</em>' reference. - * @see #getActiveResourceType() - * @generated - */ + * @param value the new value of the '<em>Active Resource Type</em>' reference. + * @see #getActiveResourceType() + * @generated + */ void setActiveResourceType(ProcessingResourceType value); /** - * Returns the value of the '<em><b>Parent Resource Specification</b></em>' container reference. - * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification#getProcessingResourceSpecifications <em>Processing Resource Specifications</em>}'. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Parent Resource Specification</b></em>' container reference. + * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification#getProcessingResourceSpecifications <em>Processing Resource Specifications</em>}'. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Parent Resource Specification</em>' reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Parent Resource Specification</em>' container reference. - * @see #setParentResourceSpecification(ActiveResourceSpecification) - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getProcessingResourceSpecification_ParentResourceSpecification() - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification#getProcessingResourceSpecifications - * @model opposite="processingResourceSpecifications" required="true" transient="false" ordered="false" - * @generated - */ + * @return the value of the '<em>Parent Resource Specification</em>' container reference. + * @see #setParentResourceSpecification(ActiveResourceSpecification) + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getProcessingResourceSpecification_ParentResourceSpecification() + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification#getProcessingResourceSpecifications + * @model opposite="processingResourceSpecifications" required="true" transient="false" ordered="false" + * @generated + */ ActiveResourceSpecification getParentResourceSpecification(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getParentResourceSpecification <em>Parent Resource Specification</em>}' container reference. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getParentResourceSpecification <em>Parent Resource Specification</em>}' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Parent Resource Specification</em>' container reference. - * @see #getParentResourceSpecification() - * @generated - */ + * @param value the new value of the '<em>Parent Resource Specification</em>' container reference. + * @see #getParentResourceSpecification() + * @generated + */ void setParentResourceSpecification(ActiveResourceSpecification value); /** - * Returns the value of the '<em><b>Nr Of Par Proc Units</b></em>' containment reference. - * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits#getProcessingResourceSpec <em>Processing Resource Spec</em>}'. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Nr Of Par Proc Units</b></em>' containment reference. + * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits#getProcessingResourceSpec <em>Processing Resource Spec</em>}'. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Nr Of Par Proc Units</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Nr Of Par Proc Units</em>' containment reference. - * @see #setNrOfParProcUnits(NumberOfParallelProcessingUnits) - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getProcessingResourceSpecification_NrOfParProcUnits() - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits#getProcessingResourceSpec - * @model opposite="processingResourceSpec" containment="true" required="true" ordered="false" - * @generated - */ + * @return the value of the '<em>Nr Of Par Proc Units</em>' containment reference. + * @see #setNrOfParProcUnits(NumberOfParallelProcessingUnits) + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#getProcessingResourceSpecification_NrOfParProcUnits() + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits#getProcessingResourceSpec + * @model opposite="processingResourceSpec" containment="true" required="true" ordered="false" + * @generated + */ NumberOfParallelProcessingUnits getNrOfParProcUnits(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getNrOfParProcUnits <em>Nr Of Par Proc Units</em>}' containment reference. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getNrOfParProcUnits <em>Nr Of Par Proc Units</em>}' containment reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Nr Of Par Proc Units</em>' containment reference. - * @see #getNrOfParProcUnits() - * @generated - */ + * @param value the new value of the '<em>Nr Of Par Proc Units</em>' containment reference. + * @see #getNrOfParProcUnits() + * @generated + */ void setNrOfParProcUnits(NumberOfParallelProcessingUnits value); } // ProcessingResourceSpecification diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/ResourceconfigurationFactory.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/ResourceconfigurationFactory.java index 830be6c5..e0950b44 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/ResourceconfigurationFactory.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/ResourceconfigurationFactory.java @@ -15,83 +15,83 @@ import org.eclipse.emf.ecore.EFactory; */ public interface ResourceconfigurationFactory extends EFactory { /** - * The singleton instance of the factory. - * <!-- begin-user-doc --> + * The singleton instance of the factory. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ ResourceconfigurationFactory eINSTANCE = edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationFactoryImpl.init(); /** - * Returns a new object of class '<em>Processing Resource Specification</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Processing Resource Specification</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Processing Resource Specification</em>'. - * @generated - */ + * @return a new object of class '<em>Processing Resource Specification</em>'. + * @generated + */ ProcessingResourceSpecification createProcessingResourceSpecification(); /** - * Returns a new object of class '<em>Number Of Parallel Processing Units</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Number Of Parallel Processing Units</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Number Of Parallel Processing Units</em>'. - * @generated - */ + * @return a new object of class '<em>Number Of Parallel Processing Units</em>'. + * @generated + */ NumberOfParallelProcessingUnits createNumberOfParallelProcessingUnits(); /** - * Returns a new object of class '<em>Linking Resource Specification</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Linking Resource Specification</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Linking Resource Specification</em>'. - * @generated - */ + * @return a new object of class '<em>Linking Resource Specification</em>'. + * @generated + */ LinkingResourceSpecification createLinkingResourceSpecification(); /** - * Returns a new object of class '<em>Active Resource Specification</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Active Resource Specification</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Active Resource Specification</em>'. - * @generated - */ + * @return a new object of class '<em>Active Resource Specification</em>'. + * @generated + */ ActiveResourceSpecification createActiveResourceSpecification(); /** - * Returns a new object of class '<em>Custom Configuration Specification</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Custom Configuration Specification</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Custom Configuration Specification</em>'. - * @generated - */ + * @return a new object of class '<em>Custom Configuration Specification</em>'. + * @generated + */ CustomConfigurationSpecification createCustomConfigurationSpecification(); /** - * Returns a new object of class '<em>Passive Resource Specification</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Passive Resource Specification</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Passive Resource Specification</em>'. - * @generated - */ + * @return a new object of class '<em>Passive Resource Specification</em>'. + * @generated + */ PassiveResourceSpecification createPassiveResourceSpecification(); /** - * Returns a new object of class '<em>Passive Resource Capacity</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Passive Resource Capacity</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Passive Resource Capacity</em>'. - * @generated - */ + * @return a new object of class '<em>Passive Resource Capacity</em>'. + * @generated + */ PassiveResourceCapacity createPassiveResourceCapacity(); /** - * Returns the package supported by this factory. - * <!-- begin-user-doc --> + * Returns the package supported by this factory. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the package supported by this factory. - * @generated - */ + * @return the package supported by this factory. + * @generated + */ ResourceconfigurationPackage getResourceconfigurationPackage(); } //ResourceconfigurationFactory diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/ResourceconfigurationPackage.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/ResourceconfigurationPackage.java index 97825d81..ebbdfdef 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/ResourceconfigurationPackage.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/ResourceconfigurationPackage.java @@ -28,814 +28,814 @@ import org.eclipse.emf.ecore.EReference; */ public interface ResourceconfigurationPackage extends EPackage { /** - * The package name. - * <!-- begin-user-doc --> + * The package name. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ String eNAME = "resourceconfiguration"; /** - * The package namespace URI. - * <!-- begin-user-doc --> + * The package namespace URI. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ String eNS_URI = "http://www.descartes-research.net/metamodel/resourceconfiguration/1.0"; /** - * The package namespace name. - * <!-- begin-user-doc --> + * The package namespace name. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ String eNS_PREFIX = "resourceconfiguration"; /** - * The singleton instance of the package. - * <!-- begin-user-doc --> + * The singleton instance of the package. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ ResourceconfigurationPackage eINSTANCE = edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl.init(); /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ConfigurationSpecificationImpl <em>Configuration Specification</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ConfigurationSpecificationImpl <em>Configuration Specification</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ConfigurationSpecificationImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getConfigurationSpecification() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ConfigurationSpecificationImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getConfigurationSpecification() + * @generated + */ int CONFIGURATION_SPECIFICATION = 0; /** - * The feature id for the '<em><b>Id</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Id</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CONFIGURATION_SPECIFICATION__ID = CorePackage.ENTITY__ID; /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CONFIGURATION_SPECIFICATION__NAME = CorePackage.ENTITY__NAME; /** - * The number of structural features of the '<em>Configuration Specification</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Configuration Specification</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CONFIGURATION_SPECIFICATION_FEATURE_COUNT = CorePackage.ENTITY_FEATURE_COUNT + 0; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ProcessingResourceSpecificationImpl <em>Processing Resource Specification</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ProcessingResourceSpecificationImpl <em>Processing Resource Specification</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ProcessingResourceSpecificationImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getProcessingResourceSpecification() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ProcessingResourceSpecificationImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getProcessingResourceSpecification() + * @generated + */ int PROCESSING_RESOURCE_SPECIFICATION = 1; /** - * The feature id for the '<em><b>Id</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Id</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PROCESSING_RESOURCE_SPECIFICATION__ID = CorePackage.ENTITY__ID; /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PROCESSING_RESOURCE_SPECIFICATION__NAME = CorePackage.ENTITY__NAME; /** - * The feature id for the '<em><b>Scheduling Policy</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Scheduling Policy</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY = CorePackage.ENTITY_FEATURE_COUNT + 0; /** - * The feature id for the '<em><b>Processing Rate</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Processing Rate</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE = CorePackage.ENTITY_FEATURE_COUNT + 1; /** - * The feature id for the '<em><b>Active Resource Type</b></em>' reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Active Resource Type</b></em>' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE = CorePackage.ENTITY_FEATURE_COUNT + 2; /** - * The feature id for the '<em><b>Parent Resource Specification</b></em>' container reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Parent Resource Specification</b></em>' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION = CorePackage.ENTITY_FEATURE_COUNT + 3; /** - * The feature id for the '<em><b>Nr Of Par Proc Units</b></em>' containment reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Nr Of Par Proc Units</b></em>' containment reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS = CorePackage.ENTITY_FEATURE_COUNT + 4; /** - * The number of structural features of the '<em>Processing Resource Specification</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Processing Resource Specification</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PROCESSING_RESOURCE_SPECIFICATION_FEATURE_COUNT = CorePackage.ENTITY_FEATURE_COUNT + 5; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.NumberOfParallelProcessingUnitsImpl <em>Number Of Parallel Processing Units</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.NumberOfParallelProcessingUnitsImpl <em>Number Of Parallel Processing Units</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.NumberOfParallelProcessingUnitsImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getNumberOfParallelProcessingUnits() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.NumberOfParallelProcessingUnitsImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getNumberOfParallelProcessingUnits() + * @generated + */ int NUMBER_OF_PARALLEL_PROCESSING_UNITS = 2; /** - * The feature id for the '<em><b>Id</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Id</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int NUMBER_OF_PARALLEL_PROCESSING_UNITS__ID = CorePackage.ADAPTABLE_ENTITY__ID; /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int NUMBER_OF_PARALLEL_PROCESSING_UNITS__NAME = CorePackage.ADAPTABLE_ENTITY__NAME; /** - * The feature id for the '<em><b>Number</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Number</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER = CorePackage.ADAPTABLE_ENTITY_FEATURE_COUNT + 0; /** - * The feature id for the '<em><b>Processing Resource Spec</b></em>' container reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Processing Resource Spec</b></em>' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC = CorePackage.ADAPTABLE_ENTITY_FEATURE_COUNT + 1; /** - * The number of structural features of the '<em>Number Of Parallel Processing Units</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Number Of Parallel Processing Units</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int NUMBER_OF_PARALLEL_PROCESSING_UNITS_FEATURE_COUNT = CorePackage.ADAPTABLE_ENTITY_FEATURE_COUNT + 2; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.LinkingResourceSpecificationImpl <em>Linking Resource Specification</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.LinkingResourceSpecificationImpl <em>Linking Resource Specification</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.LinkingResourceSpecificationImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getLinkingResourceSpecification() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.LinkingResourceSpecificationImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getLinkingResourceSpecification() + * @generated + */ int LINKING_RESOURCE_SPECIFICATION = 3; /** - * The feature id for the '<em><b>Id</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Id</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int LINKING_RESOURCE_SPECIFICATION__ID = CorePackage.ENTITY__ID; /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int LINKING_RESOURCE_SPECIFICATION__NAME = CorePackage.ENTITY__NAME; /** - * The feature id for the '<em><b>Connected Resource Specifications</b></em>' reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Connected Container</b></em>' reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ - int LINKING_RESOURCE_SPECIFICATION__CONNECTED_RESOURCE_SPECIFICATIONS = CorePackage.ENTITY_FEATURE_COUNT + 0; + * @generated + * @ordered + */ + int LINKING_RESOURCE_SPECIFICATION__CONNECTED_CONTAINER = CorePackage.ENTITY_FEATURE_COUNT + 0; /** - * The feature id for the '<em><b>Parent Resource Configuration</b></em>' container reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Parent Resource Configuration</b></em>' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION = CorePackage.ENTITY_FEATURE_COUNT + 1; /** - * The feature id for the '<em><b>Bandwidth</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Bandwidth</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int LINKING_RESOURCE_SPECIFICATION__BANDWIDTH = CorePackage.ENTITY_FEATURE_COUNT + 2; /** - * The feature id for the '<em><b>Communication Link Resource Type</b></em>' reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Communication Link Resource Type</b></em>' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE = CorePackage.ENTITY_FEATURE_COUNT + 3; /** - * The number of structural features of the '<em>Linking Resource Specification</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Linking Resource Specification</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int LINKING_RESOURCE_SPECIFICATION_FEATURE_COUNT = CorePackage.ENTITY_FEATURE_COUNT + 4; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ActiveResourceSpecificationImpl <em>Active Resource Specification</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ActiveResourceSpecificationImpl <em>Active Resource Specification</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ActiveResourceSpecificationImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getActiveResourceSpecification() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ActiveResourceSpecificationImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getActiveResourceSpecification() + * @generated + */ int ACTIVE_RESOURCE_SPECIFICATION = 4; /** - * The feature id for the '<em><b>Id</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Id</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int ACTIVE_RESOURCE_SPECIFICATION__ID = CONFIGURATION_SPECIFICATION__ID; /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int ACTIVE_RESOURCE_SPECIFICATION__NAME = CONFIGURATION_SPECIFICATION__NAME; /** - * The feature id for the '<em><b>Processing Resource Specifications</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Processing Resource Specifications</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS = CONFIGURATION_SPECIFICATION_FEATURE_COUNT + 0; /** - * The feature id for the '<em><b>Linking Resources</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Linking Resources</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES = CONFIGURATION_SPECIFICATION_FEATURE_COUNT + 1; /** - * The number of structural features of the '<em>Active Resource Specification</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Active Resource Specification</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int ACTIVE_RESOURCE_SPECIFICATION_FEATURE_COUNT = CONFIGURATION_SPECIFICATION_FEATURE_COUNT + 2; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.CustomConfigurationSpecificationImpl <em>Custom Configuration Specification</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.CustomConfigurationSpecificationImpl <em>Custom Configuration Specification</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.CustomConfigurationSpecificationImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getCustomConfigurationSpecification() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.CustomConfigurationSpecificationImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getCustomConfigurationSpecification() + * @generated + */ int CUSTOM_CONFIGURATION_SPECIFICATION = 5; /** - * The feature id for the '<em><b>Id</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Id</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CUSTOM_CONFIGURATION_SPECIFICATION__ID = CONFIGURATION_SPECIFICATION__ID; /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CUSTOM_CONFIGURATION_SPECIFICATION__NAME = CONFIGURATION_SPECIFICATION__NAME; /** - * The feature id for the '<em><b>Non Functional Properties</b></em>' reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Non Functional Properties</b></em>' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES = CONFIGURATION_SPECIFICATION_FEATURE_COUNT + 0; /** - * The number of structural features of the '<em>Custom Configuration Specification</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Custom Configuration Specification</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CUSTOM_CONFIGURATION_SPECIFICATION_FEATURE_COUNT = CONFIGURATION_SPECIFICATION_FEATURE_COUNT + 1; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.PassiveResourceSpecificationImpl <em>Passive Resource Specification</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.PassiveResourceSpecificationImpl <em>Passive Resource Specification</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.PassiveResourceSpecificationImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getPassiveResourceSpecification() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.PassiveResourceSpecificationImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getPassiveResourceSpecification() + * @generated + */ int PASSIVE_RESOURCE_SPECIFICATION = 6; /** - * The feature id for the '<em><b>Id</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Id</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PASSIVE_RESOURCE_SPECIFICATION__ID = CONFIGURATION_SPECIFICATION__ID; /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PASSIVE_RESOURCE_SPECIFICATION__NAME = CONFIGURATION_SPECIFICATION__NAME; /** - * The feature id for the '<em><b>Capacity</b></em>' containment reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Capacity</b></em>' containment reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PASSIVE_RESOURCE_SPECIFICATION__CAPACITY = CONFIGURATION_SPECIFICATION_FEATURE_COUNT + 0; /** - * The feature id for the '<em><b>Passive Resource Type</b></em>' reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Passive Resource Type</b></em>' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE = CONFIGURATION_SPECIFICATION_FEATURE_COUNT + 1; /** - * The number of structural features of the '<em>Passive Resource Specification</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Passive Resource Specification</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PASSIVE_RESOURCE_SPECIFICATION_FEATURE_COUNT = CONFIGURATION_SPECIFICATION_FEATURE_COUNT + 2; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.PassiveResourceCapacityImpl <em>Passive Resource Capacity</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.PassiveResourceCapacityImpl <em>Passive Resource Capacity</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.PassiveResourceCapacityImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getPassiveResourceCapacity() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.PassiveResourceCapacityImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getPassiveResourceCapacity() + * @generated + */ int PASSIVE_RESOURCE_CAPACITY = 7; /** - * The feature id for the '<em><b>Id</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Id</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PASSIVE_RESOURCE_CAPACITY__ID = CorePackage.ADAPTABLE_ENTITY__ID; /** - * The feature id for the '<em><b>Name</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PASSIVE_RESOURCE_CAPACITY__NAME = CorePackage.ADAPTABLE_ENTITY__NAME; /** - * The feature id for the '<em><b>Capacity</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Capacity</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PASSIVE_RESOURCE_CAPACITY__CAPACITY = CorePackage.ADAPTABLE_ENTITY_FEATURE_COUNT + 0; /** - * The number of structural features of the '<em>Passive Resource Capacity</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Passive Resource Capacity</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PASSIVE_RESOURCE_CAPACITY_FEATURE_COUNT = CorePackage.ADAPTABLE_ENTITY_FEATURE_COUNT + 1; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.CustomResourceConfigurationModelImpl <em>Custom Resource Configuration Model</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.CustomResourceConfigurationModelImpl <em>Custom Resource Configuration Model</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.CustomResourceConfigurationModelImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getCustomResourceConfigurationModel() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.CustomResourceConfigurationModelImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getCustomResourceConfigurationModel() + * @generated + */ int CUSTOM_RESOURCE_CONFIGURATION_MODEL = 8; /** - * The number of structural features of the '<em>Custom Resource Configuration Model</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Custom Resource Configuration Model</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CUSTOM_RESOURCE_CONFIGURATION_MODEL_FEATURE_COUNT = 0; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy <em>Scheduling Policy</em>}' enum. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy <em>Scheduling Policy</em>}' enum. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getSchedulingPolicy() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getSchedulingPolicy() + * @generated + */ int SCHEDULING_POLICY = 9; /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ConfigurationSpecification <em>Configuration Specification</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ConfigurationSpecification <em>Configuration Specification</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Configuration Specification</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ConfigurationSpecification - * @generated - */ + * @return the meta object for class '<em>Configuration Specification</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ConfigurationSpecification + * @generated + */ EClass getConfigurationSpecification(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification <em>Processing Resource Specification</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification <em>Processing Resource Specification</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Processing Resource Specification</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification - * @generated - */ + * @return the meta object for class '<em>Processing Resource Specification</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification + * @generated + */ EClass getProcessingResourceSpecification(); /** - * Returns the meta object for the attribute '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getSchedulingPolicy <em>Scheduling Policy</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the attribute '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getSchedulingPolicy <em>Scheduling Policy</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Scheduling Policy</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getSchedulingPolicy() - * @see #getProcessingResourceSpecification() - * @generated - */ + * @return the meta object for the attribute '<em>Scheduling Policy</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getSchedulingPolicy() + * @see #getProcessingResourceSpecification() + * @generated + */ EAttribute getProcessingResourceSpecification_SchedulingPolicy(); /** - * Returns the meta object for the attribute '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getProcessingRate <em>Processing Rate</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the attribute '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getProcessingRate <em>Processing Rate</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Processing Rate</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getProcessingRate() - * @see #getProcessingResourceSpecification() - * @generated - */ + * @return the meta object for the attribute '<em>Processing Rate</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getProcessingRate() + * @see #getProcessingResourceSpecification() + * @generated + */ EAttribute getProcessingResourceSpecification_ProcessingRate(); /** - * Returns the meta object for the reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getActiveResourceType <em>Active Resource Type</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getActiveResourceType <em>Active Resource Type</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Active Resource Type</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getActiveResourceType() - * @see #getProcessingResourceSpecification() - * @generated - */ + * @return the meta object for the reference '<em>Active Resource Type</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getActiveResourceType() + * @see #getProcessingResourceSpecification() + * @generated + */ EReference getProcessingResourceSpecification_ActiveResourceType(); /** - * Returns the meta object for the container reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getParentResourceSpecification <em>Parent Resource Specification</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the container reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getParentResourceSpecification <em>Parent Resource Specification</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the container reference '<em>Parent Resource Specification</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getParentResourceSpecification() - * @see #getProcessingResourceSpecification() - * @generated - */ + * @return the meta object for the container reference '<em>Parent Resource Specification</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getParentResourceSpecification() + * @see #getProcessingResourceSpecification() + * @generated + */ EReference getProcessingResourceSpecification_ParentResourceSpecification(); /** - * Returns the meta object for the containment reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getNrOfParProcUnits <em>Nr Of Par Proc Units</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the containment reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getNrOfParProcUnits <em>Nr Of Par Proc Units</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the containment reference '<em>Nr Of Par Proc Units</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getNrOfParProcUnits() - * @see #getProcessingResourceSpecification() - * @generated - */ + * @return the meta object for the containment reference '<em>Nr Of Par Proc Units</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification#getNrOfParProcUnits() + * @see #getProcessingResourceSpecification() + * @generated + */ EReference getProcessingResourceSpecification_NrOfParProcUnits(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits <em>Number Of Parallel Processing Units</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits <em>Number Of Parallel Processing Units</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Number Of Parallel Processing Units</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits - * @generated - */ + * @return the meta object for class '<em>Number Of Parallel Processing Units</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits + * @generated + */ EClass getNumberOfParallelProcessingUnits(); /** - * Returns the meta object for the attribute '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits#getNumber <em>Number</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the attribute '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits#getNumber <em>Number</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Number</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits#getNumber() - * @see #getNumberOfParallelProcessingUnits() - * @generated - */ + * @return the meta object for the attribute '<em>Number</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits#getNumber() + * @see #getNumberOfParallelProcessingUnits() + * @generated + */ EAttribute getNumberOfParallelProcessingUnits_Number(); /** - * Returns the meta object for the container reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits#getProcessingResourceSpec <em>Processing Resource Spec</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the container reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits#getProcessingResourceSpec <em>Processing Resource Spec</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the container reference '<em>Processing Resource Spec</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits#getProcessingResourceSpec() - * @see #getNumberOfParallelProcessingUnits() - * @generated - */ + * @return the meta object for the container reference '<em>Processing Resource Spec</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits#getProcessingResourceSpec() + * @see #getNumberOfParallelProcessingUnits() + * @generated + */ EReference getNumberOfParallelProcessingUnits_ProcessingResourceSpec(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification <em>Linking Resource Specification</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification <em>Linking Resource Specification</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Linking Resource Specification</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification - * @generated - */ + * @return the meta object for class '<em>Linking Resource Specification</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification + * @generated + */ EClass getLinkingResourceSpecification(); /** - * Returns the meta object for the reference list '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getConnectedResourceSpecifications <em>Connected Resource Specifications</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the reference list '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getConnectedContainer <em>Connected Container</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the reference list '<em>Connected Resource Specifications</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getConnectedResourceSpecifications() - * @see #getLinkingResourceSpecification() - * @generated - */ - EReference getLinkingResourceSpecification_ConnectedResourceSpecifications(); + * @return the meta object for the reference list '<em>Connected Container</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getConnectedContainer() + * @see #getLinkingResourceSpecification() + * @generated + */ + EReference getLinkingResourceSpecification_ConnectedContainer(); /** - * Returns the meta object for the container reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getParentResourceConfiguration <em>Parent Resource Configuration</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the container reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getParentResourceConfiguration <em>Parent Resource Configuration</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the container reference '<em>Parent Resource Configuration</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getParentResourceConfiguration() - * @see #getLinkingResourceSpecification() - * @generated - */ + * @return the meta object for the container reference '<em>Parent Resource Configuration</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getParentResourceConfiguration() + * @see #getLinkingResourceSpecification() + * @generated + */ EReference getLinkingResourceSpecification_ParentResourceConfiguration(); /** - * Returns the meta object for the attribute '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getBandwidth <em>Bandwidth</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the attribute '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getBandwidth <em>Bandwidth</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Bandwidth</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getBandwidth() - * @see #getLinkingResourceSpecification() - * @generated - */ + * @return the meta object for the attribute '<em>Bandwidth</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getBandwidth() + * @see #getLinkingResourceSpecification() + * @generated + */ EAttribute getLinkingResourceSpecification_Bandwidth(); /** - * Returns the meta object for the reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getCommunicationLinkResourceType <em>Communication Link Resource Type</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getCommunicationLinkResourceType <em>Communication Link Resource Type</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Communication Link Resource Type</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getCommunicationLinkResourceType() - * @see #getLinkingResourceSpecification() - * @generated - */ + * @return the meta object for the reference '<em>Communication Link Resource Type</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification#getCommunicationLinkResourceType() + * @see #getLinkingResourceSpecification() + * @generated + */ EReference getLinkingResourceSpecification_CommunicationLinkResourceType(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification <em>Active Resource Specification</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification <em>Active Resource Specification</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Active Resource Specification</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification - * @generated - */ + * @return the meta object for class '<em>Active Resource Specification</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification + * @generated + */ EClass getActiveResourceSpecification(); /** - * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification#getProcessingResourceSpecifications <em>Processing Resource Specifications</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification#getProcessingResourceSpecifications <em>Processing Resource Specifications</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the containment reference list '<em>Processing Resource Specifications</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification#getProcessingResourceSpecifications() - * @see #getActiveResourceSpecification() - * @generated - */ + * @return the meta object for the containment reference list '<em>Processing Resource Specifications</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification#getProcessingResourceSpecifications() + * @see #getActiveResourceSpecification() + * @generated + */ EReference getActiveResourceSpecification_ProcessingResourceSpecifications(); /** - * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification#getLinkingResources <em>Linking Resources</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification#getLinkingResources <em>Linking Resources</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the containment reference list '<em>Linking Resources</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification#getLinkingResources() - * @see #getActiveResourceSpecification() - * @generated - */ + * @return the meta object for the containment reference list '<em>Linking Resources</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification#getLinkingResources() + * @see #getActiveResourceSpecification() + * @generated + */ EReference getActiveResourceSpecification_LinkingResources(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification <em>Custom Configuration Specification</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification <em>Custom Configuration Specification</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Custom Configuration Specification</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification - * @generated - */ + * @return the meta object for class '<em>Custom Configuration Specification</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification + * @generated + */ EClass getCustomConfigurationSpecification(); /** - * Returns the meta object for the reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification#getNonFunctionalProperties <em>Non Functional Properties</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification#getNonFunctionalProperties <em>Non Functional Properties</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Non Functional Properties</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification#getNonFunctionalProperties() - * @see #getCustomConfigurationSpecification() - * @generated - */ + * @return the meta object for the reference '<em>Non Functional Properties</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification#getNonFunctionalProperties() + * @see #getCustomConfigurationSpecification() + * @generated + */ EReference getCustomConfigurationSpecification_NonFunctionalProperties(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification <em>Passive Resource Specification</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification <em>Passive Resource Specification</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Passive Resource Specification</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification - * @generated - */ + * @return the meta object for class '<em>Passive Resource Specification</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification + * @generated + */ EClass getPassiveResourceSpecification(); /** - * Returns the meta object for the containment reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification#getCapacity <em>Capacity</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the containment reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification#getCapacity <em>Capacity</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the containment reference '<em>Capacity</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification#getCapacity() - * @see #getPassiveResourceSpecification() - * @generated - */ + * @return the meta object for the containment reference '<em>Capacity</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification#getCapacity() + * @see #getPassiveResourceSpecification() + * @generated + */ EReference getPassiveResourceSpecification_Capacity(); /** - * Returns the meta object for the reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification#getPassiveResourceType <em>Passive Resource Type</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the reference '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification#getPassiveResourceType <em>Passive Resource Type</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Passive Resource Type</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification#getPassiveResourceType() - * @see #getPassiveResourceSpecification() - * @generated - */ + * @return the meta object for the reference '<em>Passive Resource Type</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification#getPassiveResourceType() + * @see #getPassiveResourceSpecification() + * @generated + */ EReference getPassiveResourceSpecification_PassiveResourceType(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity <em>Passive Resource Capacity</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity <em>Passive Resource Capacity</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Passive Resource Capacity</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity - * @generated - */ + * @return the meta object for class '<em>Passive Resource Capacity</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity + * @generated + */ EClass getPassiveResourceCapacity(); /** - * Returns the meta object for the attribute '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity#getCapacity <em>Capacity</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the attribute '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity#getCapacity <em>Capacity</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Capacity</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity#getCapacity() - * @see #getPassiveResourceCapacity() - * @generated - */ + * @return the meta object for the attribute '<em>Capacity</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity#getCapacity() + * @see #getPassiveResourceCapacity() + * @generated + */ EAttribute getPassiveResourceCapacity_Capacity(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.CustomResourceConfigurationModel <em>Custom Resource Configuration Model</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.CustomResourceConfigurationModel <em>Custom Resource Configuration Model</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Custom Resource Configuration Model</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.CustomResourceConfigurationModel - * @generated - */ + * @return the meta object for class '<em>Custom Resource Configuration Model</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.CustomResourceConfigurationModel + * @generated + */ EClass getCustomResourceConfigurationModel(); /** - * Returns the meta object for enum '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy <em>Scheduling Policy</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for enum '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy <em>Scheduling Policy</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for enum '<em>Scheduling Policy</em>'. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy - * @generated - */ + * @return the meta object for enum '<em>Scheduling Policy</em>'. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy + * @generated + */ EEnum getSchedulingPolicy(); /** - * Returns the factory that creates the instances of the model. - * <!-- begin-user-doc --> + * Returns the factory that creates the instances of the model. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the factory that creates the instances of the model. - * @generated - */ + * @return the factory that creates the instances of the model. + * @generated + */ ResourceconfigurationFactory getResourceconfigurationFactory(); /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * Defines literals for the meta objects that represent * <ul> * <li>each class,</li> @@ -844,243 +844,243 @@ public interface ResourceconfigurationPackage extends EPackage { * <li>and each data type</li> * </ul> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ interface Literals { /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ConfigurationSpecificationImpl <em>Configuration Specification</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ConfigurationSpecificationImpl <em>Configuration Specification</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ConfigurationSpecificationImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getConfigurationSpecification() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ConfigurationSpecificationImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getConfigurationSpecification() + * @generated + */ EClass CONFIGURATION_SPECIFICATION = eINSTANCE.getConfigurationSpecification(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ProcessingResourceSpecificationImpl <em>Processing Resource Specification</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ProcessingResourceSpecificationImpl <em>Processing Resource Specification</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ProcessingResourceSpecificationImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getProcessingResourceSpecification() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ProcessingResourceSpecificationImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getProcessingResourceSpecification() + * @generated + */ EClass PROCESSING_RESOURCE_SPECIFICATION = eINSTANCE.getProcessingResourceSpecification(); /** - * The meta object literal for the '<em><b>Scheduling Policy</b></em>' attribute feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Scheduling Policy</b></em>' attribute feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EAttribute PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY = eINSTANCE.getProcessingResourceSpecification_SchedulingPolicy(); /** - * The meta object literal for the '<em><b>Processing Rate</b></em>' attribute feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Processing Rate</b></em>' attribute feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EAttribute PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE = eINSTANCE.getProcessingResourceSpecification_ProcessingRate(); /** - * The meta object literal for the '<em><b>Active Resource Type</b></em>' reference feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Active Resource Type</b></em>' reference feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE = eINSTANCE.getProcessingResourceSpecification_ActiveResourceType(); /** - * The meta object literal for the '<em><b>Parent Resource Specification</b></em>' container reference feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Parent Resource Specification</b></em>' container reference feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION = eINSTANCE.getProcessingResourceSpecification_ParentResourceSpecification(); /** - * The meta object literal for the '<em><b>Nr Of Par Proc Units</b></em>' containment reference feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Nr Of Par Proc Units</b></em>' containment reference feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS = eINSTANCE.getProcessingResourceSpecification_NrOfParProcUnits(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.NumberOfParallelProcessingUnitsImpl <em>Number Of Parallel Processing Units</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.NumberOfParallelProcessingUnitsImpl <em>Number Of Parallel Processing Units</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.NumberOfParallelProcessingUnitsImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getNumberOfParallelProcessingUnits() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.NumberOfParallelProcessingUnitsImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getNumberOfParallelProcessingUnits() + * @generated + */ EClass NUMBER_OF_PARALLEL_PROCESSING_UNITS = eINSTANCE.getNumberOfParallelProcessingUnits(); /** - * The meta object literal for the '<em><b>Number</b></em>' attribute feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Number</b></em>' attribute feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EAttribute NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER = eINSTANCE.getNumberOfParallelProcessingUnits_Number(); /** - * The meta object literal for the '<em><b>Processing Resource Spec</b></em>' container reference feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Processing Resource Spec</b></em>' container reference feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC = eINSTANCE.getNumberOfParallelProcessingUnits_ProcessingResourceSpec(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.LinkingResourceSpecificationImpl <em>Linking Resource Specification</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.LinkingResourceSpecificationImpl <em>Linking Resource Specification</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.LinkingResourceSpecificationImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getLinkingResourceSpecification() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.LinkingResourceSpecificationImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getLinkingResourceSpecification() + * @generated + */ EClass LINKING_RESOURCE_SPECIFICATION = eINSTANCE.getLinkingResourceSpecification(); /** - * The meta object literal for the '<em><b>Connected Resource Specifications</b></em>' reference list feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Connected Container</b></em>' reference list feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ - EReference LINKING_RESOURCE_SPECIFICATION__CONNECTED_RESOURCE_SPECIFICATIONS = eINSTANCE.getLinkingResourceSpecification_ConnectedResourceSpecifications(); + * @generated + */ + EReference LINKING_RESOURCE_SPECIFICATION__CONNECTED_CONTAINER = eINSTANCE.getLinkingResourceSpecification_ConnectedContainer(); /** - * The meta object literal for the '<em><b>Parent Resource Configuration</b></em>' container reference feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Parent Resource Configuration</b></em>' container reference feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION = eINSTANCE.getLinkingResourceSpecification_ParentResourceConfiguration(); /** - * The meta object literal for the '<em><b>Bandwidth</b></em>' attribute feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Bandwidth</b></em>' attribute feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EAttribute LINKING_RESOURCE_SPECIFICATION__BANDWIDTH = eINSTANCE.getLinkingResourceSpecification_Bandwidth(); /** - * The meta object literal for the '<em><b>Communication Link Resource Type</b></em>' reference feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Communication Link Resource Type</b></em>' reference feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE = eINSTANCE.getLinkingResourceSpecification_CommunicationLinkResourceType(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ActiveResourceSpecificationImpl <em>Active Resource Specification</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ActiveResourceSpecificationImpl <em>Active Resource Specification</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ActiveResourceSpecificationImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getActiveResourceSpecification() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ActiveResourceSpecificationImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getActiveResourceSpecification() + * @generated + */ EClass ACTIVE_RESOURCE_SPECIFICATION = eINSTANCE.getActiveResourceSpecification(); /** - * The meta object literal for the '<em><b>Processing Resource Specifications</b></em>' containment reference list feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Processing Resource Specifications</b></em>' containment reference list feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS = eINSTANCE.getActiveResourceSpecification_ProcessingResourceSpecifications(); /** - * The meta object literal for the '<em><b>Linking Resources</b></em>' containment reference list feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Linking Resources</b></em>' containment reference list feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES = eINSTANCE.getActiveResourceSpecification_LinkingResources(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.CustomConfigurationSpecificationImpl <em>Custom Configuration Specification</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.CustomConfigurationSpecificationImpl <em>Custom Configuration Specification</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.CustomConfigurationSpecificationImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getCustomConfigurationSpecification() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.CustomConfigurationSpecificationImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getCustomConfigurationSpecification() + * @generated + */ EClass CUSTOM_CONFIGURATION_SPECIFICATION = eINSTANCE.getCustomConfigurationSpecification(); /** - * The meta object literal for the '<em><b>Non Functional Properties</b></em>' reference feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Non Functional Properties</b></em>' reference feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES = eINSTANCE.getCustomConfigurationSpecification_NonFunctionalProperties(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.PassiveResourceSpecificationImpl <em>Passive Resource Specification</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.PassiveResourceSpecificationImpl <em>Passive Resource Specification</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.PassiveResourceSpecificationImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getPassiveResourceSpecification() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.PassiveResourceSpecificationImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getPassiveResourceSpecification() + * @generated + */ EClass PASSIVE_RESOURCE_SPECIFICATION = eINSTANCE.getPassiveResourceSpecification(); /** - * The meta object literal for the '<em><b>Capacity</b></em>' containment reference feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Capacity</b></em>' containment reference feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference PASSIVE_RESOURCE_SPECIFICATION__CAPACITY = eINSTANCE.getPassiveResourceSpecification_Capacity(); /** - * The meta object literal for the '<em><b>Passive Resource Type</b></em>' reference feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Passive Resource Type</b></em>' reference feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE = eINSTANCE.getPassiveResourceSpecification_PassiveResourceType(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.PassiveResourceCapacityImpl <em>Passive Resource Capacity</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.PassiveResourceCapacityImpl <em>Passive Resource Capacity</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.PassiveResourceCapacityImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getPassiveResourceCapacity() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.PassiveResourceCapacityImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getPassiveResourceCapacity() + * @generated + */ EClass PASSIVE_RESOURCE_CAPACITY = eINSTANCE.getPassiveResourceCapacity(); /** - * The meta object literal for the '<em><b>Capacity</b></em>' attribute feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Capacity</b></em>' attribute feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EAttribute PASSIVE_RESOURCE_CAPACITY__CAPACITY = eINSTANCE.getPassiveResourceCapacity_Capacity(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.CustomResourceConfigurationModelImpl <em>Custom Resource Configuration Model</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.CustomResourceConfigurationModelImpl <em>Custom Resource Configuration Model</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.CustomResourceConfigurationModelImpl - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getCustomResourceConfigurationModel() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.CustomResourceConfigurationModelImpl + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getCustomResourceConfigurationModel() + * @generated + */ EClass CUSTOM_RESOURCE_CONFIGURATION_MODEL = eINSTANCE.getCustomResourceConfigurationModel(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy <em>Scheduling Policy</em>}' enum. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy <em>Scheduling Policy</em>}' enum. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getSchedulingPolicy() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.SchedulingPolicy + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.impl.ResourceconfigurationPackageImpl#getSchedulingPolicy() + * @generated + */ EEnum SCHEDULING_POLICY = eINSTANCE.getSchedulingPolicy(); } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/SchedulingPolicy.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/SchedulingPolicy.java index 8a7409dd..ed8623f3 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/SchedulingPolicy.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/SchedulingPolicy.java @@ -20,271 +20,271 @@ import org.eclipse.emf.common.util.Enumerator; */ public enum SchedulingPolicy implements Enumerator { /** - * The '<em><b>DELAY</b></em>' literal object. - * <!-- begin-user-doc --> + * The '<em><b>DELAY</b></em>' literal object. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #DELAY_VALUE - * @generated - * @ordered - */ + * @see #DELAY_VALUE + * @generated + * @ordered + */ DELAY(0, "DELAY", "DELAY"), /** - * The '<em><b>FCFS</b></em>' literal object. - * <!-- begin-user-doc --> + * The '<em><b>FCFS</b></em>' literal object. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #FCFS_VALUE - * @generated - * @ordered - */ + * @see #FCFS_VALUE + * @generated + * @ordered + */ FCFS(1, "FCFS", "FCFS"), /** - * The '<em><b>PROCESSOR SHARING</b></em>' literal object. - * <!-- begin-user-doc --> + * The '<em><b>PROCESSOR SHARING</b></em>' literal object. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #PROCESSOR_SHARING_VALUE - * @generated - * @ordered - */ + * @see #PROCESSOR_SHARING_VALUE + * @generated + * @ordered + */ PROCESSOR_SHARING(2, "PROCESSOR_SHARING", "PROCESSOR_SHARING"), /** - * The '<em><b>RANDOM</b></em>' literal object. - * <!-- begin-user-doc --> + * The '<em><b>RANDOM</b></em>' literal object. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #RANDOM_VALUE - * @generated - * @ordered - */ + * @see #RANDOM_VALUE + * @generated + * @ordered + */ RANDOM(3, "RANDOM", "RANDOM"), /** - * The '<em><b>NA</b></em>' literal object. - * <!-- begin-user-doc --> + * The '<em><b>NA</b></em>' literal object. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #NA_VALUE - * @generated - * @ordered - */ + * @see #NA_VALUE + * @generated + * @ordered + */ NA(4, "NA", "NA"); /** - * The '<em><b>DELAY</b></em>' literal value. - * <!-- begin-user-doc --> + * The '<em><b>DELAY</b></em>' literal value. + * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>DELAY</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @see #DELAY - * @model - * @generated - * @ordered - */ + * @see #DELAY + * @model + * @generated + * @ordered + */ public static final int DELAY_VALUE = 0; /** - * The '<em><b>FCFS</b></em>' literal value. - * <!-- begin-user-doc --> + * The '<em><b>FCFS</b></em>' literal value. + * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>FCFS</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @see #FCFS - * @model - * @generated - * @ordered - */ + * @see #FCFS + * @model + * @generated + * @ordered + */ public static final int FCFS_VALUE = 1; /** - * The '<em><b>PROCESSOR SHARING</b></em>' literal value. - * <!-- begin-user-doc --> + * The '<em><b>PROCESSOR SHARING</b></em>' literal value. + * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>PROCESSOR SHARING</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @see #PROCESSOR_SHARING - * @model - * @generated - * @ordered - */ + * @see #PROCESSOR_SHARING + * @model + * @generated + * @ordered + */ public static final int PROCESSOR_SHARING_VALUE = 2; /** - * The '<em><b>RANDOM</b></em>' literal value. - * <!-- begin-user-doc --> + * The '<em><b>RANDOM</b></em>' literal value. + * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>RANDOM</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @see #RANDOM - * @model - * @generated - * @ordered - */ + * @see #RANDOM + * @model + * @generated + * @ordered + */ public static final int RANDOM_VALUE = 3; /** - * The '<em><b>NA</b></em>' literal value. - * <!-- begin-user-doc --> + * The '<em><b>NA</b></em>' literal value. + * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>NA</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @see #NA - * @model - * @generated - * @ordered - */ + * @see #NA + * @model + * @generated + * @ordered + */ public static final int NA_VALUE = 4; /** - * An array of all the '<em><b>Scheduling Policy</b></em>' enumerators. - * <!-- begin-user-doc --> + * An array of all the '<em><b>Scheduling Policy</b></em>' enumerators. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private static final SchedulingPolicy[] VALUES_ARRAY = new SchedulingPolicy[] { - DELAY, - FCFS, - PROCESSOR_SHARING, - RANDOM, - NA, - }; + DELAY, + FCFS, + PROCESSOR_SHARING, + RANDOM, + NA, + }; /** - * A public read-only list of all the '<em><b>Scheduling Policy</b></em>' enumerators. - * <!-- begin-user-doc --> + * A public read-only list of all the '<em><b>Scheduling Policy</b></em>' enumerators. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static final List<SchedulingPolicy> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** - * Returns the '<em><b>Scheduling Policy</b></em>' literal with the specified literal value. - * <!-- begin-user-doc --> + * Returns the '<em><b>Scheduling Policy</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static SchedulingPolicy get(String literal) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - SchedulingPolicy result = VALUES_ARRAY[i]; - if (result.toString().equals(literal)) { - return result; - } - } - return null; - } + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + SchedulingPolicy result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } /** - * Returns the '<em><b>Scheduling Policy</b></em>' literal with the specified name. - * <!-- begin-user-doc --> + * Returns the '<em><b>Scheduling Policy</b></em>' literal with the specified name. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static SchedulingPolicy getByName(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - SchedulingPolicy result = VALUES_ARRAY[i]; - if (result.getName().equals(name)) { - return result; - } - } - return null; - } + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + SchedulingPolicy result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } /** - * Returns the '<em><b>Scheduling Policy</b></em>' literal with the specified integer value. - * <!-- begin-user-doc --> + * Returns the '<em><b>Scheduling Policy</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static SchedulingPolicy get(int value) { - switch (value) { - case DELAY_VALUE: return DELAY; - case FCFS_VALUE: return FCFS; - case PROCESSOR_SHARING_VALUE: return PROCESSOR_SHARING; - case RANDOM_VALUE: return RANDOM; - case NA_VALUE: return NA; - } - return null; - } + switch (value) { + case DELAY_VALUE: return DELAY; + case FCFS_VALUE: return FCFS; + case PROCESSOR_SHARING_VALUE: return PROCESSOR_SHARING; + case RANDOM_VALUE: return RANDOM; + case NA_VALUE: return NA; + } + return null; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private final int value; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private final String name; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private final String literal; /** - * Only this class can construct instances. - * <!-- begin-user-doc --> + * Only this class can construct instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private SchedulingPolicy(int value, String name, String literal) { - this.value = value; - this.name = name; - this.literal = literal; - } + this.value = value; + this.name = name; + this.literal = literal; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public int getValue() { - return value; - } + return value; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public String getName() { - return name; - } + return name; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public String getLiteral() { - return literal; - } + return literal; + } /** - * Returns the literal value of the enumerator, which is its string representation. - * <!-- begin-user-doc --> + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String toString() { - return literal; - } + return literal; + } } //SchedulingPolicy diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ActiveResourceSpecificationImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ActiveResourceSpecificationImpl.java index 4fc64543..5002c00e 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ActiveResourceSpecificationImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ActiveResourceSpecificationImpl.java @@ -33,170 +33,170 @@ import edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPacka */ public class ActiveResourceSpecificationImpl extends ConfigurationSpecificationImpl implements ActiveResourceSpecification { /** - * The cached value of the '{@link #getProcessingResourceSpecifications() <em>Processing Resource Specifications</em>}' containment reference list. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getProcessingResourceSpecifications() <em>Processing Resource Specifications</em>}' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getProcessingResourceSpecifications() - * @generated - * @ordered - */ + * @see #getProcessingResourceSpecifications() + * @generated + * @ordered + */ protected EList<ProcessingResourceSpecification> processingResourceSpecifications; /** - * The cached value of the '{@link #getLinkingResources() <em>Linking Resources</em>}' containment reference list. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getLinkingResources() <em>Linking Resources</em>}' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getLinkingResources() - * @generated - * @ordered - */ + * @see #getLinkingResources() + * @generated + * @ordered + */ protected EList<LinkingResourceSpecification> linkingResources; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ActiveResourceSpecificationImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourceconfigurationPackage.Literals.ACTIVE_RESOURCE_SPECIFICATION; - } + return ResourceconfigurationPackage.Literals.ACTIVE_RESOURCE_SPECIFICATION; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EList<ProcessingResourceSpecification> getProcessingResourceSpecifications() { - if (processingResourceSpecifications == null) { - processingResourceSpecifications = new EObjectContainmentWithInverseEList<ProcessingResourceSpecification>(ProcessingResourceSpecification.class, this, ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION); - } - return processingResourceSpecifications; - } + if (processingResourceSpecifications == null) { + processingResourceSpecifications = new EObjectContainmentWithInverseEList<ProcessingResourceSpecification>(ProcessingResourceSpecification.class, this, ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION); + } + return processingResourceSpecifications; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EList<LinkingResourceSpecification> getLinkingResources() { - if (linkingResources == null) { - linkingResources = new EObjectContainmentWithInverseEList<LinkingResourceSpecification>(LinkingResourceSpecification.class, this, ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES, ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION); - } - return linkingResources; - } + if (linkingResources == null) { + linkingResources = new EObjectContainmentWithInverseEList<LinkingResourceSpecification>(LinkingResourceSpecification.class, this, ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES, ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION); + } + return linkingResources; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @SuppressWarnings("unchecked") @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS: - return ((InternalEList<InternalEObject>)(InternalEList<?>)getProcessingResourceSpecifications()).basicAdd(otherEnd, msgs); - case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES: - return ((InternalEList<InternalEObject>)(InternalEList<?>)getLinkingResources()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS: + return ((InternalEList<InternalEObject>)(InternalEList<?>)getProcessingResourceSpecifications()).basicAdd(otherEnd, msgs); + case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES: + return ((InternalEList<InternalEObject>)(InternalEList<?>)getLinkingResources()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS: - return ((InternalEList<?>)getProcessingResourceSpecifications()).basicRemove(otherEnd, msgs); - case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES: - return ((InternalEList<?>)getLinkingResources()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS: + return ((InternalEList<?>)getProcessingResourceSpecifications()).basicRemove(otherEnd, msgs); + case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES: + return ((InternalEList<?>)getLinkingResources()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS: - return getProcessingResourceSpecifications(); - case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES: - return getLinkingResources(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS: + return getProcessingResourceSpecifications(); + case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES: + return getLinkingResources(); + } + return super.eGet(featureID, resolve, coreType); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS: - getProcessingResourceSpecifications().clear(); - getProcessingResourceSpecifications().addAll((Collection<? extends ProcessingResourceSpecification>)newValue); - return; - case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES: - getLinkingResources().clear(); - getLinkingResources().addAll((Collection<? extends LinkingResourceSpecification>)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS: + getProcessingResourceSpecifications().clear(); + getProcessingResourceSpecifications().addAll((Collection<? extends ProcessingResourceSpecification>)newValue); + return; + case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES: + getLinkingResources().clear(); + getLinkingResources().addAll((Collection<? extends LinkingResourceSpecification>)newValue); + return; + } + super.eSet(featureID, newValue); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void eUnset(int featureID) { - switch (featureID) { - case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS: - getProcessingResourceSpecifications().clear(); - return; - case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES: - getLinkingResources().clear(); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS: + getProcessingResourceSpecifications().clear(); + return; + case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES: + getLinkingResources().clear(); + return; + } + super.eUnset(featureID); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public boolean eIsSet(int featureID) { - switch (featureID) { - case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS: - return processingResourceSpecifications != null && !processingResourceSpecifications.isEmpty(); - case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES: - return linkingResources != null && !linkingResources.isEmpty(); - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS: + return processingResourceSpecifications != null && !processingResourceSpecifications.isEmpty(); + case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES: + return linkingResources != null && !linkingResources.isEmpty(); + } + return super.eIsSet(featureID); + } } //ActiveResourceSpecificationImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ConfigurationSpecificationImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ConfigurationSpecificationImpl.java index fb4cfa97..79ffd3b5 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ConfigurationSpecificationImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ConfigurationSpecificationImpl.java @@ -21,22 +21,22 @@ import org.eclipse.emf.ecore.EClass; */ public abstract class ConfigurationSpecificationImpl extends EntityImpl implements ConfigurationSpecification { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ConfigurationSpecificationImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourceconfigurationPackage.Literals.CONFIGURATION_SPECIFICATION; - } + return ResourceconfigurationPackage.Literals.CONFIGURATION_SPECIFICATION; + } } //ConfigurationSpecificationImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/CustomConfigurationSpecificationImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/CustomConfigurationSpecificationImpl.java index 17cb41aa..18e2f56f 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/CustomConfigurationSpecificationImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/CustomConfigurationSpecificationImpl.java @@ -30,129 +30,129 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl; */ public class CustomConfigurationSpecificationImpl extends ConfigurationSpecificationImpl implements CustomConfigurationSpecification { /** - * The cached value of the '{@link #getNonFunctionalProperties() <em>Non Functional Properties</em>}' reference. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getNonFunctionalProperties() <em>Non Functional Properties</em>}' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getNonFunctionalProperties() - * @generated - * @ordered - */ + * @see #getNonFunctionalProperties() + * @generated + * @ordered + */ protected CustomResourceConfigurationModel nonFunctionalProperties; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected CustomConfigurationSpecificationImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourceconfigurationPackage.Literals.CUSTOM_CONFIGURATION_SPECIFICATION; - } + return ResourceconfigurationPackage.Literals.CUSTOM_CONFIGURATION_SPECIFICATION; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public CustomResourceConfigurationModel getNonFunctionalProperties() { - if (nonFunctionalProperties != null && nonFunctionalProperties.eIsProxy()) { - InternalEObject oldNonFunctionalProperties = (InternalEObject)nonFunctionalProperties; - nonFunctionalProperties = (CustomResourceConfigurationModel)eResolveProxy(oldNonFunctionalProperties); - if (nonFunctionalProperties != oldNonFunctionalProperties) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, ResourceconfigurationPackage.CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES, oldNonFunctionalProperties, nonFunctionalProperties)); - } - } - return nonFunctionalProperties; - } + if (nonFunctionalProperties != null && nonFunctionalProperties.eIsProxy()) { + InternalEObject oldNonFunctionalProperties = (InternalEObject)nonFunctionalProperties; + nonFunctionalProperties = (CustomResourceConfigurationModel)eResolveProxy(oldNonFunctionalProperties); + if (nonFunctionalProperties != oldNonFunctionalProperties) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ResourceconfigurationPackage.CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES, oldNonFunctionalProperties, nonFunctionalProperties)); + } + } + return nonFunctionalProperties; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public CustomResourceConfigurationModel basicGetNonFunctionalProperties() { - return nonFunctionalProperties; - } + return nonFunctionalProperties; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setNonFunctionalProperties(CustomResourceConfigurationModel newNonFunctionalProperties) { - CustomResourceConfigurationModel oldNonFunctionalProperties = nonFunctionalProperties; - nonFunctionalProperties = newNonFunctionalProperties; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES, oldNonFunctionalProperties, nonFunctionalProperties)); - } + CustomResourceConfigurationModel oldNonFunctionalProperties = nonFunctionalProperties; + nonFunctionalProperties = newNonFunctionalProperties; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES, oldNonFunctionalProperties, nonFunctionalProperties)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ResourceconfigurationPackage.CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES: - if (resolve) return getNonFunctionalProperties(); - return basicGetNonFunctionalProperties(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourceconfigurationPackage.CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES: + if (resolve) return getNonFunctionalProperties(); + return basicGetNonFunctionalProperties(); + } + return super.eGet(featureID, resolve, coreType); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ResourceconfigurationPackage.CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES: - setNonFunctionalProperties((CustomResourceConfigurationModel)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourceconfigurationPackage.CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES: + setNonFunctionalProperties((CustomResourceConfigurationModel)newValue); + return; + } + super.eSet(featureID, newValue); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void eUnset(int featureID) { - switch (featureID) { - case ResourceconfigurationPackage.CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES: - setNonFunctionalProperties((CustomResourceConfigurationModel)null); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourceconfigurationPackage.CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES: + setNonFunctionalProperties((CustomResourceConfigurationModel)null); + return; + } + super.eUnset(featureID); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public boolean eIsSet(int featureID) { - switch (featureID) { - case ResourceconfigurationPackage.CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES: - return nonFunctionalProperties != null; - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourceconfigurationPackage.CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES: + return nonFunctionalProperties != null; + } + return super.eIsSet(featureID); + } } //CustomConfigurationSpecificationImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/CustomResourceConfigurationModelImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/CustomResourceConfigurationModelImpl.java index f74c9429..3643a111 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/CustomResourceConfigurationModelImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/CustomResourceConfigurationModelImpl.java @@ -21,22 +21,22 @@ import org.eclipse.emf.ecore.impl.EObjectImpl; */ public abstract class CustomResourceConfigurationModelImpl extends EObjectImpl implements CustomResourceConfigurationModel { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected CustomResourceConfigurationModelImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourceconfigurationPackage.Literals.CUSTOM_RESOURCE_CONFIGURATION_MODEL; - } + return ResourceconfigurationPackage.Literals.CUSTOM_RESOURCE_CONFIGURATION_MODEL; + } } //CustomResourceConfigurationModelImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/LinkingResourceSpecificationImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/LinkingResourceSpecificationImpl.java index 9a39b989..b355a61c 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/LinkingResourceSpecificationImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/LinkingResourceSpecificationImpl.java @@ -9,6 +9,7 @@ import edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecificatio import edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification; import edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage; +import edu.kit.ipd.descartes.mm.resourcelandscape.Container; import edu.kit.ipd.descartes.mm.resourcetype.CommunicationLinkResourceType; import java.util.Collection; @@ -33,7 +34,7 @@ import org.eclipse.emf.ecore.util.EcoreUtil; * <p> * The following features are implemented: * <ul> - * <li>{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.LinkingResourceSpecificationImpl#getConnectedResourceSpecifications <em>Connected Resource Specifications</em>}</li> + * <li>{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.LinkingResourceSpecificationImpl#getConnectedContainer <em>Connected Container</em>}</li> * <li>{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.LinkingResourceSpecificationImpl#getParentResourceConfiguration <em>Parent Resource Configuration</em>}</li> * <li>{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.LinkingResourceSpecificationImpl#getBandwidth <em>Bandwidth</em>}</li> * <li>{@link edu.kit.ipd.descartes.mm.resourceconfiguration.impl.LinkingResourceSpecificationImpl#getCommunicationLinkResourceType <em>Communication Link Resource Type</em>}</li> @@ -44,325 +45,325 @@ import org.eclipse.emf.ecore.util.EcoreUtil; */ public class LinkingResourceSpecificationImpl extends EntityImpl implements LinkingResourceSpecification { /** - * The cached value of the '{@link #getConnectedResourceSpecifications() <em>Connected Resource Specifications</em>}' reference list. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getConnectedContainer() <em>Connected Container</em>}' reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getConnectedResourceSpecifications() - * @generated - * @ordered - */ - protected EList<ActiveResourceSpecification> connectedResourceSpecifications; + * @see #getConnectedContainer() + * @generated + * @ordered + */ + protected EList<Container> connectedContainer; /** - * The default value of the '{@link #getBandwidth() <em>Bandwidth</em>}' attribute. - * <!-- begin-user-doc --> + * The default value of the '{@link #getBandwidth() <em>Bandwidth</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getBandwidth() - * @generated - * @ordered - */ + * @see #getBandwidth() + * @generated + * @ordered + */ protected static final double BANDWIDTH_EDEFAULT = 0.0; /** - * The cached value of the '{@link #getBandwidth() <em>Bandwidth</em>}' attribute. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getBandwidth() <em>Bandwidth</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getBandwidth() - * @generated - * @ordered - */ + * @see #getBandwidth() + * @generated + * @ordered + */ protected double bandwidth = BANDWIDTH_EDEFAULT; /** - * The cached value of the '{@link #getCommunicationLinkResourceType() <em>Communication Link Resource Type</em>}' reference. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getCommunicationLinkResourceType() <em>Communication Link Resource Type</em>}' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getCommunicationLinkResourceType() - * @generated - * @ordered - */ + * @see #getCommunicationLinkResourceType() + * @generated + * @ordered + */ protected CommunicationLinkResourceType communicationLinkResourceType; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected LinkingResourceSpecificationImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourceconfigurationPackage.Literals.LINKING_RESOURCE_SPECIFICATION; - } + return ResourceconfigurationPackage.Literals.LINKING_RESOURCE_SPECIFICATION; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ - public EList<ActiveResourceSpecification> getConnectedResourceSpecifications() { - if (connectedResourceSpecifications == null) { - connectedResourceSpecifications = new EObjectResolvingEList<ActiveResourceSpecification>(ActiveResourceSpecification.class, this, ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__CONNECTED_RESOURCE_SPECIFICATIONS); - } - return connectedResourceSpecifications; - } + * @generated + */ + public EList<Container> getConnectedContainer() { + if (connectedContainer == null) { + connectedContainer = new EObjectResolvingEList<Container>(Container.class, this, ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__CONNECTED_CONTAINER); + } + return connectedContainer; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ActiveResourceSpecification getParentResourceConfiguration() { - if (eContainerFeatureID() != ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION) return null; - return (ActiveResourceSpecification)eContainer(); - } + if (eContainerFeatureID() != ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION) return null; + return (ActiveResourceSpecification)eInternalContainer(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public NotificationChain basicSetParentResourceConfiguration(ActiveResourceSpecification newParentResourceConfiguration, NotificationChain msgs) { - msgs = eBasicSetContainer((InternalEObject)newParentResourceConfiguration, ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION, msgs); - return msgs; - } + msgs = eBasicSetContainer((InternalEObject)newParentResourceConfiguration, ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION, msgs); + return msgs; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setParentResourceConfiguration(ActiveResourceSpecification newParentResourceConfiguration) { - if (newParentResourceConfiguration != eInternalContainer() || (eContainerFeatureID() != ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION && newParentResourceConfiguration != null)) { - if (EcoreUtil.isAncestor(this, newParentResourceConfiguration)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newParentResourceConfiguration != null) - msgs = ((InternalEObject)newParentResourceConfiguration).eInverseAdd(this, ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES, ActiveResourceSpecification.class, msgs); - msgs = basicSetParentResourceConfiguration(newParentResourceConfiguration, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION, newParentResourceConfiguration, newParentResourceConfiguration)); - } + if (newParentResourceConfiguration != eInternalContainer() || (eContainerFeatureID() != ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION && newParentResourceConfiguration != null)) { + if (EcoreUtil.isAncestor(this, newParentResourceConfiguration)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newParentResourceConfiguration != null) + msgs = ((InternalEObject)newParentResourceConfiguration).eInverseAdd(this, ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES, ActiveResourceSpecification.class, msgs); + msgs = basicSetParentResourceConfiguration(newParentResourceConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION, newParentResourceConfiguration, newParentResourceConfiguration)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public double getBandwidth() { - return bandwidth; - } + return bandwidth; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setBandwidth(double newBandwidth) { - double oldBandwidth = bandwidth; - bandwidth = newBandwidth; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__BANDWIDTH, oldBandwidth, bandwidth)); - } + double oldBandwidth = bandwidth; + bandwidth = newBandwidth; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__BANDWIDTH, oldBandwidth, bandwidth)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public CommunicationLinkResourceType getCommunicationLinkResourceType() { - if (communicationLinkResourceType != null && communicationLinkResourceType.eIsProxy()) { - InternalEObject oldCommunicationLinkResourceType = (InternalEObject)communicationLinkResourceType; - communicationLinkResourceType = (CommunicationLinkResourceType)eResolveProxy(oldCommunicationLinkResourceType); - if (communicationLinkResourceType != oldCommunicationLinkResourceType) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE, oldCommunicationLinkResourceType, communicationLinkResourceType)); - } - } - return communicationLinkResourceType; - } + if (communicationLinkResourceType != null && communicationLinkResourceType.eIsProxy()) { + InternalEObject oldCommunicationLinkResourceType = (InternalEObject)communicationLinkResourceType; + communicationLinkResourceType = (CommunicationLinkResourceType)eResolveProxy(oldCommunicationLinkResourceType); + if (communicationLinkResourceType != oldCommunicationLinkResourceType) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE, oldCommunicationLinkResourceType, communicationLinkResourceType)); + } + } + return communicationLinkResourceType; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public CommunicationLinkResourceType basicGetCommunicationLinkResourceType() { - return communicationLinkResourceType; - } + return communicationLinkResourceType; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setCommunicationLinkResourceType(CommunicationLinkResourceType newCommunicationLinkResourceType) { - CommunicationLinkResourceType oldCommunicationLinkResourceType = communicationLinkResourceType; - communicationLinkResourceType = newCommunicationLinkResourceType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE, oldCommunicationLinkResourceType, communicationLinkResourceType)); - } + CommunicationLinkResourceType oldCommunicationLinkResourceType = communicationLinkResourceType; + communicationLinkResourceType = newCommunicationLinkResourceType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE, oldCommunicationLinkResourceType, communicationLinkResourceType)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetParentResourceConfiguration((ActiveResourceSpecification)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetParentResourceConfiguration((ActiveResourceSpecification)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION: - return basicSetParentResourceConfiguration(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION: + return basicSetParentResourceConfiguration(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { - switch (eContainerFeatureID()) { - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION: - return eInternalContainer().eInverseRemove(this, ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES, ActiveResourceSpecification.class, msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } + switch (eContainerFeatureID()) { + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION: + return eInternalContainer().eInverseRemove(this, ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES, ActiveResourceSpecification.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__CONNECTED_RESOURCE_SPECIFICATIONS: - return getConnectedResourceSpecifications(); - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION: - return getParentResourceConfiguration(); - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__BANDWIDTH: - return getBandwidth(); - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE: - if (resolve) return getCommunicationLinkResourceType(); - return basicGetCommunicationLinkResourceType(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__CONNECTED_CONTAINER: + return getConnectedContainer(); + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION: + return getParentResourceConfiguration(); + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__BANDWIDTH: + return getBandwidth(); + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE: + if (resolve) return getCommunicationLinkResourceType(); + return basicGetCommunicationLinkResourceType(); + } + return super.eGet(featureID, resolve, coreType); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__CONNECTED_RESOURCE_SPECIFICATIONS: - getConnectedResourceSpecifications().clear(); - getConnectedResourceSpecifications().addAll((Collection<? extends ActiveResourceSpecification>)newValue); - return; - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION: - setParentResourceConfiguration((ActiveResourceSpecification)newValue); - return; - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__BANDWIDTH: - setBandwidth((Double)newValue); - return; - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE: - setCommunicationLinkResourceType((CommunicationLinkResourceType)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__CONNECTED_CONTAINER: + getConnectedContainer().clear(); + getConnectedContainer().addAll((Collection<? extends Container>)newValue); + return; + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION: + setParentResourceConfiguration((ActiveResourceSpecification)newValue); + return; + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__BANDWIDTH: + setBandwidth((Double)newValue); + return; + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE: + setCommunicationLinkResourceType((CommunicationLinkResourceType)newValue); + return; + } + super.eSet(featureID, newValue); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void eUnset(int featureID) { - switch (featureID) { - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__CONNECTED_RESOURCE_SPECIFICATIONS: - getConnectedResourceSpecifications().clear(); - return; - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION: - setParentResourceConfiguration((ActiveResourceSpecification)null); - return; - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__BANDWIDTH: - setBandwidth(BANDWIDTH_EDEFAULT); - return; - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE: - setCommunicationLinkResourceType((CommunicationLinkResourceType)null); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__CONNECTED_CONTAINER: + getConnectedContainer().clear(); + return; + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION: + setParentResourceConfiguration((ActiveResourceSpecification)null); + return; + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__BANDWIDTH: + setBandwidth(BANDWIDTH_EDEFAULT); + return; + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE: + setCommunicationLinkResourceType((CommunicationLinkResourceType)null); + return; + } + super.eUnset(featureID); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public boolean eIsSet(int featureID) { - switch (featureID) { - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__CONNECTED_RESOURCE_SPECIFICATIONS: - return connectedResourceSpecifications != null && !connectedResourceSpecifications.isEmpty(); - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION: - return getParentResourceConfiguration() != null; - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__BANDWIDTH: - return bandwidth != BANDWIDTH_EDEFAULT; - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE: - return communicationLinkResourceType != null; - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__CONNECTED_CONTAINER: + return connectedContainer != null && !connectedContainer.isEmpty(); + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION: + return getParentResourceConfiguration() != null; + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__BANDWIDTH: + return bandwidth != BANDWIDTH_EDEFAULT; + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE: + return communicationLinkResourceType != null; + } + return super.eIsSet(featureID); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (bandwidth: "); - result.append(bandwidth); - result.append(')'); - return result.toString(); - } + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (bandwidth: "); + result.append(bandwidth); + result.append(')'); + return result.toString(); + } } //LinkingResourceSpecificationImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/NumberOfParallelProcessingUnitsImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/NumberOfParallelProcessingUnitsImpl.java index b3efaf19..ae9dd438 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/NumberOfParallelProcessingUnitsImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/NumberOfParallelProcessingUnitsImpl.java @@ -35,232 +35,232 @@ import org.eclipse.emf.ecore.util.EcoreUtil; */ public class NumberOfParallelProcessingUnitsImpl extends AdaptableEntityImpl implements NumberOfParallelProcessingUnits { /** - * The default value of the '{@link #getNumber() <em>Number</em>}' attribute. - * <!-- begin-user-doc --> + * The default value of the '{@link #getNumber() <em>Number</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getNumber() - * @generated - * @ordered - */ + * @see #getNumber() + * @generated + * @ordered + */ protected static final int NUMBER_EDEFAULT = 0; /** - * The cached value of the '{@link #getNumber() <em>Number</em>}' attribute. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getNumber() <em>Number</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getNumber() - * @generated - * @ordered - */ + * @see #getNumber() + * @generated + * @ordered + */ protected int number = NUMBER_EDEFAULT; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected NumberOfParallelProcessingUnitsImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourceconfigurationPackage.Literals.NUMBER_OF_PARALLEL_PROCESSING_UNITS; - } + return ResourceconfigurationPackage.Literals.NUMBER_OF_PARALLEL_PROCESSING_UNITS; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public int getNumber() { - return number; - } + return number; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setNumber(int newNumber) { - int oldNumber = number; - number = newNumber; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER, oldNumber, number)); - } + int oldNumber = number; + number = newNumber; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER, oldNumber, number)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ProcessingResourceSpecification getProcessingResourceSpec() { - if (eContainerFeatureID() != ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC) return null; - return (ProcessingResourceSpecification)eContainer(); - } + if (eContainerFeatureID() != ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC) return null; + return (ProcessingResourceSpecification)eInternalContainer(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public NotificationChain basicSetProcessingResourceSpec(ProcessingResourceSpecification newProcessingResourceSpec, NotificationChain msgs) { - msgs = eBasicSetContainer((InternalEObject)newProcessingResourceSpec, ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC, msgs); - return msgs; - } + msgs = eBasicSetContainer((InternalEObject)newProcessingResourceSpec, ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC, msgs); + return msgs; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setProcessingResourceSpec(ProcessingResourceSpecification newProcessingResourceSpec) { - if (newProcessingResourceSpec != eInternalContainer() || (eContainerFeatureID() != ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC && newProcessingResourceSpec != null)) { - if (EcoreUtil.isAncestor(this, newProcessingResourceSpec)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newProcessingResourceSpec != null) - msgs = ((InternalEObject)newProcessingResourceSpec).eInverseAdd(this, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS, ProcessingResourceSpecification.class, msgs); - msgs = basicSetProcessingResourceSpec(newProcessingResourceSpec, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC, newProcessingResourceSpec, newProcessingResourceSpec)); - } + if (newProcessingResourceSpec != eInternalContainer() || (eContainerFeatureID() != ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC && newProcessingResourceSpec != null)) { + if (EcoreUtil.isAncestor(this, newProcessingResourceSpec)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newProcessingResourceSpec != null) + msgs = ((InternalEObject)newProcessingResourceSpec).eInverseAdd(this, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS, ProcessingResourceSpecification.class, msgs); + msgs = basicSetProcessingResourceSpec(newProcessingResourceSpec, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC, newProcessingResourceSpec, newProcessingResourceSpec)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetProcessingResourceSpec((ProcessingResourceSpecification)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetProcessingResourceSpec((ProcessingResourceSpecification)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC: - return basicSetProcessingResourceSpec(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC: + return basicSetProcessingResourceSpec(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { - switch (eContainerFeatureID()) { - case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC: - return eInternalContainer().eInverseRemove(this, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS, ProcessingResourceSpecification.class, msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } + switch (eContainerFeatureID()) { + case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC: + return eInternalContainer().eInverseRemove(this, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS, ProcessingResourceSpecification.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER: - return getNumber(); - case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC: - return getProcessingResourceSpec(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER: + return getNumber(); + case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC: + return getProcessingResourceSpec(); + } + return super.eGet(featureID, resolve, coreType); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER: - setNumber((Integer)newValue); - return; - case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC: - setProcessingResourceSpec((ProcessingResourceSpecification)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER: + setNumber((Integer)newValue); + return; + case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC: + setProcessingResourceSpec((ProcessingResourceSpecification)newValue); + return; + } + super.eSet(featureID, newValue); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void eUnset(int featureID) { - switch (featureID) { - case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER: - setNumber(NUMBER_EDEFAULT); - return; - case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC: - setProcessingResourceSpec((ProcessingResourceSpecification)null); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER: + setNumber(NUMBER_EDEFAULT); + return; + case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC: + setProcessingResourceSpec((ProcessingResourceSpecification)null); + return; + } + super.eUnset(featureID); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public boolean eIsSet(int featureID) { - switch (featureID) { - case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER: - return number != NUMBER_EDEFAULT; - case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC: - return getProcessingResourceSpec() != null; - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER: + return number != NUMBER_EDEFAULT; + case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC: + return getProcessingResourceSpec() != null; + } + return super.eIsSet(featureID); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String toString() { - if (eIsProxy()) return super.toString(); + if (eIsProxy()) return super.toString(); - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (number: "); - result.append(number); - result.append(')'); - return result.toString(); - } + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (number: "); + result.append(number); + result.append(')'); + return result.toString(); + } } //NumberOfParallelProcessingUnitsImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/PassiveResourceCapacityImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/PassiveResourceCapacityImpl.java index 357c0871..aa654558 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/PassiveResourceCapacityImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/PassiveResourceCapacityImpl.java @@ -31,137 +31,137 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl; */ public class PassiveResourceCapacityImpl extends AdaptableEntityImpl implements PassiveResourceCapacity { /** - * The default value of the '{@link #getCapacity() <em>Capacity</em>}' attribute. - * <!-- begin-user-doc --> + * The default value of the '{@link #getCapacity() <em>Capacity</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getCapacity() - * @generated - * @ordered - */ + * @see #getCapacity() + * @generated + * @ordered + */ protected static final BigInteger CAPACITY_EDEFAULT = null; /** - * The cached value of the '{@link #getCapacity() <em>Capacity</em>}' attribute. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getCapacity() <em>Capacity</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getCapacity() - * @generated - * @ordered - */ + * @see #getCapacity() + * @generated + * @ordered + */ protected BigInteger capacity = CAPACITY_EDEFAULT; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected PassiveResourceCapacityImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourceconfigurationPackage.Literals.PASSIVE_RESOURCE_CAPACITY; - } + return ResourceconfigurationPackage.Literals.PASSIVE_RESOURCE_CAPACITY; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public BigInteger getCapacity() { - return capacity; - } + return capacity; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setCapacity(BigInteger newCapacity) { - BigInteger oldCapacity = capacity; - capacity = newCapacity; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PASSIVE_RESOURCE_CAPACITY__CAPACITY, oldCapacity, capacity)); - } + BigInteger oldCapacity = capacity; + capacity = newCapacity; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PASSIVE_RESOURCE_CAPACITY__CAPACITY, oldCapacity, capacity)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ResourceconfigurationPackage.PASSIVE_RESOURCE_CAPACITY__CAPACITY: - return getCapacity(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourceconfigurationPackage.PASSIVE_RESOURCE_CAPACITY__CAPACITY: + return getCapacity(); + } + return super.eGet(featureID, resolve, coreType); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ResourceconfigurationPackage.PASSIVE_RESOURCE_CAPACITY__CAPACITY: - setCapacity((BigInteger)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourceconfigurationPackage.PASSIVE_RESOURCE_CAPACITY__CAPACITY: + setCapacity((BigInteger)newValue); + return; + } + super.eSet(featureID, newValue); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void eUnset(int featureID) { - switch (featureID) { - case ResourceconfigurationPackage.PASSIVE_RESOURCE_CAPACITY__CAPACITY: - setCapacity(CAPACITY_EDEFAULT); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourceconfigurationPackage.PASSIVE_RESOURCE_CAPACITY__CAPACITY: + setCapacity(CAPACITY_EDEFAULT); + return; + } + super.eUnset(featureID); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public boolean eIsSet(int featureID) { - switch (featureID) { - case ResourceconfigurationPackage.PASSIVE_RESOURCE_CAPACITY__CAPACITY: - return CAPACITY_EDEFAULT == null ? capacity != null : !CAPACITY_EDEFAULT.equals(capacity); - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourceconfigurationPackage.PASSIVE_RESOURCE_CAPACITY__CAPACITY: + return CAPACITY_EDEFAULT == null ? capacity != null : !CAPACITY_EDEFAULT.equals(capacity); + } + return super.eIsSet(featureID); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (capacity: "); - result.append(capacity); - result.append(')'); - return result.toString(); - } + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (capacity: "); + result.append(capacity); + result.append(')'); + return result.toString(); + } } //PassiveResourceCapacityImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/PassiveResourceSpecificationImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/PassiveResourceSpecificationImpl.java index a1e31c47..36d89caa 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/PassiveResourceSpecificationImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/PassiveResourceSpecificationImpl.java @@ -33,206 +33,206 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl; */ public class PassiveResourceSpecificationImpl extends ConfigurationSpecificationImpl implements PassiveResourceSpecification { /** - * The cached value of the '{@link #getCapacity() <em>Capacity</em>}' containment reference. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getCapacity() <em>Capacity</em>}' containment reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getCapacity() - * @generated - * @ordered - */ + * @see #getCapacity() + * @generated + * @ordered + */ protected PassiveResourceCapacity capacity; /** - * The cached value of the '{@link #getPassiveResourceType() <em>Passive Resource Type</em>}' reference. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getPassiveResourceType() <em>Passive Resource Type</em>}' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getPassiveResourceType() - * @generated - * @ordered - */ + * @see #getPassiveResourceType() + * @generated + * @ordered + */ protected PassiveResourceType passiveResourceType; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected PassiveResourceSpecificationImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourceconfigurationPackage.Literals.PASSIVE_RESOURCE_SPECIFICATION; - } + return ResourceconfigurationPackage.Literals.PASSIVE_RESOURCE_SPECIFICATION; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public PassiveResourceCapacity getCapacity() { - return capacity; - } + return capacity; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public NotificationChain basicSetCapacity(PassiveResourceCapacity newCapacity, NotificationChain msgs) { - PassiveResourceCapacity oldCapacity = capacity; - capacity = newCapacity; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY, oldCapacity, newCapacity); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } + PassiveResourceCapacity oldCapacity = capacity; + capacity = newCapacity; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY, oldCapacity, newCapacity); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setCapacity(PassiveResourceCapacity newCapacity) { - if (newCapacity != capacity) { - NotificationChain msgs = null; - if (capacity != null) - msgs = ((InternalEObject)capacity).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY, null, msgs); - if (newCapacity != null) - msgs = ((InternalEObject)newCapacity).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY, null, msgs); - msgs = basicSetCapacity(newCapacity, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY, newCapacity, newCapacity)); - } + if (newCapacity != capacity) { + NotificationChain msgs = null; + if (capacity != null) + msgs = ((InternalEObject)capacity).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY, null, msgs); + if (newCapacity != null) + msgs = ((InternalEObject)newCapacity).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY, null, msgs); + msgs = basicSetCapacity(newCapacity, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY, newCapacity, newCapacity)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public PassiveResourceType getPassiveResourceType() { - if (passiveResourceType != null && passiveResourceType.eIsProxy()) { - InternalEObject oldPassiveResourceType = (InternalEObject)passiveResourceType; - passiveResourceType = (PassiveResourceType)eResolveProxy(oldPassiveResourceType); - if (passiveResourceType != oldPassiveResourceType) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE, oldPassiveResourceType, passiveResourceType)); - } - } - return passiveResourceType; - } + if (passiveResourceType != null && passiveResourceType.eIsProxy()) { + InternalEObject oldPassiveResourceType = (InternalEObject)passiveResourceType; + passiveResourceType = (PassiveResourceType)eResolveProxy(oldPassiveResourceType); + if (passiveResourceType != oldPassiveResourceType) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE, oldPassiveResourceType, passiveResourceType)); + } + } + return passiveResourceType; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public PassiveResourceType basicGetPassiveResourceType() { - return passiveResourceType; - } + return passiveResourceType; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setPassiveResourceType(PassiveResourceType newPassiveResourceType) { - PassiveResourceType oldPassiveResourceType = passiveResourceType; - passiveResourceType = newPassiveResourceType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE, oldPassiveResourceType, passiveResourceType)); - } + PassiveResourceType oldPassiveResourceType = passiveResourceType; + passiveResourceType = newPassiveResourceType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE, oldPassiveResourceType, passiveResourceType)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY: - return basicSetCapacity(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY: + return basicSetCapacity(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY: - return getCapacity(); - case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE: - if (resolve) return getPassiveResourceType(); - return basicGetPassiveResourceType(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY: + return getCapacity(); + case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE: + if (resolve) return getPassiveResourceType(); + return basicGetPassiveResourceType(); + } + return super.eGet(featureID, resolve, coreType); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY: - setCapacity((PassiveResourceCapacity)newValue); - return; - case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE: - setPassiveResourceType((PassiveResourceType)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY: + setCapacity((PassiveResourceCapacity)newValue); + return; + case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE: + setPassiveResourceType((PassiveResourceType)newValue); + return; + } + super.eSet(featureID, newValue); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void eUnset(int featureID) { - switch (featureID) { - case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY: - setCapacity((PassiveResourceCapacity)null); - return; - case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE: - setPassiveResourceType((PassiveResourceType)null); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY: + setCapacity((PassiveResourceCapacity)null); + return; + case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE: + setPassiveResourceType((PassiveResourceType)null); + return; + } + super.eUnset(featureID); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public boolean eIsSet(int featureID) { - switch (featureID) { - case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY: - return capacity != null; - case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE: - return passiveResourceType != null; - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__CAPACITY: + return capacity != null; + case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE: + return passiveResourceType != null; + } + return super.eIsSet(featureID); + } } //PassiveResourceSpecificationImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ProcessingResourceSpecificationImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ProcessingResourceSpecificationImpl.java index dee1754a..0a59803c 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ProcessingResourceSpecificationImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ProcessingResourceSpecificationImpl.java @@ -41,413 +41,413 @@ import org.eclipse.emf.ecore.util.EcoreUtil; */ public class ProcessingResourceSpecificationImpl extends EntityImpl implements ProcessingResourceSpecification { /** - * The default value of the '{@link #getSchedulingPolicy() <em>Scheduling Policy</em>}' attribute. - * <!-- begin-user-doc --> + * The default value of the '{@link #getSchedulingPolicy() <em>Scheduling Policy</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getSchedulingPolicy() - * @generated - * @ordered - */ + * @see #getSchedulingPolicy() + * @generated + * @ordered + */ protected static final SchedulingPolicy SCHEDULING_POLICY_EDEFAULT = SchedulingPolicy.DELAY; /** - * The cached value of the '{@link #getSchedulingPolicy() <em>Scheduling Policy</em>}' attribute. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getSchedulingPolicy() <em>Scheduling Policy</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getSchedulingPolicy() - * @generated - * @ordered - */ + * @see #getSchedulingPolicy() + * @generated + * @ordered + */ protected SchedulingPolicy schedulingPolicy = SCHEDULING_POLICY_EDEFAULT; /** - * The default value of the '{@link #getProcessingRate() <em>Processing Rate</em>}' attribute. - * <!-- begin-user-doc --> + * The default value of the '{@link #getProcessingRate() <em>Processing Rate</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getProcessingRate() - * @generated - * @ordered - */ + * @see #getProcessingRate() + * @generated + * @ordered + */ protected static final double PROCESSING_RATE_EDEFAULT = 0.0; /** - * The cached value of the '{@link #getProcessingRate() <em>Processing Rate</em>}' attribute. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getProcessingRate() <em>Processing Rate</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getProcessingRate() - * @generated - * @ordered - */ + * @see #getProcessingRate() + * @generated + * @ordered + */ protected double processingRate = PROCESSING_RATE_EDEFAULT; /** - * The cached value of the '{@link #getActiveResourceType() <em>Active Resource Type</em>}' reference. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getActiveResourceType() <em>Active Resource Type</em>}' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getActiveResourceType() - * @generated - * @ordered - */ + * @see #getActiveResourceType() + * @generated + * @ordered + */ protected ProcessingResourceType activeResourceType; /** - * The cached value of the '{@link #getNrOfParProcUnits() <em>Nr Of Par Proc Units</em>}' containment reference. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getNrOfParProcUnits() <em>Nr Of Par Proc Units</em>}' containment reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getNrOfParProcUnits() - * @generated - * @ordered - */ + * @see #getNrOfParProcUnits() + * @generated + * @ordered + */ protected NumberOfParallelProcessingUnits nrOfParProcUnits; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ProcessingResourceSpecificationImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourceconfigurationPackage.Literals.PROCESSING_RESOURCE_SPECIFICATION; - } + return ResourceconfigurationPackage.Literals.PROCESSING_RESOURCE_SPECIFICATION; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public SchedulingPolicy getSchedulingPolicy() { - return schedulingPolicy; - } + return schedulingPolicy; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setSchedulingPolicy(SchedulingPolicy newSchedulingPolicy) { - SchedulingPolicy oldSchedulingPolicy = schedulingPolicy; - schedulingPolicy = newSchedulingPolicy == null ? SCHEDULING_POLICY_EDEFAULT : newSchedulingPolicy; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY, oldSchedulingPolicy, schedulingPolicy)); - } + SchedulingPolicy oldSchedulingPolicy = schedulingPolicy; + schedulingPolicy = newSchedulingPolicy == null ? SCHEDULING_POLICY_EDEFAULT : newSchedulingPolicy; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY, oldSchedulingPolicy, schedulingPolicy)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public double getProcessingRate() { - return processingRate; - } + return processingRate; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setProcessingRate(double newProcessingRate) { - double oldProcessingRate = processingRate; - processingRate = newProcessingRate; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE, oldProcessingRate, processingRate)); - } + double oldProcessingRate = processingRate; + processingRate = newProcessingRate; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE, oldProcessingRate, processingRate)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ProcessingResourceType getActiveResourceType() { - if (activeResourceType != null && activeResourceType.eIsProxy()) { - InternalEObject oldActiveResourceType = (InternalEObject)activeResourceType; - activeResourceType = (ProcessingResourceType)eResolveProxy(oldActiveResourceType); - if (activeResourceType != oldActiveResourceType) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE, oldActiveResourceType, activeResourceType)); - } - } - return activeResourceType; - } + if (activeResourceType != null && activeResourceType.eIsProxy()) { + InternalEObject oldActiveResourceType = (InternalEObject)activeResourceType; + activeResourceType = (ProcessingResourceType)eResolveProxy(oldActiveResourceType); + if (activeResourceType != oldActiveResourceType) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE, oldActiveResourceType, activeResourceType)); + } + } + return activeResourceType; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ProcessingResourceType basicGetActiveResourceType() { - return activeResourceType; - } + return activeResourceType; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setActiveResourceType(ProcessingResourceType newActiveResourceType) { - ProcessingResourceType oldActiveResourceType = activeResourceType; - activeResourceType = newActiveResourceType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE, oldActiveResourceType, activeResourceType)); - } + ProcessingResourceType oldActiveResourceType = activeResourceType; + activeResourceType = newActiveResourceType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE, oldActiveResourceType, activeResourceType)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ActiveResourceSpecification getParentResourceSpecification() { - if (eContainerFeatureID() != ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION) return null; - return (ActiveResourceSpecification)eContainer(); - } + if (eContainerFeatureID() != ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION) return null; + return (ActiveResourceSpecification)eInternalContainer(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public NotificationChain basicSetParentResourceSpecification(ActiveResourceSpecification newParentResourceSpecification, NotificationChain msgs) { - msgs = eBasicSetContainer((InternalEObject)newParentResourceSpecification, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION, msgs); - return msgs; - } + msgs = eBasicSetContainer((InternalEObject)newParentResourceSpecification, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION, msgs); + return msgs; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setParentResourceSpecification(ActiveResourceSpecification newParentResourceSpecification) { - if (newParentResourceSpecification != eInternalContainer() || (eContainerFeatureID() != ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION && newParentResourceSpecification != null)) { - if (EcoreUtil.isAncestor(this, newParentResourceSpecification)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newParentResourceSpecification != null) - msgs = ((InternalEObject)newParentResourceSpecification).eInverseAdd(this, ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS, ActiveResourceSpecification.class, msgs); - msgs = basicSetParentResourceSpecification(newParentResourceSpecification, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION, newParentResourceSpecification, newParentResourceSpecification)); - } + if (newParentResourceSpecification != eInternalContainer() || (eContainerFeatureID() != ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION && newParentResourceSpecification != null)) { + if (EcoreUtil.isAncestor(this, newParentResourceSpecification)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newParentResourceSpecification != null) + msgs = ((InternalEObject)newParentResourceSpecification).eInverseAdd(this, ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS, ActiveResourceSpecification.class, msgs); + msgs = basicSetParentResourceSpecification(newParentResourceSpecification, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION, newParentResourceSpecification, newParentResourceSpecification)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public NumberOfParallelProcessingUnits getNrOfParProcUnits() { - return nrOfParProcUnits; - } + return nrOfParProcUnits; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public NotificationChain basicSetNrOfParProcUnits(NumberOfParallelProcessingUnits newNrOfParProcUnits, NotificationChain msgs) { - NumberOfParallelProcessingUnits oldNrOfParProcUnits = nrOfParProcUnits; - nrOfParProcUnits = newNrOfParProcUnits; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS, oldNrOfParProcUnits, newNrOfParProcUnits); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } + NumberOfParallelProcessingUnits oldNrOfParProcUnits = nrOfParProcUnits; + nrOfParProcUnits = newNrOfParProcUnits; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS, oldNrOfParProcUnits, newNrOfParProcUnits); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setNrOfParProcUnits(NumberOfParallelProcessingUnits newNrOfParProcUnits) { - if (newNrOfParProcUnits != nrOfParProcUnits) { - NotificationChain msgs = null; - if (nrOfParProcUnits != null) - msgs = ((InternalEObject)nrOfParProcUnits).eInverseRemove(this, ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC, NumberOfParallelProcessingUnits.class, msgs); - if (newNrOfParProcUnits != null) - msgs = ((InternalEObject)newNrOfParProcUnits).eInverseAdd(this, ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC, NumberOfParallelProcessingUnits.class, msgs); - msgs = basicSetNrOfParProcUnits(newNrOfParProcUnits, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS, newNrOfParProcUnits, newNrOfParProcUnits)); - } + if (newNrOfParProcUnits != nrOfParProcUnits) { + NotificationChain msgs = null; + if (nrOfParProcUnits != null) + msgs = ((InternalEObject)nrOfParProcUnits).eInverseRemove(this, ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC, NumberOfParallelProcessingUnits.class, msgs); + if (newNrOfParProcUnits != null) + msgs = ((InternalEObject)newNrOfParProcUnits).eInverseAdd(this, ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC, NumberOfParallelProcessingUnits.class, msgs); + msgs = basicSetNrOfParProcUnits(newNrOfParProcUnits, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS, newNrOfParProcUnits, newNrOfParProcUnits)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetParentResourceSpecification((ActiveResourceSpecification)otherEnd, msgs); - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS: - if (nrOfParProcUnits != null) - msgs = ((InternalEObject)nrOfParProcUnits).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS, null, msgs); - return basicSetNrOfParProcUnits((NumberOfParallelProcessingUnits)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetParentResourceSpecification((ActiveResourceSpecification)otherEnd, msgs); + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS: + if (nrOfParProcUnits != null) + msgs = ((InternalEObject)nrOfParProcUnits).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS, null, msgs); + return basicSetNrOfParProcUnits((NumberOfParallelProcessingUnits)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION: - return basicSetParentResourceSpecification(null, msgs); - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS: - return basicSetNrOfParProcUnits(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION: + return basicSetParentResourceSpecification(null, msgs); + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS: + return basicSetNrOfParProcUnits(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { - switch (eContainerFeatureID()) { - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION: - return eInternalContainer().eInverseRemove(this, ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS, ActiveResourceSpecification.class, msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } + switch (eContainerFeatureID()) { + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION: + return eInternalContainer().eInverseRemove(this, ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS, ActiveResourceSpecification.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY: - return getSchedulingPolicy(); - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE: - return getProcessingRate(); - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE: - if (resolve) return getActiveResourceType(); - return basicGetActiveResourceType(); - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION: - return getParentResourceSpecification(); - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS: - return getNrOfParProcUnits(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY: + return getSchedulingPolicy(); + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE: + return getProcessingRate(); + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE: + if (resolve) return getActiveResourceType(); + return basicGetActiveResourceType(); + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION: + return getParentResourceSpecification(); + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS: + return getNrOfParProcUnits(); + } + return super.eGet(featureID, resolve, coreType); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void eSet(int featureID, Object newValue) { - switch (featureID) { - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY: - setSchedulingPolicy((SchedulingPolicy)newValue); - return; - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE: - setProcessingRate((Double)newValue); - return; - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE: - setActiveResourceType((ProcessingResourceType)newValue); - return; - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION: - setParentResourceSpecification((ActiveResourceSpecification)newValue); - return; - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS: - setNrOfParProcUnits((NumberOfParallelProcessingUnits)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY: + setSchedulingPolicy((SchedulingPolicy)newValue); + return; + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE: + setProcessingRate((Double)newValue); + return; + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE: + setActiveResourceType((ProcessingResourceType)newValue); + return; + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION: + setParentResourceSpecification((ActiveResourceSpecification)newValue); + return; + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS: + setNrOfParProcUnits((NumberOfParallelProcessingUnits)newValue); + return; + } + super.eSet(featureID, newValue); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public void eUnset(int featureID) { - switch (featureID) { - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY: - setSchedulingPolicy(SCHEDULING_POLICY_EDEFAULT); - return; - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE: - setProcessingRate(PROCESSING_RATE_EDEFAULT); - return; - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE: - setActiveResourceType((ProcessingResourceType)null); - return; - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION: - setParentResourceSpecification((ActiveResourceSpecification)null); - return; - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS: - setNrOfParProcUnits((NumberOfParallelProcessingUnits)null); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY: + setSchedulingPolicy(SCHEDULING_POLICY_EDEFAULT); + return; + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE: + setProcessingRate(PROCESSING_RATE_EDEFAULT); + return; + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE: + setActiveResourceType((ProcessingResourceType)null); + return; + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION: + setParentResourceSpecification((ActiveResourceSpecification)null); + return; + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS: + setNrOfParProcUnits((NumberOfParallelProcessingUnits)null); + return; + } + super.eUnset(featureID); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public boolean eIsSet(int featureID) { - switch (featureID) { - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY: - return schedulingPolicy != SCHEDULING_POLICY_EDEFAULT; - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE: - return processingRate != PROCESSING_RATE_EDEFAULT; - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE: - return activeResourceType != null; - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION: - return getParentResourceSpecification() != null; - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS: - return nrOfParProcUnits != null; - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY: + return schedulingPolicy != SCHEDULING_POLICY_EDEFAULT; + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE: + return processingRate != PROCESSING_RATE_EDEFAULT; + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE: + return activeResourceType != null; + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION: + return getParentResourceSpecification() != null; + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS: + return nrOfParProcUnits != null; + } + return super.eIsSet(featureID); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (schedulingPolicy: "); - result.append(schedulingPolicy); - result.append(", processingRate: "); - result.append(processingRate); - result.append(')'); - return result.toString(); - } + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (schedulingPolicy: "); + result.append(schedulingPolicy); + result.append(", processingRate: "); + result.append(processingRate); + result.append(')'); + return result.toString(); + } } //ProcessingResourceSpecificationImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ResourceconfigurationFactoryImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ResourceconfigurationFactoryImpl.java index 64b261c9..7f220534 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ResourceconfigurationFactoryImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ResourceconfigurationFactoryImpl.java @@ -22,192 +22,192 @@ import org.eclipse.emf.ecore.plugin.EcorePlugin; */ public class ResourceconfigurationFactoryImpl extends EFactoryImpl implements ResourceconfigurationFactory { /** - * Creates the default factory implementation. - * <!-- begin-user-doc --> + * Creates the default factory implementation. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static ResourceconfigurationFactory init() { - try { - ResourceconfigurationFactory theResourceconfigurationFactory = (ResourceconfigurationFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.descartes-research.net/metamodel/resourceconfiguration/1.0"); - if (theResourceconfigurationFactory != null) { - return theResourceconfigurationFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new ResourceconfigurationFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + try { + ResourceconfigurationFactory theResourceconfigurationFactory = (ResourceconfigurationFactory)EPackage.Registry.INSTANCE.getEFactory(ResourceconfigurationPackage.eNS_URI); + if (theResourceconfigurationFactory != null) { + return theResourceconfigurationFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ResourceconfigurationFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public ResourceconfigurationFactoryImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION: return createProcessingResourceSpecification(); - case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS: return createNumberOfParallelProcessingUnits(); - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION: return createLinkingResourceSpecification(); - case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION: return createActiveResourceSpecification(); - case ResourceconfigurationPackage.CUSTOM_CONFIGURATION_SPECIFICATION: return createCustomConfigurationSpecification(); - case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION: return createPassiveResourceSpecification(); - case ResourceconfigurationPackage.PASSIVE_RESOURCE_CAPACITY: return createPassiveResourceCapacity(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + switch (eClass.getClassifierID()) { + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION: return createProcessingResourceSpecification(); + case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS: return createNumberOfParallelProcessingUnits(); + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION: return createLinkingResourceSpecification(); + case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION: return createActiveResourceSpecification(); + case ResourceconfigurationPackage.CUSTOM_CONFIGURATION_SPECIFICATION: return createCustomConfigurationSpecification(); + case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION: return createPassiveResourceSpecification(); + case ResourceconfigurationPackage.PASSIVE_RESOURCE_CAPACITY: return createPassiveResourceCapacity(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ @Override public Object createFromString(EDataType eDataType, String initialValue) { - switch (eDataType.getClassifierID()) { - case ResourceconfigurationPackage.SCHEDULING_POLICY: - return createSchedulingPolicyFromString(eDataType, initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } + switch (eDataType.getClassifierID()) { + case ResourceconfigurationPackage.SCHEDULING_POLICY: + return createSchedulingPolicyFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public String convertToString(EDataType eDataType, Object instanceValue) { - switch (eDataType.getClassifierID()) { - case ResourceconfigurationPackage.SCHEDULING_POLICY: - return convertSchedulingPolicyToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } + switch (eDataType.getClassifierID()) { + case ResourceconfigurationPackage.SCHEDULING_POLICY: + return convertSchedulingPolicyToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ProcessingResourceSpecification createProcessingResourceSpecification() { - ProcessingResourceSpecificationImpl processingResourceSpecification = new ProcessingResourceSpecificationImpl(); - return processingResourceSpecification; - } + ProcessingResourceSpecificationImpl processingResourceSpecification = new ProcessingResourceSpecificationImpl(); + return processingResourceSpecification; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public NumberOfParallelProcessingUnits createNumberOfParallelProcessingUnits() { - NumberOfParallelProcessingUnitsImpl numberOfParallelProcessingUnits = new NumberOfParallelProcessingUnitsImpl(); - return numberOfParallelProcessingUnits; - } + NumberOfParallelProcessingUnitsImpl numberOfParallelProcessingUnits = new NumberOfParallelProcessingUnitsImpl(); + return numberOfParallelProcessingUnits; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public LinkingResourceSpecification createLinkingResourceSpecification() { - LinkingResourceSpecificationImpl linkingResourceSpecification = new LinkingResourceSpecificationImpl(); - return linkingResourceSpecification; - } + LinkingResourceSpecificationImpl linkingResourceSpecification = new LinkingResourceSpecificationImpl(); + return linkingResourceSpecification; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ActiveResourceSpecification createActiveResourceSpecification() { - ActiveResourceSpecificationImpl activeResourceSpecification = new ActiveResourceSpecificationImpl(); - return activeResourceSpecification; - } + ActiveResourceSpecificationImpl activeResourceSpecification = new ActiveResourceSpecificationImpl(); + return activeResourceSpecification; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public CustomConfigurationSpecification createCustomConfigurationSpecification() { - CustomConfigurationSpecificationImpl customConfigurationSpecification = new CustomConfigurationSpecificationImpl(); - return customConfigurationSpecification; - } + CustomConfigurationSpecificationImpl customConfigurationSpecification = new CustomConfigurationSpecificationImpl(); + return customConfigurationSpecification; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public PassiveResourceSpecification createPassiveResourceSpecification() { - PassiveResourceSpecificationImpl passiveResourceSpecification = new PassiveResourceSpecificationImpl(); - return passiveResourceSpecification; - } + PassiveResourceSpecificationImpl passiveResourceSpecification = new PassiveResourceSpecificationImpl(); + return passiveResourceSpecification; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public PassiveResourceCapacity createPassiveResourceCapacity() { - PassiveResourceCapacityImpl passiveResourceCapacity = new PassiveResourceCapacityImpl(); - return passiveResourceCapacity; - } + PassiveResourceCapacityImpl passiveResourceCapacity = new PassiveResourceCapacityImpl(); + return passiveResourceCapacity; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public SchedulingPolicy createSchedulingPolicyFromString(EDataType eDataType, String initialValue) { - SchedulingPolicy result = SchedulingPolicy.get(initialValue); - if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); - return result; - } + SchedulingPolicy result = SchedulingPolicy.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public String convertSchedulingPolicyToString(EDataType eDataType, Object instanceValue) { - return instanceValue == null ? null : instanceValue.toString(); - } + return instanceValue == null ? null : instanceValue.toString(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourceconfigurationPackage getResourceconfigurationPackage() { - return (ResourceconfigurationPackage)getEPackage(); - } + return (ResourceconfigurationPackage)getEPackage(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @deprecated - * @generated - */ + * @deprecated + * @generated + */ @Deprecated public static ResourceconfigurationPackage getPackage() { - return ResourceconfigurationPackage.eINSTANCE; - } + return ResourceconfigurationPackage.eINSTANCE; + } } //ResourceconfigurationFactoryImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ResourceconfigurationPackageImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ResourceconfigurationPackageImpl.java index c1b9fecc..dedf61f7 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ResourceconfigurationPackageImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/impl/ResourceconfigurationPackageImpl.java @@ -50,550 +50,551 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; */ public class ResourceconfigurationPackageImpl extends EPackageImpl implements ResourceconfigurationPackage { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass configurationSpecificationEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass processingResourceSpecificationEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass numberOfParallelProcessingUnitsEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass linkingResourceSpecificationEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass activeResourceSpecificationEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass customConfigurationSpecificationEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass passiveResourceSpecificationEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass passiveResourceCapacityEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass customResourceConfigurationModelEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EEnum schedulingPolicyEEnum = null; /** - * Creates an instance of the model <b>Package</b>, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - * <p>Note: the correct way to create the package is via the static - * factory method {@link #init init()}, which also performs - * initialization of the package, or returns the registered package, - * if one already exists. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#eNS_URI - * @see #init() - * @generated - */ + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ResourceconfigurationPackage#eNS_URI + * @see #init() + * @generated + */ private ResourceconfigurationPackageImpl() { - super(eNS_URI, ResourceconfigurationFactory.eINSTANCE); - } + super(eNS_URI, ResourceconfigurationFactory.eINSTANCE); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private static boolean isInited = false; /** - * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. - * - * <p>This method is used to initialize {@link ResourceconfigurationPackage#eINSTANCE} when that field is accessed. - * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. - * <!-- begin-user-doc --> + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>This method is used to initialize {@link ResourceconfigurationPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ public static ResourceconfigurationPackage init() { - if (isInited) return (ResourceconfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI); + if (isInited) return (ResourceconfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI); - // Obtain or create and register package - ResourceconfigurationPackageImpl theResourceconfigurationPackage = (ResourceconfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ResourceconfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ResourceconfigurationPackageImpl()); + // Obtain or create and register package + ResourceconfigurationPackageImpl theResourceconfigurationPackage = (ResourceconfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ResourceconfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ResourceconfigurationPackageImpl()); - isInited = true; + isInited = true; - // Initialize simple dependencies - CorePackage.eINSTANCE.eClass(); + // Initialize simple dependencies + CorePackage.eINSTANCE.eClass(); - // Obtain or create and register interdependencies - ResourcelandscapePackageImpl theResourcelandscapePackage = (ResourcelandscapePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ResourcelandscapePackage.eNS_URI) instanceof ResourcelandscapePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ResourcelandscapePackage.eNS_URI) : ResourcelandscapePackage.eINSTANCE); - ContainerrepositoryPackageImpl theContainerrepositoryPackage = (ContainerrepositoryPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ContainerrepositoryPackage.eNS_URI) instanceof ContainerrepositoryPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ContainerrepositoryPackage.eNS_URI) : ContainerrepositoryPackage.eINSTANCE); - RuntimeenvironmentclassesPackageImpl theRuntimeenvironmentclassesPackage = (RuntimeenvironmentclassesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(RuntimeenvironmentclassesPackage.eNS_URI) instanceof RuntimeenvironmentclassesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RuntimeenvironmentclassesPackage.eNS_URI) : RuntimeenvironmentclassesPackage.eINSTANCE); - ResourcetypePackageImpl theResourcetypePackage = (ResourcetypePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ResourcetypePackage.eNS_URI) instanceof ResourcetypePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ResourcetypePackage.eNS_URI) : ResourcetypePackage.eINSTANCE); + // Obtain or create and register interdependencies + ResourcelandscapePackageImpl theResourcelandscapePackage = (ResourcelandscapePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ResourcelandscapePackage.eNS_URI) instanceof ResourcelandscapePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ResourcelandscapePackage.eNS_URI) : ResourcelandscapePackage.eINSTANCE); + ContainerrepositoryPackageImpl theContainerrepositoryPackage = (ContainerrepositoryPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ContainerrepositoryPackage.eNS_URI) instanceof ContainerrepositoryPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ContainerrepositoryPackage.eNS_URI) : ContainerrepositoryPackage.eINSTANCE); + RuntimeenvironmentclassesPackageImpl theRuntimeenvironmentclassesPackage = (RuntimeenvironmentclassesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(RuntimeenvironmentclassesPackage.eNS_URI) instanceof RuntimeenvironmentclassesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RuntimeenvironmentclassesPackage.eNS_URI) : RuntimeenvironmentclassesPackage.eINSTANCE); + ResourcetypePackageImpl theResourcetypePackage = (ResourcetypePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ResourcetypePackage.eNS_URI) instanceof ResourcetypePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ResourcetypePackage.eNS_URI) : ResourcetypePackage.eINSTANCE); - // Create package meta-data objects - theResourceconfigurationPackage.createPackageContents(); - theResourcelandscapePackage.createPackageContents(); - theContainerrepositoryPackage.createPackageContents(); - theRuntimeenvironmentclassesPackage.createPackageContents(); - theResourcetypePackage.createPackageContents(); + // Create package meta-data objects + theResourceconfigurationPackage.createPackageContents(); + theResourcelandscapePackage.createPackageContents(); + theContainerrepositoryPackage.createPackageContents(); + theRuntimeenvironmentclassesPackage.createPackageContents(); + theResourcetypePackage.createPackageContents(); - // Initialize created meta-data - theResourceconfigurationPackage.initializePackageContents(); - theResourcelandscapePackage.initializePackageContents(); - theContainerrepositoryPackage.initializePackageContents(); - theRuntimeenvironmentclassesPackage.initializePackageContents(); - theResourcetypePackage.initializePackageContents(); + // Initialize created meta-data + theResourceconfigurationPackage.initializePackageContents(); + theResourcelandscapePackage.initializePackageContents(); + theContainerrepositoryPackage.initializePackageContents(); + theRuntimeenvironmentclassesPackage.initializePackageContents(); + theResourcetypePackage.initializePackageContents(); - // Mark meta-data to indicate it can't be changed - theResourceconfigurationPackage.freeze(); + // Mark meta-data to indicate it can't be changed + theResourceconfigurationPackage.freeze(); - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(ResourceconfigurationPackage.eNS_URI, theResourceconfigurationPackage); - return theResourceconfigurationPackage; - } + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ResourceconfigurationPackage.eNS_URI, theResourceconfigurationPackage); + return theResourceconfigurationPackage; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getConfigurationSpecification() { - return configurationSpecificationEClass; - } + return configurationSpecificationEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getProcessingResourceSpecification() { - return processingResourceSpecificationEClass; - } + return processingResourceSpecificationEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EAttribute getProcessingResourceSpecification_SchedulingPolicy() { - return (EAttribute)processingResourceSpecificationEClass.getEStructuralFeatures().get(0); - } + return (EAttribute)processingResourceSpecificationEClass.getEStructuralFeatures().get(0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EAttribute getProcessingResourceSpecification_ProcessingRate() { - return (EAttribute)processingResourceSpecificationEClass.getEStructuralFeatures().get(1); - } + return (EAttribute)processingResourceSpecificationEClass.getEStructuralFeatures().get(1); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getProcessingResourceSpecification_ActiveResourceType() { - return (EReference)processingResourceSpecificationEClass.getEStructuralFeatures().get(2); - } + return (EReference)processingResourceSpecificationEClass.getEStructuralFeatures().get(2); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getProcessingResourceSpecification_ParentResourceSpecification() { - return (EReference)processingResourceSpecificationEClass.getEStructuralFeatures().get(3); - } + return (EReference)processingResourceSpecificationEClass.getEStructuralFeatures().get(3); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getProcessingResourceSpecification_NrOfParProcUnits() { - return (EReference)processingResourceSpecificationEClass.getEStructuralFeatures().get(4); - } + return (EReference)processingResourceSpecificationEClass.getEStructuralFeatures().get(4); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getNumberOfParallelProcessingUnits() { - return numberOfParallelProcessingUnitsEClass; - } + return numberOfParallelProcessingUnitsEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EAttribute getNumberOfParallelProcessingUnits_Number() { - return (EAttribute)numberOfParallelProcessingUnitsEClass.getEStructuralFeatures().get(0); - } + return (EAttribute)numberOfParallelProcessingUnitsEClass.getEStructuralFeatures().get(0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getNumberOfParallelProcessingUnits_ProcessingResourceSpec() { - return (EReference)numberOfParallelProcessingUnitsEClass.getEStructuralFeatures().get(1); - } + return (EReference)numberOfParallelProcessingUnitsEClass.getEStructuralFeatures().get(1); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getLinkingResourceSpecification() { - return linkingResourceSpecificationEClass; - } + return linkingResourceSpecificationEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ - public EReference getLinkingResourceSpecification_ConnectedResourceSpecifications() { - return (EReference)linkingResourceSpecificationEClass.getEStructuralFeatures().get(0); - } + * @generated + */ + public EReference getLinkingResourceSpecification_ConnectedContainer() { + return (EReference)linkingResourceSpecificationEClass.getEStructuralFeatures().get(0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getLinkingResourceSpecification_ParentResourceConfiguration() { - return (EReference)linkingResourceSpecificationEClass.getEStructuralFeatures().get(1); - } + return (EReference)linkingResourceSpecificationEClass.getEStructuralFeatures().get(1); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EAttribute getLinkingResourceSpecification_Bandwidth() { - return (EAttribute)linkingResourceSpecificationEClass.getEStructuralFeatures().get(2); - } + return (EAttribute)linkingResourceSpecificationEClass.getEStructuralFeatures().get(2); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getLinkingResourceSpecification_CommunicationLinkResourceType() { - return (EReference)linkingResourceSpecificationEClass.getEStructuralFeatures().get(3); - } + return (EReference)linkingResourceSpecificationEClass.getEStructuralFeatures().get(3); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getActiveResourceSpecification() { - return activeResourceSpecificationEClass; - } + return activeResourceSpecificationEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getActiveResourceSpecification_ProcessingResourceSpecifications() { - return (EReference)activeResourceSpecificationEClass.getEStructuralFeatures().get(0); - } + return (EReference)activeResourceSpecificationEClass.getEStructuralFeatures().get(0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getActiveResourceSpecification_LinkingResources() { - return (EReference)activeResourceSpecificationEClass.getEStructuralFeatures().get(1); - } + return (EReference)activeResourceSpecificationEClass.getEStructuralFeatures().get(1); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getCustomConfigurationSpecification() { - return customConfigurationSpecificationEClass; - } + return customConfigurationSpecificationEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getCustomConfigurationSpecification_NonFunctionalProperties() { - return (EReference)customConfigurationSpecificationEClass.getEStructuralFeatures().get(0); - } + return (EReference)customConfigurationSpecificationEClass.getEStructuralFeatures().get(0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getPassiveResourceSpecification() { - return passiveResourceSpecificationEClass; - } + return passiveResourceSpecificationEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getPassiveResourceSpecification_Capacity() { - return (EReference)passiveResourceSpecificationEClass.getEStructuralFeatures().get(0); - } + return (EReference)passiveResourceSpecificationEClass.getEStructuralFeatures().get(0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getPassiveResourceSpecification_PassiveResourceType() { - return (EReference)passiveResourceSpecificationEClass.getEStructuralFeatures().get(1); - } + return (EReference)passiveResourceSpecificationEClass.getEStructuralFeatures().get(1); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getPassiveResourceCapacity() { - return passiveResourceCapacityEClass; - } + return passiveResourceCapacityEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EAttribute getPassiveResourceCapacity_Capacity() { - return (EAttribute)passiveResourceCapacityEClass.getEStructuralFeatures().get(0); - } + return (EAttribute)passiveResourceCapacityEClass.getEStructuralFeatures().get(0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getCustomResourceConfigurationModel() { - return customResourceConfigurationModelEClass; - } + return customResourceConfigurationModelEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EEnum getSchedulingPolicy() { - return schedulingPolicyEEnum; - } + return schedulingPolicyEEnum; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourceconfigurationFactory getResourceconfigurationFactory() { - return (ResourceconfigurationFactory)getEFactoryInstance(); - } + return (ResourceconfigurationFactory)getEFactoryInstance(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private boolean isCreated = false; /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * <!-- begin-user-doc --> + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void createPackageContents() { - if (isCreated) return; - isCreated = true; + if (isCreated) return; + isCreated = true; - // Create classes and their features - configurationSpecificationEClass = createEClass(CONFIGURATION_SPECIFICATION); + // Create classes and their features + configurationSpecificationEClass = createEClass(CONFIGURATION_SPECIFICATION); - processingResourceSpecificationEClass = createEClass(PROCESSING_RESOURCE_SPECIFICATION); - createEAttribute(processingResourceSpecificationEClass, PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY); - createEAttribute(processingResourceSpecificationEClass, PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE); - createEReference(processingResourceSpecificationEClass, PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE); - createEReference(processingResourceSpecificationEClass, PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION); - createEReference(processingResourceSpecificationEClass, PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS); + processingResourceSpecificationEClass = createEClass(PROCESSING_RESOURCE_SPECIFICATION); + createEAttribute(processingResourceSpecificationEClass, PROCESSING_RESOURCE_SPECIFICATION__SCHEDULING_POLICY); + createEAttribute(processingResourceSpecificationEClass, PROCESSING_RESOURCE_SPECIFICATION__PROCESSING_RATE); + createEReference(processingResourceSpecificationEClass, PROCESSING_RESOURCE_SPECIFICATION__ACTIVE_RESOURCE_TYPE); + createEReference(processingResourceSpecificationEClass, PROCESSING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_SPECIFICATION); + createEReference(processingResourceSpecificationEClass, PROCESSING_RESOURCE_SPECIFICATION__NR_OF_PAR_PROC_UNITS); - numberOfParallelProcessingUnitsEClass = createEClass(NUMBER_OF_PARALLEL_PROCESSING_UNITS); - createEAttribute(numberOfParallelProcessingUnitsEClass, NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER); - createEReference(numberOfParallelProcessingUnitsEClass, NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC); + numberOfParallelProcessingUnitsEClass = createEClass(NUMBER_OF_PARALLEL_PROCESSING_UNITS); + createEAttribute(numberOfParallelProcessingUnitsEClass, NUMBER_OF_PARALLEL_PROCESSING_UNITS__NUMBER); + createEReference(numberOfParallelProcessingUnitsEClass, NUMBER_OF_PARALLEL_PROCESSING_UNITS__PROCESSING_RESOURCE_SPEC); - linkingResourceSpecificationEClass = createEClass(LINKING_RESOURCE_SPECIFICATION); - createEReference(linkingResourceSpecificationEClass, LINKING_RESOURCE_SPECIFICATION__CONNECTED_RESOURCE_SPECIFICATIONS); - createEReference(linkingResourceSpecificationEClass, LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION); - createEAttribute(linkingResourceSpecificationEClass, LINKING_RESOURCE_SPECIFICATION__BANDWIDTH); - createEReference(linkingResourceSpecificationEClass, LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE); + linkingResourceSpecificationEClass = createEClass(LINKING_RESOURCE_SPECIFICATION); + createEReference(linkingResourceSpecificationEClass, LINKING_RESOURCE_SPECIFICATION__CONNECTED_CONTAINER); + createEReference(linkingResourceSpecificationEClass, LINKING_RESOURCE_SPECIFICATION__PARENT_RESOURCE_CONFIGURATION); + createEAttribute(linkingResourceSpecificationEClass, LINKING_RESOURCE_SPECIFICATION__BANDWIDTH); + createEReference(linkingResourceSpecificationEClass, LINKING_RESOURCE_SPECIFICATION__COMMUNICATION_LINK_RESOURCE_TYPE); - activeResourceSpecificationEClass = createEClass(ACTIVE_RESOURCE_SPECIFICATION); - createEReference(activeResourceSpecificationEClass, ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS); - createEReference(activeResourceSpecificationEClass, ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES); + activeResourceSpecificationEClass = createEClass(ACTIVE_RESOURCE_SPECIFICATION); + createEReference(activeResourceSpecificationEClass, ACTIVE_RESOURCE_SPECIFICATION__PROCESSING_RESOURCE_SPECIFICATIONS); + createEReference(activeResourceSpecificationEClass, ACTIVE_RESOURCE_SPECIFICATION__LINKING_RESOURCES); - customConfigurationSpecificationEClass = createEClass(CUSTOM_CONFIGURATION_SPECIFICATION); - createEReference(customConfigurationSpecificationEClass, CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES); + customConfigurationSpecificationEClass = createEClass(CUSTOM_CONFIGURATION_SPECIFICATION); + createEReference(customConfigurationSpecificationEClass, CUSTOM_CONFIGURATION_SPECIFICATION__NON_FUNCTIONAL_PROPERTIES); - passiveResourceSpecificationEClass = createEClass(PASSIVE_RESOURCE_SPECIFICATION); - createEReference(passiveResourceSpecificationEClass, PASSIVE_RESOURCE_SPECIFICATION__CAPACITY); - createEReference(passiveResourceSpecificationEClass, PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE); + passiveResourceSpecificationEClass = createEClass(PASSIVE_RESOURCE_SPECIFICATION); + createEReference(passiveResourceSpecificationEClass, PASSIVE_RESOURCE_SPECIFICATION__CAPACITY); + createEReference(passiveResourceSpecificationEClass, PASSIVE_RESOURCE_SPECIFICATION__PASSIVE_RESOURCE_TYPE); - passiveResourceCapacityEClass = createEClass(PASSIVE_RESOURCE_CAPACITY); - createEAttribute(passiveResourceCapacityEClass, PASSIVE_RESOURCE_CAPACITY__CAPACITY); + passiveResourceCapacityEClass = createEClass(PASSIVE_RESOURCE_CAPACITY); + createEAttribute(passiveResourceCapacityEClass, PASSIVE_RESOURCE_CAPACITY__CAPACITY); - customResourceConfigurationModelEClass = createEClass(CUSTOM_RESOURCE_CONFIGURATION_MODEL); + customResourceConfigurationModelEClass = createEClass(CUSTOM_RESOURCE_CONFIGURATION_MODEL); - // Create enums - schedulingPolicyEEnum = createEEnum(SCHEDULING_POLICY); - } + // Create enums + schedulingPolicyEEnum = createEEnum(SCHEDULING_POLICY); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private boolean isInitialized = false; /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * <!-- begin-user-doc --> + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); - ResourcetypePackage theResourcetypePackage = (ResourcetypePackage)EPackage.Registry.INSTANCE.getEPackage(ResourcetypePackage.eNS_URI); - - // Create type parameters - - // Set bounds for type parameters - - // Add supertypes to classes - configurationSpecificationEClass.getESuperTypes().add(theCorePackage.getEntity()); - processingResourceSpecificationEClass.getESuperTypes().add(theCorePackage.getEntity()); - numberOfParallelProcessingUnitsEClass.getESuperTypes().add(theCorePackage.getAdaptableEntity()); - linkingResourceSpecificationEClass.getESuperTypes().add(theCorePackage.getEntity()); - activeResourceSpecificationEClass.getESuperTypes().add(this.getConfigurationSpecification()); - customConfigurationSpecificationEClass.getESuperTypes().add(this.getConfigurationSpecification()); - passiveResourceSpecificationEClass.getESuperTypes().add(this.getConfigurationSpecification()); - passiveResourceCapacityEClass.getESuperTypes().add(theCorePackage.getAdaptableEntity()); - - // Initialize classes and features; add operations and parameters - initEClass(configurationSpecificationEClass, ConfigurationSpecification.class, "ConfigurationSpecification", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(processingResourceSpecificationEClass, ProcessingResourceSpecification.class, "ProcessingResourceSpecification", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getProcessingResourceSpecification_SchedulingPolicy(), this.getSchedulingPolicy(), "schedulingPolicy", null, 1, 1, ProcessingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - initEAttribute(getProcessingResourceSpecification_ProcessingRate(), ecorePackage.getEDouble(), "processingRate", null, 1, 1, ProcessingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - initEReference(getProcessingResourceSpecification_ActiveResourceType(), theResourcetypePackage.getProcessingResourceType(), null, "activeResourceType", null, 1, 1, ProcessingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getProcessingResourceSpecification_ParentResourceSpecification(), this.getActiveResourceSpecification(), this.getActiveResourceSpecification_ProcessingResourceSpecifications(), "parentResourceSpecification", null, 1, 1, ProcessingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - initEReference(getProcessingResourceSpecification_NrOfParProcUnits(), this.getNumberOfParallelProcessingUnits(), this.getNumberOfParallelProcessingUnits_ProcessingResourceSpec(), "nrOfParProcUnits", null, 1, 1, ProcessingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - - initEClass(numberOfParallelProcessingUnitsEClass, NumberOfParallelProcessingUnits.class, "NumberOfParallelProcessingUnits", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getNumberOfParallelProcessingUnits_Number(), ecorePackage.getEInt(), "number", null, 1, 1, NumberOfParallelProcessingUnits.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - initEReference(getNumberOfParallelProcessingUnits_ProcessingResourceSpec(), this.getProcessingResourceSpecification(), this.getProcessingResourceSpecification_NrOfParProcUnits(), "processingResourceSpec", null, 1, 1, NumberOfParallelProcessingUnits.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - - initEClass(linkingResourceSpecificationEClass, LinkingResourceSpecification.class, "LinkingResourceSpecification", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getLinkingResourceSpecification_ConnectedResourceSpecifications(), this.getActiveResourceSpecification(), null, "connectedResourceSpecifications", null, 2, -1, LinkingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - initEReference(getLinkingResourceSpecification_ParentResourceConfiguration(), this.getActiveResourceSpecification(), this.getActiveResourceSpecification_LinkingResources(), "parentResourceConfiguration", null, 1, 1, LinkingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - initEAttribute(getLinkingResourceSpecification_Bandwidth(), ecorePackage.getEDouble(), "bandwidth", null, 1, 1, LinkingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - initEReference(getLinkingResourceSpecification_CommunicationLinkResourceType(), theResourcetypePackage.getCommunicationLinkResourceType(), null, "communicationLinkResourceType", null, 1, 1, LinkingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(activeResourceSpecificationEClass, ActiveResourceSpecification.class, "ActiveResourceSpecification", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getActiveResourceSpecification_ProcessingResourceSpecifications(), this.getProcessingResourceSpecification(), this.getProcessingResourceSpecification_ParentResourceSpecification(), "processingResourceSpecifications", null, 0, -1, ActiveResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - initEReference(getActiveResourceSpecification_LinkingResources(), this.getLinkingResourceSpecification(), this.getLinkingResourceSpecification_ParentResourceConfiguration(), "linkingResources", null, 0, -1, ActiveResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - - initEClass(customConfigurationSpecificationEClass, CustomConfigurationSpecification.class, "CustomConfigurationSpecification", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getCustomConfigurationSpecification_NonFunctionalProperties(), this.getCustomResourceConfigurationModel(), null, "nonFunctionalProperties", null, 1, 1, CustomConfigurationSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - - initEClass(passiveResourceSpecificationEClass, PassiveResourceSpecification.class, "PassiveResourceSpecification", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getPassiveResourceSpecification_Capacity(), this.getPassiveResourceCapacity(), null, "capacity", null, 1, 1, PassiveResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - initEReference(getPassiveResourceSpecification_PassiveResourceType(), theResourcetypePackage.getPassiveResourceType(), null, "passiveResourceType", null, 1, 1, PassiveResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(passiveResourceCapacityEClass, PassiveResourceCapacity.class, "PassiveResourceCapacity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getPassiveResourceCapacity_Capacity(), ecorePackage.getEBigInteger(), "capacity", null, 1, 1, PassiveResourceCapacity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - - initEClass(customResourceConfigurationModelEClass, CustomResourceConfigurationModel.class, "CustomResourceConfigurationModel", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - // Initialize enums and add enum literals - initEEnum(schedulingPolicyEEnum, SchedulingPolicy.class, "SchedulingPolicy"); - addEEnumLiteral(schedulingPolicyEEnum, SchedulingPolicy.DELAY); - addEEnumLiteral(schedulingPolicyEEnum, SchedulingPolicy.FCFS); - addEEnumLiteral(schedulingPolicyEEnum, SchedulingPolicy.PROCESSOR_SHARING); - addEEnumLiteral(schedulingPolicyEEnum, SchedulingPolicy.RANDOM); - addEEnumLiteral(schedulingPolicyEEnum, SchedulingPolicy.NA); - - // Create resource - createResource(eNS_URI); - } + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + ResourcetypePackage theResourcetypePackage = (ResourcetypePackage)EPackage.Registry.INSTANCE.getEPackage(ResourcetypePackage.eNS_URI); + ResourcelandscapePackage theResourcelandscapePackage = (ResourcelandscapePackage)EPackage.Registry.INSTANCE.getEPackage(ResourcelandscapePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + configurationSpecificationEClass.getESuperTypes().add(theCorePackage.getEntity()); + processingResourceSpecificationEClass.getESuperTypes().add(theCorePackage.getEntity()); + numberOfParallelProcessingUnitsEClass.getESuperTypes().add(theCorePackage.getAdaptableEntity()); + linkingResourceSpecificationEClass.getESuperTypes().add(theCorePackage.getEntity()); + activeResourceSpecificationEClass.getESuperTypes().add(this.getConfigurationSpecification()); + customConfigurationSpecificationEClass.getESuperTypes().add(this.getConfigurationSpecification()); + passiveResourceSpecificationEClass.getESuperTypes().add(this.getConfigurationSpecification()); + passiveResourceCapacityEClass.getESuperTypes().add(theCorePackage.getAdaptableEntity()); + + // Initialize classes and features; add operations and parameters + initEClass(configurationSpecificationEClass, ConfigurationSpecification.class, "ConfigurationSpecification", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(processingResourceSpecificationEClass, ProcessingResourceSpecification.class, "ProcessingResourceSpecification", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getProcessingResourceSpecification_SchedulingPolicy(), this.getSchedulingPolicy(), "schedulingPolicy", null, 1, 1, ProcessingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEAttribute(getProcessingResourceSpecification_ProcessingRate(), ecorePackage.getEDouble(), "processingRate", null, 1, 1, ProcessingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getProcessingResourceSpecification_ActiveResourceType(), theResourcetypePackage.getProcessingResourceType(), null, "activeResourceType", null, 1, 1, ProcessingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getProcessingResourceSpecification_ParentResourceSpecification(), this.getActiveResourceSpecification(), this.getActiveResourceSpecification_ProcessingResourceSpecifications(), "parentResourceSpecification", null, 1, 1, ProcessingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getProcessingResourceSpecification_NrOfParProcUnits(), this.getNumberOfParallelProcessingUnits(), this.getNumberOfParallelProcessingUnits_ProcessingResourceSpec(), "nrOfParProcUnits", null, 1, 1, ProcessingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(numberOfParallelProcessingUnitsEClass, NumberOfParallelProcessingUnits.class, "NumberOfParallelProcessingUnits", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getNumberOfParallelProcessingUnits_Number(), ecorePackage.getEInt(), "number", null, 1, 1, NumberOfParallelProcessingUnits.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getNumberOfParallelProcessingUnits_ProcessingResourceSpec(), this.getProcessingResourceSpecification(), this.getProcessingResourceSpecification_NrOfParProcUnits(), "processingResourceSpec", null, 1, 1, NumberOfParallelProcessingUnits.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(linkingResourceSpecificationEClass, LinkingResourceSpecification.class, "LinkingResourceSpecification", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getLinkingResourceSpecification_ConnectedContainer(), theResourcelandscapePackage.getContainer(), null, "connectedContainer", null, 2, -1, LinkingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getLinkingResourceSpecification_ParentResourceConfiguration(), this.getActiveResourceSpecification(), this.getActiveResourceSpecification_LinkingResources(), "parentResourceConfiguration", null, 1, 1, LinkingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEAttribute(getLinkingResourceSpecification_Bandwidth(), ecorePackage.getEDouble(), "bandwidth", null, 1, 1, LinkingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getLinkingResourceSpecification_CommunicationLinkResourceType(), theResourcetypePackage.getCommunicationLinkResourceType(), null, "communicationLinkResourceType", null, 1, 1, LinkingResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(activeResourceSpecificationEClass, ActiveResourceSpecification.class, "ActiveResourceSpecification", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getActiveResourceSpecification_ProcessingResourceSpecifications(), this.getProcessingResourceSpecification(), this.getProcessingResourceSpecification_ParentResourceSpecification(), "processingResourceSpecifications", null, 0, -1, ActiveResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getActiveResourceSpecification_LinkingResources(), this.getLinkingResourceSpecification(), this.getLinkingResourceSpecification_ParentResourceConfiguration(), "linkingResources", null, 0, -1, ActiveResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(customConfigurationSpecificationEClass, CustomConfigurationSpecification.class, "CustomConfigurationSpecification", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCustomConfigurationSpecification_NonFunctionalProperties(), this.getCustomResourceConfigurationModel(), null, "nonFunctionalProperties", null, 1, 1, CustomConfigurationSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(passiveResourceSpecificationEClass, PassiveResourceSpecification.class, "PassiveResourceSpecification", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getPassiveResourceSpecification_Capacity(), this.getPassiveResourceCapacity(), null, "capacity", null, 1, 1, PassiveResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getPassiveResourceSpecification_PassiveResourceType(), theResourcetypePackage.getPassiveResourceType(), null, "passiveResourceType", null, 1, 1, PassiveResourceSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(passiveResourceCapacityEClass, PassiveResourceCapacity.class, "PassiveResourceCapacity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getPassiveResourceCapacity_Capacity(), ecorePackage.getEBigInteger(), "capacity", null, 1, 1, PassiveResourceCapacity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(customResourceConfigurationModelEClass, CustomResourceConfigurationModel.class, "CustomResourceConfigurationModel", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Initialize enums and add enum literals + initEEnum(schedulingPolicyEEnum, SchedulingPolicy.class, "SchedulingPolicy"); + addEEnumLiteral(schedulingPolicyEEnum, SchedulingPolicy.DELAY); + addEEnumLiteral(schedulingPolicyEEnum, SchedulingPolicy.FCFS); + addEEnumLiteral(schedulingPolicyEEnum, SchedulingPolicy.PROCESSOR_SHARING); + addEEnumLiteral(schedulingPolicyEEnum, SchedulingPolicy.RANDOM); + addEEnumLiteral(schedulingPolicyEEnum, SchedulingPolicy.NA); + + // Create resource + createResource(eNS_URI); + } } //ResourceconfigurationPackageImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/util/ResourceconfigurationAdapterFactory.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/util/ResourceconfigurationAdapterFactory.java index 94392898..3381dbb8 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/util/ResourceconfigurationAdapterFactory.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/util/ResourceconfigurationAdapterFactory.java @@ -28,316 +28,316 @@ import org.eclipse.emf.ecore.EObject; */ public class ResourceconfigurationAdapterFactory extends AdapterFactoryImpl { /** - * The cached model package. - * <!-- begin-user-doc --> + * The cached model package. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected static ResourceconfigurationPackage modelPackage; /** - * Creates an instance of the adapter factory. - * <!-- begin-user-doc --> + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourceconfigurationAdapterFactory() { - if (modelPackage == null) { - modelPackage = ResourceconfigurationPackage.eINSTANCE; - } - } + if (modelPackage == null) { + modelPackage = ResourceconfigurationPackage.eINSTANCE; + } + } /** - * Returns whether this factory is applicable for the type of the object. - * <!-- begin-user-doc --> + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. * <!-- end-user-doc --> - * @return whether this factory is applicable for the type of the object. - * @generated - */ + * @return whether this factory is applicable for the type of the object. + * @generated + */ @Override public boolean isFactoryForType(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } /** - * The switch that delegates to the <code>createXXX</code> methods. - * <!-- begin-user-doc --> + * The switch that delegates to the <code>createXXX</code> methods. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ResourceconfigurationSwitch<Adapter> modelSwitch = new ResourceconfigurationSwitch<Adapter>() { - @Override - public Adapter caseConfigurationSpecification(ConfigurationSpecification object) { - return createConfigurationSpecificationAdapter(); - } - @Override - public Adapter caseProcessingResourceSpecification(ProcessingResourceSpecification object) { - return createProcessingResourceSpecificationAdapter(); - } - @Override - public Adapter caseNumberOfParallelProcessingUnits(NumberOfParallelProcessingUnits object) { - return createNumberOfParallelProcessingUnitsAdapter(); - } - @Override - public Adapter caseLinkingResourceSpecification(LinkingResourceSpecification object) { - return createLinkingResourceSpecificationAdapter(); - } - @Override - public Adapter caseActiveResourceSpecification(ActiveResourceSpecification object) { - return createActiveResourceSpecificationAdapter(); - } - @Override - public Adapter caseCustomConfigurationSpecification(CustomConfigurationSpecification object) { - return createCustomConfigurationSpecificationAdapter(); - } - @Override - public Adapter casePassiveResourceSpecification(PassiveResourceSpecification object) { - return createPassiveResourceSpecificationAdapter(); - } - @Override - public Adapter casePassiveResourceCapacity(PassiveResourceCapacity object) { - return createPassiveResourceCapacityAdapter(); - } - @Override - public Adapter caseCustomResourceConfigurationModel(CustomResourceConfigurationModel object) { - return createCustomResourceConfigurationModelAdapter(); - } - @Override - public Adapter caseIdentifier(Identifier object) { - return createIdentifierAdapter(); - } - @Override - public Adapter caseNamedElement(NamedElement object) { - return createNamedElementAdapter(); - } - @Override - public Adapter caseEntity(Entity object) { - return createEntityAdapter(); - } - @Override - public Adapter caseAdaptableEntity(AdaptableEntity object) { - return createAdaptableEntityAdapter(); - } - @Override - public Adapter defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; + @Override + public Adapter caseConfigurationSpecification(ConfigurationSpecification object) { + return createConfigurationSpecificationAdapter(); + } + @Override + public Adapter caseProcessingResourceSpecification(ProcessingResourceSpecification object) { + return createProcessingResourceSpecificationAdapter(); + } + @Override + public Adapter caseNumberOfParallelProcessingUnits(NumberOfParallelProcessingUnits object) { + return createNumberOfParallelProcessingUnitsAdapter(); + } + @Override + public Adapter caseLinkingResourceSpecification(LinkingResourceSpecification object) { + return createLinkingResourceSpecificationAdapter(); + } + @Override + public Adapter caseActiveResourceSpecification(ActiveResourceSpecification object) { + return createActiveResourceSpecificationAdapter(); + } + @Override + public Adapter caseCustomConfigurationSpecification(CustomConfigurationSpecification object) { + return createCustomConfigurationSpecificationAdapter(); + } + @Override + public Adapter casePassiveResourceSpecification(PassiveResourceSpecification object) { + return createPassiveResourceSpecificationAdapter(); + } + @Override + public Adapter casePassiveResourceCapacity(PassiveResourceCapacity object) { + return createPassiveResourceCapacityAdapter(); + } + @Override + public Adapter caseCustomResourceConfigurationModel(CustomResourceConfigurationModel object) { + return createCustomResourceConfigurationModelAdapter(); + } + @Override + public Adapter caseIdentifier(Identifier object) { + return createIdentifierAdapter(); + } + @Override + public Adapter caseNamedElement(NamedElement object) { + return createNamedElementAdapter(); + } + @Override + public Adapter caseEntity(Entity object) { + return createEntityAdapter(); + } + @Override + public Adapter caseAdaptableEntity(AdaptableEntity object) { + return createAdaptableEntityAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; /** - * Creates an adapter for the <code>target</code>. - * <!-- begin-user-doc --> + * Creates an adapter for the <code>target</code>. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param target the object to adapt. - * @return the adapter for the <code>target</code>. - * @generated - */ + * @param target the object to adapt. + * @return the adapter for the <code>target</code>. + * @generated + */ @Override public Adapter createAdapter(Notifier target) { - return modelSwitch.doSwitch((EObject)target); - } + return modelSwitch.doSwitch((EObject)target); + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ConfigurationSpecification <em>Configuration Specification</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ConfigurationSpecification <em>Configuration Specification</em>}'. + * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> - * @return the new adapter. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ConfigurationSpecification - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ConfigurationSpecification + * @generated + */ public Adapter createConfigurationSpecificationAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification <em>Processing Resource Specification</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification <em>Processing Resource Specification</em>}'. + * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> - * @return the new adapter. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ProcessingResourceSpecification + * @generated + */ public Adapter createProcessingResourceSpecificationAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits <em>Number Of Parallel Processing Units</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits <em>Number Of Parallel Processing Units</em>}'. + * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> - * @return the new adapter. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.NumberOfParallelProcessingUnits + * @generated + */ public Adapter createNumberOfParallelProcessingUnitsAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification <em>Linking Resource Specification</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification <em>Linking Resource Specification</em>}'. + * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> - * @return the new adapter. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.LinkingResourceSpecification + * @generated + */ public Adapter createLinkingResourceSpecificationAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification <em>Active Resource Specification</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification <em>Active Resource Specification</em>}'. + * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> - * @return the new adapter. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.ActiveResourceSpecification + * @generated + */ public Adapter createActiveResourceSpecificationAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification <em>Custom Configuration Specification</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification <em>Custom Configuration Specification</em>}'. + * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> - * @return the new adapter. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.CustomConfigurationSpecification + * @generated + */ public Adapter createCustomConfigurationSpecificationAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification <em>Passive Resource Specification</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification <em>Passive Resource Specification</em>}'. + * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> - * @return the new adapter. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceSpecification + * @generated + */ public Adapter createPassiveResourceSpecificationAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity <em>Passive Resource Capacity</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity <em>Passive Resource Capacity</em>}'. + * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> - * @return the new adapter. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.PassiveResourceCapacity + * @generated + */ public Adapter createPassiveResourceCapacityAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.CustomResourceConfigurationModel <em>Custom Resource Configuration Model</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourceconfiguration.CustomResourceConfigurationModel <em>Custom Resource Configuration Model</em>}'. + * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> - * @return the new adapter. - * @see edu.kit.ipd.descartes.mm.resourceconfiguration.CustomResourceConfigurationModel - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourceconfiguration.CustomResourceConfigurationModel + * @generated + */ public Adapter createCustomResourceConfigurationModelAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.identifier.Identifier <em>Identifier</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.identifier.Identifier <em>Identifier</em>}'. + * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> - * @return the new adapter. - * @see edu.kit.ipd.descartes.identifier.Identifier - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.identifier.Identifier + * @generated + */ public Adapter createIdentifierAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.core.NamedElement <em>Named Element</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.core.NamedElement <em>Named Element</em>}'. + * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> - * @return the new adapter. - * @see edu.kit.ipd.descartes.core.NamedElement - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.core.NamedElement + * @generated + */ public Adapter createNamedElementAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.core.Entity <em>Entity</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.core.Entity <em>Entity</em>}'. + * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> - * @return the new adapter. - * @see edu.kit.ipd.descartes.core.Entity - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.core.Entity + * @generated + */ public Adapter createEntityAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.core.AdaptableEntity <em>Adaptable Entity</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.core.AdaptableEntity <em>Adaptable Entity</em>}'. + * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> - * @return the new adapter. - * @see edu.kit.ipd.descartes.core.AdaptableEntity - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.core.AdaptableEntity + * @generated + */ public Adapter createAdaptableEntityAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for the default case. - * <!-- begin-user-doc --> + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> * This default implementation returns null. * <!-- end-user-doc --> - * @return the new adapter. - * @generated - */ + * @return the new adapter. + * @generated + */ public Adapter createEObjectAdapter() { - return null; - } + return null; + } } //ResourceconfigurationAdapterFactory diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/util/ResourceconfigurationSwitch.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/util/ResourceconfigurationSwitch.java index 60831cd2..70a3a120 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/util/ResourceconfigurationSwitch.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourceconfiguration/util/ResourceconfigurationSwitch.java @@ -31,344 +31,344 @@ import org.eclipse.emf.ecore.util.Switch; */ public class ResourceconfigurationSwitch<T> extends Switch<T> { /** - * The cached model package - * <!-- begin-user-doc --> + * The cached model package + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected static ResourceconfigurationPackage modelPackage; /** - * Creates an instance of the switch. - * <!-- begin-user-doc --> + * Creates an instance of the switch. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourceconfigurationSwitch() { - if (modelPackage == null) { - modelPackage = ResourceconfigurationPackage.eINSTANCE; - } - } + if (modelPackage == null) { + modelPackage = ResourceconfigurationPackage.eINSTANCE; + } + } /** - * Checks whether this is a switch for the given package. - * <!-- begin-user-doc --> + * Checks whether this is a switch for the given package. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @parameter ePackage the package in question. - * @return whether this is a switch for the given package. - * @generated - */ + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ @Override protected boolean isSwitchFor(EPackage ePackage) { - return ePackage == modelPackage; - } + return ePackage == modelPackage; + } /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ @Override protected T doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case ResourceconfigurationPackage.CONFIGURATION_SPECIFICATION: { - ConfigurationSpecification configurationSpecification = (ConfigurationSpecification)theEObject; - T result = caseConfigurationSpecification(configurationSpecification); - if (result == null) result = caseEntity(configurationSpecification); - if (result == null) result = caseIdentifier(configurationSpecification); - if (result == null) result = caseNamedElement(configurationSpecification); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION: { - ProcessingResourceSpecification processingResourceSpecification = (ProcessingResourceSpecification)theEObject; - T result = caseProcessingResourceSpecification(processingResourceSpecification); - if (result == null) result = caseEntity(processingResourceSpecification); - if (result == null) result = caseIdentifier(processingResourceSpecification); - if (result == null) result = caseNamedElement(processingResourceSpecification); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS: { - NumberOfParallelProcessingUnits numberOfParallelProcessingUnits = (NumberOfParallelProcessingUnits)theEObject; - T result = caseNumberOfParallelProcessingUnits(numberOfParallelProcessingUnits); - if (result == null) result = caseAdaptableEntity(numberOfParallelProcessingUnits); - if (result == null) result = caseEntity(numberOfParallelProcessingUnits); - if (result == null) result = caseIdentifier(numberOfParallelProcessingUnits); - if (result == null) result = caseNamedElement(numberOfParallelProcessingUnits); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION: { - LinkingResourceSpecification linkingResourceSpecification = (LinkingResourceSpecification)theEObject; - T result = caseLinkingResourceSpecification(linkingResourceSpecification); - if (result == null) result = caseEntity(linkingResourceSpecification); - if (result == null) result = caseIdentifier(linkingResourceSpecification); - if (result == null) result = caseNamedElement(linkingResourceSpecification); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION: { - ActiveResourceSpecification activeResourceSpecification = (ActiveResourceSpecification)theEObject; - T result = caseActiveResourceSpecification(activeResourceSpecification); - if (result == null) result = caseConfigurationSpecification(activeResourceSpecification); - if (result == null) result = caseEntity(activeResourceSpecification); - if (result == null) result = caseIdentifier(activeResourceSpecification); - if (result == null) result = caseNamedElement(activeResourceSpecification); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourceconfigurationPackage.CUSTOM_CONFIGURATION_SPECIFICATION: { - CustomConfigurationSpecification customConfigurationSpecification = (CustomConfigurationSpecification)theEObject; - T result = caseCustomConfigurationSpecification(customConfigurationSpecification); - if (result == null) result = caseConfigurationSpecification(customConfigurationSpecification); - if (result == null) result = caseEntity(customConfigurationSpecification); - if (result == null) result = caseIdentifier(customConfigurationSpecification); - if (result == null) result = caseNamedElement(customConfigurationSpecification); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION: { - PassiveResourceSpecification passiveResourceSpecification = (PassiveResourceSpecification)theEObject; - T result = casePassiveResourceSpecification(passiveResourceSpecification); - if (result == null) result = caseConfigurationSpecification(passiveResourceSpecification); - if (result == null) result = caseEntity(passiveResourceSpecification); - if (result == null) result = caseIdentifier(passiveResourceSpecification); - if (result == null) result = caseNamedElement(passiveResourceSpecification); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourceconfigurationPackage.PASSIVE_RESOURCE_CAPACITY: { - PassiveResourceCapacity passiveResourceCapacity = (PassiveResourceCapacity)theEObject; - T result = casePassiveResourceCapacity(passiveResourceCapacity); - if (result == null) result = caseAdaptableEntity(passiveResourceCapacity); - if (result == null) result = caseEntity(passiveResourceCapacity); - if (result == null) result = caseIdentifier(passiveResourceCapacity); - if (result == null) result = caseNamedElement(passiveResourceCapacity); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourceconfigurationPackage.CUSTOM_RESOURCE_CONFIGURATION_MODEL: { - CustomResourceConfigurationModel customResourceConfigurationModel = (CustomResourceConfigurationModel)theEObject; - T result = caseCustomResourceConfigurationModel(customResourceConfigurationModel); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } + switch (classifierID) { + case ResourceconfigurationPackage.CONFIGURATION_SPECIFICATION: { + ConfigurationSpecification configurationSpecification = (ConfigurationSpecification)theEObject; + T result = caseConfigurationSpecification(configurationSpecification); + if (result == null) result = caseEntity(configurationSpecification); + if (result == null) result = caseIdentifier(configurationSpecification); + if (result == null) result = caseNamedElement(configurationSpecification); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourceconfigurationPackage.PROCESSING_RESOURCE_SPECIFICATION: { + ProcessingResourceSpecification processingResourceSpecification = (ProcessingResourceSpecification)theEObject; + T result = caseProcessingResourceSpecification(processingResourceSpecification); + if (result == null) result = caseEntity(processingResourceSpecification); + if (result == null) result = caseIdentifier(processingResourceSpecification); + if (result == null) result = caseNamedElement(processingResourceSpecification); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourceconfigurationPackage.NUMBER_OF_PARALLEL_PROCESSING_UNITS: { + NumberOfParallelProcessingUnits numberOfParallelProcessingUnits = (NumberOfParallelProcessingUnits)theEObject; + T result = caseNumberOfParallelProcessingUnits(numberOfParallelProcessingUnits); + if (result == null) result = caseAdaptableEntity(numberOfParallelProcessingUnits); + if (result == null) result = caseEntity(numberOfParallelProcessingUnits); + if (result == null) result = caseIdentifier(numberOfParallelProcessingUnits); + if (result == null) result = caseNamedElement(numberOfParallelProcessingUnits); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourceconfigurationPackage.LINKING_RESOURCE_SPECIFICATION: { + LinkingResourceSpecification linkingResourceSpecification = (LinkingResourceSpecification)theEObject; + T result = caseLinkingResourceSpecification(linkingResourceSpecification); + if (result == null) result = caseEntity(linkingResourceSpecification); + if (result == null) result = caseIdentifier(linkingResourceSpecification); + if (result == null) result = caseNamedElement(linkingResourceSpecification); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourceconfigurationPackage.ACTIVE_RESOURCE_SPECIFICATION: { + ActiveResourceSpecification activeResourceSpecification = (ActiveResourceSpecification)theEObject; + T result = caseActiveResourceSpecification(activeResourceSpecification); + if (result == null) result = caseConfigurationSpecification(activeResourceSpecification); + if (result == null) result = caseEntity(activeResourceSpecification); + if (result == null) result = caseIdentifier(activeResourceSpecification); + if (result == null) result = caseNamedElement(activeResourceSpecification); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourceconfigurationPackage.CUSTOM_CONFIGURATION_SPECIFICATION: { + CustomConfigurationSpecification customConfigurationSpecification = (CustomConfigurationSpecification)theEObject; + T result = caseCustomConfigurationSpecification(customConfigurationSpecification); + if (result == null) result = caseConfigurationSpecification(customConfigurationSpecification); + if (result == null) result = caseEntity(customConfigurationSpecification); + if (result == null) result = caseIdentifier(customConfigurationSpecification); + if (result == null) result = caseNamedElement(customConfigurationSpecification); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourceconfigurationPackage.PASSIVE_RESOURCE_SPECIFICATION: { + PassiveResourceSpecification passiveResourceSpecification = (PassiveResourceSpecification)theEObject; + T result = casePassiveResourceSpecification(passiveResourceSpecification); + if (result == null) result = caseConfigurationSpecification(passiveResourceSpecification); + if (result == null) result = caseEntity(passiveResourceSpecification); + if (result == null) result = caseIdentifier(passiveResourceSpecification); + if (result == null) result = caseNamedElement(passiveResourceSpecification); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourceconfigurationPackage.PASSIVE_RESOURCE_CAPACITY: { + PassiveResourceCapacity passiveResourceCapacity = (PassiveResourceCapacity)theEObject; + T result = casePassiveResourceCapacity(passiveResourceCapacity); + if (result == null) result = caseAdaptableEntity(passiveResourceCapacity); + if (result == null) result = caseEntity(passiveResourceCapacity); + if (result == null) result = caseIdentifier(passiveResourceCapacity); + if (result == null) result = caseNamedElement(passiveResourceCapacity); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourceconfigurationPackage.CUSTOM_RESOURCE_CONFIGURATION_MODEL: { + CustomResourceConfigurationModel customResourceConfigurationModel = (CustomResourceConfigurationModel)theEObject; + T result = caseCustomResourceConfigurationModel(customResourceConfigurationModel); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } /** - * Returns the result of interpreting the object as an instance of '<em>Configuration Specification</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Configuration Specification</em>'. + * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Configuration Specification</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Configuration Specification</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseConfigurationSpecification(ConfigurationSpecification object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Processing Resource Specification</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Processing Resource Specification</em>'. + * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Processing Resource Specification</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Processing Resource Specification</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseProcessingResourceSpecification(ProcessingResourceSpecification object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Number Of Parallel Processing Units</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Number Of Parallel Processing Units</em>'. + * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Number Of Parallel Processing Units</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Number Of Parallel Processing Units</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseNumberOfParallelProcessingUnits(NumberOfParallelProcessingUnits object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Linking Resource Specification</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Linking Resource Specification</em>'. + * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Linking Resource Specification</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Linking Resource Specification</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseLinkingResourceSpecification(LinkingResourceSpecification object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Active Resource Specification</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Active Resource Specification</em>'. + * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Active Resource Specification</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Active Resource Specification</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseActiveResourceSpecification(ActiveResourceSpecification object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Custom Configuration Specification</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Custom Configuration Specification</em>'. + * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Custom Configuration Specification</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Custom Configuration Specification</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseCustomConfigurationSpecification(CustomConfigurationSpecification object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Passive Resource Specification</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Passive Resource Specification</em>'. + * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Passive Resource Specification</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Passive Resource Specification</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T casePassiveResourceSpecification(PassiveResourceSpecification object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Passive Resource Capacity</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Passive Resource Capacity</em>'. + * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Passive Resource Capacity</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Passive Resource Capacity</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T casePassiveResourceCapacity(PassiveResourceCapacity object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Custom Resource Configuration Model</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Custom Resource Configuration Model</em>'. + * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Custom Resource Configuration Model</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Custom Resource Configuration Model</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseCustomResourceConfigurationModel(CustomResourceConfigurationModel object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Identifier</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Identifier</em>'. + * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Identifier</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Identifier</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseIdentifier(Identifier object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Named Element</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Named Element</em>'. + * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Named Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Named Element</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseNamedElement(NamedElement object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Entity</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Entity</em>'. + * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Entity</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Entity</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseEntity(Entity object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Adaptable Entity</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Adaptable Entity</em>'. + * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Adaptable Entity</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Adaptable Entity</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseAdaptableEntity(AdaptableEntity object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. + * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch, but this is the last case anyway. * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>EObject</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ @Override public T defaultCase(EObject object) { - return null; - } + return null; + } } //ResourceconfigurationSwitch -- GitLab