diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/.gitignore b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..ae3c1726048cd06b9a143e0376ed46dd9b9a8d53 --- /dev/null +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/plugin.properties b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/plugin.properties index 1f319b0e33c2550ef60aa6001a9cbdf75e6d03a8..46bb7e34a5a14458d81a39a275e16b98b873ab44 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/containerrepository/provider/ContainerRepositoryItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/containerrepository/provider/ContainerRepositoryItemProvider.java index d9258a8df6b0f1ea8a78a20b607715d14d09e403..57c78eddb83cbd807d9183bb71491bf77485741f 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/containerrepository/provider/ContainerRepositoryItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/containerrepository/provider/ContainerRepositoryItemProvider.java @@ -37,138 +37,132 @@ import org.eclipse.emf.edit.provider.ViewerNotification; * @generated */ public class ContainerRepositoryItemProvider - 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 ContainerRepositoryItemProvider(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(ContainerrepositoryPackage.Literals.CONTAINER_REPOSITORY__TEMPLATES); - } - return childrenFeatures; - } + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ContainerrepositoryPackage.Literals.CONTAINER_REPOSITORY__TEMPLATES); + } + 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 ContainerRepository.gif. - * <!-- begin-user-doc --> + * This returns ContainerRepository.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/ContainerRepository")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/ContainerRepository")); + } /** - * 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 = ((ContainerRepository)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_ContainerRepository_type") : - getString("_UI_ContainerRepository_type") + " " + label; - } + String label = ((ContainerRepository)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ContainerRepository_type") : + getString("_UI_ContainerRepository_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(ContainerRepository.class)) { - case ContainerrepositoryPackage.CONTAINER_REPOSITORY__TEMPLATES: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(ContainerRepository.class)) { + case ContainerrepositoryPackage.CONTAINER_REPOSITORY__TEMPLATES: + 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 - (ContainerrepositoryPackage.Literals.CONTAINER_REPOSITORY__TEMPLATES, - ContainerrepositoryFactory.eINSTANCE.createContainerTemplate())); - } + newChildDescriptors.add + (createChildParameter + (ContainerrepositoryPackage.Literals.CONTAINER_REPOSITORY__TEMPLATES, + ContainerrepositoryFactory.eINSTANCE.createContainerTemplate())); + } /** - * 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/containerrepository/provider/ContainerTemplateItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/containerrepository/provider/ContainerTemplateItemProvider.java index 37910aec28bdf1804a890d71c4326148664643fc..15dfb4a02947e6d1549b0aae794e88cee0327a6c 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/containerrepository/provider/ContainerTemplateItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/containerrepository/provider/ContainerTemplateItemProvider.java @@ -39,194 +39,188 @@ import org.eclipse.emf.edit.provider.ViewerNotification; * @generated */ public class ContainerTemplateItemProvider - 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 ContainerTemplateItemProvider(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); - addReferringContainersPropertyDescriptor(object); - addRunningOnPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } + addReferringContainersPropertyDescriptor(object); + addRunningOnPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } /** - * This adds a property descriptor for the Referring Containers feature. - * <!-- begin-user-doc --> + * This adds a property descriptor for the Referring Containers feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void addReferringContainersPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ContainerTemplate_referringContainers_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ContainerTemplate_referringContainers_feature", "_UI_ContainerTemplate_type"), - ContainerrepositoryPackage.Literals.CONTAINER_TEMPLATE__REFERRING_CONTAINERS, - true, - false, - true, - null, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ContainerTemplate_referringContainers_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ContainerTemplate_referringContainers_feature", "_UI_ContainerTemplate_type"), + ContainerrepositoryPackage.Literals.CONTAINER_TEMPLATE__REFERRING_CONTAINERS, + true, + false, + true, + null, + null, + null)); + } /** - * This adds a property descriptor for the Running On feature. - * <!-- begin-user-doc --> + * This adds a property descriptor for the Running On feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void addRunningOnPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_ContainerTemplate_runningOn_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ContainerTemplate_runningOn_feature", "_UI_ContainerTemplate_type"), - ContainerrepositoryPackage.Literals.CONTAINER_TEMPLATE__RUNNING_ON, - true, - false, - true, - null, - null, - null)); - } + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ContainerTemplate_runningOn_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ContainerTemplate_runningOn_feature", "_UI_ContainerTemplate_type"), + ContainerrepositoryPackage.Literals.CONTAINER_TEMPLATE__RUNNING_ON, + 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(ContainerrepositoryPackage.Literals.CONTAINER_TEMPLATE__TEMPLATE_CONFIG); - } - return childrenFeatures; - } + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ContainerrepositoryPackage.Literals.CONTAINER_TEMPLATE__TEMPLATE_CONFIG); + } + 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 ContainerTemplate.gif. - * <!-- begin-user-doc --> + * This returns ContainerTemplate.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/ContainerTemplate")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/ContainerTemplate")); + } /** - * 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 = ((ContainerTemplate)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_ContainerTemplate_type") : - getString("_UI_ContainerTemplate_type") + " " + label; - } + String label = ((ContainerTemplate)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ContainerTemplate_type") : + getString("_UI_ContainerTemplate_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(ContainerTemplate.class)) { - case ContainerrepositoryPackage.CONTAINER_TEMPLATE__TEMPLATE_CONFIG: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(ContainerTemplate.class)) { + case ContainerrepositoryPackage.CONTAINER_TEMPLATE__TEMPLATE_CONFIG: + 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 - (ContainerrepositoryPackage.Literals.CONTAINER_TEMPLATE__TEMPLATE_CONFIG, - ResourceconfigurationFactory.eINSTANCE.createActiveResourceSpecification())); + newChildDescriptors.add + (createChildParameter + (ContainerrepositoryPackage.Literals.CONTAINER_TEMPLATE__TEMPLATE_CONFIG, + ResourceconfigurationFactory.eINSTANCE.createActiveResourceSpecification())); - newChildDescriptors.add - (createChildParameter - (ContainerrepositoryPackage.Literals.CONTAINER_TEMPLATE__TEMPLATE_CONFIG, - ResourceconfigurationFactory.eINSTANCE.createCustomConfigurationSpecification())); + newChildDescriptors.add + (createChildParameter + (ContainerrepositoryPackage.Literals.CONTAINER_TEMPLATE__TEMPLATE_CONFIG, + ResourceconfigurationFactory.eINSTANCE.createCustomConfigurationSpecification())); - newChildDescriptors.add - (createChildParameter - (ContainerrepositoryPackage.Literals.CONTAINER_TEMPLATE__TEMPLATE_CONFIG, - ResourceconfigurationFactory.eINSTANCE.createPassiveResourceSpecification())); - } + newChildDescriptors.add + (createChildParameter + (ContainerrepositoryPackage.Literals.CONTAINER_TEMPLATE__TEMPLATE_CONFIG, + 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/containerrepository/provider/ContainerrepositoryItemProviderAdapterFactory.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/containerrepository/provider/ContainerrepositoryItemProviderAdapterFactory.java index 4571f6ed72c7b0209ef483105cb744d836c51fdd..95a2080dc6ed6363911f759866b7fade608ff36b 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/containerrepository/provider/ContainerrepositoryItemProviderAdapterFactory.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/containerrepository/provider/ContainerrepositoryItemProviderAdapterFactory.java @@ -35,190 +35,190 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider; */ public class ContainerrepositoryItemProviderAdapterFactory extends ContainerrepositoryAdapterFactory 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 ContainerrepositoryItemProviderAdapterFactory() { - 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.containerrepository.ContainerRepository} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.containerrepository.ContainerRepository} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ContainerRepositoryItemProvider containerRepositoryItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.containerrepository.ContainerRepository}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.containerrepository.ContainerRepository}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createContainerRepositoryAdapter() { - if (containerRepositoryItemProvider == null) { - containerRepositoryItemProvider = new ContainerRepositoryItemProvider(this); - } + if (containerRepositoryItemProvider == null) { + containerRepositoryItemProvider = new ContainerRepositoryItemProvider(this); + } - return containerRepositoryItemProvider; - } + return containerRepositoryItemProvider; + } /** - * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ContainerTemplateItemProvider containerTemplateItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createContainerTemplateAdapter() { - if (containerTemplateItemProvider == null) { - containerTemplateItemProvider = new ContainerTemplateItemProvider(this); - } + if (containerTemplateItemProvider == null) { + containerTemplateItemProvider = new ContainerTemplateItemProvider(this); + } - return containerTemplateItemProvider; - } + return containerTemplateItemProvider; + } /** - * 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 (containerRepositoryItemProvider != null) containerRepositoryItemProvider.dispose(); - if (containerTemplateItemProvider != null) containerTemplateItemProvider.dispose(); - } + if (containerRepositoryItemProvider != null) containerRepositoryItemProvider.dispose(); + if (containerTemplateItemProvider != null) containerTemplateItemProvider.dispose(); + } } 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 d9e9057aa81914511a31a288d676a6ebc8febb2a..27427f973ee2f5e0911e6b2081b40824e7655bcb 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 54ea1a02998266ad03f9cb1e910c1bda43d9145c..e7f696fbadd66fcb1992dac89d88bf34a1214b14 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 566f7bd1502efe9b45a56b37dd3729a7a3355ec2..de83e2c530571b04e7a203efdc861af62d75632f 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 0000000000000000000000000000000000000000..075892c943ca8d4ff01d18455b0c7f849ef84d57 --- /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 c3127cc087d2ca6b87c3c3846494fa0ba1d78987..5b165bbe9833c1f956d21129ff03a5570322d7e5 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 ccad46cd6767004b1b1604670f1682928ec21460..fec947e963091a5ac5f5175f60574ea4a419dcd0 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 e07a311a36802874c91b90baa298d33d79ad5fe0..0ed0ae2df1c3f35c6f5b08310111ac77c8a3514b 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 8f647f4ef575f1caa80a3f016c76e17daec428f8..4ded33c40bf2df9aedac8b59deceb75e989201f0 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 69750a04d71fd9f17f99a24c3799e5d3b20150e1..3dcf6e1e22fe42d5f3cff80669bb27cd45bb2a8f 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 569a5b4121e83ed69cf3b7a6230a71a5802ea48f..1d8f215aacb5d1075ad99797f7efe9b8780865bd 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 22f4ec2bd62e2c264a890a31ecbf4adcd6c41b4b..c713dee6a30525ff71017d2491885c73e1ebd3d6 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 f25dd86f5ccf22827953dd80e1927392172b761d..216ded70a4a1f2553ded51bdb7699d79d86d4259 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 b03239e7806703d0d616cb0f4194ea791b6ab4cd..9c0df19dd1f193490a961b89e04835068cf61fb4 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 45d07743a3a578e33f8845a7156a7d04309e4ddb..85e46f428793bbba27194142b1bc47b7950bd4e6 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 53e74acfbdc68985e86168b7376186fa428ae848..8dd0c9a8f083246e375958ff6a7e2066762d1964 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 0000000000000000000000000000000000000000..ad9183f2c79307fd6e2a3a226d9a52afaa89a224 --- /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 bb5c0644b0b0fc87741711846541a27e1fd5105a..2092d195e743a1b982a34f1cdb1b4de39bedbd4d 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 15cf54a08f540dbcf14239cd6746a7ee25197192..7b83f6df60c2c2470fbd0e4c3165d5d3425cb0f1 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 1adfd9f93818802e4a5e63e3851cd27a3cd70225..7dd19ae2243c2a68a09597d40d23930e505ffca7 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 6fdb007d9048c9cfb614293e9c7502067ebaec88..ee7806a7a0d0f96bcd75771404c129fb2f03ace6 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 7c1ff861eac63aa16d30158b81e66233f45a0be2..9e6a28ffae373c636da018731f066650b94b3984 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.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/CommunicationLinkResourceTypeItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/CommunicationLinkResourceTypeItemProvider.java index 6699a456e812d718b1962254df41ca5e237b17f6..99ed79fb77d158631a77fcba2a364f01d970d099 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/CommunicationLinkResourceTypeItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/CommunicationLinkResourceTypeItemProvider.java @@ -26,86 +26,80 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider; * @generated */ public class CommunicationLinkResourceTypeItemProvider - extends ProcessingResourceTypeItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends ProcessingResourceTypeItemProvider { /** - * 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 CommunicationLinkResourceTypeItemProvider(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 CommunicationLinkResourceType.gif. - * <!-- begin-user-doc --> + * This returns CommunicationLinkResourceType.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/CommunicationLinkResourceType")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/CommunicationLinkResourceType")); + } /** - * 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 = ((CommunicationLinkResourceType)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_CommunicationLinkResourceType_type") : - getString("_UI_CommunicationLinkResourceType_type") + " " + label; - } + String label = ((CommunicationLinkResourceType)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_CommunicationLinkResourceType_type") : + getString("_UI_CommunicationLinkResourceType_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/resourcetype/provider/PassiveResourceTypeItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/PassiveResourceTypeItemProvider.java index 3ef877ea8141272ac4967c253b9fc7511208a89b..f4da065f2f5c7181c9f484a0b5ada68a49470362 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/PassiveResourceTypeItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/PassiveResourceTypeItemProvider.java @@ -26,86 +26,80 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider; * @generated */ public class PassiveResourceTypeItemProvider - extends ResourceTypeItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends ResourceTypeItemProvider { /** - * 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 PassiveResourceTypeItemProvider(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 PassiveResourceType.gif. - * <!-- begin-user-doc --> + * This returns PassiveResourceType.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/PassiveResourceType")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/PassiveResourceType")); + } /** - * 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 = ((PassiveResourceType)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_PassiveResourceType_type") : - getString("_UI_PassiveResourceType_type") + " " + label; - } + String label = ((PassiveResourceType)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_PassiveResourceType_type") : + getString("_UI_PassiveResourceType_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/resourcetype/provider/ProcessingResourceTypeItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/ProcessingResourceTypeItemProvider.java index a51cfb3b46adcc49638c6910aebe59b65cb2c91a..7af34a72ed9c179533f3745bc6847120cf6c1bf3 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/ProcessingResourceTypeItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/ProcessingResourceTypeItemProvider.java @@ -26,86 +26,80 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider; * @generated */ public class ProcessingResourceTypeItemProvider - extends ResourceTypeItemProvider - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { + extends ResourceTypeItemProvider { /** - * 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 ProcessingResourceTypeItemProvider(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 ProcessingResourceType.gif. - * <!-- begin-user-doc --> + * This returns ProcessingResourceType.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/ProcessingResourceType")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/ProcessingResourceType")); + } /** - * 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 = ((ProcessingResourceType)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_ProcessingResourceType_type") : - getString("_UI_ProcessingResourceType_type") + " " + label; - } + String label = ((ProcessingResourceType)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ProcessingResourceType_type") : + getString("_UI_ProcessingResourceType_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/resourcetype/provider/ResourceTypeItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/ResourceTypeItemProvider.java index 48abfa8e0c8342eb6f11541b6a1476c2fcba23a3..6c5436b83ca7b252f7368dfbfd9ebc86631e7cd2 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/ResourceTypeItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/ResourceTypeItemProvider.java @@ -32,86 +32,80 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider; * @generated */ public class ResourceTypeItemProvider - 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 ResourceTypeItemProvider(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 = ((ResourceType)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_ResourceType_type") : - getString("_UI_ResourceType_type") + " " + label; - } + String label = ((ResourceType)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ResourceType_type") : + getString("_UI_ResourceType_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/resourcetype/provider/ResourceTypeRepositoryItemProvider.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/ResourceTypeRepositoryItemProvider.java index 89dae178076fe2536f44114f5a774e947083238a..6add748ceb34e320f9a87b0d1dfb5adae1f2a8f6 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/ResourceTypeRepositoryItemProvider.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/ResourceTypeRepositoryItemProvider.java @@ -44,137 +44,137 @@ public class ResourceTypeRepositoryItemProvider IItemLabelProvider, IItemPropertySource { /** - * 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 ResourceTypeRepositoryItemProvider(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(ResourcetypePackage.Literals.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES); - } - return childrenFeatures; - } + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ResourcetypePackage.Literals.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES); + } + 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 ResourceTypeRepository.gif. - * <!-- begin-user-doc --> + * This returns ResourceTypeRepository.gif. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/ResourceTypeRepository")); - } + return overlayImage(object, getResourceLocator().getImage("full/obj16/ResourceTypeRepository")); + } /** - * 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) { - return getString("_UI_ResourceTypeRepository_type"); - } + return getString("_UI_ResourceTypeRepository_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 --> + * 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(ResourceTypeRepository.class)) { - case ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); - return; - } - super.notifyChanged(notification); - } + switch (notification.getFeatureID(ResourceTypeRepository.class)) { + case ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES: + 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 - (ResourcetypePackage.Literals.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES, - ResourcetypeFactory.eINSTANCE.createProcessingResourceType())); + newChildDescriptors.add + (createChildParameter + (ResourcetypePackage.Literals.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES, + ResourcetypeFactory.eINSTANCE.createProcessingResourceType())); - newChildDescriptors.add - (createChildParameter - (ResourcetypePackage.Literals.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES, - ResourcetypeFactory.eINSTANCE.createCommunicationLinkResourceType())); + newChildDescriptors.add + (createChildParameter + (ResourcetypePackage.Literals.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES, + ResourcetypeFactory.eINSTANCE.createCommunicationLinkResourceType())); - newChildDescriptors.add - (createChildParameter - (ResourcetypePackage.Literals.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES, - ResourcetypeFactory.eINSTANCE.createPassiveResourceType())); - } + newChildDescriptors.add + (createChildParameter + (ResourcetypePackage.Literals.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES, + ResourcetypeFactory.eINSTANCE.createPassiveResourceType())); + } /** - * 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/resourcetype/provider/ResourcetypeItemProviderAdapterFactory.java b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/ResourcetypeItemProviderAdapterFactory.java index efce4050b1f8fa53e6eb3f21b5c8049db46674ea..3b13fff7d38932060e99b038787c2b1526737dff 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/ResourcetypeItemProviderAdapterFactory.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.edit/src/edu/kit/ipd/descartes/mm/resourcetype/provider/ResourcetypeItemProviderAdapterFactory.java @@ -34,225 +34,225 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider; */ public class ResourcetypeItemProviderAdapterFactory extends ResourcetypeAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier { /** - * 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 ResourcetypeItemProviderAdapterFactory() { - 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.resourcetype.ResourceTypeRepository} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcetype.ResourceTypeRepository} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ResourceTypeRepositoryItemProvider resourceTypeRepositoryItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcetype.ResourceTypeRepository}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcetype.ResourceTypeRepository}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createResourceTypeRepositoryAdapter() { - if (resourceTypeRepositoryItemProvider == null) { - resourceTypeRepositoryItemProvider = new ResourceTypeRepositoryItemProvider(this); - } + if (resourceTypeRepositoryItemProvider == null) { + resourceTypeRepositoryItemProvider = new ResourceTypeRepositoryItemProvider(this); + } - return resourceTypeRepositoryItemProvider; - } + return resourceTypeRepositoryItemProvider; + } /** - * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcetype.ProcessingResourceType} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcetype.ProcessingResourceType} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ProcessingResourceTypeItemProvider processingResourceTypeItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcetype.ProcessingResourceType}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcetype.ProcessingResourceType}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createProcessingResourceTypeAdapter() { - if (processingResourceTypeItemProvider == null) { - processingResourceTypeItemProvider = new ProcessingResourceTypeItemProvider(this); - } + if (processingResourceTypeItemProvider == null) { + processingResourceTypeItemProvider = new ProcessingResourceTypeItemProvider(this); + } - return processingResourceTypeItemProvider; - } + return processingResourceTypeItemProvider; + } /** - * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcetype.CommunicationLinkResourceType} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcetype.CommunicationLinkResourceType} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected CommunicationLinkResourceTypeItemProvider communicationLinkResourceTypeItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcetype.CommunicationLinkResourceType}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcetype.CommunicationLinkResourceType}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createCommunicationLinkResourceTypeAdapter() { - if (communicationLinkResourceTypeItemProvider == null) { - communicationLinkResourceTypeItemProvider = new CommunicationLinkResourceTypeItemProvider(this); - } + if (communicationLinkResourceTypeItemProvider == null) { + communicationLinkResourceTypeItemProvider = new CommunicationLinkResourceTypeItemProvider(this); + } - return communicationLinkResourceTypeItemProvider; - } + return communicationLinkResourceTypeItemProvider; + } /** - * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcetype.PassiveResourceType} instances. - * <!-- begin-user-doc --> + * This keeps track of the one adapter used for all {@link edu.kit.ipd.descartes.mm.resourcetype.PassiveResourceType} instances. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected PassiveResourceTypeItemProvider passiveResourceTypeItemProvider; /** - * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcetype.PassiveResourceType}. - * <!-- begin-user-doc --> + * This creates an adapter for a {@link edu.kit.ipd.descartes.mm.resourcetype.PassiveResourceType}. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Adapter createPassiveResourceTypeAdapter() { - if (passiveResourceTypeItemProvider == null) { - passiveResourceTypeItemProvider = new PassiveResourceTypeItemProvider(this); - } + if (passiveResourceTypeItemProvider == null) { + passiveResourceTypeItemProvider = new PassiveResourceTypeItemProvider(this); + } - return passiveResourceTypeItemProvider; - } + return passiveResourceTypeItemProvider; + } /** - * 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); + } + } } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/.gitignore b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..ae3c1726048cd06b9a143e0376ed46dd9b9a8d53 --- /dev/null +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/plugin.xml b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/plugin.xml index 1bf0f47760806f57fc7ecc618f2ebe2f64149f5e..5c318485d06118f7478d32c8e89570a81f5322eb 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/plugin.xml +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/plugin.xml @@ -69,6 +69,18 @@ </editor> </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"> <category id="tools.descartes.dml.category" diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/containerrepository/presentation/ContainerrepositoryActionBarContributor.java b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/containerrepository/presentation/ContainerrepositoryActionBarContributor.java index 0da5c2d183a8584fc33e4770d8308d3ec2093db4..3cf8f94033058f4dde6fe7f49e67b8a97dc3ee6f 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/containerrepository/presentation/ContainerrepositoryActionBarContributor.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/containerrepository/presentation/ContainerrepositoryActionBarContributor.java @@ -52,375 +52,375 @@ public class ContainerrepositoryActionBarContributor 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 ContainerrepositoryActionBarContributor() { - 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("containerrepository-settings")); - toolBarManager.add(new Separator("containerrepository-additions")); - } + toolBarManager.add(new Separator("containerrepository-settings")); + toolBarManager.add(new Separator("containerrepository-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_ContainerrepositoryEditor_menu"), "edu.kit.ipd.descartes.mm.containerrepositoryMenuID"); - 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_ContainerrepositoryEditor_menu"), "edu.kit.ipd.descartes.mm.containerrepositoryMenuID"); + 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/containerrepository/presentation/ContainerrepositoryEditor.java b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/containerrepository/presentation/ContainerrepositoryEditor.java index 8a7b6e16f26a5ca989fe0d5fdacdfc654e2bc722..2bf75c45c4b22843eff009fc22c76f87b512714a 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/containerrepository/presentation/ContainerrepositoryEditor.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/containerrepository/presentation/ContainerrepositoryEditor.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 ContainerrepositoryEditor 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(ContainerrepositoryEditor.this); - - setCurrentViewer(contentOutlineViewer); - } - } - else if (p instanceof PropertySheet) { - if (((PropertySheet)p).getCurrentPage() == propertySheetPage) { - getActionBarContributor().setActiveEditor(ContainerrepositoryEditor.this); - handleActivate(); - } - } - else if (p == ContainerrepositoryEditor.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(ContainerrepositoryEditor.this); + + setCurrentViewer(contentOutlineViewer); + } + } + else if (p instanceof PropertySheet) { + if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) { + getActionBarContributor().setActiveEditor(ContainerrepositoryEditor.this); + handleActivate(); + } + } + else if (p == ContainerrepositoryEditor.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(ContainerrepositoryEditor.this, false); - } - } - }); - } - - if (!visitor.getChangedResources().isEmpty()) { - getSite().getShell().getDisplay().asyncExec - (new Runnable() { - public void run() { - changedResources.addAll(visitor.getChangedResources()); - if (getSite().getPage().getActiveEditor() == ContainerrepositoryEditor.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(ContainerrepositoryEditor.this, false); + } + } + }); + } + + if (!visitor.getChangedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + changedResources.addAll(visitor.getChangedResources()); + if (getSite().getPage().getActiveEditor() == ContainerrepositoryEditor.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(ContainerrepositoryEditor.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(ContainerrepositoryEditor.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 ContainerrepositoryEditor() { - 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(), ContainerrepositoryEditor.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(), ContainerrepositoryEditor.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(), ContainerrepositoryEditor.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(), ContainerrepositoryEditor.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(), ContainerrepositoryEditor.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(), ContainerrepositoryEditor.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(), ContainerrepositoryEditor.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(), ContainerrepositoryEditor.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(), ContainerrepositoryEditor.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(), ContainerrepositoryEditor.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(), ContainerrepositoryEditor.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(), ContainerrepositoryEditor.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) { - ContainerrepositoryEditor.this.setSelectionToViewer(selection); - ContainerrepositoryEditor.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) { + ContainerrepositoryEditor.this.setSelectionToViewer(selection); + ContainerrepositoryEditor.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/containerrepository/presentation/ContainerrepositoryModelWizard.java b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/containerrepository/presentation/ContainerrepositoryModelWizard.java index 67c1ccd73045971b14496b2872a10247a858421d..0107c55ced7ac4c19d155fb70cfcaf6252eb332e 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/containerrepository/presentation/ContainerrepositoryModelWizard.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/containerrepository/presentation/ContainerrepositoryModelWizard.java @@ -96,536 +96,535 @@ import org.eclipse.ui.PartInitException; */ public class ContainerrepositoryModelWizard 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_ContainerrepositoryEditorFilenameExtensions").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_ContainerrepositoryEditorFilenameExtensions").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 ContainerrepositoryPackage containerrepositoryPackage = ContainerrepositoryPackage.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 ContainerrepositoryFactory containerrepositoryFactory = containerrepositoryPackage.getContainerrepositoryFactory(); /** - * This is the file creation page. - * <!-- begin-user-doc --> + * This is the file creation page. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ContainerrepositoryModelWizardNewFileCreationPage 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 ContainerrepositoryModelWizardInitialObjectCreationPage 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/NewContainerrepository"))); - } + this.workbench = workbench; + this.selection = selection; + setWindowTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); + setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(ResourcelandscapeEditorPlugin.INSTANCE.getImage("full/wizban/NewContainerrepository"))); + } /** - * 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 : containerrepositoryPackage.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 : containerrepositoryPackage.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)containerrepositoryPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); - EObject rootObject = containerrepositoryFactory.create(eClass); - return rootObject; - } + EClass eClass = (EClass)containerrepositoryPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); + EObject rootObject = containerrepositoryFactory.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 ContainerrepositoryModelWizardNewFileCreationPage extends WizardNewFileCreationPage { /** - * Pass in the selection. - * <!-- begin-user-doc --> + * Pass in the selection. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ContainerrepositoryModelWizardNewFileCreationPage(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 ContainerrepositoryModelWizardInitialObjectCreationPage 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 ContainerrepositoryModelWizardInitialObjectCreationPage(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 ContainerrepositoryModelWizardNewFileCreationPage("Whatever", selection); - newFileCreationPage.setTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ContainerrepositoryModelWizard_label")); - newFileCreationPage.setDescription(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ContainerrepositoryModelWizard_description")); - newFileCreationPage.setFileName(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ContainerrepositoryEditorFilenameDefaultBase") + "." + 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_ContainerrepositoryEditorFilenameDefaultBase"); - 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 ContainerrepositoryModelWizardInitialObjectCreationPage("Whatever2"); - initialObjectCreationPage.setTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ContainerrepositoryModelWizard_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 ContainerrepositoryModelWizardNewFileCreationPage("Whatever", selection); + newFileCreationPage.setTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ContainerrepositoryModelWizard_label")); + newFileCreationPage.setDescription(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ContainerrepositoryModelWizard_description")); + newFileCreationPage.setFileName(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ContainerrepositoryEditorFilenameDefaultBase") + "." + 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_ContainerrepositoryEditorFilenameDefaultBase"); + 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 ContainerrepositoryModelWizardInitialObjectCreationPage("Whatever2"); + initialObjectCreationPage.setTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ContainerrepositoryModelWizard_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/resourceconfiguration/presentation/ResourceconfigurationActionBarContributor.java b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourceconfiguration/presentation/ResourceconfigurationActionBarContributor.java index ae6bccb86a2b4472fe87bf830231c27af7c0670d..5dec30940a5bbbb9baf15c1f4a565407e89f662e 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 9bc3233582b115782dd5f817675c392afc784b8b..e70a4c6d24e38008e560f15dfa2ada9c2558800e 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 d4fc5b9ab97e43ed850397b2a923cb150aa93d6e..25ffec9f4f241c4c076e51c3be070d0ce9c43339 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 1bc2d7c7ba26295ea348b3d295d9380ba69546d9..cf50d1b60726f8e7f2d9e3ad9a2544c9b29662f4 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 28dac8f8886f1010b49300f646844d47a5292575..8a8fa2fbe9fb3964c1daf0aed90fe95b412ea240 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 b38530ea0b2c3299bcde54153975934469f25db1..1fe66b745d70c5c3d6e0e849bd3f828dc7e3e8f6 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 c25a2c55e9f741dedee7821398f92c2b4f186050..309d7bd102cf2e4d8e5afae83042b1d411e0f8bb 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.editor/src/edu/kit/ipd/descartes/mm/resourcetype/presentation/ResourcetypeActionBarContributor.java b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcetype/presentation/ResourcetypeActionBarContributor.java index af3f90bd8c845a3069c7abbe2d064f9e98ba9aab..7fbd2fc8ad006afd626e7528d571da214e94948d 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcetype/presentation/ResourcetypeActionBarContributor.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcetype/presentation/ResourcetypeActionBarContributor.java @@ -52,375 +52,375 @@ public class ResourcetypeActionBarContributor 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 ResourcetypeActionBarContributor() { - 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("resourcetype-settings")); - toolBarManager.add(new Separator("resourcetype-additions")); - } + toolBarManager.add(new Separator("resourcetype-settings")); + toolBarManager.add(new Separator("resourcetype-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_ResourcetypeEditor_menu"), "edu.kit.ipd.descartes.mm.resourcetypeMenuID"); - 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_ResourcetypeEditor_menu"), "edu.kit.ipd.descartes.mm.resourcetypeMenuID"); + 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/resourcetype/presentation/ResourcetypeEditor.java b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcetype/presentation/ResourcetypeEditor.java index 4778fc3cffd68fe1a693d6bdbd50479af14b2490..3ec8664be2c279ccaeb1debcbc59b14d9456f88b 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcetype/presentation/ResourcetypeEditor.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcetype/presentation/ResourcetypeEditor.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 ResourcetypeEditor 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(ResourcetypeEditor.this); - - setCurrentViewer(contentOutlineViewer); - } - } - else if (p instanceof PropertySheet) { - if (((PropertySheet)p).getCurrentPage() == propertySheetPage) { - getActionBarContributor().setActiveEditor(ResourcetypeEditor.this); - handleActivate(); - } - } - else if (p == ResourcetypeEditor.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(ResourcetypeEditor.this); + + setCurrentViewer(contentOutlineViewer); + } + } + else if (p instanceof PropertySheet) { + if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) { + getActionBarContributor().setActiveEditor(ResourcetypeEditor.this); + handleActivate(); + } + } + else if (p == ResourcetypeEditor.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(ResourcetypeEditor.this, false); - } - } - }); - } - - if (!visitor.getChangedResources().isEmpty()) { - getSite().getShell().getDisplay().asyncExec - (new Runnable() { - public void run() { - changedResources.addAll(visitor.getChangedResources()); - if (getSite().getPage().getActiveEditor() == ResourcetypeEditor.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(ResourcetypeEditor.this, false); + } + } + }); + } + + if (!visitor.getChangedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + changedResources.addAll(visitor.getChangedResources()); + if (getSite().getPage().getActiveEditor() == ResourcetypeEditor.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(ResourcetypeEditor.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(ResourcetypeEditor.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 ResourcetypeEditor() { - 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(), ResourcetypeEditor.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(), ResourcetypeEditor.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(), ResourcetypeEditor.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(), ResourcetypeEditor.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(), ResourcetypeEditor.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(), ResourcetypeEditor.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(), ResourcetypeEditor.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(), ResourcetypeEditor.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(), ResourcetypeEditor.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(), ResourcetypeEditor.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(), ResourcetypeEditor.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(), ResourcetypeEditor.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) { - ResourcetypeEditor.this.setSelectionToViewer(selection); - ResourcetypeEditor.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) { + ResourcetypeEditor.this.setSelectionToViewer(selection); + ResourcetypeEditor.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/resourcetype/presentation/ResourcetypeModelWizard.java b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcetype/presentation/ResourcetypeModelWizard.java index 22252d62d5644893fac4fb796d02e5d92dad4f25..b2335d8807a162c2bacb0ef7d16abdbb2f0d7496 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcetype/presentation/ResourcetypeModelWizard.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape.editor/src/edu/kit/ipd/descartes/mm/resourcetype/presentation/ResourcetypeModelWizard.java @@ -96,535 +96,535 @@ import org.eclipse.ui.PartInitException; */ public class ResourcetypeModelWizard 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_ResourcetypeEditorFilenameExtensions").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_ResourcetypeEditorFilenameExtensions").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 ResourcetypePackage resourcetypePackage = ResourcetypePackage.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 ResourcetypeFactory resourcetypeFactory = resourcetypePackage.getResourcetypeFactory(); /** - * This is the file creation page. - * <!-- begin-user-doc --> + * This is the file creation page. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ResourcetypeModelWizardNewFileCreationPage 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 ResourcetypeModelWizardInitialObjectCreationPage 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/NewResourcetype"))); - } + this.workbench = workbench; + this.selection = selection; + setWindowTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); + setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(ResourcelandscapeEditorPlugin.INSTANCE.getImage("full/wizban/NewResourcetype"))); + } /** - * 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 : resourcetypePackage.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 : resourcetypePackage.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)resourcetypePackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); - EObject rootObject = resourcetypeFactory.create(eClass); - return rootObject; - } + EClass eClass = (EClass)resourcetypePackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); + EObject rootObject = resourcetypeFactory.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 ResourcetypeModelWizardNewFileCreationPage extends WizardNewFileCreationPage { /** - * Pass in the selection. - * <!-- begin-user-doc --> + * Pass in the selection. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourcetypeModelWizardNewFileCreationPage(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 ResourcetypeModelWizardInitialObjectCreationPage 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 ResourcetypeModelWizardInitialObjectCreationPage(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 ResourcetypeModelWizardNewFileCreationPage("Whatever", selection); - newFileCreationPage.setTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcetypeModelWizard_label")); - newFileCreationPage.setDescription(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcetypeModelWizard_description")); - newFileCreationPage.setFileName(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcetypeEditorFilenameDefaultBase") + "." + 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_ResourcetypeEditorFilenameDefaultBase"); - 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 ResourcetypeModelWizardInitialObjectCreationPage("Whatever2"); - initialObjectCreationPage.setTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcetypeModelWizard_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 ResourcetypeModelWizardNewFileCreationPage("Whatever", selection); + newFileCreationPage.setTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcetypeModelWizard_label")); + newFileCreationPage.setDescription(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcetypeModelWizard_description")); + newFileCreationPage.setFileName(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcetypeEditorFilenameDefaultBase") + "." + 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_ResourcetypeEditorFilenameDefaultBase"); + 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 ResourcetypeModelWizardInitialObjectCreationPage("Whatever2"); + initialObjectCreationPage.setTitle(ResourcelandscapeEditorPlugin.INSTANCE.getString("_UI_ResourcetypeModelWizard_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 713e4f1dc44d4a2d0c61d49b9098fbe5c6c5cd6f..4c19b08839d8e6b2fefa0475b0a3f053c6db3d0b 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 301cf8611152422fcd53e6725c6d8404f0557794..6fcb553c3e39748b9c1a7d65f7c51c82bfb486bb 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/containerrepository/ContainerRepository.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/ContainerRepository.java index 524a47e8626730be47f9257a103fa87e9e4a6a58..1fb63010f366a7c505093603634a125f275dc15b 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/ContainerRepository.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/ContainerRepository.java @@ -25,19 +25,19 @@ import org.eclipse.emf.common.util.EList; */ public interface ContainerRepository extends Entity { /** - * Returns the value of the '<em><b>Templates</b></em>' containment reference list. - * The list contents are of type {@link edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate}. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Templates</b></em>' containment reference list. + * The list contents are of type {@link edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate}. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Templates</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>Templates</em>' containment reference list. - * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerrepositoryPackage#getContainerRepository_Templates() - * @model containment="true" - * @generated - */ + * @return the value of the '<em>Templates</em>' containment reference list. + * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerrepositoryPackage#getContainerRepository_Templates() + * @model containment="true" + * @generated + */ EList<ContainerTemplate> getTemplates(); } // ContainerRepository diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/ContainerTemplate.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/ContainerTemplate.java index d98d74a1cc85dcb5b0077e07e3818285ee6e813b..323400516e15b6859841c1fd4d7885a477a39075 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/ContainerTemplate.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/ContainerTemplate.java @@ -31,51 +31,51 @@ import org.eclipse.emf.common.util.EList; */ public interface ContainerTemplate extends Entity { /** - * Returns the value of the '<em><b>Template Config</b></em>' containment reference list. - * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourceconfiguration.ConfigurationSpecification}. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Template Config</b></em>' containment reference list. + * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourceconfiguration.ConfigurationSpecification}. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Template Config</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>Template Config</em>' containment reference list. - * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerrepositoryPackage#getContainerTemplate_TemplateConfig() - * @model containment="true" - * @generated - */ + * @return the value of the '<em>Template Config</em>' containment reference list. + * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerrepositoryPackage#getContainerTemplate_TemplateConfig() + * @model containment="true" + * @generated + */ EList<ConfigurationSpecification> getTemplateConfig(); /** - * Returns the value of the '<em><b>Referring Containers</b></em>' reference list. - * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourcelandscape.Container}. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Referring Containers</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>Referring Containers</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>Referring Containers</em>' reference list. - * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerrepositoryPackage#getContainerTemplate_ReferringContainers() - * @model - * @generated - */ + * @return the value of the '<em>Referring Containers</em>' reference list. + * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerrepositoryPackage#getContainerTemplate_ReferringContainers() + * @model + * @generated + */ EList<Container> getReferringContainers(); /** - * Returns the value of the '<em><b>Running On</b></em>' reference list. - * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourcelandscape.Container}. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Running On</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>Running On</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>Running On</em>' reference list. - * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerrepositoryPackage#getContainerTemplate_RunningOn() - * @model - * @generated - */ + * @return the value of the '<em>Running On</em>' reference list. + * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerrepositoryPackage#getContainerTemplate_RunningOn() + * @model + * @generated + */ EList<Container> getRunningOn(); } // ContainerTemplate diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/ContainerrepositoryFactory.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/ContainerrepositoryFactory.java index 97600643bc0b4273d4df3162616112a93c69e89d..856ab56d989abd6d682caf363ab04b9bca8d7a5e 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/ContainerrepositoryFactory.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/ContainerrepositoryFactory.java @@ -15,38 +15,38 @@ import org.eclipse.emf.ecore.EFactory; */ public interface ContainerrepositoryFactory 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 + */ ContainerrepositoryFactory eINSTANCE = edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerrepositoryFactoryImpl.init(); /** - * Returns a new object of class '<em>Container Repository</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Container Repository</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Container Repository</em>'. - * @generated - */ + * @return a new object of class '<em>Container Repository</em>'. + * @generated + */ ContainerRepository createContainerRepository(); /** - * Returns a new object of class '<em>Container Template</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Container Template</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Container Template</em>'. - * @generated - */ + * @return a new object of class '<em>Container Template</em>'. + * @generated + */ ContainerTemplate createContainerTemplate(); /** - * 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 + */ ContainerrepositoryPackage getContainerrepositoryPackage(); } //ContainerrepositoryFactory diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/ContainerrepositoryPackage.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/ContainerrepositoryPackage.java index 6fe1e9a839c529e872b9bff2cda7889b4e41a385..2485b7fe1794d7a8648e730823ffcfffa4059685 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/ContainerrepositoryPackage.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/ContainerrepositoryPackage.java @@ -26,223 +26,223 @@ import org.eclipse.emf.ecore.EReference; */ public interface ContainerrepositoryPackage extends EPackage { /** - * The package name. - * <!-- begin-user-doc --> + * The package name. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ String eNAME = "containerrepository"; /** - * 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/containerrepository/1.0"; /** - * The package namespace name. - * <!-- begin-user-doc --> + * The package namespace name. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ String eNS_PREFIX = "containerrepository"; /** - * The singleton instance of the package. - * <!-- begin-user-doc --> + * The singleton instance of the package. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ ContainerrepositoryPackage eINSTANCE = edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerrepositoryPackageImpl.init(); /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerRepositoryImpl <em>Container Repository</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerRepositoryImpl <em>Container Repository</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerRepositoryImpl - * @see edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerrepositoryPackageImpl#getContainerRepository() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerRepositoryImpl + * @see edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerrepositoryPackageImpl#getContainerRepository() + * @generated + */ int CONTAINER_REPOSITORY = 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 CONTAINER_REPOSITORY__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 CONTAINER_REPOSITORY__NAME = CorePackage.ENTITY__NAME; /** - * The feature id for the '<em><b>Templates</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Templates</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CONTAINER_REPOSITORY__TEMPLATES = CorePackage.ENTITY_FEATURE_COUNT + 0; /** - * The number of structural features of the '<em>Container Repository</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Container Repository</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CONTAINER_REPOSITORY_FEATURE_COUNT = CorePackage.ENTITY_FEATURE_COUNT + 1; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerTemplateImpl <em>Container Template</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerTemplateImpl <em>Container Template</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerTemplateImpl - * @see edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerrepositoryPackageImpl#getContainerTemplate() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerTemplateImpl + * @see edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerrepositoryPackageImpl#getContainerTemplate() + * @generated + */ int CONTAINER_TEMPLATE = 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 CONTAINER_TEMPLATE__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 CONTAINER_TEMPLATE__NAME = CorePackage.ENTITY__NAME; /** - * The feature id for the '<em><b>Template Config</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Template Config</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CONTAINER_TEMPLATE__TEMPLATE_CONFIG = CorePackage.ENTITY_FEATURE_COUNT + 0; /** - * The feature id for the '<em><b>Referring Containers</b></em>' reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Referring Containers</b></em>' reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CONTAINER_TEMPLATE__REFERRING_CONTAINERS = CorePackage.ENTITY_FEATURE_COUNT + 1; /** - * The feature id for the '<em><b>Running On</b></em>' reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Running On</b></em>' reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CONTAINER_TEMPLATE__RUNNING_ON = CorePackage.ENTITY_FEATURE_COUNT + 2; /** - * The number of structural features of the '<em>Container Template</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Container Template</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CONTAINER_TEMPLATE_FEATURE_COUNT = CorePackage.ENTITY_FEATURE_COUNT + 3; /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.containerrepository.ContainerRepository <em>Container Repository</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.containerrepository.ContainerRepository <em>Container Repository</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Container Repository</em>'. - * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerRepository - * @generated - */ + * @return the meta object for class '<em>Container Repository</em>'. + * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerRepository + * @generated + */ EClass getContainerRepository(); /** - * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.containerrepository.ContainerRepository#getTemplates <em>Templates</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.containerrepository.ContainerRepository#getTemplates <em>Templates</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the containment reference list '<em>Templates</em>'. - * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerRepository#getTemplates() - * @see #getContainerRepository() - * @generated - */ + * @return the meta object for the containment reference list '<em>Templates</em>'. + * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerRepository#getTemplates() + * @see #getContainerRepository() + * @generated + */ EReference getContainerRepository_Templates(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate <em>Container Template</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate <em>Container Template</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Container Template</em>'. - * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate - * @generated - */ + * @return the meta object for class '<em>Container Template</em>'. + * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate + * @generated + */ EClass getContainerTemplate(); /** - * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate#getTemplateConfig <em>Template Config</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate#getTemplateConfig <em>Template Config</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the containment reference list '<em>Template Config</em>'. - * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate#getTemplateConfig() - * @see #getContainerTemplate() - * @generated - */ + * @return the meta object for the containment reference list '<em>Template Config</em>'. + * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate#getTemplateConfig() + * @see #getContainerTemplate() + * @generated + */ EReference getContainerTemplate_TemplateConfig(); /** - * Returns the meta object for the reference list '{@link edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate#getReferringContainers <em>Referring Containers</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the reference list '{@link edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate#getReferringContainers <em>Referring Containers</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the reference list '<em>Referring Containers</em>'. - * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate#getReferringContainers() - * @see #getContainerTemplate() - * @generated - */ + * @return the meta object for the reference list '<em>Referring Containers</em>'. + * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate#getReferringContainers() + * @see #getContainerTemplate() + * @generated + */ EReference getContainerTemplate_ReferringContainers(); /** - * Returns the meta object for the reference list '{@link edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate#getRunningOn <em>Running On</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the reference list '{@link edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate#getRunningOn <em>Running On</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the reference list '<em>Running On</em>'. - * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate#getRunningOn() - * @see #getContainerTemplate() - * @generated - */ + * @return the meta object for the reference list '<em>Running On</em>'. + * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate#getRunningOn() + * @see #getContainerTemplate() + * @generated + */ EReference getContainerTemplate_RunningOn(); /** - * 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 + */ ContainerrepositoryFactory getContainerrepositoryFactory(); /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * Defines literals for the meta objects that represent * <ul> * <li>each class,</li> @@ -251,59 +251,59 @@ public interface ContainerrepositoryPackage 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.containerrepository.impl.ContainerRepositoryImpl <em>Container Repository</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerRepositoryImpl <em>Container Repository</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerRepositoryImpl - * @see edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerrepositoryPackageImpl#getContainerRepository() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerRepositoryImpl + * @see edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerrepositoryPackageImpl#getContainerRepository() + * @generated + */ EClass CONTAINER_REPOSITORY = eINSTANCE.getContainerRepository(); /** - * The meta object literal for the '<em><b>Templates</b></em>' containment reference list feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Templates</b></em>' containment reference list feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference CONTAINER_REPOSITORY__TEMPLATES = eINSTANCE.getContainerRepository_Templates(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerTemplateImpl <em>Container Template</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerTemplateImpl <em>Container Template</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerTemplateImpl - * @see edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerrepositoryPackageImpl#getContainerTemplate() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerTemplateImpl + * @see edu.kit.ipd.descartes.mm.containerrepository.impl.ContainerrepositoryPackageImpl#getContainerTemplate() + * @generated + */ EClass CONTAINER_TEMPLATE = eINSTANCE.getContainerTemplate(); /** - * The meta object literal for the '<em><b>Template Config</b></em>' containment reference list feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Template Config</b></em>' containment reference list feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference CONTAINER_TEMPLATE__TEMPLATE_CONFIG = eINSTANCE.getContainerTemplate_TemplateConfig(); /** - * The meta object literal for the '<em><b>Referring Containers</b></em>' reference list feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Referring Containers</b></em>' reference list feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference CONTAINER_TEMPLATE__REFERRING_CONTAINERS = eINSTANCE.getContainerTemplate_ReferringContainers(); /** - * The meta object literal for the '<em><b>Running On</b></em>' reference list feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Running On</b></em>' reference list feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference CONTAINER_TEMPLATE__RUNNING_ON = eINSTANCE.getContainerTemplate_RunningOn(); } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/impl/ContainerRepositoryImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/impl/ContainerRepositoryImpl.java index 2d242e9020a83b15eda51872ac453bcda7d14007..980e28b7c6ca283e89a185d6be31ea00337be220 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/impl/ContainerRepositoryImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/impl/ContainerRepositoryImpl.java @@ -36,118 +36,118 @@ import org.eclipse.emf.ecore.util.InternalEList; */ public class ContainerRepositoryImpl extends EntityImpl implements ContainerRepository { /** - * The cached value of the '{@link #getTemplates() <em>Templates</em>}' containment reference list. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getTemplates() <em>Templates</em>}' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getTemplates() - * @generated - * @ordered - */ + * @see #getTemplates() + * @generated + * @ordered + */ protected EList<ContainerTemplate> templates; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ContainerRepositoryImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ContainerrepositoryPackage.Literals.CONTAINER_REPOSITORY; - } + return ContainerrepositoryPackage.Literals.CONTAINER_REPOSITORY; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EList<ContainerTemplate> getTemplates() { - if (templates == null) { - templates = new EObjectContainmentEList<ContainerTemplate>(ContainerTemplate.class, this, ContainerrepositoryPackage.CONTAINER_REPOSITORY__TEMPLATES); - } - return templates; - } + if (templates == null) { + templates = new EObjectContainmentEList<ContainerTemplate>(ContainerTemplate.class, this, ContainerrepositoryPackage.CONTAINER_REPOSITORY__TEMPLATES); + } + return templates; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ContainerrepositoryPackage.CONTAINER_REPOSITORY__TEMPLATES: - return ((InternalEList<?>)getTemplates()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ContainerrepositoryPackage.CONTAINER_REPOSITORY__TEMPLATES: + return ((InternalEList<?>)getTemplates()).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 ContainerrepositoryPackage.CONTAINER_REPOSITORY__TEMPLATES: - return getTemplates(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ContainerrepositoryPackage.CONTAINER_REPOSITORY__TEMPLATES: + return getTemplates(); + } + 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 ContainerrepositoryPackage.CONTAINER_REPOSITORY__TEMPLATES: - getTemplates().clear(); - getTemplates().addAll((Collection<? extends ContainerTemplate>)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ContainerrepositoryPackage.CONTAINER_REPOSITORY__TEMPLATES: + getTemplates().clear(); + getTemplates().addAll((Collection<? extends ContainerTemplate>)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 ContainerrepositoryPackage.CONTAINER_REPOSITORY__TEMPLATES: - getTemplates().clear(); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ContainerrepositoryPackage.CONTAINER_REPOSITORY__TEMPLATES: + getTemplates().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 ContainerrepositoryPackage.CONTAINER_REPOSITORY__TEMPLATES: - return templates != null && !templates.isEmpty(); - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ContainerrepositoryPackage.CONTAINER_REPOSITORY__TEMPLATES: + return templates != null && !templates.isEmpty(); + } + return super.eIsSet(featureID); + } } //ContainerRepositoryImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/impl/ContainerTemplateImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/impl/ContainerTemplateImpl.java index 23f503fb3e70abf716f8500a87ee3236522aba2f..c9a453fced015a38886f50035d5b0daf07892988 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/impl/ContainerTemplateImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/impl/ContainerTemplateImpl.java @@ -42,184 +42,184 @@ import org.eclipse.emf.ecore.util.InternalEList; */ public class ContainerTemplateImpl extends EntityImpl implements ContainerTemplate { /** - * The cached value of the '{@link #getTemplateConfig() <em>Template Config</em>}' containment reference list. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getTemplateConfig() <em>Template Config</em>}' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getTemplateConfig() - * @generated - * @ordered - */ + * @see #getTemplateConfig() + * @generated + * @ordered + */ protected EList<ConfigurationSpecification> templateConfig; /** - * The cached value of the '{@link #getReferringContainers() <em>Referring Containers</em>}' reference list. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getReferringContainers() <em>Referring Containers</em>}' reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getReferringContainers() - * @generated - * @ordered - */ + * @see #getReferringContainers() + * @generated + * @ordered + */ protected EList<Container> referringContainers; /** - * The cached value of the '{@link #getRunningOn() <em>Running On</em>}' reference list. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getRunningOn() <em>Running On</em>}' reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getRunningOn() - * @generated - * @ordered - */ + * @see #getRunningOn() + * @generated + * @ordered + */ protected EList<Container> runningOn; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ContainerTemplateImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ContainerrepositoryPackage.Literals.CONTAINER_TEMPLATE; - } + return ContainerrepositoryPackage.Literals.CONTAINER_TEMPLATE; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EList<ConfigurationSpecification> getTemplateConfig() { - if (templateConfig == null) { - templateConfig = new EObjectContainmentEList<ConfigurationSpecification>(ConfigurationSpecification.class, this, ContainerrepositoryPackage.CONTAINER_TEMPLATE__TEMPLATE_CONFIG); - } - return templateConfig; - } + if (templateConfig == null) { + templateConfig = new EObjectContainmentEList<ConfigurationSpecification>(ConfigurationSpecification.class, this, ContainerrepositoryPackage.CONTAINER_TEMPLATE__TEMPLATE_CONFIG); + } + return templateConfig; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EList<Container> getReferringContainers() { - if (referringContainers == null) { - referringContainers = new EObjectResolvingEList<Container>(Container.class, this, ContainerrepositoryPackage.CONTAINER_TEMPLATE__REFERRING_CONTAINERS); - } - return referringContainers; - } + if (referringContainers == null) { + referringContainers = new EObjectResolvingEList<Container>(Container.class, this, ContainerrepositoryPackage.CONTAINER_TEMPLATE__REFERRING_CONTAINERS); + } + return referringContainers; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EList<Container> getRunningOn() { - if (runningOn == null) { - runningOn = new EObjectResolvingEList<Container>(Container.class, this, ContainerrepositoryPackage.CONTAINER_TEMPLATE__RUNNING_ON); - } - return runningOn; - } + if (runningOn == null) { + runningOn = new EObjectResolvingEList<Container>(Container.class, this, ContainerrepositoryPackage.CONTAINER_TEMPLATE__RUNNING_ON); + } + return runningOn; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ContainerrepositoryPackage.CONTAINER_TEMPLATE__TEMPLATE_CONFIG: - return ((InternalEList<?>)getTemplateConfig()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ContainerrepositoryPackage.CONTAINER_TEMPLATE__TEMPLATE_CONFIG: + return ((InternalEList<?>)getTemplateConfig()).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 ContainerrepositoryPackage.CONTAINER_TEMPLATE__TEMPLATE_CONFIG: - return getTemplateConfig(); - case ContainerrepositoryPackage.CONTAINER_TEMPLATE__REFERRING_CONTAINERS: - return getReferringContainers(); - case ContainerrepositoryPackage.CONTAINER_TEMPLATE__RUNNING_ON: - return getRunningOn(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ContainerrepositoryPackage.CONTAINER_TEMPLATE__TEMPLATE_CONFIG: + return getTemplateConfig(); + case ContainerrepositoryPackage.CONTAINER_TEMPLATE__REFERRING_CONTAINERS: + return getReferringContainers(); + case ContainerrepositoryPackage.CONTAINER_TEMPLATE__RUNNING_ON: + return getRunningOn(); + } + 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 ContainerrepositoryPackage.CONTAINER_TEMPLATE__TEMPLATE_CONFIG: - getTemplateConfig().clear(); - getTemplateConfig().addAll((Collection<? extends ConfigurationSpecification>)newValue); - return; - case ContainerrepositoryPackage.CONTAINER_TEMPLATE__REFERRING_CONTAINERS: - getReferringContainers().clear(); - getReferringContainers().addAll((Collection<? extends Container>)newValue); - return; - case ContainerrepositoryPackage.CONTAINER_TEMPLATE__RUNNING_ON: - getRunningOn().clear(); - getRunningOn().addAll((Collection<? extends Container>)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ContainerrepositoryPackage.CONTAINER_TEMPLATE__TEMPLATE_CONFIG: + getTemplateConfig().clear(); + getTemplateConfig().addAll((Collection<? extends ConfigurationSpecification>)newValue); + return; + case ContainerrepositoryPackage.CONTAINER_TEMPLATE__REFERRING_CONTAINERS: + getReferringContainers().clear(); + getReferringContainers().addAll((Collection<? extends Container>)newValue); + return; + case ContainerrepositoryPackage.CONTAINER_TEMPLATE__RUNNING_ON: + getRunningOn().clear(); + getRunningOn().addAll((Collection<? extends Container>)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 ContainerrepositoryPackage.CONTAINER_TEMPLATE__TEMPLATE_CONFIG: - getTemplateConfig().clear(); - return; - case ContainerrepositoryPackage.CONTAINER_TEMPLATE__REFERRING_CONTAINERS: - getReferringContainers().clear(); - return; - case ContainerrepositoryPackage.CONTAINER_TEMPLATE__RUNNING_ON: - getRunningOn().clear(); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ContainerrepositoryPackage.CONTAINER_TEMPLATE__TEMPLATE_CONFIG: + getTemplateConfig().clear(); + return; + case ContainerrepositoryPackage.CONTAINER_TEMPLATE__REFERRING_CONTAINERS: + getReferringContainers().clear(); + return; + case ContainerrepositoryPackage.CONTAINER_TEMPLATE__RUNNING_ON: + getRunningOn().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 ContainerrepositoryPackage.CONTAINER_TEMPLATE__TEMPLATE_CONFIG: - return templateConfig != null && !templateConfig.isEmpty(); - case ContainerrepositoryPackage.CONTAINER_TEMPLATE__REFERRING_CONTAINERS: - return referringContainers != null && !referringContainers.isEmpty(); - case ContainerrepositoryPackage.CONTAINER_TEMPLATE__RUNNING_ON: - return runningOn != null && !runningOn.isEmpty(); - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ContainerrepositoryPackage.CONTAINER_TEMPLATE__TEMPLATE_CONFIG: + return templateConfig != null && !templateConfig.isEmpty(); + case ContainerrepositoryPackage.CONTAINER_TEMPLATE__REFERRING_CONTAINERS: + return referringContainers != null && !referringContainers.isEmpty(); + case ContainerrepositoryPackage.CONTAINER_TEMPLATE__RUNNING_ON: + return runningOn != null && !runningOn.isEmpty(); + } + return super.eIsSet(featureID); + } } //ContainerTemplateImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/impl/ContainerrepositoryFactoryImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/impl/ContainerrepositoryFactoryImpl.java index 6023d713ac0cbaaa6349b10c1dcbc1ce072009c0..83e3c0b5ddaff85120c6c87fc85994506fe35221 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/impl/ContainerrepositoryFactoryImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/impl/ContainerrepositoryFactoryImpl.java @@ -21,87 +21,87 @@ import org.eclipse.emf.ecore.plugin.EcorePlugin; */ public class ContainerrepositoryFactoryImpl extends EFactoryImpl implements ContainerrepositoryFactory { /** - * Creates the default factory implementation. - * <!-- begin-user-doc --> + * Creates the default factory implementation. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static ContainerrepositoryFactory init() { - try { - ContainerrepositoryFactory theContainerrepositoryFactory = (ContainerrepositoryFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.descartes-research.net/metamodel/containerrepository/1.0"); - if (theContainerrepositoryFactory != null) { - return theContainerrepositoryFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new ContainerrepositoryFactoryImpl(); - } + try { + ContainerrepositoryFactory theContainerrepositoryFactory = (ContainerrepositoryFactory)EPackage.Registry.INSTANCE.getEFactory(ContainerrepositoryPackage.eNS_URI); + if (theContainerrepositoryFactory != null) { + return theContainerrepositoryFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ContainerrepositoryFactoryImpl(); + } /** - * Creates an instance of the factory. - * <!-- begin-user-doc --> + * Creates an instance of the factory. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ContainerrepositoryFactoryImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case ContainerrepositoryPackage.CONTAINER_REPOSITORY: return createContainerRepository(); - case ContainerrepositoryPackage.CONTAINER_TEMPLATE: return createContainerTemplate(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } + switch (eClass.getClassifierID()) { + case ContainerrepositoryPackage.CONTAINER_REPOSITORY: return createContainerRepository(); + case ContainerrepositoryPackage.CONTAINER_TEMPLATE: return createContainerTemplate(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ContainerRepository createContainerRepository() { - ContainerRepositoryImpl containerRepository = new ContainerRepositoryImpl(); - return containerRepository; - } + ContainerRepositoryImpl containerRepository = new ContainerRepositoryImpl(); + return containerRepository; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ContainerTemplate createContainerTemplate() { - ContainerTemplateImpl containerTemplate = new ContainerTemplateImpl(); - return containerTemplate; - } + ContainerTemplateImpl containerTemplate = new ContainerTemplateImpl(); + return containerTemplate; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ContainerrepositoryPackage getContainerrepositoryPackage() { - return (ContainerrepositoryPackage)getEPackage(); - } + return (ContainerrepositoryPackage)getEPackage(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @deprecated - * @generated - */ + * @deprecated + * @generated + */ @Deprecated public static ContainerrepositoryPackage getPackage() { - return ContainerrepositoryPackage.eINSTANCE; - } + return ContainerrepositoryPackage.eINSTANCE; + } } //ContainerrepositoryFactoryImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/impl/ContainerrepositoryPackageImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/impl/ContainerrepositoryPackageImpl.java index 1e46db679b71f658ae9fa7c4286cba2a57ba0dff..0d8f12c4fc05843ee73286bbd93272bb8f11a8b3 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/impl/ContainerrepositoryPackageImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/impl/ContainerrepositoryPackageImpl.java @@ -40,235 +40,235 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; */ public class ContainerrepositoryPackageImpl extends EPackageImpl implements ContainerrepositoryPackage { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass containerRepositoryEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass containerTemplateEClass = 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 --> + * 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.containerrepository.ContainerrepositoryPackage#eNS_URI - * @see #init() - * @generated - */ + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerrepositoryPackage#eNS_URI + * @see #init() + * @generated + */ private ContainerrepositoryPackageImpl() { - super(eNS_URI, ContainerrepositoryFactory.eINSTANCE); - } + super(eNS_URI, ContainerrepositoryFactory.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 ContainerrepositoryPackage#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 ContainerrepositoryPackage#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 ContainerrepositoryPackage init() { - if (isInited) return (ContainerrepositoryPackage)EPackage.Registry.INSTANCE.getEPackage(ContainerrepositoryPackage.eNS_URI); + if (isInited) return (ContainerrepositoryPackage)EPackage.Registry.INSTANCE.getEPackage(ContainerrepositoryPackage.eNS_URI); - // Obtain or create and register package - ContainerrepositoryPackageImpl theContainerrepositoryPackage = (ContainerrepositoryPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ContainerrepositoryPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ContainerrepositoryPackageImpl()); + // Obtain or create and register package + ContainerrepositoryPackageImpl theContainerrepositoryPackage = (ContainerrepositoryPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ContainerrepositoryPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ContainerrepositoryPackageImpl()); - 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); - ResourceconfigurationPackageImpl theResourceconfigurationPackage = (ResourceconfigurationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI) instanceof ResourceconfigurationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI) : ResourceconfigurationPackage.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); + ResourceconfigurationPackageImpl theResourceconfigurationPackage = (ResourceconfigurationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI) instanceof ResourceconfigurationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI) : ResourceconfigurationPackage.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 - theContainerrepositoryPackage.createPackageContents(); - theResourcelandscapePackage.createPackageContents(); - theResourceconfigurationPackage.createPackageContents(); - theRuntimeenvironmentclassesPackage.createPackageContents(); - theResourcetypePackage.createPackageContents(); + // Create package meta-data objects + theContainerrepositoryPackage.createPackageContents(); + theResourcelandscapePackage.createPackageContents(); + theResourceconfigurationPackage.createPackageContents(); + theRuntimeenvironmentclassesPackage.createPackageContents(); + theResourcetypePackage.createPackageContents(); - // Initialize created meta-data - theContainerrepositoryPackage.initializePackageContents(); - theResourcelandscapePackage.initializePackageContents(); - theResourceconfigurationPackage.initializePackageContents(); - theRuntimeenvironmentclassesPackage.initializePackageContents(); - theResourcetypePackage.initializePackageContents(); + // Initialize created meta-data + theContainerrepositoryPackage.initializePackageContents(); + theResourcelandscapePackage.initializePackageContents(); + theResourceconfigurationPackage.initializePackageContents(); + theRuntimeenvironmentclassesPackage.initializePackageContents(); + theResourcetypePackage.initializePackageContents(); - // Mark meta-data to indicate it can't be changed - theContainerrepositoryPackage.freeze(); + // Mark meta-data to indicate it can't be changed + theContainerrepositoryPackage.freeze(); - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(ContainerrepositoryPackage.eNS_URI, theContainerrepositoryPackage); - return theContainerrepositoryPackage; - } + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ContainerrepositoryPackage.eNS_URI, theContainerrepositoryPackage); + return theContainerrepositoryPackage; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getContainerRepository() { - return containerRepositoryEClass; - } + return containerRepositoryEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getContainerRepository_Templates() { - return (EReference)containerRepositoryEClass.getEStructuralFeatures().get(0); - } + return (EReference)containerRepositoryEClass.getEStructuralFeatures().get(0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getContainerTemplate() { - return containerTemplateEClass; - } + return containerTemplateEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getContainerTemplate_TemplateConfig() { - return (EReference)containerTemplateEClass.getEStructuralFeatures().get(0); - } + return (EReference)containerTemplateEClass.getEStructuralFeatures().get(0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getContainerTemplate_ReferringContainers() { - return (EReference)containerTemplateEClass.getEStructuralFeatures().get(1); - } + return (EReference)containerTemplateEClass.getEStructuralFeatures().get(1); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getContainerTemplate_RunningOn() { - return (EReference)containerTemplateEClass.getEStructuralFeatures().get(2); - } + return (EReference)containerTemplateEClass.getEStructuralFeatures().get(2); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ContainerrepositoryFactory getContainerrepositoryFactory() { - return (ContainerrepositoryFactory)getEFactoryInstance(); - } + return (ContainerrepositoryFactory)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 - containerRepositoryEClass = createEClass(CONTAINER_REPOSITORY); - createEReference(containerRepositoryEClass, CONTAINER_REPOSITORY__TEMPLATES); + // Create classes and their features + containerRepositoryEClass = createEClass(CONTAINER_REPOSITORY); + createEReference(containerRepositoryEClass, CONTAINER_REPOSITORY__TEMPLATES); - containerTemplateEClass = createEClass(CONTAINER_TEMPLATE); - createEReference(containerTemplateEClass, CONTAINER_TEMPLATE__TEMPLATE_CONFIG); - createEReference(containerTemplateEClass, CONTAINER_TEMPLATE__REFERRING_CONTAINERS); - createEReference(containerTemplateEClass, CONTAINER_TEMPLATE__RUNNING_ON); - } + containerTemplateEClass = createEClass(CONTAINER_TEMPLATE); + createEReference(containerTemplateEClass, CONTAINER_TEMPLATE__TEMPLATE_CONFIG); + createEReference(containerTemplateEClass, CONTAINER_TEMPLATE__REFERRING_CONTAINERS); + createEReference(containerTemplateEClass, CONTAINER_TEMPLATE__RUNNING_ON); + } /** - * <!-- 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; + if (isInitialized) return; + isInitialized = true; - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); - // Obtain other dependent packages - CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); - ResourceconfigurationPackage theResourceconfigurationPackage = (ResourceconfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI); - ResourcelandscapePackage theResourcelandscapePackage = (ResourcelandscapePackage)EPackage.Registry.INSTANCE.getEPackage(ResourcelandscapePackage.eNS_URI); + // Obtain other dependent packages + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + ResourceconfigurationPackage theResourceconfigurationPackage = (ResourceconfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI); + ResourcelandscapePackage theResourcelandscapePackage = (ResourcelandscapePackage)EPackage.Registry.INSTANCE.getEPackage(ResourcelandscapePackage.eNS_URI); - // Create type parameters + // Create type parameters - // Set bounds for type parameters + // Set bounds for type parameters - // Add supertypes to classes - containerRepositoryEClass.getESuperTypes().add(theCorePackage.getEntity()); - containerTemplateEClass.getESuperTypes().add(theCorePackage.getEntity()); + // Add supertypes to classes + containerRepositoryEClass.getESuperTypes().add(theCorePackage.getEntity()); + containerTemplateEClass.getESuperTypes().add(theCorePackage.getEntity()); - // Initialize classes and features; add operations and parameters - initEClass(containerRepositoryEClass, ContainerRepository.class, "ContainerRepository", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getContainerRepository_Templates(), this.getContainerTemplate(), null, "templates", null, 0, -1, ContainerRepository.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + // Initialize classes and features; add operations and parameters + initEClass(containerRepositoryEClass, ContainerRepository.class, "ContainerRepository", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getContainerRepository_Templates(), this.getContainerTemplate(), null, "templates", null, 0, -1, ContainerRepository.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEClass(containerTemplateEClass, ContainerTemplate.class, "ContainerTemplate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getContainerTemplate_TemplateConfig(), theResourceconfigurationPackage.getConfigurationSpecification(), null, "templateConfig", null, 0, -1, ContainerTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getContainerTemplate_ReferringContainers(), theResourcelandscapePackage.getContainer(), null, "referringContainers", null, 0, -1, ContainerTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getContainerTemplate_RunningOn(), theResourcelandscapePackage.getContainer(), null, "runningOn", null, 0, -1, ContainerTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(containerTemplateEClass, ContainerTemplate.class, "ContainerTemplate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getContainerTemplate_TemplateConfig(), theResourceconfigurationPackage.getConfigurationSpecification(), null, "templateConfig", null, 0, -1, ContainerTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getContainerTemplate_ReferringContainers(), theResourcelandscapePackage.getContainer(), null, "referringContainers", null, 0, -1, ContainerTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getContainerTemplate_RunningOn(), theResourcelandscapePackage.getContainer(), null, "runningOn", null, 0, -1, ContainerTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - // Create resource - createResource(eNS_URI); - } + // Create resource + createResource(eNS_URI); + } } //ContainerrepositoryPackageImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/util/ContainerrepositoryAdapterFactory.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/util/ContainerrepositoryAdapterFactory.java index 52d165c3ec80eec4f7a789d11150d3be0b1a4d8c..b85dfc2a198bd3927b308d8bfa62027cd3e314e0 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/util/ContainerrepositoryAdapterFactory.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/util/ContainerrepositoryAdapterFactory.java @@ -27,172 +27,172 @@ import org.eclipse.emf.ecore.EObject; */ public class ContainerrepositoryAdapterFactory extends AdapterFactoryImpl { /** - * The cached model package. - * <!-- begin-user-doc --> + * The cached model package. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected static ContainerrepositoryPackage 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 ContainerrepositoryAdapterFactory() { - if (modelPackage == null) { - modelPackage = ContainerrepositoryPackage.eINSTANCE; - } - } + if (modelPackage == null) { + modelPackage = ContainerrepositoryPackage.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 ContainerrepositorySwitch<Adapter> modelSwitch = new ContainerrepositorySwitch<Adapter>() { - @Override - public Adapter caseContainerRepository(ContainerRepository object) { - return createContainerRepositoryAdapter(); - } - @Override - public Adapter caseContainerTemplate(ContainerTemplate object) { - return createContainerTemplateAdapter(); - } - @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 defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; + @Override + public Adapter caseContainerRepository(ContainerRepository object) { + return createContainerRepositoryAdapter(); + } + @Override + public Adapter caseContainerTemplate(ContainerTemplate object) { + return createContainerTemplateAdapter(); + } + @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 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.containerrepository.ContainerRepository <em>Container Repository</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.containerrepository.ContainerRepository <em>Container Repository</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.containerrepository.ContainerRepository - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerRepository + * @generated + */ public Adapter createContainerRepositoryAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate <em>Container Template</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate <em>Container Template</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.containerrepository.ContainerTemplate - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.containerrepository.ContainerTemplate + * @generated + */ public Adapter createContainerTemplateAdapter() { - 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 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; + } } //ContainerrepositoryAdapterFactory diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/util/ContainerrepositorySwitch.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/util/ContainerrepositorySwitch.java index 0fe67d5ba3acefe990e4e7348c921256461a11ee..8b22ad3d565202699bce86404997c63bec9a331b 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/util/ContainerrepositorySwitch.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/containerrepository/util/ContainerrepositorySwitch.java @@ -30,159 +30,159 @@ import org.eclipse.emf.ecore.util.Switch; */ public class ContainerrepositorySwitch<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 ContainerrepositoryPackage 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 ContainerrepositorySwitch() { - if (modelPackage == null) { - modelPackage = ContainerrepositoryPackage.eINSTANCE; - } - } + if (modelPackage == null) { + modelPackage = ContainerrepositoryPackage.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 ContainerrepositoryPackage.CONTAINER_REPOSITORY: { - ContainerRepository containerRepository = (ContainerRepository)theEObject; - T result = caseContainerRepository(containerRepository); - if (result == null) result = caseEntity(containerRepository); - if (result == null) result = caseIdentifier(containerRepository); - if (result == null) result = caseNamedElement(containerRepository); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ContainerrepositoryPackage.CONTAINER_TEMPLATE: { - ContainerTemplate containerTemplate = (ContainerTemplate)theEObject; - T result = caseContainerTemplate(containerTemplate); - if (result == null) result = caseEntity(containerTemplate); - if (result == null) result = caseIdentifier(containerTemplate); - if (result == null) result = caseNamedElement(containerTemplate); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } + switch (classifierID) { + case ContainerrepositoryPackage.CONTAINER_REPOSITORY: { + ContainerRepository containerRepository = (ContainerRepository)theEObject; + T result = caseContainerRepository(containerRepository); + if (result == null) result = caseEntity(containerRepository); + if (result == null) result = caseIdentifier(containerRepository); + if (result == null) result = caseNamedElement(containerRepository); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ContainerrepositoryPackage.CONTAINER_TEMPLATE: { + ContainerTemplate containerTemplate = (ContainerTemplate)theEObject; + T result = caseContainerTemplate(containerTemplate); + if (result == null) result = caseEntity(containerTemplate); + if (result == null) result = caseIdentifier(containerTemplate); + if (result == null) result = caseNamedElement(containerTemplate); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } /** - * Returns the result of interpreting the object as an instance of '<em>Container Repository</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Container Repository</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>Container Repository</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>Container Repository</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseContainerRepository(ContainerRepository object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Container Template</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Container Template</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>Container Template</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>Container Template</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseContainerTemplate(ContainerTemplate 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>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; + } } //ContainerrepositorySwitch 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 ade9571b96035df27938466d6dfd77abeac2dfda..fc763ac699751d6ce6ec105b55955e6d12215a82 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 55632014b1879614da7ce6f7b7a2832d4dd2f36c..6c69853cdc03a7dfc411366f2a3442dcd996a6ec 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 26b0a3661b1d38dfb581f8f49e0249736ddb526f..42fe1a9865d397bda90bbd81217be35c87d5e980 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 dedde522ab872acba9c22e909859729fada13e4e..3ab3f039e817076a436a13d7918c2e03bde6f25b 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 651b8ff419e5c32c4db6eb45429eb1df61ae15fe..1adc2996c96c8c7b88d589a2d09c93d458adf265 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 1e0e0d29a01301d5075bf6ff40ee3c28a3cff057..b761fbbe6fcbf43d7257f8a982f7517c17cd63ec 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 aa5608dfb4b282d81417754a100c70ee14cc344b..69737a0b06e302d5a35feb7536e1125534ee8aef 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 830be6c53df4d01a5182d3e5a19235b756293f86..e0950b4451d09e2bb5b1b6e4c18772e87bf778a6 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 97825d813e6e311ffa622d605bc6c6aa442f8b9e..ebbdfdef06d97363cb4527e279af08f46408086d 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 8a7409ddd986fc267665c061a13b4b812eb942c2..ed8623f3c332a6bddc31833a0b45870e182daa32 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 4fc64543d6b6bccd6c53938ad36c0d7ca28e195d..5002c00eacd513e9ad650228279f61c571ba3742 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 fb4cfa972f8c656002fd44e6c2ab7f30e274c162..79ffd3b53f6e35e575fcf939fb6802d18aef2ea4 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 17cb41aa59e6fb54429afff92e4f6363e71f131f..18e2f56f75d81f891958f04e26e1971f577b451f 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 f74c9429a1ae9b8bff4951f8f5c7058d116d7aa7..3643a111fb807f97af5e27dd3879ba9715c70657 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 9a39b989603fc95ec4165f9628c9103347805ec4..b355a61c7001744d93914150410291686fb225b2 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 b3efaf19b1f2a35d62e0e1fd73c6f2b158ef9522..ae9dd4389527a2ea4a81d3e79efcb80369839347 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 357c08710a407557065648c6cba81b9fe56cd7f2..aa6545581a01f461796132b7ea169fb5fbb36770 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 a1e31c475d27360151df4ae52b45ef340d934e51..36d89caa31b61d96ab94a2835889e672132f6709 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 dee1754a184f5e06a627322940ec233cfafb5732..0a59803cc51dc2829bce0b0c27d972867d057fad 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 64b261c930eedb9b5209a182dfc5ac0a831ef0b4..7f2205349680551d8b07da50d564fc9febc2bbd7 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 c1b9feccf9ee064c092c0d5bde8b87c0a25cae72..dedf61f745264b11f420bc9366d249428efefc02 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 9439289803c517346c7a78ba1fc0907bc4e46949..3381dbb8a6c64393bfd10e7788072b729f7b968c 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 60831cd272eae462a8d17fcdcb7c0aee81c16d73..70a3a120d66e216a6e36c1b98f523e12d9de4453 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 diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/CompositeHardwareInfrastructure.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/CompositeHardwareInfrastructure.java index 82deadd3b4cc9acc640165c33024a4c56b2d5dfc..682cf1f7e620b08fd5f77b77bd31c48db8d2b736 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/CompositeHardwareInfrastructure.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/CompositeHardwareInfrastructure.java @@ -23,19 +23,19 @@ import org.eclipse.emf.common.util.EList; */ public interface CompositeHardwareInfrastructure extends HardwareInfrastructure { /** - * Returns the value of the '<em><b>Contains</b></em>' containment reference list. - * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure}. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Contains</b></em>' containment reference list. + * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure}. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Contains</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>Contains</em>' containment reference list. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getCompositeHardwareInfrastructure_Contains() - * @model containment="true" - * @generated - */ + * @return the value of the '<em>Contains</em>' containment reference list. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getCompositeHardwareInfrastructure_Contains() + * @model containment="true" + * @generated + */ EList<HardwareInfrastructure> getContains(); } // CompositeHardwareInfrastructure diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/Container.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/Container.java index 4f954351220c33b2f13c439de4b3e27a30240372..0b1d32648774d15a882c1aaa5123083a1c657533 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/Container.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/Container.java @@ -31,63 +31,63 @@ import org.eclipse.emf.common.util.EList; */ public interface Container extends Entity { /** - * Returns the value of the '<em><b>Contains</b></em>' containment reference list. - * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment}. - * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment#getContainedIn <em>Contained In</em>}'. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Contains</b></em>' containment reference list. + * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment}. + * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment#getContainedIn <em>Contained In</em>}'. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Contains</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>Contains</em>' containment reference list. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getContainer_Contains() - * @see edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment#getContainedIn - * @model opposite="containedIn" containment="true" - * @generated - */ + * @return the value of the '<em>Contains</em>' containment reference list. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getContainer_Contains() + * @see edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment#getContainedIn + * @model opposite="containedIn" containment="true" + * @generated + */ EList<RuntimeEnvironment> getContains(); /** - * Returns the value of the '<em><b>Config Spec</b></em>' containment reference list. - * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourceconfiguration.ConfigurationSpecification}. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Config Spec</b></em>' containment reference list. + * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourceconfiguration.ConfigurationSpecification}. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Config Spec</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>Config Spec</em>' containment reference list. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getContainer_ConfigSpec() - * @model containment="true" - * @generated - */ + * @return the value of the '<em>Config Spec</em>' containment reference list. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getContainer_ConfigSpec() + * @model containment="true" + * @generated + */ EList<ConfigurationSpecification> getConfigSpec(); /** - * Returns the value of the '<em><b>Template</b></em>' reference. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Template</b></em>' reference. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Template</em>' reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Template</em>' reference. - * @see #setTemplate(ContainerTemplate) - * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getContainer_Template() - * @model - * @generated - */ + * @return the value of the '<em>Template</em>' reference. + * @see #setTemplate(ContainerTemplate) + * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getContainer_Template() + * @model + * @generated + */ ContainerTemplate getTemplate(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.Container#getTemplate <em>Template</em>}' reference. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.Container#getTemplate <em>Template</em>}' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Template</em>' reference. - * @see #getTemplate() - * @generated - */ + * @param value the new value of the '<em>Template</em>' reference. + * @see #getTemplate() + * @generated + */ void setTemplate(ContainerTemplate value); } // Container diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/DataCenter.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/DataCenter.java index d1f468278a291bfb18f1c2effc77872908ad9c56..2a23a5f93da022e424b3006cd15db113a752824b 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/DataCenter.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/DataCenter.java @@ -26,49 +26,49 @@ import org.eclipse.emf.common.util.EList; */ public interface DataCenter extends Entity { /** - * Returns the value of the '<em><b>Belongs To</b></em>' container reference. - * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter#getConsistsOf <em>Consists Of</em>}'. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Belongs To</b></em>' container reference. + * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter#getConsistsOf <em>Consists Of</em>}'. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Belongs To</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>Belongs To</em>' container reference. - * @see #setBelongsTo(DistributedDataCenter) - * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getDataCenter_BelongsTo() - * @see edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter#getConsistsOf - * @model opposite="consistsOf" transient="false" - * @generated - */ + * @return the value of the '<em>Belongs To</em>' container reference. + * @see #setBelongsTo(DistributedDataCenter) + * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getDataCenter_BelongsTo() + * @see edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter#getConsistsOf + * @model opposite="consistsOf" transient="false" + * @generated + */ DistributedDataCenter getBelongsTo(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getBelongsTo <em>Belongs To</em>}' container reference. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getBelongsTo <em>Belongs To</em>}' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Belongs To</em>' container reference. - * @see #getBelongsTo() - * @generated - */ + * @param value the new value of the '<em>Belongs To</em>' container reference. + * @see #getBelongsTo() + * @generated + */ void setBelongsTo(DistributedDataCenter value); /** - * Returns the value of the '<em><b>Contains</b></em>' containment reference list. - * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure}. - * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure#getPartOf <em>Part Of</em>}'. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Contains</b></em>' containment reference list. + * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure}. + * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure#getPartOf <em>Part Of</em>}'. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Contains</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>Contains</em>' containment reference list. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getDataCenter_Contains() - * @see edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure#getPartOf - * @model opposite="partOf" containment="true" - * @generated - */ + * @return the value of the '<em>Contains</em>' containment reference list. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getDataCenter_Contains() + * @see edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure#getPartOf + * @model opposite="partOf" containment="true" + * @generated + */ EList<HardwareInfrastructure> getContains(); } // DataCenter diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/DistributedDataCenter.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/DistributedDataCenter.java index 795c40432cec9b57f7bc11b9eafe6372740b2918..9fd698eb5f4f7a7a899a01e5d6d35c00799abe43 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/DistributedDataCenter.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/DistributedDataCenter.java @@ -25,21 +25,21 @@ import org.eclipse.emf.common.util.EList; */ public interface DistributedDataCenter extends Entity { /** - * Returns the value of the '<em><b>Consists Of</b></em>' containment reference list. - * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter}. - * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getBelongsTo <em>Belongs To</em>}'. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Consists Of</b></em>' containment reference list. + * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter}. + * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getBelongsTo <em>Belongs To</em>}'. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Consists Of</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>Consists Of</em>' containment reference list. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getDistributedDataCenter_ConsistsOf() - * @see edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getBelongsTo - * @model opposite="belongsTo" containment="true" required="true" - * @generated - */ + * @return the value of the '<em>Consists Of</em>' containment reference list. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getDistributedDataCenter_ConsistsOf() + * @see edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getBelongsTo + * @model opposite="belongsTo" containment="true" required="true" + * @generated + */ EList<DataCenter> getConsistsOf(); } // DistributedDataCenter diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/HardwareInfrastructure.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/HardwareInfrastructure.java index 35cdc5ed1859b4cd3f49530972147f106940715c..481ca5b5e96967797996292565b84a94eb4e7e45 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/HardwareInfrastructure.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/HardwareInfrastructure.java @@ -23,31 +23,31 @@ import edu.kit.ipd.descartes.core.Entity; */ public interface HardwareInfrastructure extends Entity { /** - * Returns the value of the '<em><b>Part Of</b></em>' container reference. - * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getContains <em>Contains</em>}'. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Part Of</b></em>' container reference. + * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getContains <em>Contains</em>}'. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Part Of</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>Part Of</em>' container reference. - * @see #setPartOf(DataCenter) - * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getHardwareInfrastructure_PartOf() - * @see edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getContains - * @model opposite="contains" transient="false" - * @generated - */ + * @return the value of the '<em>Part Of</em>' container reference. + * @see #setPartOf(DataCenter) + * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getHardwareInfrastructure_PartOf() + * @see edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getContains + * @model opposite="contains" transient="false" + * @generated + */ DataCenter getPartOf(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure#getPartOf <em>Part Of</em>}' container reference. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure#getPartOf <em>Part Of</em>}' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Part Of</em>' container reference. - * @see #getPartOf() - * @generated - */ + * @param value the new value of the '<em>Part Of</em>' container reference. + * @see #getPartOf() + * @generated + */ void setPartOf(DataCenter value); } // HardwareInfrastructure diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/ResourcelandscapeFactory.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/ResourcelandscapeFactory.java index 11d1a1d0fdbe3c5bf7fb6a98e93c6740120cdada..9392a4c4d917ee97d92bffdb64548a1e80318f55 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/ResourcelandscapeFactory.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/ResourcelandscapeFactory.java @@ -15,83 +15,83 @@ import org.eclipse.emf.ecore.EFactory; */ public interface ResourcelandscapeFactory 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 + */ ResourcelandscapeFactory eINSTANCE = edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapeFactoryImpl.init(); /** - * Returns a new object of class '<em>Computing Infrastructure</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Computing Infrastructure</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Computing Infrastructure</em>'. - * @generated - */ + * @return a new object of class '<em>Computing Infrastructure</em>'. + * @generated + */ ComputingInfrastructure createComputingInfrastructure(); /** - * Returns a new object of class '<em>Networking Infrastructure</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Networking Infrastructure</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Networking Infrastructure</em>'. - * @generated - */ + * @return a new object of class '<em>Networking Infrastructure</em>'. + * @generated + */ NetworkingInfrastructure createNetworkingInfrastructure(); /** - * Returns a new object of class '<em>Storage Infrastructure</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Storage Infrastructure</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Storage Infrastructure</em>'. - * @generated - */ + * @return a new object of class '<em>Storage Infrastructure</em>'. + * @generated + */ StorageInfrastructure createStorageInfrastructure(); /** - * Returns a new object of class '<em>Runtime Environment</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Runtime Environment</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Runtime Environment</em>'. - * @generated - */ + * @return a new object of class '<em>Runtime Environment</em>'. + * @generated + */ RuntimeEnvironment createRuntimeEnvironment(); /** - * Returns a new object of class '<em>Data Center</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Data Center</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Data Center</em>'. - * @generated - */ + * @return a new object of class '<em>Data Center</em>'. + * @generated + */ DataCenter createDataCenter(); /** - * Returns a new object of class '<em>Distributed Data Center</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Distributed Data Center</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Distributed Data Center</em>'. - * @generated - */ + * @return a new object of class '<em>Distributed Data Center</em>'. + * @generated + */ DistributedDataCenter createDistributedDataCenter(); /** - * Returns a new object of class '<em>Composite Hardware Infrastructure</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Composite Hardware Infrastructure</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Composite Hardware Infrastructure</em>'. - * @generated - */ + * @return a new object of class '<em>Composite Hardware Infrastructure</em>'. + * @generated + */ CompositeHardwareInfrastructure createCompositeHardwareInfrastructure(); /** - * 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 + */ ResourcelandscapePackage getResourcelandscapePackage(); } //ResourcelandscapeFactory diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/ResourcelandscapePackage.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/ResourcelandscapePackage.java index e6e52d83f61aa9e58d8725a23fe0e01dfb087583..2aa632b987ebb1ca8148ab9e20dc39b1f8d46aba 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/ResourcelandscapePackage.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/ResourcelandscapePackage.java @@ -28,816 +28,816 @@ import org.eclipse.emf.ecore.EReference; */ public interface ResourcelandscapePackage extends EPackage { /** - * The package name. - * <!-- begin-user-doc --> + * The package name. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ String eNAME = "resourcelandscape"; /** - * 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/resourcelandscape/1.0"; /** - * The package namespace name. - * <!-- begin-user-doc --> + * The package namespace name. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ String eNS_PREFIX = "resourcelandscape"; /** - * The singleton instance of the package. - * <!-- begin-user-doc --> + * The singleton instance of the package. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ ResourcelandscapePackage eINSTANCE = edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl.init(); /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.ContainerImpl <em>Container</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.ContainerImpl <em>Container</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ContainerImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getContainer() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ContainerImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getContainer() + * @generated + */ int CONTAINER = 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 CONTAINER__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 CONTAINER__NAME = CorePackage.ENTITY__NAME; /** - * The feature id for the '<em><b>Contains</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Contains</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CONTAINER__CONTAINS = CorePackage.ENTITY_FEATURE_COUNT + 0; /** - * The feature id for the '<em><b>Config Spec</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Config Spec</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CONTAINER__CONFIG_SPEC = CorePackage.ENTITY_FEATURE_COUNT + 1; /** - * The feature id for the '<em><b>Template</b></em>' reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Template</b></em>' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CONTAINER__TEMPLATE = CorePackage.ENTITY_FEATURE_COUNT + 2; /** - * The number of structural features of the '<em>Container</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Container</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int CONTAINER_FEATURE_COUNT = CorePackage.ENTITY_FEATURE_COUNT + 3; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.ComputingInfrastructureImpl <em>Computing Infrastructure</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.ComputingInfrastructureImpl <em>Computing Infrastructure</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ComputingInfrastructureImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getComputingInfrastructure() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ComputingInfrastructureImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getComputingInfrastructure() + * @generated + */ int COMPUTING_INFRASTRUCTURE = 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 COMPUTING_INFRASTRUCTURE__ID = CONTAINER__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 COMPUTING_INFRASTRUCTURE__NAME = CONTAINER__NAME; /** - * The feature id for the '<em><b>Contains</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Contains</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int COMPUTING_INFRASTRUCTURE__CONTAINS = CONTAINER__CONTAINS; /** - * The feature id for the '<em><b>Config Spec</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Config Spec</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int COMPUTING_INFRASTRUCTURE__CONFIG_SPEC = CONTAINER__CONFIG_SPEC; /** - * The feature id for the '<em><b>Template</b></em>' reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Template</b></em>' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int COMPUTING_INFRASTRUCTURE__TEMPLATE = CONTAINER__TEMPLATE; /** - * The feature id for the '<em><b>Part Of</b></em>' container reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Part Of</b></em>' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int COMPUTING_INFRASTRUCTURE__PART_OF = CONTAINER_FEATURE_COUNT + 0; /** - * The number of structural features of the '<em>Computing Infrastructure</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Computing Infrastructure</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int COMPUTING_INFRASTRUCTURE_FEATURE_COUNT = CONTAINER_FEATURE_COUNT + 1; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.NetworkingInfrastructureImpl <em>Networking Infrastructure</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.NetworkingInfrastructureImpl <em>Networking Infrastructure</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.NetworkingInfrastructureImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getNetworkingInfrastructure() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.NetworkingInfrastructureImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getNetworkingInfrastructure() + * @generated + */ int NETWORKING_INFRASTRUCTURE = 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 NETWORKING_INFRASTRUCTURE__ID = CONTAINER__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 NETWORKING_INFRASTRUCTURE__NAME = CONTAINER__NAME; /** - * The feature id for the '<em><b>Contains</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Contains</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int NETWORKING_INFRASTRUCTURE__CONTAINS = CONTAINER__CONTAINS; /** - * The feature id for the '<em><b>Config Spec</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Config Spec</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int NETWORKING_INFRASTRUCTURE__CONFIG_SPEC = CONTAINER__CONFIG_SPEC; /** - * The feature id for the '<em><b>Template</b></em>' reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Template</b></em>' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int NETWORKING_INFRASTRUCTURE__TEMPLATE = CONTAINER__TEMPLATE; /** - * The feature id for the '<em><b>Part Of</b></em>' container reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Part Of</b></em>' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int NETWORKING_INFRASTRUCTURE__PART_OF = CONTAINER_FEATURE_COUNT + 0; /** - * The number of structural features of the '<em>Networking Infrastructure</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Networking Infrastructure</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int NETWORKING_INFRASTRUCTURE_FEATURE_COUNT = CONTAINER_FEATURE_COUNT + 1; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.StorageInfrastructureImpl <em>Storage Infrastructure</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.StorageInfrastructureImpl <em>Storage Infrastructure</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.StorageInfrastructureImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getStorageInfrastructure() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.StorageInfrastructureImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getStorageInfrastructure() + * @generated + */ int STORAGE_INFRASTRUCTURE = 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 STORAGE_INFRASTRUCTURE__ID = CONTAINER__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 STORAGE_INFRASTRUCTURE__NAME = CONTAINER__NAME; /** - * The feature id for the '<em><b>Contains</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Contains</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int STORAGE_INFRASTRUCTURE__CONTAINS = CONTAINER__CONTAINS; /** - * The feature id for the '<em><b>Config Spec</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Config Spec</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int STORAGE_INFRASTRUCTURE__CONFIG_SPEC = CONTAINER__CONFIG_SPEC; /** - * The feature id for the '<em><b>Template</b></em>' reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Template</b></em>' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int STORAGE_INFRASTRUCTURE__TEMPLATE = CONTAINER__TEMPLATE; /** - * The feature id for the '<em><b>Part Of</b></em>' container reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Part Of</b></em>' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int STORAGE_INFRASTRUCTURE__PART_OF = CONTAINER_FEATURE_COUNT + 0; /** - * The number of structural features of the '<em>Storage Infrastructure</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Storage Infrastructure</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int STORAGE_INFRASTRUCTURE_FEATURE_COUNT = CONTAINER_FEATURE_COUNT + 1; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.RuntimeEnvironmentImpl <em>Runtime Environment</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.RuntimeEnvironmentImpl <em>Runtime Environment</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.RuntimeEnvironmentImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getRuntimeEnvironment() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.RuntimeEnvironmentImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getRuntimeEnvironment() + * @generated + */ int RUNTIME_ENVIRONMENT = 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 RUNTIME_ENVIRONMENT__ID = CONTAINER__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 RUNTIME_ENVIRONMENT__NAME = CONTAINER__NAME; /** - * The feature id for the '<em><b>Contains</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Contains</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int RUNTIME_ENVIRONMENT__CONTAINS = CONTAINER__CONTAINS; /** - * The feature id for the '<em><b>Config Spec</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Config Spec</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int RUNTIME_ENVIRONMENT__CONFIG_SPEC = CONTAINER__CONFIG_SPEC; /** - * The feature id for the '<em><b>Template</b></em>' reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Template</b></em>' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int RUNTIME_ENVIRONMENT__TEMPLATE = CONTAINER__TEMPLATE; /** - * The feature id for the '<em><b>Contained In</b></em>' container reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Contained In</b></em>' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int RUNTIME_ENVIRONMENT__CONTAINED_IN = CONTAINER_FEATURE_COUNT + 0; /** - * The feature id for the '<em><b>Of Class</b></em>' attribute. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Of Class</b></em>' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int RUNTIME_ENVIRONMENT__OF_CLASS = CONTAINER_FEATURE_COUNT + 1; /** - * The number of structural features of the '<em>Runtime Environment</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Runtime Environment</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int RUNTIME_ENVIRONMENT_FEATURE_COUNT = CONTAINER_FEATURE_COUNT + 2; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.DataCenterImpl <em>Data Center</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.DataCenterImpl <em>Data Center</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.DataCenterImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getDataCenter() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.DataCenterImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getDataCenter() + * @generated + */ int DATA_CENTER = 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 DATA_CENTER__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 DATA_CENTER__NAME = CorePackage.ENTITY__NAME; /** - * The feature id for the '<em><b>Belongs To</b></em>' container reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Belongs To</b></em>' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int DATA_CENTER__BELONGS_TO = CorePackage.ENTITY_FEATURE_COUNT + 0; /** - * The feature id for the '<em><b>Contains</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Contains</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int DATA_CENTER__CONTAINS = CorePackage.ENTITY_FEATURE_COUNT + 1; /** - * The number of structural features of the '<em>Data Center</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Data Center</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int DATA_CENTER_FEATURE_COUNT = CorePackage.ENTITY_FEATURE_COUNT + 2; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.DistributedDataCenterImpl <em>Distributed Data Center</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.DistributedDataCenterImpl <em>Distributed Data Center</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.DistributedDataCenterImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getDistributedDataCenter() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.DistributedDataCenterImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getDistributedDataCenter() + * @generated + */ int DISTRIBUTED_DATA_CENTER = 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 DISTRIBUTED_DATA_CENTER__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 DISTRIBUTED_DATA_CENTER__NAME = CorePackage.ENTITY__NAME; /** - * The feature id for the '<em><b>Consists Of</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Consists Of</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int DISTRIBUTED_DATA_CENTER__CONSISTS_OF = CorePackage.ENTITY_FEATURE_COUNT + 0; /** - * The number of structural features of the '<em>Distributed Data Center</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Distributed Data Center</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int DISTRIBUTED_DATA_CENTER_FEATURE_COUNT = CorePackage.ENTITY_FEATURE_COUNT + 1; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.HardwareInfrastructureImpl <em>Hardware Infrastructure</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.HardwareInfrastructureImpl <em>Hardware Infrastructure</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.HardwareInfrastructureImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getHardwareInfrastructure() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.HardwareInfrastructureImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getHardwareInfrastructure() + * @generated + */ int HARDWARE_INFRASTRUCTURE = 8; /** - * 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 HARDWARE_INFRASTRUCTURE__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 HARDWARE_INFRASTRUCTURE__NAME = CorePackage.ENTITY__NAME; /** - * The feature id for the '<em><b>Part Of</b></em>' container reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Part Of</b></em>' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int HARDWARE_INFRASTRUCTURE__PART_OF = CorePackage.ENTITY_FEATURE_COUNT + 0; /** - * The number of structural features of the '<em>Hardware Infrastructure</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Hardware Infrastructure</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int HARDWARE_INFRASTRUCTURE_FEATURE_COUNT = CorePackage.ENTITY_FEATURE_COUNT + 1; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.CompositeHardwareInfrastructureImpl <em>Composite Hardware Infrastructure</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.CompositeHardwareInfrastructureImpl <em>Composite Hardware Infrastructure</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.CompositeHardwareInfrastructureImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getCompositeHardwareInfrastructure() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.CompositeHardwareInfrastructureImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getCompositeHardwareInfrastructure() + * @generated + */ int COMPOSITE_HARDWARE_INFRASTRUCTURE = 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 COMPOSITE_HARDWARE_INFRASTRUCTURE__ID = HARDWARE_INFRASTRUCTURE__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 COMPOSITE_HARDWARE_INFRASTRUCTURE__NAME = HARDWARE_INFRASTRUCTURE__NAME; /** - * The feature id for the '<em><b>Part Of</b></em>' container reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Part Of</b></em>' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int COMPOSITE_HARDWARE_INFRASTRUCTURE__PART_OF = HARDWARE_INFRASTRUCTURE__PART_OF; /** - * The feature id for the '<em><b>Contains</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Contains</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS = HARDWARE_INFRASTRUCTURE_FEATURE_COUNT + 0; /** - * The number of structural features of the '<em>Composite Hardware Infrastructure</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Composite Hardware Infrastructure</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int COMPOSITE_HARDWARE_INFRASTRUCTURE_FEATURE_COUNT = HARDWARE_INFRASTRUCTURE_FEATURE_COUNT + 1; /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.ComputingInfrastructure <em>Computing Infrastructure</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.ComputingInfrastructure <em>Computing Infrastructure</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Computing Infrastructure</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.ComputingInfrastructure - * @generated - */ + * @return the meta object for class '<em>Computing Infrastructure</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.ComputingInfrastructure + * @generated + */ EClass getComputingInfrastructure(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.NetworkingInfrastructure <em>Networking Infrastructure</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.NetworkingInfrastructure <em>Networking Infrastructure</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Networking Infrastructure</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.NetworkingInfrastructure - * @generated - */ + * @return the meta object for class '<em>Networking Infrastructure</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.NetworkingInfrastructure + * @generated + */ EClass getNetworkingInfrastructure(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.StorageInfrastructure <em>Storage Infrastructure</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.StorageInfrastructure <em>Storage Infrastructure</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Storage Infrastructure</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.StorageInfrastructure - * @generated - */ + * @return the meta object for class '<em>Storage Infrastructure</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.StorageInfrastructure + * @generated + */ EClass getStorageInfrastructure(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.Container <em>Container</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.Container <em>Container</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Container</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.Container - * @generated - */ + * @return the meta object for class '<em>Container</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.Container + * @generated + */ EClass getContainer(); /** - * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.resourcelandscape.Container#getContains <em>Contains</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.resourcelandscape.Container#getContains <em>Contains</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the containment reference list '<em>Contains</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.Container#getContains() - * @see #getContainer() - * @generated - */ + * @return the meta object for the containment reference list '<em>Contains</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.Container#getContains() + * @see #getContainer() + * @generated + */ EReference getContainer_Contains(); /** - * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.resourcelandscape.Container#getConfigSpec <em>Config Spec</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.resourcelandscape.Container#getConfigSpec <em>Config Spec</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the containment reference list '<em>Config Spec</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.Container#getConfigSpec() - * @see #getContainer() - * @generated - */ + * @return the meta object for the containment reference list '<em>Config Spec</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.Container#getConfigSpec() + * @see #getContainer() + * @generated + */ EReference getContainer_ConfigSpec(); /** - * Returns the meta object for the reference '{@link edu.kit.ipd.descartes.mm.resourcelandscape.Container#getTemplate <em>Template</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the reference '{@link edu.kit.ipd.descartes.mm.resourcelandscape.Container#getTemplate <em>Template</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the reference '<em>Template</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.Container#getTemplate() - * @see #getContainer() - * @generated - */ + * @return the meta object for the reference '<em>Template</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.Container#getTemplate() + * @see #getContainer() + * @generated + */ EReference getContainer_Template(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment <em>Runtime Environment</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment <em>Runtime Environment</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Runtime Environment</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment - * @generated - */ + * @return the meta object for class '<em>Runtime Environment</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment + * @generated + */ EClass getRuntimeEnvironment(); /** - * Returns the meta object for the container reference '{@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment#getContainedIn <em>Contained In</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the container reference '{@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment#getContainedIn <em>Contained In</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the container reference '<em>Contained In</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment#getContainedIn() - * @see #getRuntimeEnvironment() - * @generated - */ + * @return the meta object for the container reference '<em>Contained In</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment#getContainedIn() + * @see #getRuntimeEnvironment() + * @generated + */ EReference getRuntimeEnvironment_ContainedIn(); /** - * Returns the meta object for the attribute '{@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment#getOfClass <em>Of Class</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the attribute '{@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment#getOfClass <em>Of Class</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Of Class</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment#getOfClass() - * @see #getRuntimeEnvironment() - * @generated - */ + * @return the meta object for the attribute '<em>Of Class</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment#getOfClass() + * @see #getRuntimeEnvironment() + * @generated + */ EAttribute getRuntimeEnvironment_OfClass(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter <em>Data Center</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter <em>Data Center</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Data Center</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter - * @generated - */ + * @return the meta object for class '<em>Data Center</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter + * @generated + */ EClass getDataCenter(); /** - * Returns the meta object for the container reference '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getBelongsTo <em>Belongs To</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the container reference '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getBelongsTo <em>Belongs To</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the container reference '<em>Belongs To</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getBelongsTo() - * @see #getDataCenter() - * @generated - */ + * @return the meta object for the container reference '<em>Belongs To</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getBelongsTo() + * @see #getDataCenter() + * @generated + */ EReference getDataCenter_BelongsTo(); /** - * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getContains <em>Contains</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getContains <em>Contains</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the containment reference list '<em>Contains</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getContains() - * @see #getDataCenter() - * @generated - */ + * @return the meta object for the containment reference list '<em>Contains</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter#getContains() + * @see #getDataCenter() + * @generated + */ EReference getDataCenter_Contains(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter <em>Distributed Data Center</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter <em>Distributed Data Center</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Distributed Data Center</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter - * @generated - */ + * @return the meta object for class '<em>Distributed Data Center</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter + * @generated + */ EClass getDistributedDataCenter(); /** - * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter#getConsistsOf <em>Consists Of</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter#getConsistsOf <em>Consists Of</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the containment reference list '<em>Consists Of</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter#getConsistsOf() - * @see #getDistributedDataCenter() - * @generated - */ + * @return the meta object for the containment reference list '<em>Consists Of</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter#getConsistsOf() + * @see #getDistributedDataCenter() + * @generated + */ EReference getDistributedDataCenter_ConsistsOf(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.CompositeHardwareInfrastructure <em>Composite Hardware Infrastructure</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.CompositeHardwareInfrastructure <em>Composite Hardware Infrastructure</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Composite Hardware Infrastructure</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.CompositeHardwareInfrastructure - * @generated - */ + * @return the meta object for class '<em>Composite Hardware Infrastructure</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.CompositeHardwareInfrastructure + * @generated + */ EClass getCompositeHardwareInfrastructure(); /** - * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.resourcelandscape.CompositeHardwareInfrastructure#getContains <em>Contains</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.resourcelandscape.CompositeHardwareInfrastructure#getContains <em>Contains</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the containment reference list '<em>Contains</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.CompositeHardwareInfrastructure#getContains() - * @see #getCompositeHardwareInfrastructure() - * @generated - */ + * @return the meta object for the containment reference list '<em>Contains</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.CompositeHardwareInfrastructure#getContains() + * @see #getCompositeHardwareInfrastructure() + * @generated + */ EReference getCompositeHardwareInfrastructure_Contains(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure <em>Hardware Infrastructure</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure <em>Hardware Infrastructure</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Hardware Infrastructure</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure - * @generated - */ + * @return the meta object for class '<em>Hardware Infrastructure</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure + * @generated + */ EClass getHardwareInfrastructure(); /** - * Returns the meta object for the container reference '{@link edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure#getPartOf <em>Part Of</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the container reference '{@link edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure#getPartOf <em>Part Of</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the container reference '<em>Part Of</em>'. - * @see edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure#getPartOf() - * @see #getHardwareInfrastructure() - * @generated - */ + * @return the meta object for the container reference '<em>Part Of</em>'. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure#getPartOf() + * @see #getHardwareInfrastructure() + * @generated + */ EReference getHardwareInfrastructure_PartOf(); /** - * 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 + */ ResourcelandscapeFactory getResourcelandscapeFactory(); /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * Defines literals for the meta objects that represent * <ul> * <li>each class,</li> @@ -846,177 +846,177 @@ public interface ResourcelandscapePackage 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.resourcelandscape.impl.ComputingInfrastructureImpl <em>Computing Infrastructure</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.ComputingInfrastructureImpl <em>Computing Infrastructure</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ComputingInfrastructureImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getComputingInfrastructure() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ComputingInfrastructureImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getComputingInfrastructure() + * @generated + */ EClass COMPUTING_INFRASTRUCTURE = eINSTANCE.getComputingInfrastructure(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.NetworkingInfrastructureImpl <em>Networking Infrastructure</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.NetworkingInfrastructureImpl <em>Networking Infrastructure</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.NetworkingInfrastructureImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getNetworkingInfrastructure() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.NetworkingInfrastructureImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getNetworkingInfrastructure() + * @generated + */ EClass NETWORKING_INFRASTRUCTURE = eINSTANCE.getNetworkingInfrastructure(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.StorageInfrastructureImpl <em>Storage Infrastructure</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.StorageInfrastructureImpl <em>Storage Infrastructure</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.StorageInfrastructureImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getStorageInfrastructure() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.StorageInfrastructureImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getStorageInfrastructure() + * @generated + */ EClass STORAGE_INFRASTRUCTURE = eINSTANCE.getStorageInfrastructure(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.ContainerImpl <em>Container</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.ContainerImpl <em>Container</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ContainerImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getContainer() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ContainerImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getContainer() + * @generated + */ EClass CONTAINER = eINSTANCE.getContainer(); /** - * The meta object literal for the '<em><b>Contains</b></em>' containment reference list feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Contains</b></em>' containment reference list feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference CONTAINER__CONTAINS = eINSTANCE.getContainer_Contains(); /** - * The meta object literal for the '<em><b>Config Spec</b></em>' containment reference list feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Config Spec</b></em>' containment reference list feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference CONTAINER__CONFIG_SPEC = eINSTANCE.getContainer_ConfigSpec(); /** - * The meta object literal for the '<em><b>Template</b></em>' reference feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Template</b></em>' reference feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference CONTAINER__TEMPLATE = eINSTANCE.getContainer_Template(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.RuntimeEnvironmentImpl <em>Runtime Environment</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.RuntimeEnvironmentImpl <em>Runtime Environment</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.RuntimeEnvironmentImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getRuntimeEnvironment() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.RuntimeEnvironmentImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getRuntimeEnvironment() + * @generated + */ EClass RUNTIME_ENVIRONMENT = eINSTANCE.getRuntimeEnvironment(); /** - * The meta object literal for the '<em><b>Contained In</b></em>' container reference feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Contained In</b></em>' container reference feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference RUNTIME_ENVIRONMENT__CONTAINED_IN = eINSTANCE.getRuntimeEnvironment_ContainedIn(); /** - * The meta object literal for the '<em><b>Of Class</b></em>' attribute feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Of Class</b></em>' attribute feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EAttribute RUNTIME_ENVIRONMENT__OF_CLASS = eINSTANCE.getRuntimeEnvironment_OfClass(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.DataCenterImpl <em>Data Center</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.DataCenterImpl <em>Data Center</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.DataCenterImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getDataCenter() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.DataCenterImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getDataCenter() + * @generated + */ EClass DATA_CENTER = eINSTANCE.getDataCenter(); /** - * The meta object literal for the '<em><b>Belongs To</b></em>' container reference feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Belongs To</b></em>' container reference feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference DATA_CENTER__BELONGS_TO = eINSTANCE.getDataCenter_BelongsTo(); /** - * The meta object literal for the '<em><b>Contains</b></em>' containment reference list feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Contains</b></em>' containment reference list feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference DATA_CENTER__CONTAINS = eINSTANCE.getDataCenter_Contains(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.DistributedDataCenterImpl <em>Distributed Data Center</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.DistributedDataCenterImpl <em>Distributed Data Center</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.DistributedDataCenterImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getDistributedDataCenter() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.DistributedDataCenterImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getDistributedDataCenter() + * @generated + */ EClass DISTRIBUTED_DATA_CENTER = eINSTANCE.getDistributedDataCenter(); /** - * The meta object literal for the '<em><b>Consists Of</b></em>' containment reference list feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Consists Of</b></em>' containment reference list feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference DISTRIBUTED_DATA_CENTER__CONSISTS_OF = eINSTANCE.getDistributedDataCenter_ConsistsOf(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.CompositeHardwareInfrastructureImpl <em>Composite Hardware Infrastructure</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.CompositeHardwareInfrastructureImpl <em>Composite Hardware Infrastructure</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.CompositeHardwareInfrastructureImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getCompositeHardwareInfrastructure() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.CompositeHardwareInfrastructureImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getCompositeHardwareInfrastructure() + * @generated + */ EClass COMPOSITE_HARDWARE_INFRASTRUCTURE = eINSTANCE.getCompositeHardwareInfrastructure(); /** - * The meta object literal for the '<em><b>Contains</b></em>' containment reference list feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Contains</b></em>' containment reference list feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS = eINSTANCE.getCompositeHardwareInfrastructure_Contains(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.HardwareInfrastructureImpl <em>Hardware Infrastructure</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.impl.HardwareInfrastructureImpl <em>Hardware Infrastructure</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.HardwareInfrastructureImpl - * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getHardwareInfrastructure() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.HardwareInfrastructureImpl + * @see edu.kit.ipd.descartes.mm.resourcelandscape.impl.ResourcelandscapePackageImpl#getHardwareInfrastructure() + * @generated + */ EClass HARDWARE_INFRASTRUCTURE = eINSTANCE.getHardwareInfrastructure(); /** - * The meta object literal for the '<em><b>Part Of</b></em>' container reference feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Part Of</b></em>' container reference feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference HARDWARE_INFRASTRUCTURE__PART_OF = eINSTANCE.getHardwareInfrastructure_PartOf(); } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/RuntimeEnvironment.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/RuntimeEnvironment.java index 54e79c3bdc0d6c92468c695ab42134663ba6a1ae..bdfd5c456da24fe2323afa84cee9ec53abb5bf39 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/RuntimeEnvironment.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/RuntimeEnvironment.java @@ -25,60 +25,60 @@ import edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClas */ public interface RuntimeEnvironment extends Container { /** - * Returns the value of the '<em><b>Contained In</b></em>' container reference. - * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourcelandscape.Container#getContains <em>Contains</em>}'. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Contained In</b></em>' container reference. + * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourcelandscape.Container#getContains <em>Contains</em>}'. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Contained In</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>Contained In</em>' container reference. - * @see #setContainedIn(Container) - * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getRuntimeEnvironment_ContainedIn() - * @see edu.kit.ipd.descartes.mm.resourcelandscape.Container#getContains - * @model opposite="contains" required="true" transient="false" - * @generated - */ + * @return the value of the '<em>Contained In</em>' container reference. + * @see #setContainedIn(Container) + * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getRuntimeEnvironment_ContainedIn() + * @see edu.kit.ipd.descartes.mm.resourcelandscape.Container#getContains + * @model opposite="contains" required="true" transient="false" + * @generated + */ Container getContainedIn(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment#getContainedIn <em>Contained In</em>}' container reference. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment#getContainedIn <em>Contained In</em>}' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Contained In</em>' container reference. - * @see #getContainedIn() - * @generated - */ + * @param value the new value of the '<em>Contained In</em>' container reference. + * @see #getContainedIn() + * @generated + */ void setContainedIn(Container value); /** - * Returns the value of the '<em><b>Of Class</b></em>' attribute. - * The literals are from the enumeration {@link edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClasses}. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Of Class</b></em>' attribute. + * The literals are from the enumeration {@link edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClasses}. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Of Class</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @return the value of the '<em>Of Class</em>' attribute. - * @see edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClasses - * @see #setOfClass(RuntimeEnvironmentClasses) - * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getRuntimeEnvironment_OfClass() - * @model required="true" - * @generated - */ + * @return the value of the '<em>Of Class</em>' attribute. + * @see edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClasses + * @see #setOfClass(RuntimeEnvironmentClasses) + * @see edu.kit.ipd.descartes.mm.resourcelandscape.ResourcelandscapePackage#getRuntimeEnvironment_OfClass() + * @model required="true" + * @generated + */ RuntimeEnvironmentClasses getOfClass(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment#getOfClass <em>Of Class</em>}' attribute. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment#getOfClass <em>Of Class</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Of Class</em>' attribute. - * @see edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClasses - * @see #getOfClass() - * @generated - */ + * @param value the new value of the '<em>Of Class</em>' attribute. + * @see edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClasses + * @see #getOfClass() + * @generated + */ void setOfClass(RuntimeEnvironmentClasses value); } // RuntimeEnvironment diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/CompositeHardwareInfrastructureImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/CompositeHardwareInfrastructureImpl.java index 288ed62dece5f5930e6424e856190ae5a8c009ee..5f50edab6a9a7cc7a00289bd440cfbb8fe5c2987 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/CompositeHardwareInfrastructureImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/CompositeHardwareInfrastructureImpl.java @@ -35,118 +35,118 @@ import org.eclipse.emf.ecore.util.InternalEList; */ public class CompositeHardwareInfrastructureImpl extends HardwareInfrastructureImpl implements CompositeHardwareInfrastructure { /** - * The cached value of the '{@link #getContains() <em>Contains</em>}' containment reference list. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getContains() <em>Contains</em>}' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getContains() - * @generated - * @ordered - */ + * @see #getContains() + * @generated + * @ordered + */ protected EList<HardwareInfrastructure> contains; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected CompositeHardwareInfrastructureImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourcelandscapePackage.Literals.COMPOSITE_HARDWARE_INFRASTRUCTURE; - } + return ResourcelandscapePackage.Literals.COMPOSITE_HARDWARE_INFRASTRUCTURE; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EList<HardwareInfrastructure> getContains() { - if (contains == null) { - contains = new EObjectContainmentEList<HardwareInfrastructure>(HardwareInfrastructure.class, this, ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS); - } - return contains; - } + if (contains == null) { + contains = new EObjectContainmentEList<HardwareInfrastructure>(HardwareInfrastructure.class, this, ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS); + } + return contains; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS: - return ((InternalEList<?>)getContains()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS: + return ((InternalEList<?>)getContains()).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 ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS: - return getContains(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS: + return getContains(); + } + 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 ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS: - getContains().clear(); - getContains().addAll((Collection<? extends HardwareInfrastructure>)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS: + getContains().clear(); + getContains().addAll((Collection<? extends HardwareInfrastructure>)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 ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS: - getContains().clear(); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS: + getContains().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 ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS: - return contains != null && !contains.isEmpty(); - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS: + return contains != null && !contains.isEmpty(); + } + return super.eIsSet(featureID); + } } //CompositeHardwareInfrastructureImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/ComputingInfrastructureImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/ComputingInfrastructureImpl.java index 1d03a136fa39293ce4f231975284cd0a749e1786..7f9c7009599d73e43c45876adb55113edd7d7fc2 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/ComputingInfrastructureImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/ComputingInfrastructureImpl.java @@ -34,197 +34,197 @@ import org.eclipse.emf.ecore.util.EcoreUtil; */ public class ComputingInfrastructureImpl extends ContainerImpl implements ComputingInfrastructure { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ComputingInfrastructureImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourcelandscapePackage.Literals.COMPUTING_INFRASTRUCTURE; - } + return ResourcelandscapePackage.Literals.COMPUTING_INFRASTRUCTURE; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public DataCenter getPartOf() { - if (eContainerFeatureID() != ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF) return null; - return (DataCenter)eContainer(); - } + if (eContainerFeatureID() != ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF) return null; + return (DataCenter)eInternalContainer(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public NotificationChain basicSetPartOf(DataCenter newPartOf, NotificationChain msgs) { - msgs = eBasicSetContainer((InternalEObject)newPartOf, ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF, msgs); - return msgs; - } + msgs = eBasicSetContainer((InternalEObject)newPartOf, ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF, msgs); + return msgs; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setPartOf(DataCenter newPartOf) { - if (newPartOf != eInternalContainer() || (eContainerFeatureID() != ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF && newPartOf != null)) { - if (EcoreUtil.isAncestor(this, newPartOf)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newPartOf != null) - msgs = ((InternalEObject)newPartOf).eInverseAdd(this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, DataCenter.class, msgs); - msgs = basicSetPartOf(newPartOf, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF, newPartOf, newPartOf)); - } + if (newPartOf != eInternalContainer() || (eContainerFeatureID() != ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF && newPartOf != null)) { + if (EcoreUtil.isAncestor(this, newPartOf)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newPartOf != null) + msgs = ((InternalEObject)newPartOf).eInverseAdd(this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, DataCenter.class, msgs); + msgs = basicSetPartOf(newPartOf, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF, newPartOf, newPartOf)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetPartOf((DataCenter)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetPartOf((DataCenter)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 ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF: - return basicSetPartOf(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF: + return basicSetPartOf(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 ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF: - return eInternalContainer().eInverseRemove(this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, DataCenter.class, msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } + switch (eContainerFeatureID()) { + case ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF: + return eInternalContainer().eInverseRemove(this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, DataCenter.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 ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF: - return getPartOf(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF: + return getPartOf(); + } + 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 ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF: - setPartOf((DataCenter)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF: + setPartOf((DataCenter)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 ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF: - setPartOf((DataCenter)null); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF: + setPartOf((DataCenter)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 ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF: - return getPartOf() != null; - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF: + return getPartOf() != null; + } + return super.eIsSet(featureID); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { - if (baseClass == HardwareInfrastructure.class) { - switch (derivedFeatureID) { - case ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF: return ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF; - default: return -1; - } - } - return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); - } + if (baseClass == HardwareInfrastructure.class) { + switch (derivedFeatureID) { + case ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF: return ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { - if (baseClass == HardwareInfrastructure.class) { - switch (baseFeatureID) { - case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: return ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF; - default: return -1; - } - } - return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); - } + if (baseClass == HardwareInfrastructure.class) { + switch (baseFeatureID) { + case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: return ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE__PART_OF; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } } //ComputingInfrastructureImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/ContainerImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/ContainerImpl.java index 271a569cf1812ef93fa87488ef2633a9cd7c155d..56d8a7d3dc6797ded1faea57a27cda1400f38b27 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/ContainerImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/ContainerImpl.java @@ -46,227 +46,227 @@ import org.eclipse.emf.ecore.util.InternalEList; */ public abstract class ContainerImpl extends EntityImpl implements Container { /** - * The cached value of the '{@link #getContains() <em>Contains</em>}' containment reference list. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getContains() <em>Contains</em>}' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getContains() - * @generated - * @ordered - */ + * @see #getContains() + * @generated + * @ordered + */ protected EList<RuntimeEnvironment> contains; /** - * The cached value of the '{@link #getConfigSpec() <em>Config Spec</em>}' containment reference list. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getConfigSpec() <em>Config Spec</em>}' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getConfigSpec() - * @generated - * @ordered - */ + * @see #getConfigSpec() + * @generated + * @ordered + */ protected EList<ConfigurationSpecification> configSpec; /** - * The cached value of the '{@link #getTemplate() <em>Template</em>}' reference. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getTemplate() <em>Template</em>}' reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getTemplate() - * @generated - * @ordered - */ + * @see #getTemplate() + * @generated + * @ordered + */ protected ContainerTemplate template; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ContainerImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourcelandscapePackage.Literals.CONTAINER; - } + return ResourcelandscapePackage.Literals.CONTAINER; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EList<RuntimeEnvironment> getContains() { - if (contains == null) { - contains = new EObjectContainmentWithInverseEList<RuntimeEnvironment>(RuntimeEnvironment.class, this, ResourcelandscapePackage.CONTAINER__CONTAINS, ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN); - } - return contains; - } + if (contains == null) { + contains = new EObjectContainmentWithInverseEList<RuntimeEnvironment>(RuntimeEnvironment.class, this, ResourcelandscapePackage.CONTAINER__CONTAINS, ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN); + } + return contains; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EList<ConfigurationSpecification> getConfigSpec() { - if (configSpec == null) { - configSpec = new EObjectContainmentEList<ConfigurationSpecification>(ConfigurationSpecification.class, this, ResourcelandscapePackage.CONTAINER__CONFIG_SPEC); - } - return configSpec; - } + if (configSpec == null) { + configSpec = new EObjectContainmentEList<ConfigurationSpecification>(ConfigurationSpecification.class, this, ResourcelandscapePackage.CONTAINER__CONFIG_SPEC); + } + return configSpec; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ContainerTemplate getTemplate() { - if (template != null && template.eIsProxy()) { - InternalEObject oldTemplate = (InternalEObject)template; - template = (ContainerTemplate)eResolveProxy(oldTemplate); - if (template != oldTemplate) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, ResourcelandscapePackage.CONTAINER__TEMPLATE, oldTemplate, template)); - } - } - return template; - } + if (template != null && template.eIsProxy()) { + InternalEObject oldTemplate = (InternalEObject)template; + template = (ContainerTemplate)eResolveProxy(oldTemplate); + if (template != oldTemplate) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ResourcelandscapePackage.CONTAINER__TEMPLATE, oldTemplate, template)); + } + } + return template; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ContainerTemplate basicGetTemplate() { - return template; - } + return template; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setTemplate(ContainerTemplate newTemplate) { - ContainerTemplate oldTemplate = template; - template = newTemplate; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourcelandscapePackage.CONTAINER__TEMPLATE, oldTemplate, template)); - } + ContainerTemplate oldTemplate = template; + template = newTemplate; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourcelandscapePackage.CONTAINER__TEMPLATE, oldTemplate, template)); + } /** - * <!-- 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 ResourcelandscapePackage.CONTAINER__CONTAINS: - return ((InternalEList<InternalEObject>)(InternalEList<?>)getContains()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcelandscapePackage.CONTAINER__CONTAINS: + return ((InternalEList<InternalEObject>)(InternalEList<?>)getContains()).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 ResourcelandscapePackage.CONTAINER__CONTAINS: - return ((InternalEList<?>)getContains()).basicRemove(otherEnd, msgs); - case ResourcelandscapePackage.CONTAINER__CONFIG_SPEC: - return ((InternalEList<?>)getConfigSpec()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcelandscapePackage.CONTAINER__CONTAINS: + return ((InternalEList<?>)getContains()).basicRemove(otherEnd, msgs); + case ResourcelandscapePackage.CONTAINER__CONFIG_SPEC: + return ((InternalEList<?>)getConfigSpec()).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 ResourcelandscapePackage.CONTAINER__CONTAINS: - return getContains(); - case ResourcelandscapePackage.CONTAINER__CONFIG_SPEC: - return getConfigSpec(); - case ResourcelandscapePackage.CONTAINER__TEMPLATE: - if (resolve) return getTemplate(); - return basicGetTemplate(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourcelandscapePackage.CONTAINER__CONTAINS: + return getContains(); + case ResourcelandscapePackage.CONTAINER__CONFIG_SPEC: + return getConfigSpec(); + case ResourcelandscapePackage.CONTAINER__TEMPLATE: + if (resolve) return getTemplate(); + return basicGetTemplate(); + } + 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 ResourcelandscapePackage.CONTAINER__CONTAINS: - getContains().clear(); - getContains().addAll((Collection<? extends RuntimeEnvironment>)newValue); - return; - case ResourcelandscapePackage.CONTAINER__CONFIG_SPEC: - getConfigSpec().clear(); - getConfigSpec().addAll((Collection<? extends ConfigurationSpecification>)newValue); - return; - case ResourcelandscapePackage.CONTAINER__TEMPLATE: - setTemplate((ContainerTemplate)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourcelandscapePackage.CONTAINER__CONTAINS: + getContains().clear(); + getContains().addAll((Collection<? extends RuntimeEnvironment>)newValue); + return; + case ResourcelandscapePackage.CONTAINER__CONFIG_SPEC: + getConfigSpec().clear(); + getConfigSpec().addAll((Collection<? extends ConfigurationSpecification>)newValue); + return; + case ResourcelandscapePackage.CONTAINER__TEMPLATE: + setTemplate((ContainerTemplate)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 ResourcelandscapePackage.CONTAINER__CONTAINS: - getContains().clear(); - return; - case ResourcelandscapePackage.CONTAINER__CONFIG_SPEC: - getConfigSpec().clear(); - return; - case ResourcelandscapePackage.CONTAINER__TEMPLATE: - setTemplate((ContainerTemplate)null); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.CONTAINER__CONTAINS: + getContains().clear(); + return; + case ResourcelandscapePackage.CONTAINER__CONFIG_SPEC: + getConfigSpec().clear(); + return; + case ResourcelandscapePackage.CONTAINER__TEMPLATE: + setTemplate((ContainerTemplate)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 ResourcelandscapePackage.CONTAINER__CONTAINS: - return contains != null && !contains.isEmpty(); - case ResourcelandscapePackage.CONTAINER__CONFIG_SPEC: - return configSpec != null && !configSpec.isEmpty(); - case ResourcelandscapePackage.CONTAINER__TEMPLATE: - return template != null; - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.CONTAINER__CONTAINS: + return contains != null && !contains.isEmpty(); + case ResourcelandscapePackage.CONTAINER__CONFIG_SPEC: + return configSpec != null && !configSpec.isEmpty(); + case ResourcelandscapePackage.CONTAINER__TEMPLATE: + return template != null; + } + return super.eIsSet(featureID); + } } //ContainerImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/DataCenterImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/DataCenterImpl.java index d62140f9e436d702d835efb508d938f4393609bc..8585f6ec4ca55dca3bdd64f05abb06551e2c70a1 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/DataCenterImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/DataCenterImpl.java @@ -43,204 +43,204 @@ import org.eclipse.emf.ecore.util.InternalEList; */ public class DataCenterImpl extends EntityImpl implements DataCenter { /** - * The cached value of the '{@link #getContains() <em>Contains</em>}' containment reference list. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getContains() <em>Contains</em>}' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getContains() - * @generated - * @ordered - */ + * @see #getContains() + * @generated + * @ordered + */ protected EList<HardwareInfrastructure> contains; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected DataCenterImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourcelandscapePackage.Literals.DATA_CENTER; - } + return ResourcelandscapePackage.Literals.DATA_CENTER; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public DistributedDataCenter getBelongsTo() { - if (eContainerFeatureID() != ResourcelandscapePackage.DATA_CENTER__BELONGS_TO) return null; - return (DistributedDataCenter)eContainer(); - } + if (eContainerFeatureID() != ResourcelandscapePackage.DATA_CENTER__BELONGS_TO) return null; + return (DistributedDataCenter)eInternalContainer(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public NotificationChain basicSetBelongsTo(DistributedDataCenter newBelongsTo, NotificationChain msgs) { - msgs = eBasicSetContainer((InternalEObject)newBelongsTo, ResourcelandscapePackage.DATA_CENTER__BELONGS_TO, msgs); - return msgs; - } + msgs = eBasicSetContainer((InternalEObject)newBelongsTo, ResourcelandscapePackage.DATA_CENTER__BELONGS_TO, msgs); + return msgs; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setBelongsTo(DistributedDataCenter newBelongsTo) { - if (newBelongsTo != eInternalContainer() || (eContainerFeatureID() != ResourcelandscapePackage.DATA_CENTER__BELONGS_TO && newBelongsTo != null)) { - if (EcoreUtil.isAncestor(this, newBelongsTo)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newBelongsTo != null) - msgs = ((InternalEObject)newBelongsTo).eInverseAdd(this, ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF, DistributedDataCenter.class, msgs); - msgs = basicSetBelongsTo(newBelongsTo, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourcelandscapePackage.DATA_CENTER__BELONGS_TO, newBelongsTo, newBelongsTo)); - } + if (newBelongsTo != eInternalContainer() || (eContainerFeatureID() != ResourcelandscapePackage.DATA_CENTER__BELONGS_TO && newBelongsTo != null)) { + if (EcoreUtil.isAncestor(this, newBelongsTo)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newBelongsTo != null) + msgs = ((InternalEObject)newBelongsTo).eInverseAdd(this, ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF, DistributedDataCenter.class, msgs); + msgs = basicSetBelongsTo(newBelongsTo, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourcelandscapePackage.DATA_CENTER__BELONGS_TO, newBelongsTo, newBelongsTo)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EList<HardwareInfrastructure> getContains() { - if (contains == null) { - contains = new EObjectContainmentWithInverseEList<HardwareInfrastructure>(HardwareInfrastructure.class, this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF); - } - return contains; - } + if (contains == null) { + contains = new EObjectContainmentWithInverseEList<HardwareInfrastructure>(HardwareInfrastructure.class, this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF); + } + return contains; + } /** - * <!-- 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 ResourcelandscapePackage.DATA_CENTER__BELONGS_TO: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetBelongsTo((DistributedDataCenter)otherEnd, msgs); - case ResourcelandscapePackage.DATA_CENTER__CONTAINS: - return ((InternalEList<InternalEObject>)(InternalEList<?>)getContains()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcelandscapePackage.DATA_CENTER__BELONGS_TO: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetBelongsTo((DistributedDataCenter)otherEnd, msgs); + case ResourcelandscapePackage.DATA_CENTER__CONTAINS: + return ((InternalEList<InternalEObject>)(InternalEList<?>)getContains()).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 ResourcelandscapePackage.DATA_CENTER__BELONGS_TO: - return basicSetBelongsTo(null, msgs); - case ResourcelandscapePackage.DATA_CENTER__CONTAINS: - return ((InternalEList<?>)getContains()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcelandscapePackage.DATA_CENTER__BELONGS_TO: + return basicSetBelongsTo(null, msgs); + case ResourcelandscapePackage.DATA_CENTER__CONTAINS: + return ((InternalEList<?>)getContains()).basicRemove(otherEnd, 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 ResourcelandscapePackage.DATA_CENTER__BELONGS_TO: - return eInternalContainer().eInverseRemove(this, ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF, DistributedDataCenter.class, msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } + switch (eContainerFeatureID()) { + case ResourcelandscapePackage.DATA_CENTER__BELONGS_TO: + return eInternalContainer().eInverseRemove(this, ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF, DistributedDataCenter.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 ResourcelandscapePackage.DATA_CENTER__BELONGS_TO: - return getBelongsTo(); - case ResourcelandscapePackage.DATA_CENTER__CONTAINS: - return getContains(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourcelandscapePackage.DATA_CENTER__BELONGS_TO: + return getBelongsTo(); + case ResourcelandscapePackage.DATA_CENTER__CONTAINS: + return getContains(); + } + 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 ResourcelandscapePackage.DATA_CENTER__BELONGS_TO: - setBelongsTo((DistributedDataCenter)newValue); - return; - case ResourcelandscapePackage.DATA_CENTER__CONTAINS: - getContains().clear(); - getContains().addAll((Collection<? extends HardwareInfrastructure>)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourcelandscapePackage.DATA_CENTER__BELONGS_TO: + setBelongsTo((DistributedDataCenter)newValue); + return; + case ResourcelandscapePackage.DATA_CENTER__CONTAINS: + getContains().clear(); + getContains().addAll((Collection<? extends HardwareInfrastructure>)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 ResourcelandscapePackage.DATA_CENTER__BELONGS_TO: - setBelongsTo((DistributedDataCenter)null); - return; - case ResourcelandscapePackage.DATA_CENTER__CONTAINS: - getContains().clear(); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.DATA_CENTER__BELONGS_TO: + setBelongsTo((DistributedDataCenter)null); + return; + case ResourcelandscapePackage.DATA_CENTER__CONTAINS: + getContains().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 ResourcelandscapePackage.DATA_CENTER__BELONGS_TO: - return getBelongsTo() != null; - case ResourcelandscapePackage.DATA_CENTER__CONTAINS: - return contains != null && !contains.isEmpty(); - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.DATA_CENTER__BELONGS_TO: + return getBelongsTo() != null; + case ResourcelandscapePackage.DATA_CENTER__CONTAINS: + return contains != null && !contains.isEmpty(); + } + return super.eIsSet(featureID); + } } //DataCenterImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/DistributedDataCenterImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/DistributedDataCenterImpl.java index 136341380af1a25bcda7ec91f48bd08552075735..7e6a8506bc89ae3f677977bdfa0ad06d1f7502ed 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/DistributedDataCenterImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/DistributedDataCenterImpl.java @@ -36,133 +36,133 @@ import org.eclipse.emf.ecore.util.InternalEList; */ public class DistributedDataCenterImpl extends EntityImpl implements DistributedDataCenter { /** - * The cached value of the '{@link #getConsistsOf() <em>Consists Of</em>}' containment reference list. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getConsistsOf() <em>Consists Of</em>}' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getConsistsOf() - * @generated - * @ordered - */ + * @see #getConsistsOf() + * @generated + * @ordered + */ protected EList<DataCenter> consistsOf; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected DistributedDataCenterImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourcelandscapePackage.Literals.DISTRIBUTED_DATA_CENTER; - } + return ResourcelandscapePackage.Literals.DISTRIBUTED_DATA_CENTER; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EList<DataCenter> getConsistsOf() { - if (consistsOf == null) { - consistsOf = new EObjectContainmentWithInverseEList<DataCenter>(DataCenter.class, this, ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF, ResourcelandscapePackage.DATA_CENTER__BELONGS_TO); - } - return consistsOf; - } + if (consistsOf == null) { + consistsOf = new EObjectContainmentWithInverseEList<DataCenter>(DataCenter.class, this, ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF, ResourcelandscapePackage.DATA_CENTER__BELONGS_TO); + } + return consistsOf; + } /** - * <!-- 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 ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF: - return ((InternalEList<InternalEObject>)(InternalEList<?>)getConsistsOf()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF: + return ((InternalEList<InternalEObject>)(InternalEList<?>)getConsistsOf()).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 ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF: - return ((InternalEList<?>)getConsistsOf()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF: + return ((InternalEList<?>)getConsistsOf()).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 ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF: - return getConsistsOf(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF: + return getConsistsOf(); + } + 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 ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF: - getConsistsOf().clear(); - getConsistsOf().addAll((Collection<? extends DataCenter>)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF: + getConsistsOf().clear(); + getConsistsOf().addAll((Collection<? extends DataCenter>)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 ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF: - getConsistsOf().clear(); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF: + getConsistsOf().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 ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF: - return consistsOf != null && !consistsOf.isEmpty(); - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER__CONSISTS_OF: + return consistsOf != null && !consistsOf.isEmpty(); + } + return super.eIsSet(featureID); + } } //DistributedDataCenterImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/HardwareInfrastructureImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/HardwareInfrastructureImpl.java index 31837026b96e49e430d0c3ded904e66bb6071542..c14aab7fb412cdd1fa77ffd28e93dc5d17e32149 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/HardwareInfrastructureImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/HardwareInfrastructureImpl.java @@ -34,165 +34,165 @@ import org.eclipse.emf.ecore.util.EcoreUtil; */ public abstract class HardwareInfrastructureImpl extends EntityImpl implements HardwareInfrastructure { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected HardwareInfrastructureImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourcelandscapePackage.Literals.HARDWARE_INFRASTRUCTURE; - } + return ResourcelandscapePackage.Literals.HARDWARE_INFRASTRUCTURE; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public DataCenter getPartOf() { - if (eContainerFeatureID() != ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF) return null; - return (DataCenter)eContainer(); - } + if (eContainerFeatureID() != ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF) return null; + return (DataCenter)eInternalContainer(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public NotificationChain basicSetPartOf(DataCenter newPartOf, NotificationChain msgs) { - msgs = eBasicSetContainer((InternalEObject)newPartOf, ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF, msgs); - return msgs; - } + msgs = eBasicSetContainer((InternalEObject)newPartOf, ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF, msgs); + return msgs; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setPartOf(DataCenter newPartOf) { - if (newPartOf != eInternalContainer() || (eContainerFeatureID() != ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF && newPartOf != null)) { - if (EcoreUtil.isAncestor(this, newPartOf)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newPartOf != null) - msgs = ((InternalEObject)newPartOf).eInverseAdd(this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, DataCenter.class, msgs); - msgs = basicSetPartOf(newPartOf, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF, newPartOf, newPartOf)); - } + if (newPartOf != eInternalContainer() || (eContainerFeatureID() != ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF && newPartOf != null)) { + if (EcoreUtil.isAncestor(this, newPartOf)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newPartOf != null) + msgs = ((InternalEObject)newPartOf).eInverseAdd(this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, DataCenter.class, msgs); + msgs = basicSetPartOf(newPartOf, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF, newPartOf, newPartOf)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetPartOf((DataCenter)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetPartOf((DataCenter)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 ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: - return basicSetPartOf(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: + return basicSetPartOf(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 ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: - return eInternalContainer().eInverseRemove(this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, DataCenter.class, msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } + switch (eContainerFeatureID()) { + case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: + return eInternalContainer().eInverseRemove(this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, DataCenter.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 ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: - return getPartOf(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: + return getPartOf(); + } + 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 ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: - setPartOf((DataCenter)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: + setPartOf((DataCenter)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 ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: - setPartOf((DataCenter)null); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: + setPartOf((DataCenter)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 ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: - return getPartOf() != null; - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: + return getPartOf() != null; + } + return super.eIsSet(featureID); + } } //HardwareInfrastructureImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/NetworkingInfrastructureImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/NetworkingInfrastructureImpl.java index b326c978a6e2b7b2d3a7f7e1af32d9750c31f743..03b20ec43104bcd6fc932d804529cb8fd6988dcb 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/NetworkingInfrastructureImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/NetworkingInfrastructureImpl.java @@ -34,197 +34,197 @@ import org.eclipse.emf.ecore.util.EcoreUtil; */ public class NetworkingInfrastructureImpl extends ContainerImpl implements NetworkingInfrastructure { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected NetworkingInfrastructureImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourcelandscapePackage.Literals.NETWORKING_INFRASTRUCTURE; - } + return ResourcelandscapePackage.Literals.NETWORKING_INFRASTRUCTURE; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public DataCenter getPartOf() { - if (eContainerFeatureID() != ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF) return null; - return (DataCenter)eContainer(); - } + if (eContainerFeatureID() != ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF) return null; + return (DataCenter)eInternalContainer(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public NotificationChain basicSetPartOf(DataCenter newPartOf, NotificationChain msgs) { - msgs = eBasicSetContainer((InternalEObject)newPartOf, ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF, msgs); - return msgs; - } + msgs = eBasicSetContainer((InternalEObject)newPartOf, ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF, msgs); + return msgs; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setPartOf(DataCenter newPartOf) { - if (newPartOf != eInternalContainer() || (eContainerFeatureID() != ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF && newPartOf != null)) { - if (EcoreUtil.isAncestor(this, newPartOf)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newPartOf != null) - msgs = ((InternalEObject)newPartOf).eInverseAdd(this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, DataCenter.class, msgs); - msgs = basicSetPartOf(newPartOf, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF, newPartOf, newPartOf)); - } + if (newPartOf != eInternalContainer() || (eContainerFeatureID() != ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF && newPartOf != null)) { + if (EcoreUtil.isAncestor(this, newPartOf)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newPartOf != null) + msgs = ((InternalEObject)newPartOf).eInverseAdd(this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, DataCenter.class, msgs); + msgs = basicSetPartOf(newPartOf, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF, newPartOf, newPartOf)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetPartOf((DataCenter)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetPartOf((DataCenter)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 ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF: - return basicSetPartOf(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF: + return basicSetPartOf(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 ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF: - return eInternalContainer().eInverseRemove(this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, DataCenter.class, msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } + switch (eContainerFeatureID()) { + case ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF: + return eInternalContainer().eInverseRemove(this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, DataCenter.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 ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF: - return getPartOf(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF: + return getPartOf(); + } + 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 ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF: - setPartOf((DataCenter)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF: + setPartOf((DataCenter)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 ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF: - setPartOf((DataCenter)null); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF: + setPartOf((DataCenter)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 ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF: - return getPartOf() != null; - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF: + return getPartOf() != null; + } + return super.eIsSet(featureID); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { - if (baseClass == HardwareInfrastructure.class) { - switch (derivedFeatureID) { - case ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF: return ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF; - default: return -1; - } - } - return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); - } + if (baseClass == HardwareInfrastructure.class) { + switch (derivedFeatureID) { + case ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF: return ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { - if (baseClass == HardwareInfrastructure.class) { - switch (baseFeatureID) { - case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: return ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF; - default: return -1; - } - } - return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); - } + if (baseClass == HardwareInfrastructure.class) { + switch (baseFeatureID) { + case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: return ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE__PART_OF; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } } //NetworkingInfrastructureImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/ResourcelandscapeFactoryImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/ResourcelandscapeFactoryImpl.java index 574a47fe825c4bcb8df7a5f7a5b2eed2f9d78101..53d600b1f0aa5f0f185c0efb15635be9c9e7aa39 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/ResourcelandscapeFactoryImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/ResourcelandscapeFactoryImpl.java @@ -21,142 +21,142 @@ import org.eclipse.emf.ecore.plugin.EcorePlugin; */ public class ResourcelandscapeFactoryImpl extends EFactoryImpl implements ResourcelandscapeFactory { /** - * Creates the default factory implementation. - * <!-- begin-user-doc --> + * Creates the default factory implementation. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static ResourcelandscapeFactory init() { - try { - ResourcelandscapeFactory theResourcelandscapeFactory = (ResourcelandscapeFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.descartes-research.net/metamodel/resourcelandscape/1.0"); - if (theResourcelandscapeFactory != null) { - return theResourcelandscapeFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new ResourcelandscapeFactoryImpl(); - } + try { + ResourcelandscapeFactory theResourcelandscapeFactory = (ResourcelandscapeFactory)EPackage.Registry.INSTANCE.getEFactory(ResourcelandscapePackage.eNS_URI); + if (theResourcelandscapeFactory != null) { + return theResourcelandscapeFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ResourcelandscapeFactoryImpl(); + } /** - * Creates an instance of the factory. - * <!-- begin-user-doc --> + * Creates an instance of the factory. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourcelandscapeFactoryImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE: return createComputingInfrastructure(); - case ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE: return createNetworkingInfrastructure(); - case ResourcelandscapePackage.STORAGE_INFRASTRUCTURE: return createStorageInfrastructure(); - case ResourcelandscapePackage.RUNTIME_ENVIRONMENT: return createRuntimeEnvironment(); - case ResourcelandscapePackage.DATA_CENTER: return createDataCenter(); - case ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER: return createDistributedDataCenter(); - case ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE: return createCompositeHardwareInfrastructure(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } + switch (eClass.getClassifierID()) { + case ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE: return createComputingInfrastructure(); + case ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE: return createNetworkingInfrastructure(); + case ResourcelandscapePackage.STORAGE_INFRASTRUCTURE: return createStorageInfrastructure(); + case ResourcelandscapePackage.RUNTIME_ENVIRONMENT: return createRuntimeEnvironment(); + case ResourcelandscapePackage.DATA_CENTER: return createDataCenter(); + case ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER: return createDistributedDataCenter(); + case ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE: return createCompositeHardwareInfrastructure(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ComputingInfrastructure createComputingInfrastructure() { - ComputingInfrastructureImpl computingInfrastructure = new ComputingInfrastructureImpl(); - return computingInfrastructure; - } + ComputingInfrastructureImpl computingInfrastructure = new ComputingInfrastructureImpl(); + return computingInfrastructure; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public NetworkingInfrastructure createNetworkingInfrastructure() { - NetworkingInfrastructureImpl networkingInfrastructure = new NetworkingInfrastructureImpl(); - return networkingInfrastructure; - } + NetworkingInfrastructureImpl networkingInfrastructure = new NetworkingInfrastructureImpl(); + return networkingInfrastructure; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public StorageInfrastructure createStorageInfrastructure() { - StorageInfrastructureImpl storageInfrastructure = new StorageInfrastructureImpl(); - return storageInfrastructure; - } + StorageInfrastructureImpl storageInfrastructure = new StorageInfrastructureImpl(); + return storageInfrastructure; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public RuntimeEnvironment createRuntimeEnvironment() { - RuntimeEnvironmentImpl runtimeEnvironment = new RuntimeEnvironmentImpl(); - return runtimeEnvironment; - } + RuntimeEnvironmentImpl runtimeEnvironment = new RuntimeEnvironmentImpl(); + return runtimeEnvironment; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public DataCenter createDataCenter() { - DataCenterImpl dataCenter = new DataCenterImpl(); - return dataCenter; - } + DataCenterImpl dataCenter = new DataCenterImpl(); + return dataCenter; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public DistributedDataCenter createDistributedDataCenter() { - DistributedDataCenterImpl distributedDataCenter = new DistributedDataCenterImpl(); - return distributedDataCenter; - } + DistributedDataCenterImpl distributedDataCenter = new DistributedDataCenterImpl(); + return distributedDataCenter; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public CompositeHardwareInfrastructure createCompositeHardwareInfrastructure() { - CompositeHardwareInfrastructureImpl compositeHardwareInfrastructure = new CompositeHardwareInfrastructureImpl(); - return compositeHardwareInfrastructure; - } + CompositeHardwareInfrastructureImpl compositeHardwareInfrastructure = new CompositeHardwareInfrastructureImpl(); + return compositeHardwareInfrastructure; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourcelandscapePackage getResourcelandscapePackage() { - return (ResourcelandscapePackage)getEPackage(); - } + return (ResourcelandscapePackage)getEPackage(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @deprecated - * @generated - */ + * @deprecated + * @generated + */ @Deprecated public static ResourcelandscapePackage getPackage() { - return ResourcelandscapePackage.eINSTANCE; - } + return ResourcelandscapePackage.eINSTANCE; + } } //ResourcelandscapeFactoryImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/ResourcelandscapePackageImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/ResourcelandscapePackageImpl.java index 8361ac6f02d34954ee023b5156d86ee63d567162..dfbcaa4c2b2498e303a52798bc63f308043a976b 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/ResourcelandscapePackageImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/ResourcelandscapePackageImpl.java @@ -51,507 +51,507 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; */ public class ResourcelandscapePackageImpl extends EPackageImpl implements ResourcelandscapePackage { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass computingInfrastructureEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass networkingInfrastructureEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass storageInfrastructureEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass containerEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass runtimeEnvironmentEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass dataCenterEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass distributedDataCenterEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass compositeHardwareInfrastructureEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass hardwareInfrastructureEClass = 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.resourcelandscape.ResourcelandscapePackage#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.resourcelandscape.ResourcelandscapePackage#eNS_URI + * @see #init() + * @generated + */ private ResourcelandscapePackageImpl() { - super(eNS_URI, ResourcelandscapeFactory.eINSTANCE); - } + super(eNS_URI, ResourcelandscapeFactory.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 ResourcelandscapePackage#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 ResourcelandscapePackage#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 ResourcelandscapePackage init() { - if (isInited) return (ResourcelandscapePackage)EPackage.Registry.INSTANCE.getEPackage(ResourcelandscapePackage.eNS_URI); - - // Obtain or create and register package - ResourcelandscapePackageImpl theResourcelandscapePackage = (ResourcelandscapePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ResourcelandscapePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ResourcelandscapePackageImpl()); - - isInited = true; - - // Initialize simple dependencies - CorePackage.eINSTANCE.eClass(); - - // Obtain or create and register interdependencies - ResourceconfigurationPackageImpl theResourceconfigurationPackage = (ResourceconfigurationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI) instanceof ResourceconfigurationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI) : ResourceconfigurationPackage.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 - theResourcelandscapePackage.createPackageContents(); - theResourceconfigurationPackage.createPackageContents(); - theContainerrepositoryPackage.createPackageContents(); - theRuntimeenvironmentclassesPackage.createPackageContents(); - theResourcetypePackage.createPackageContents(); - - // Initialize created meta-data - theResourcelandscapePackage.initializePackageContents(); - theResourceconfigurationPackage.initializePackageContents(); - theContainerrepositoryPackage.initializePackageContents(); - theRuntimeenvironmentclassesPackage.initializePackageContents(); - theResourcetypePackage.initializePackageContents(); - - // Register package validator - EValidator.Registry.INSTANCE.put - (theResourcelandscapePackage, - new EValidator.Descriptor() { - public EValidator getEValidator() { - return ResourcelandscapeValidator.INSTANCE; - } - }); - - // Mark meta-data to indicate it can't be changed - theResourcelandscapePackage.freeze(); + if (isInited) return (ResourcelandscapePackage)EPackage.Registry.INSTANCE.getEPackage(ResourcelandscapePackage.eNS_URI); + + // Obtain or create and register package + ResourcelandscapePackageImpl theResourcelandscapePackage = (ResourcelandscapePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ResourcelandscapePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ResourcelandscapePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + CorePackage.eINSTANCE.eClass(); + + // Obtain or create and register interdependencies + ResourceconfigurationPackageImpl theResourceconfigurationPackage = (ResourceconfigurationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI) instanceof ResourceconfigurationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI) : ResourceconfigurationPackage.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 + theResourcelandscapePackage.createPackageContents(); + theResourceconfigurationPackage.createPackageContents(); + theContainerrepositoryPackage.createPackageContents(); + theRuntimeenvironmentclassesPackage.createPackageContents(); + theResourcetypePackage.createPackageContents(); + + // Initialize created meta-data + theResourcelandscapePackage.initializePackageContents(); + theResourceconfigurationPackage.initializePackageContents(); + theContainerrepositoryPackage.initializePackageContents(); + theRuntimeenvironmentclassesPackage.initializePackageContents(); + theResourcetypePackage.initializePackageContents(); + + // Register package validator + EValidator.Registry.INSTANCE.put + (theResourcelandscapePackage, + new EValidator.Descriptor() { + public EValidator getEValidator() { + return ResourcelandscapeValidator.INSTANCE; + } + }); + + // Mark meta-data to indicate it can't be changed + theResourcelandscapePackage.freeze(); - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(ResourcelandscapePackage.eNS_URI, theResourcelandscapePackage); - return theResourcelandscapePackage; - } + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ResourcelandscapePackage.eNS_URI, theResourcelandscapePackage); + return theResourcelandscapePackage; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getComputingInfrastructure() { - return computingInfrastructureEClass; - } + return computingInfrastructureEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getNetworkingInfrastructure() { - return networkingInfrastructureEClass; - } + return networkingInfrastructureEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getStorageInfrastructure() { - return storageInfrastructureEClass; - } + return storageInfrastructureEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getContainer() { - return containerEClass; - } + return containerEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getContainer_Contains() { - return (EReference)containerEClass.getEStructuralFeatures().get(0); - } + return (EReference)containerEClass.getEStructuralFeatures().get(0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getContainer_ConfigSpec() { - return (EReference)containerEClass.getEStructuralFeatures().get(1); - } + return (EReference)containerEClass.getEStructuralFeatures().get(1); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getContainer_Template() { - return (EReference)containerEClass.getEStructuralFeatures().get(2); - } + return (EReference)containerEClass.getEStructuralFeatures().get(2); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getRuntimeEnvironment() { - return runtimeEnvironmentEClass; - } + return runtimeEnvironmentEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getRuntimeEnvironment_ContainedIn() { - return (EReference)runtimeEnvironmentEClass.getEStructuralFeatures().get(0); - } + return (EReference)runtimeEnvironmentEClass.getEStructuralFeatures().get(0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EAttribute getRuntimeEnvironment_OfClass() { - return (EAttribute)runtimeEnvironmentEClass.getEStructuralFeatures().get(1); - } + return (EAttribute)runtimeEnvironmentEClass.getEStructuralFeatures().get(1); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getDataCenter() { - return dataCenterEClass; - } + return dataCenterEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getDataCenter_BelongsTo() { - return (EReference)dataCenterEClass.getEStructuralFeatures().get(0); - } + return (EReference)dataCenterEClass.getEStructuralFeatures().get(0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getDataCenter_Contains() { - return (EReference)dataCenterEClass.getEStructuralFeatures().get(1); - } + return (EReference)dataCenterEClass.getEStructuralFeatures().get(1); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getDistributedDataCenter() { - return distributedDataCenterEClass; - } + return distributedDataCenterEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getDistributedDataCenter_ConsistsOf() { - return (EReference)distributedDataCenterEClass.getEStructuralFeatures().get(0); - } + return (EReference)distributedDataCenterEClass.getEStructuralFeatures().get(0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getCompositeHardwareInfrastructure() { - return compositeHardwareInfrastructureEClass; - } + return compositeHardwareInfrastructureEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getCompositeHardwareInfrastructure_Contains() { - return (EReference)compositeHardwareInfrastructureEClass.getEStructuralFeatures().get(0); - } + return (EReference)compositeHardwareInfrastructureEClass.getEStructuralFeatures().get(0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getHardwareInfrastructure() { - return hardwareInfrastructureEClass; - } + return hardwareInfrastructureEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getHardwareInfrastructure_PartOf() { - return (EReference)hardwareInfrastructureEClass.getEStructuralFeatures().get(0); - } + return (EReference)hardwareInfrastructureEClass.getEStructuralFeatures().get(0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourcelandscapeFactory getResourcelandscapeFactory() { - return (ResourcelandscapeFactory)getEFactoryInstance(); - } + return (ResourcelandscapeFactory)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 - computingInfrastructureEClass = createEClass(COMPUTING_INFRASTRUCTURE); + // Create classes and their features + computingInfrastructureEClass = createEClass(COMPUTING_INFRASTRUCTURE); - networkingInfrastructureEClass = createEClass(NETWORKING_INFRASTRUCTURE); + networkingInfrastructureEClass = createEClass(NETWORKING_INFRASTRUCTURE); - storageInfrastructureEClass = createEClass(STORAGE_INFRASTRUCTURE); + storageInfrastructureEClass = createEClass(STORAGE_INFRASTRUCTURE); - containerEClass = createEClass(CONTAINER); - createEReference(containerEClass, CONTAINER__CONTAINS); - createEReference(containerEClass, CONTAINER__CONFIG_SPEC); - createEReference(containerEClass, CONTAINER__TEMPLATE); + containerEClass = createEClass(CONTAINER); + createEReference(containerEClass, CONTAINER__CONTAINS); + createEReference(containerEClass, CONTAINER__CONFIG_SPEC); + createEReference(containerEClass, CONTAINER__TEMPLATE); - runtimeEnvironmentEClass = createEClass(RUNTIME_ENVIRONMENT); - createEReference(runtimeEnvironmentEClass, RUNTIME_ENVIRONMENT__CONTAINED_IN); - createEAttribute(runtimeEnvironmentEClass, RUNTIME_ENVIRONMENT__OF_CLASS); + runtimeEnvironmentEClass = createEClass(RUNTIME_ENVIRONMENT); + createEReference(runtimeEnvironmentEClass, RUNTIME_ENVIRONMENT__CONTAINED_IN); + createEAttribute(runtimeEnvironmentEClass, RUNTIME_ENVIRONMENT__OF_CLASS); - dataCenterEClass = createEClass(DATA_CENTER); - createEReference(dataCenterEClass, DATA_CENTER__BELONGS_TO); - createEReference(dataCenterEClass, DATA_CENTER__CONTAINS); + dataCenterEClass = createEClass(DATA_CENTER); + createEReference(dataCenterEClass, DATA_CENTER__BELONGS_TO); + createEReference(dataCenterEClass, DATA_CENTER__CONTAINS); - distributedDataCenterEClass = createEClass(DISTRIBUTED_DATA_CENTER); - createEReference(distributedDataCenterEClass, DISTRIBUTED_DATA_CENTER__CONSISTS_OF); + distributedDataCenterEClass = createEClass(DISTRIBUTED_DATA_CENTER); + createEReference(distributedDataCenterEClass, DISTRIBUTED_DATA_CENTER__CONSISTS_OF); - compositeHardwareInfrastructureEClass = createEClass(COMPOSITE_HARDWARE_INFRASTRUCTURE); - createEReference(compositeHardwareInfrastructureEClass, COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS); + compositeHardwareInfrastructureEClass = createEClass(COMPOSITE_HARDWARE_INFRASTRUCTURE); + createEReference(compositeHardwareInfrastructureEClass, COMPOSITE_HARDWARE_INFRASTRUCTURE__CONTAINS); - hardwareInfrastructureEClass = createEClass(HARDWARE_INFRASTRUCTURE); - createEReference(hardwareInfrastructureEClass, HARDWARE_INFRASTRUCTURE__PART_OF); - } + hardwareInfrastructureEClass = createEClass(HARDWARE_INFRASTRUCTURE); + createEReference(hardwareInfrastructureEClass, HARDWARE_INFRASTRUCTURE__PART_OF); + } /** - * <!-- 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; + if (isInitialized) return; + isInitialized = true; - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); - // Obtain other dependent packages - CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); - ResourceconfigurationPackage theResourceconfigurationPackage = (ResourceconfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI); - ContainerrepositoryPackage theContainerrepositoryPackage = (ContainerrepositoryPackage)EPackage.Registry.INSTANCE.getEPackage(ContainerrepositoryPackage.eNS_URI); - RuntimeenvironmentclassesPackage theRuntimeenvironmentclassesPackage = (RuntimeenvironmentclassesPackage)EPackage.Registry.INSTANCE.getEPackage(RuntimeenvironmentclassesPackage.eNS_URI); + // Obtain other dependent packages + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + ResourceconfigurationPackage theResourceconfigurationPackage = (ResourceconfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI); + ContainerrepositoryPackage theContainerrepositoryPackage = (ContainerrepositoryPackage)EPackage.Registry.INSTANCE.getEPackage(ContainerrepositoryPackage.eNS_URI); + RuntimeenvironmentclassesPackage theRuntimeenvironmentclassesPackage = (RuntimeenvironmentclassesPackage)EPackage.Registry.INSTANCE.getEPackage(RuntimeenvironmentclassesPackage.eNS_URI); - // Create type parameters + // Create type parameters - // Set bounds for type parameters + // Set bounds for type parameters - // Add supertypes to classes - computingInfrastructureEClass.getESuperTypes().add(this.getContainer()); - computingInfrastructureEClass.getESuperTypes().add(this.getHardwareInfrastructure()); - networkingInfrastructureEClass.getESuperTypes().add(this.getContainer()); - networkingInfrastructureEClass.getESuperTypes().add(this.getHardwareInfrastructure()); - storageInfrastructureEClass.getESuperTypes().add(this.getContainer()); - storageInfrastructureEClass.getESuperTypes().add(this.getHardwareInfrastructure()); - containerEClass.getESuperTypes().add(theCorePackage.getEntity()); - runtimeEnvironmentEClass.getESuperTypes().add(this.getContainer()); - dataCenterEClass.getESuperTypes().add(theCorePackage.getEntity()); - distributedDataCenterEClass.getESuperTypes().add(theCorePackage.getEntity()); - compositeHardwareInfrastructureEClass.getESuperTypes().add(this.getHardwareInfrastructure()); - hardwareInfrastructureEClass.getESuperTypes().add(theCorePackage.getEntity()); + // Add supertypes to classes + computingInfrastructureEClass.getESuperTypes().add(this.getContainer()); + computingInfrastructureEClass.getESuperTypes().add(this.getHardwareInfrastructure()); + networkingInfrastructureEClass.getESuperTypes().add(this.getContainer()); + networkingInfrastructureEClass.getESuperTypes().add(this.getHardwareInfrastructure()); + storageInfrastructureEClass.getESuperTypes().add(this.getContainer()); + storageInfrastructureEClass.getESuperTypes().add(this.getHardwareInfrastructure()); + containerEClass.getESuperTypes().add(theCorePackage.getEntity()); + runtimeEnvironmentEClass.getESuperTypes().add(this.getContainer()); + dataCenterEClass.getESuperTypes().add(theCorePackage.getEntity()); + distributedDataCenterEClass.getESuperTypes().add(theCorePackage.getEntity()); + compositeHardwareInfrastructureEClass.getESuperTypes().add(this.getHardwareInfrastructure()); + hardwareInfrastructureEClass.getESuperTypes().add(theCorePackage.getEntity()); - // Initialize classes and features; add operations and parameters - initEClass(computingInfrastructureEClass, ComputingInfrastructure.class, "ComputingInfrastructure", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + // Initialize classes and features; add operations and parameters + initEClass(computingInfrastructureEClass, ComputingInfrastructure.class, "ComputingInfrastructure", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEClass(networkingInfrastructureEClass, NetworkingInfrastructure.class, "NetworkingInfrastructure", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEClass(networkingInfrastructureEClass, NetworkingInfrastructure.class, "NetworkingInfrastructure", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEClass(storageInfrastructureEClass, StorageInfrastructure.class, "StorageInfrastructure", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEClass(storageInfrastructureEClass, StorageInfrastructure.class, "StorageInfrastructure", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEClass(containerEClass, edu.kit.ipd.descartes.mm.resourcelandscape.Container.class, "Container", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getContainer_Contains(), this.getRuntimeEnvironment(), this.getRuntimeEnvironment_ContainedIn(), "contains", null, 0, -1, edu.kit.ipd.descartes.mm.resourcelandscape.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getContainer_ConfigSpec(), theResourceconfigurationPackage.getConfigurationSpecification(), null, "configSpec", null, 0, -1, edu.kit.ipd.descartes.mm.resourcelandscape.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getContainer_Template(), theContainerrepositoryPackage.getContainerTemplate(), null, "template", null, 0, 1, edu.kit.ipd.descartes.mm.resourcelandscape.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(containerEClass, edu.kit.ipd.descartes.mm.resourcelandscape.Container.class, "Container", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getContainer_Contains(), this.getRuntimeEnvironment(), this.getRuntimeEnvironment_ContainedIn(), "contains", null, 0, -1, edu.kit.ipd.descartes.mm.resourcelandscape.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getContainer_ConfigSpec(), theResourceconfigurationPackage.getConfigurationSpecification(), null, "configSpec", null, 0, -1, edu.kit.ipd.descartes.mm.resourcelandscape.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getContainer_Template(), theContainerrepositoryPackage.getContainerTemplate(), null, "template", null, 0, 1, edu.kit.ipd.descartes.mm.resourcelandscape.Container.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEClass(runtimeEnvironmentEClass, RuntimeEnvironment.class, "RuntimeEnvironment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getRuntimeEnvironment_ContainedIn(), this.getContainer(), this.getContainer_Contains(), "containedIn", null, 1, 1, RuntimeEnvironment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getRuntimeEnvironment_OfClass(), theRuntimeenvironmentclassesPackage.getRuntimeEnvironmentClasses(), "ofClass", null, 1, 1, RuntimeEnvironment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(runtimeEnvironmentEClass, RuntimeEnvironment.class, "RuntimeEnvironment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getRuntimeEnvironment_ContainedIn(), this.getContainer(), this.getContainer_Contains(), "containedIn", null, 1, 1, RuntimeEnvironment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getRuntimeEnvironment_OfClass(), theRuntimeenvironmentclassesPackage.getRuntimeEnvironmentClasses(), "ofClass", null, 1, 1, RuntimeEnvironment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEClass(dataCenterEClass, DataCenter.class, "DataCenter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getDataCenter_BelongsTo(), this.getDistributedDataCenter(), this.getDistributedDataCenter_ConsistsOf(), "belongsTo", null, 0, 1, DataCenter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getDataCenter_Contains(), this.getHardwareInfrastructure(), this.getHardwareInfrastructure_PartOf(), "contains", null, 0, -1, DataCenter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(dataCenterEClass, DataCenter.class, "DataCenter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDataCenter_BelongsTo(), this.getDistributedDataCenter(), this.getDistributedDataCenter_ConsistsOf(), "belongsTo", null, 0, 1, DataCenter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDataCenter_Contains(), this.getHardwareInfrastructure(), this.getHardwareInfrastructure_PartOf(), "contains", null, 0, -1, DataCenter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEClass(distributedDataCenterEClass, DistributedDataCenter.class, "DistributedDataCenter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getDistributedDataCenter_ConsistsOf(), this.getDataCenter(), this.getDataCenter_BelongsTo(), "consistsOf", null, 1, -1, DistributedDataCenter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(distributedDataCenterEClass, DistributedDataCenter.class, "DistributedDataCenter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDistributedDataCenter_ConsistsOf(), this.getDataCenter(), this.getDataCenter_BelongsTo(), "consistsOf", null, 1, -1, DistributedDataCenter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEClass(compositeHardwareInfrastructureEClass, CompositeHardwareInfrastructure.class, "CompositeHardwareInfrastructure", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getCompositeHardwareInfrastructure_Contains(), this.getHardwareInfrastructure(), null, "contains", null, 0, -1, CompositeHardwareInfrastructure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(compositeHardwareInfrastructureEClass, CompositeHardwareInfrastructure.class, "CompositeHardwareInfrastructure", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCompositeHardwareInfrastructure_Contains(), this.getHardwareInfrastructure(), null, "contains", null, 0, -1, CompositeHardwareInfrastructure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEClass(hardwareInfrastructureEClass, HardwareInfrastructure.class, "HardwareInfrastructure", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getHardwareInfrastructure_PartOf(), this.getDataCenter(), this.getDataCenter_Contains(), "partOf", null, 0, 1, HardwareInfrastructure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(hardwareInfrastructureEClass, HardwareInfrastructure.class, "HardwareInfrastructure", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getHardwareInfrastructure_PartOf(), this.getDataCenter(), this.getDataCenter_Contains(), "partOf", null, 0, 1, HardwareInfrastructure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - // Create resource - createResource(eNS_URI); + // Create resource + createResource(eNS_URI); - // Create annotations - // http://www.eclipse.org/emf/2002/Ecore - createEcoreAnnotations(); - // http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot - createPivotAnnotations(); - } + // Create annotations + // http://www.eclipse.org/emf/2002/Ecore + createEcoreAnnotations(); + // http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot + createPivotAnnotations(); + } /** - * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>. - * <!-- begin-user-doc --> + * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected void createEcoreAnnotations() { - String source = "http://www.eclipse.org/emf/2002/Ecore"; - addAnnotation - (this, - source, - new String[] { - "invocationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", - "settingDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", - "validationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot" - }); - addAnnotation - (runtimeEnvironmentEClass, - source, - new String[] { - "constraints", "runtimeEnvironmentLevelCompliance" - }); - } - - /** - * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot</b>. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ + String source = "http://www.eclipse.org/emf/2002/Ecore"; + addAnnotation + (this, + source, + new String[] { + "invocationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", + "settingDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", + "validationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot" + }); + addAnnotation + (runtimeEnvironmentEClass, + source, + new String[] { + "constraints", "runtimeEnvironmentLevelCompliance" + }); + } + + /** + * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot</b>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ protected void createPivotAnnotations() { - String source = "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"; - addAnnotation - (runtimeEnvironmentEClass, - source, - new String[] { - "runtimeEnvironmentLevelCompliance", "self.containedIn.contains->forAll(r : RuntimeEnvironment | r.ofClass = self.ofClass)" - }); - } + String source = "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"; + addAnnotation + (runtimeEnvironmentEClass, + source, + new String[] { + "runtimeEnvironmentLevelCompliance", "self.containedIn.contains->forAll(r : RuntimeEnvironment | r.ofClass = self.ofClass)" + }); + } } //ResourcelandscapePackageImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/RuntimeEnvironmentImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/RuntimeEnvironmentImpl.java index a92bd9da1bff89d73ab888294d7060558b6e65d4..1a7ca4009a18a6cd1a0de919efb08ef7c13ca843 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/RuntimeEnvironmentImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/RuntimeEnvironmentImpl.java @@ -35,232 +35,232 @@ import org.eclipse.emf.ecore.util.EcoreUtil; */ public class RuntimeEnvironmentImpl extends ContainerImpl implements RuntimeEnvironment { /** - * The default value of the '{@link #getOfClass() <em>Of Class</em>}' attribute. - * <!-- begin-user-doc --> + * The default value of the '{@link #getOfClass() <em>Of Class</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getOfClass() - * @generated - * @ordered - */ + * @see #getOfClass() + * @generated + * @ordered + */ protected static final RuntimeEnvironmentClasses OF_CLASS_EDEFAULT = RuntimeEnvironmentClasses.HYPERVISOR; /** - * The cached value of the '{@link #getOfClass() <em>Of Class</em>}' attribute. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getOfClass() <em>Of Class</em>}' attribute. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getOfClass() - * @generated - * @ordered - */ + * @see #getOfClass() + * @generated + * @ordered + */ protected RuntimeEnvironmentClasses ofClass = OF_CLASS_EDEFAULT; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected RuntimeEnvironmentImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourcelandscapePackage.Literals.RUNTIME_ENVIRONMENT; - } + return ResourcelandscapePackage.Literals.RUNTIME_ENVIRONMENT; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public Container getContainedIn() { - if (eContainerFeatureID() != ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN) return null; - return (Container)eContainer(); - } + if (eContainerFeatureID() != ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN) return null; + return (Container)eInternalContainer(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public NotificationChain basicSetContainedIn(Container newContainedIn, NotificationChain msgs) { - msgs = eBasicSetContainer((InternalEObject)newContainedIn, ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN, msgs); - return msgs; - } + msgs = eBasicSetContainer((InternalEObject)newContainedIn, ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN, msgs); + return msgs; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setContainedIn(Container newContainedIn) { - if (newContainedIn != eInternalContainer() || (eContainerFeatureID() != ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN && newContainedIn != null)) { - if (EcoreUtil.isAncestor(this, newContainedIn)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newContainedIn != null) - msgs = ((InternalEObject)newContainedIn).eInverseAdd(this, ResourcelandscapePackage.CONTAINER__CONTAINS, Container.class, msgs); - msgs = basicSetContainedIn(newContainedIn, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN, newContainedIn, newContainedIn)); - } + if (newContainedIn != eInternalContainer() || (eContainerFeatureID() != ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN && newContainedIn != null)) { + if (EcoreUtil.isAncestor(this, newContainedIn)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newContainedIn != null) + msgs = ((InternalEObject)newContainedIn).eInverseAdd(this, ResourcelandscapePackage.CONTAINER__CONTAINS, Container.class, msgs); + msgs = basicSetContainedIn(newContainedIn, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN, newContainedIn, newContainedIn)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public RuntimeEnvironmentClasses getOfClass() { - return ofClass; - } + return ofClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setOfClass(RuntimeEnvironmentClasses newOfClass) { - RuntimeEnvironmentClasses oldOfClass = ofClass; - ofClass = newOfClass == null ? OF_CLASS_EDEFAULT : newOfClass; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourcelandscapePackage.RUNTIME_ENVIRONMENT__OF_CLASS, oldOfClass, ofClass)); - } + RuntimeEnvironmentClasses oldOfClass = ofClass; + ofClass = newOfClass == null ? OF_CLASS_EDEFAULT : newOfClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourcelandscapePackage.RUNTIME_ENVIRONMENT__OF_CLASS, oldOfClass, ofClass)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetContainedIn((Container)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetContainedIn((Container)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 ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN: - return basicSetContainedIn(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN: + return basicSetContainedIn(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 ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN: - return eInternalContainer().eInverseRemove(this, ResourcelandscapePackage.CONTAINER__CONTAINS, Container.class, msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } + switch (eContainerFeatureID()) { + case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN: + return eInternalContainer().eInverseRemove(this, ResourcelandscapePackage.CONTAINER__CONTAINS, Container.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 ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN: - return getContainedIn(); - case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__OF_CLASS: - return getOfClass(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN: + return getContainedIn(); + case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__OF_CLASS: + return getOfClass(); + } + 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 ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN: - setContainedIn((Container)newValue); - return; - case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__OF_CLASS: - setOfClass((RuntimeEnvironmentClasses)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN: + setContainedIn((Container)newValue); + return; + case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__OF_CLASS: + setOfClass((RuntimeEnvironmentClasses)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 ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN: - setContainedIn((Container)null); - return; - case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__OF_CLASS: - setOfClass(OF_CLASS_EDEFAULT); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN: + setContainedIn((Container)null); + return; + case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__OF_CLASS: + setOfClass(OF_CLASS_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 ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN: - return getContainedIn() != null; - case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__OF_CLASS: - return ofClass != OF_CLASS_EDEFAULT; - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__CONTAINED_IN: + return getContainedIn() != null; + case ResourcelandscapePackage.RUNTIME_ENVIRONMENT__OF_CLASS: + return ofClass != OF_CLASS_EDEFAULT; + } + 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(" (ofClass: "); - result.append(ofClass); - result.append(')'); - return result.toString(); - } + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (ofClass: "); + result.append(ofClass); + result.append(')'); + return result.toString(); + } } //RuntimeEnvironmentImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/StorageInfrastructureImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/StorageInfrastructureImpl.java index efd6a55ef631f7296cb8f901ae465cee94e88aa4..db762761d115730b7d0fec60ec6ad51aaf7b1031 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/StorageInfrastructureImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/impl/StorageInfrastructureImpl.java @@ -34,197 +34,197 @@ import org.eclipse.emf.ecore.util.EcoreUtil; */ public class StorageInfrastructureImpl extends ContainerImpl implements StorageInfrastructure { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected StorageInfrastructureImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourcelandscapePackage.Literals.STORAGE_INFRASTRUCTURE; - } + return ResourcelandscapePackage.Literals.STORAGE_INFRASTRUCTURE; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public DataCenter getPartOf() { - if (eContainerFeatureID() != ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF) return null; - return (DataCenter)eContainer(); - } + if (eContainerFeatureID() != ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF) return null; + return (DataCenter)eInternalContainer(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public NotificationChain basicSetPartOf(DataCenter newPartOf, NotificationChain msgs) { - msgs = eBasicSetContainer((InternalEObject)newPartOf, ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF, msgs); - return msgs; - } + msgs = eBasicSetContainer((InternalEObject)newPartOf, ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF, msgs); + return msgs; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setPartOf(DataCenter newPartOf) { - if (newPartOf != eInternalContainer() || (eContainerFeatureID() != ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF && newPartOf != null)) { - if (EcoreUtil.isAncestor(this, newPartOf)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newPartOf != null) - msgs = ((InternalEObject)newPartOf).eInverseAdd(this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, DataCenter.class, msgs); - msgs = basicSetPartOf(newPartOf, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF, newPartOf, newPartOf)); - } + if (newPartOf != eInternalContainer() || (eContainerFeatureID() != ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF && newPartOf != null)) { + if (EcoreUtil.isAncestor(this, newPartOf)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newPartOf != null) + msgs = ((InternalEObject)newPartOf).eInverseAdd(this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, DataCenter.class, msgs); + msgs = basicSetPartOf(newPartOf, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF, newPartOf, newPartOf)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetPartOf((DataCenter)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetPartOf((DataCenter)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 ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF: - return basicSetPartOf(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF: + return basicSetPartOf(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 ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF: - return eInternalContainer().eInverseRemove(this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, DataCenter.class, msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } + switch (eContainerFeatureID()) { + case ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF: + return eInternalContainer().eInverseRemove(this, ResourcelandscapePackage.DATA_CENTER__CONTAINS, DataCenter.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 ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF: - return getPartOf(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF: + return getPartOf(); + } + 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 ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF: - setPartOf((DataCenter)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF: + setPartOf((DataCenter)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 ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF: - setPartOf((DataCenter)null); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF: + setPartOf((DataCenter)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 ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF: - return getPartOf() != null; - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF: + return getPartOf() != null; + } + return super.eIsSet(featureID); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { - if (baseClass == HardwareInfrastructure.class) { - switch (derivedFeatureID) { - case ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF: return ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF; - default: return -1; - } - } - return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); - } + if (baseClass == HardwareInfrastructure.class) { + switch (derivedFeatureID) { + case ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF: return ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { - if (baseClass == HardwareInfrastructure.class) { - switch (baseFeatureID) { - case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: return ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF; - default: return -1; - } - } - return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); - } + if (baseClass == HardwareInfrastructure.class) { + switch (baseFeatureID) { + case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE__PART_OF: return ResourcelandscapePackage.STORAGE_INFRASTRUCTURE__PART_OF; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } } //StorageInfrastructureImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/util/ResourcelandscapeAdapterFactory.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/util/ResourcelandscapeAdapterFactory.java index 2db66716b185dee85c4ad4ff07a76858af037582..c44e167bde525f0ff18d6733ce29180895882392 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/util/ResourcelandscapeAdapterFactory.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/util/ResourcelandscapeAdapterFactory.java @@ -27,298 +27,298 @@ import org.eclipse.emf.ecore.EObject; */ public class ResourcelandscapeAdapterFactory extends AdapterFactoryImpl { /** - * The cached model package. - * <!-- begin-user-doc --> + * The cached model package. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected static ResourcelandscapePackage 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 ResourcelandscapeAdapterFactory() { - if (modelPackage == null) { - modelPackage = ResourcelandscapePackage.eINSTANCE; - } - } + if (modelPackage == null) { + modelPackage = ResourcelandscapePackage.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 ResourcelandscapeSwitch<Adapter> modelSwitch = new ResourcelandscapeSwitch<Adapter>() { - @Override - public Adapter caseComputingInfrastructure(ComputingInfrastructure object) { - return createComputingInfrastructureAdapter(); - } - @Override - public Adapter caseNetworkingInfrastructure(NetworkingInfrastructure object) { - return createNetworkingInfrastructureAdapter(); - } - @Override - public Adapter caseStorageInfrastructure(StorageInfrastructure object) { - return createStorageInfrastructureAdapter(); - } - @Override - public Adapter caseContainer(Container object) { - return createContainerAdapter(); - } - @Override - public Adapter caseRuntimeEnvironment(RuntimeEnvironment object) { - return createRuntimeEnvironmentAdapter(); - } - @Override - public Adapter caseDataCenter(DataCenter object) { - return createDataCenterAdapter(); - } - @Override - public Adapter caseDistributedDataCenter(DistributedDataCenter object) { - return createDistributedDataCenterAdapter(); - } - @Override - public Adapter caseCompositeHardwareInfrastructure(CompositeHardwareInfrastructure object) { - return createCompositeHardwareInfrastructureAdapter(); - } - @Override - public Adapter caseHardwareInfrastructure(HardwareInfrastructure object) { - return createHardwareInfrastructureAdapter(); - } - @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 defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; + @Override + public Adapter caseComputingInfrastructure(ComputingInfrastructure object) { + return createComputingInfrastructureAdapter(); + } + @Override + public Adapter caseNetworkingInfrastructure(NetworkingInfrastructure object) { + return createNetworkingInfrastructureAdapter(); + } + @Override + public Adapter caseStorageInfrastructure(StorageInfrastructure object) { + return createStorageInfrastructureAdapter(); + } + @Override + public Adapter caseContainer(Container object) { + return createContainerAdapter(); + } + @Override + public Adapter caseRuntimeEnvironment(RuntimeEnvironment object) { + return createRuntimeEnvironmentAdapter(); + } + @Override + public Adapter caseDataCenter(DataCenter object) { + return createDataCenterAdapter(); + } + @Override + public Adapter caseDistributedDataCenter(DistributedDataCenter object) { + return createDistributedDataCenterAdapter(); + } + @Override + public Adapter caseCompositeHardwareInfrastructure(CompositeHardwareInfrastructure object) { + return createCompositeHardwareInfrastructureAdapter(); + } + @Override + public Adapter caseHardwareInfrastructure(HardwareInfrastructure object) { + return createHardwareInfrastructureAdapter(); + } + @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 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.resourcelandscape.ComputingInfrastructure <em>Computing Infrastructure</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.ComputingInfrastructure <em>Computing Infrastructure</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.resourcelandscape.ComputingInfrastructure - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.ComputingInfrastructure + * @generated + */ public Adapter createComputingInfrastructureAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.NetworkingInfrastructure <em>Networking Infrastructure</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.NetworkingInfrastructure <em>Networking Infrastructure</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.resourcelandscape.NetworkingInfrastructure - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.NetworkingInfrastructure + * @generated + */ public Adapter createNetworkingInfrastructureAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.StorageInfrastructure <em>Storage Infrastructure</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.StorageInfrastructure <em>Storage Infrastructure</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.resourcelandscape.StorageInfrastructure - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.StorageInfrastructure + * @generated + */ public Adapter createStorageInfrastructureAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.Container <em>Container</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.Container <em>Container</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.resourcelandscape.Container - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.Container + * @generated + */ public Adapter createContainerAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment <em>Runtime Environment</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment <em>Runtime Environment</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.resourcelandscape.RuntimeEnvironment - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.RuntimeEnvironment + * @generated + */ public Adapter createRuntimeEnvironmentAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter <em>Data Center</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter <em>Data Center</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.resourcelandscape.DataCenter - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.DataCenter + * @generated + */ public Adapter createDataCenterAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter <em>Distributed Data Center</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter <em>Distributed Data Center</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.resourcelandscape.DistributedDataCenter - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter + * @generated + */ public Adapter createDistributedDataCenterAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.CompositeHardwareInfrastructure <em>Composite Hardware Infrastructure</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.CompositeHardwareInfrastructure <em>Composite Hardware Infrastructure</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.resourcelandscape.CompositeHardwareInfrastructure - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.CompositeHardwareInfrastructure + * @generated + */ public Adapter createCompositeHardwareInfrastructureAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure <em>Hardware Infrastructure</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure <em>Hardware Infrastructure</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.resourcelandscape.HardwareInfrastructure - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourcelandscape.HardwareInfrastructure + * @generated + */ public Adapter createHardwareInfrastructureAdapter() { - 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 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; + } } //ResourcelandscapeAdapterFactory diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/util/ResourcelandscapeSwitch.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/util/ResourcelandscapeSwitch.java index 0d00f7eae17c9f17d457bdfca514c78fb06f0be3..ccf7c41ddb76d6f254a672cfb470e24427121c48 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/util/ResourcelandscapeSwitch.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/util/ResourcelandscapeSwitch.java @@ -30,335 +30,335 @@ import org.eclipse.emf.ecore.util.Switch; */ public class ResourcelandscapeSwitch<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 ResourcelandscapePackage 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 ResourcelandscapeSwitch() { - if (modelPackage == null) { - modelPackage = ResourcelandscapePackage.eINSTANCE; - } - } + if (modelPackage == null) { + modelPackage = ResourcelandscapePackage.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 ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE: { - ComputingInfrastructure computingInfrastructure = (ComputingInfrastructure)theEObject; - T result = caseComputingInfrastructure(computingInfrastructure); - if (result == null) result = caseContainer(computingInfrastructure); - if (result == null) result = caseHardwareInfrastructure(computingInfrastructure); - if (result == null) result = caseEntity(computingInfrastructure); - if (result == null) result = caseIdentifier(computingInfrastructure); - if (result == null) result = caseNamedElement(computingInfrastructure); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE: { - NetworkingInfrastructure networkingInfrastructure = (NetworkingInfrastructure)theEObject; - T result = caseNetworkingInfrastructure(networkingInfrastructure); - if (result == null) result = caseContainer(networkingInfrastructure); - if (result == null) result = caseHardwareInfrastructure(networkingInfrastructure); - if (result == null) result = caseEntity(networkingInfrastructure); - if (result == null) result = caseIdentifier(networkingInfrastructure); - if (result == null) result = caseNamedElement(networkingInfrastructure); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourcelandscapePackage.STORAGE_INFRASTRUCTURE: { - StorageInfrastructure storageInfrastructure = (StorageInfrastructure)theEObject; - T result = caseStorageInfrastructure(storageInfrastructure); - if (result == null) result = caseContainer(storageInfrastructure); - if (result == null) result = caseHardwareInfrastructure(storageInfrastructure); - if (result == null) result = caseEntity(storageInfrastructure); - if (result == null) result = caseIdentifier(storageInfrastructure); - if (result == null) result = caseNamedElement(storageInfrastructure); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourcelandscapePackage.CONTAINER: { - Container container = (Container)theEObject; - T result = caseContainer(container); - if (result == null) result = caseEntity(container); - if (result == null) result = caseIdentifier(container); - if (result == null) result = caseNamedElement(container); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourcelandscapePackage.RUNTIME_ENVIRONMENT: { - RuntimeEnvironment runtimeEnvironment = (RuntimeEnvironment)theEObject; - T result = caseRuntimeEnvironment(runtimeEnvironment); - if (result == null) result = caseContainer(runtimeEnvironment); - if (result == null) result = caseEntity(runtimeEnvironment); - if (result == null) result = caseIdentifier(runtimeEnvironment); - if (result == null) result = caseNamedElement(runtimeEnvironment); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourcelandscapePackage.DATA_CENTER: { - DataCenter dataCenter = (DataCenter)theEObject; - T result = caseDataCenter(dataCenter); - if (result == null) result = caseEntity(dataCenter); - if (result == null) result = caseIdentifier(dataCenter); - if (result == null) result = caseNamedElement(dataCenter); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER: { - DistributedDataCenter distributedDataCenter = (DistributedDataCenter)theEObject; - T result = caseDistributedDataCenter(distributedDataCenter); - if (result == null) result = caseEntity(distributedDataCenter); - if (result == null) result = caseIdentifier(distributedDataCenter); - if (result == null) result = caseNamedElement(distributedDataCenter); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE: { - CompositeHardwareInfrastructure compositeHardwareInfrastructure = (CompositeHardwareInfrastructure)theEObject; - T result = caseCompositeHardwareInfrastructure(compositeHardwareInfrastructure); - if (result == null) result = caseHardwareInfrastructure(compositeHardwareInfrastructure); - if (result == null) result = caseEntity(compositeHardwareInfrastructure); - if (result == null) result = caseIdentifier(compositeHardwareInfrastructure); - if (result == null) result = caseNamedElement(compositeHardwareInfrastructure); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE: { - HardwareInfrastructure hardwareInfrastructure = (HardwareInfrastructure)theEObject; - T result = caseHardwareInfrastructure(hardwareInfrastructure); - if (result == null) result = caseEntity(hardwareInfrastructure); - if (result == null) result = caseIdentifier(hardwareInfrastructure); - if (result == null) result = caseNamedElement(hardwareInfrastructure); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } + switch (classifierID) { + case ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE: { + ComputingInfrastructure computingInfrastructure = (ComputingInfrastructure)theEObject; + T result = caseComputingInfrastructure(computingInfrastructure); + if (result == null) result = caseContainer(computingInfrastructure); + if (result == null) result = caseHardwareInfrastructure(computingInfrastructure); + if (result == null) result = caseEntity(computingInfrastructure); + if (result == null) result = caseIdentifier(computingInfrastructure); + if (result == null) result = caseNamedElement(computingInfrastructure); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE: { + NetworkingInfrastructure networkingInfrastructure = (NetworkingInfrastructure)theEObject; + T result = caseNetworkingInfrastructure(networkingInfrastructure); + if (result == null) result = caseContainer(networkingInfrastructure); + if (result == null) result = caseHardwareInfrastructure(networkingInfrastructure); + if (result == null) result = caseEntity(networkingInfrastructure); + if (result == null) result = caseIdentifier(networkingInfrastructure); + if (result == null) result = caseNamedElement(networkingInfrastructure); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourcelandscapePackage.STORAGE_INFRASTRUCTURE: { + StorageInfrastructure storageInfrastructure = (StorageInfrastructure)theEObject; + T result = caseStorageInfrastructure(storageInfrastructure); + if (result == null) result = caseContainer(storageInfrastructure); + if (result == null) result = caseHardwareInfrastructure(storageInfrastructure); + if (result == null) result = caseEntity(storageInfrastructure); + if (result == null) result = caseIdentifier(storageInfrastructure); + if (result == null) result = caseNamedElement(storageInfrastructure); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourcelandscapePackage.CONTAINER: { + Container container = (Container)theEObject; + T result = caseContainer(container); + if (result == null) result = caseEntity(container); + if (result == null) result = caseIdentifier(container); + if (result == null) result = caseNamedElement(container); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourcelandscapePackage.RUNTIME_ENVIRONMENT: { + RuntimeEnvironment runtimeEnvironment = (RuntimeEnvironment)theEObject; + T result = caseRuntimeEnvironment(runtimeEnvironment); + if (result == null) result = caseContainer(runtimeEnvironment); + if (result == null) result = caseEntity(runtimeEnvironment); + if (result == null) result = caseIdentifier(runtimeEnvironment); + if (result == null) result = caseNamedElement(runtimeEnvironment); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourcelandscapePackage.DATA_CENTER: { + DataCenter dataCenter = (DataCenter)theEObject; + T result = caseDataCenter(dataCenter); + if (result == null) result = caseEntity(dataCenter); + if (result == null) result = caseIdentifier(dataCenter); + if (result == null) result = caseNamedElement(dataCenter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER: { + DistributedDataCenter distributedDataCenter = (DistributedDataCenter)theEObject; + T result = caseDistributedDataCenter(distributedDataCenter); + if (result == null) result = caseEntity(distributedDataCenter); + if (result == null) result = caseIdentifier(distributedDataCenter); + if (result == null) result = caseNamedElement(distributedDataCenter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE: { + CompositeHardwareInfrastructure compositeHardwareInfrastructure = (CompositeHardwareInfrastructure)theEObject; + T result = caseCompositeHardwareInfrastructure(compositeHardwareInfrastructure); + if (result == null) result = caseHardwareInfrastructure(compositeHardwareInfrastructure); + if (result == null) result = caseEntity(compositeHardwareInfrastructure); + if (result == null) result = caseIdentifier(compositeHardwareInfrastructure); + if (result == null) result = caseNamedElement(compositeHardwareInfrastructure); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE: { + HardwareInfrastructure hardwareInfrastructure = (HardwareInfrastructure)theEObject; + T result = caseHardwareInfrastructure(hardwareInfrastructure); + if (result == null) result = caseEntity(hardwareInfrastructure); + if (result == null) result = caseIdentifier(hardwareInfrastructure); + if (result == null) result = caseNamedElement(hardwareInfrastructure); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } /** - * Returns the result of interpreting the object as an instance of '<em>Computing Infrastructure</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Computing Infrastructure</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>Computing Infrastructure</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>Computing Infrastructure</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseComputingInfrastructure(ComputingInfrastructure object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Networking Infrastructure</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Networking Infrastructure</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>Networking Infrastructure</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>Networking Infrastructure</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseNetworkingInfrastructure(NetworkingInfrastructure object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Storage Infrastructure</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Storage Infrastructure</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>Storage Infrastructure</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>Storage Infrastructure</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseStorageInfrastructure(StorageInfrastructure object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Container</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Container</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>Container</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>Container</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseContainer(Container object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Runtime Environment</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Runtime Environment</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>Runtime Environment</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>Runtime Environment</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseRuntimeEnvironment(RuntimeEnvironment object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Data Center</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Data Center</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>Data Center</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>Data Center</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseDataCenter(DataCenter object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Distributed Data Center</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Distributed Data Center</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>Distributed Data Center</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>Distributed Data Center</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseDistributedDataCenter(DistributedDataCenter object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Composite Hardware Infrastructure</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Composite Hardware Infrastructure</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>Composite Hardware Infrastructure</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>Composite Hardware Infrastructure</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseCompositeHardwareInfrastructure(CompositeHardwareInfrastructure object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Hardware Infrastructure</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Hardware Infrastructure</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>Hardware Infrastructure</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>Hardware Infrastructure</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseHardwareInfrastructure(HardwareInfrastructure 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>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; + } } //ResourcelandscapeSwitch diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/util/ResourcelandscapeValidator.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/util/ResourcelandscapeValidator.java index 108bd9137dcffa309c905c4cce6f71e58f31ad24..66dfd78838f0523c1f8e4fa5f310d557bac0208e 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/util/ResourcelandscapeValidator.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcelandscape/util/ResourcelandscapeValidator.java @@ -26,314 +26,314 @@ import org.eclipse.emf.ecore.util.EObjectValidator; */ public class ResourcelandscapeValidator extends EObjectValidator { /** - * The cached model package - * <!-- begin-user-doc --> + * The cached model package + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static final ResourcelandscapeValidator INSTANCE = new ResourcelandscapeValidator(); /** - * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package. - * <!-- begin-user-doc --> + * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see org.eclipse.emf.common.util.Diagnostic#getSource() - * @see org.eclipse.emf.common.util.Diagnostic#getCode() - * @generated - */ + * @see org.eclipse.emf.common.util.Diagnostic#getSource() + * @see org.eclipse.emf.common.util.Diagnostic#getCode() + * @generated + */ public static final String DIAGNOSTIC_SOURCE = "edu.kit.ipd.descartes.mm.resourcelandscape"; /** - * A constant with a fixed name that can be used as the base value for additional hand written constants. - * <!-- begin-user-doc --> + * A constant with a fixed name that can be used as the base value for additional hand written constants. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 0; /** - * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class. - * <!-- begin-user-doc --> + * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT; /** - * The cached base package validator. - * <!-- begin-user-doc --> + * The cached base package validator. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected IdentifierValidator identifierValidator; /** - * Creates an instance of the switch. - * <!-- begin-user-doc --> + * Creates an instance of the switch. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourcelandscapeValidator() { - super(); - identifierValidator = IdentifierValidator.INSTANCE; - } + super(); + identifierValidator = IdentifierValidator.INSTANCE; + } /** - * Returns the package of this validator switch. - * <!-- begin-user-doc --> + * Returns the package of this validator switch. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EPackage getEPackage() { - return ResourcelandscapePackage.eINSTANCE; - } + return ResourcelandscapePackage.eINSTANCE; + } /** - * Calls <code>validateXXX</code> for the corresponding classifier of the model. - * <!-- begin-user-doc --> + * Calls <code>validateXXX</code> for the corresponding classifier of the model. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) { - switch (classifierID) { - case ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE: - return validateComputingInfrastructure((ComputingInfrastructure)value, diagnostics, context); - case ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE: - return validateNetworkingInfrastructure((NetworkingInfrastructure)value, diagnostics, context); - case ResourcelandscapePackage.STORAGE_INFRASTRUCTURE: - return validateStorageInfrastructure((StorageInfrastructure)value, diagnostics, context); - case ResourcelandscapePackage.CONTAINER: - return validateContainer((Container)value, diagnostics, context); - case ResourcelandscapePackage.RUNTIME_ENVIRONMENT: - return validateRuntimeEnvironment((RuntimeEnvironment)value, diagnostics, context); - case ResourcelandscapePackage.DATA_CENTER: - return validateDataCenter((DataCenter)value, diagnostics, context); - case ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER: - return validateDistributedDataCenter((DistributedDataCenter)value, diagnostics, context); - case ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE: - return validateCompositeHardwareInfrastructure((CompositeHardwareInfrastructure)value, diagnostics, context); - case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE: - return validateHardwareInfrastructure((HardwareInfrastructure)value, diagnostics, context); - default: - return true; - } - } + switch (classifierID) { + case ResourcelandscapePackage.COMPUTING_INFRASTRUCTURE: + return validateComputingInfrastructure((ComputingInfrastructure)value, diagnostics, context); + case ResourcelandscapePackage.NETWORKING_INFRASTRUCTURE: + return validateNetworkingInfrastructure((NetworkingInfrastructure)value, diagnostics, context); + case ResourcelandscapePackage.STORAGE_INFRASTRUCTURE: + return validateStorageInfrastructure((StorageInfrastructure)value, diagnostics, context); + case ResourcelandscapePackage.CONTAINER: + return validateContainer((Container)value, diagnostics, context); + case ResourcelandscapePackage.RUNTIME_ENVIRONMENT: + return validateRuntimeEnvironment((RuntimeEnvironment)value, diagnostics, context); + case ResourcelandscapePackage.DATA_CENTER: + return validateDataCenter((DataCenter)value, diagnostics, context); + case ResourcelandscapePackage.DISTRIBUTED_DATA_CENTER: + return validateDistributedDataCenter((DistributedDataCenter)value, diagnostics, context); + case ResourcelandscapePackage.COMPOSITE_HARDWARE_INFRASTRUCTURE: + return validateCompositeHardwareInfrastructure((CompositeHardwareInfrastructure)value, diagnostics, context); + case ResourcelandscapePackage.HARDWARE_INFRASTRUCTURE: + return validateHardwareInfrastructure((HardwareInfrastructure)value, diagnostics, context); + default: + return true; + } + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public boolean validateComputingInfrastructure(ComputingInfrastructure computingInfrastructure, DiagnosticChain diagnostics, Map<Object, Object> context) { - if (!validate_NoCircularContainment(computingInfrastructure, diagnostics, context)) return false; - boolean result = validate_EveryMultiplicityConforms(computingInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryDataValueConforms(computingInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(computingInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(computingInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryProxyResolves(computingInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_UniqueID(computingInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryKeyUnique(computingInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(computingInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(computingInfrastructure, diagnostics, context); - return result; - } + if (!validate_NoCircularContainment(computingInfrastructure, diagnostics, context)) return false; + boolean result = validate_EveryMultiplicityConforms(computingInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryDataValueConforms(computingInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(computingInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(computingInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryProxyResolves(computingInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_UniqueID(computingInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryKeyUnique(computingInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(computingInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(computingInfrastructure, diagnostics, context); + return result; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public boolean validateNetworkingInfrastructure(NetworkingInfrastructure networkingInfrastructure, DiagnosticChain diagnostics, Map<Object, Object> context) { - if (!validate_NoCircularContainment(networkingInfrastructure, diagnostics, context)) return false; - boolean result = validate_EveryMultiplicityConforms(networkingInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryDataValueConforms(networkingInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(networkingInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(networkingInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryProxyResolves(networkingInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_UniqueID(networkingInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryKeyUnique(networkingInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(networkingInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(networkingInfrastructure, diagnostics, context); - return result; - } + if (!validate_NoCircularContainment(networkingInfrastructure, diagnostics, context)) return false; + boolean result = validate_EveryMultiplicityConforms(networkingInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryDataValueConforms(networkingInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(networkingInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(networkingInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryProxyResolves(networkingInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_UniqueID(networkingInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryKeyUnique(networkingInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(networkingInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(networkingInfrastructure, diagnostics, context); + return result; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public boolean validateStorageInfrastructure(StorageInfrastructure storageInfrastructure, DiagnosticChain diagnostics, Map<Object, Object> context) { - if (!validate_NoCircularContainment(storageInfrastructure, diagnostics, context)) return false; - boolean result = validate_EveryMultiplicityConforms(storageInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryDataValueConforms(storageInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(storageInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(storageInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryProxyResolves(storageInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_UniqueID(storageInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryKeyUnique(storageInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(storageInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(storageInfrastructure, diagnostics, context); - return result; - } + if (!validate_NoCircularContainment(storageInfrastructure, diagnostics, context)) return false; + boolean result = validate_EveryMultiplicityConforms(storageInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryDataValueConforms(storageInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(storageInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(storageInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryProxyResolves(storageInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_UniqueID(storageInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryKeyUnique(storageInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(storageInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(storageInfrastructure, diagnostics, context); + return result; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public boolean validateContainer(Container container, DiagnosticChain diagnostics, Map<Object, Object> context) { - if (!validate_NoCircularContainment(container, diagnostics, context)) return false; - boolean result = validate_EveryMultiplicityConforms(container, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryDataValueConforms(container, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(container, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(container, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryProxyResolves(container, diagnostics, context); - if (result || diagnostics != null) result &= validate_UniqueID(container, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryKeyUnique(container, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(container, diagnostics, context); - if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(container, diagnostics, context); - return result; - } + if (!validate_NoCircularContainment(container, diagnostics, context)) return false; + boolean result = validate_EveryMultiplicityConforms(container, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryDataValueConforms(container, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(container, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(container, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryProxyResolves(container, diagnostics, context); + if (result || diagnostics != null) result &= validate_UniqueID(container, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryKeyUnique(container, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(container, diagnostics, context); + if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(container, diagnostics, context); + return result; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public boolean validateRuntimeEnvironment(RuntimeEnvironment runtimeEnvironment, DiagnosticChain diagnostics, Map<Object, Object> context) { - if (!validate_NoCircularContainment(runtimeEnvironment, diagnostics, context)) return false; - boolean result = validate_EveryMultiplicityConforms(runtimeEnvironment, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryDataValueConforms(runtimeEnvironment, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(runtimeEnvironment, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(runtimeEnvironment, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryProxyResolves(runtimeEnvironment, diagnostics, context); - if (result || diagnostics != null) result &= validate_UniqueID(runtimeEnvironment, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryKeyUnique(runtimeEnvironment, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(runtimeEnvironment, diagnostics, context); - if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(runtimeEnvironment, diagnostics, context); - if (result || diagnostics != null) result &= validateRuntimeEnvironment_runtimeEnvironmentLevelCompliance(runtimeEnvironment, diagnostics, context); - return result; - } + if (!validate_NoCircularContainment(runtimeEnvironment, diagnostics, context)) return false; + boolean result = validate_EveryMultiplicityConforms(runtimeEnvironment, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryDataValueConforms(runtimeEnvironment, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(runtimeEnvironment, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(runtimeEnvironment, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryProxyResolves(runtimeEnvironment, diagnostics, context); + if (result || diagnostics != null) result &= validate_UniqueID(runtimeEnvironment, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryKeyUnique(runtimeEnvironment, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(runtimeEnvironment, diagnostics, context); + if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(runtimeEnvironment, diagnostics, context); + if (result || diagnostics != null) result &= validateRuntimeEnvironment_runtimeEnvironmentLevelCompliance(runtimeEnvironment, diagnostics, context); + return result; + } /** - * The cached validation expression for the runtimeEnvironmentLevelCompliance constraint of '<em>Runtime Environment</em>'. - * <!-- begin-user-doc --> + * The cached validation expression for the runtimeEnvironmentLevelCompliance constraint of '<em>Runtime Environment</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected static final String RUNTIME_ENVIRONMENT__RUNTIME_ENVIRONMENT_LEVEL_COMPLIANCE__EEXPRESSION = "self.containedIn.contains->forAll(r : RuntimeEnvironment | r.ofClass = self.ofClass)"; /** - * Validates the runtimeEnvironmentLevelCompliance constraint of '<em>Runtime Environment</em>'. - * <!-- begin-user-doc --> + * Validates the runtimeEnvironmentLevelCompliance constraint of '<em>Runtime Environment</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public boolean validateRuntimeEnvironment_runtimeEnvironmentLevelCompliance(RuntimeEnvironment runtimeEnvironment, DiagnosticChain diagnostics, Map<Object, Object> context) { - return - validate - (ResourcelandscapePackage.Literals.RUNTIME_ENVIRONMENT, - runtimeEnvironment, - diagnostics, - context, - "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", - "runtimeEnvironmentLevelCompliance", - RUNTIME_ENVIRONMENT__RUNTIME_ENVIRONMENT_LEVEL_COMPLIANCE__EEXPRESSION, - Diagnostic.ERROR, - DIAGNOSTIC_SOURCE, - 0); - } + return + validate + (ResourcelandscapePackage.Literals.RUNTIME_ENVIRONMENT, + runtimeEnvironment, + diagnostics, + context, + "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", + "runtimeEnvironmentLevelCompliance", + RUNTIME_ENVIRONMENT__RUNTIME_ENVIRONMENT_LEVEL_COMPLIANCE__EEXPRESSION, + Diagnostic.ERROR, + DIAGNOSTIC_SOURCE, + 0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public boolean validateDataCenter(DataCenter dataCenter, DiagnosticChain diagnostics, Map<Object, Object> context) { - if (!validate_NoCircularContainment(dataCenter, diagnostics, context)) return false; - boolean result = validate_EveryMultiplicityConforms(dataCenter, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryDataValueConforms(dataCenter, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(dataCenter, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(dataCenter, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryProxyResolves(dataCenter, diagnostics, context); - if (result || diagnostics != null) result &= validate_UniqueID(dataCenter, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryKeyUnique(dataCenter, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(dataCenter, diagnostics, context); - if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(dataCenter, diagnostics, context); - return result; - } + if (!validate_NoCircularContainment(dataCenter, diagnostics, context)) return false; + boolean result = validate_EveryMultiplicityConforms(dataCenter, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryDataValueConforms(dataCenter, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(dataCenter, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(dataCenter, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryProxyResolves(dataCenter, diagnostics, context); + if (result || diagnostics != null) result &= validate_UniqueID(dataCenter, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryKeyUnique(dataCenter, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(dataCenter, diagnostics, context); + if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(dataCenter, diagnostics, context); + return result; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public boolean validateDistributedDataCenter(DistributedDataCenter distributedDataCenter, DiagnosticChain diagnostics, Map<Object, Object> context) { - if (!validate_NoCircularContainment(distributedDataCenter, diagnostics, context)) return false; - boolean result = validate_EveryMultiplicityConforms(distributedDataCenter, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryDataValueConforms(distributedDataCenter, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(distributedDataCenter, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(distributedDataCenter, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryProxyResolves(distributedDataCenter, diagnostics, context); - if (result || diagnostics != null) result &= validate_UniqueID(distributedDataCenter, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryKeyUnique(distributedDataCenter, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(distributedDataCenter, diagnostics, context); - if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(distributedDataCenter, diagnostics, context); - return result; - } + if (!validate_NoCircularContainment(distributedDataCenter, diagnostics, context)) return false; + boolean result = validate_EveryMultiplicityConforms(distributedDataCenter, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryDataValueConforms(distributedDataCenter, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(distributedDataCenter, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(distributedDataCenter, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryProxyResolves(distributedDataCenter, diagnostics, context); + if (result || diagnostics != null) result &= validate_UniqueID(distributedDataCenter, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryKeyUnique(distributedDataCenter, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(distributedDataCenter, diagnostics, context); + if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(distributedDataCenter, diagnostics, context); + return result; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public boolean validateCompositeHardwareInfrastructure(CompositeHardwareInfrastructure compositeHardwareInfrastructure, DiagnosticChain diagnostics, Map<Object, Object> context) { - if (!validate_NoCircularContainment(compositeHardwareInfrastructure, diagnostics, context)) return false; - boolean result = validate_EveryMultiplicityConforms(compositeHardwareInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryDataValueConforms(compositeHardwareInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(compositeHardwareInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(compositeHardwareInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryProxyResolves(compositeHardwareInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_UniqueID(compositeHardwareInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryKeyUnique(compositeHardwareInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(compositeHardwareInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(compositeHardwareInfrastructure, diagnostics, context); - return result; - } + if (!validate_NoCircularContainment(compositeHardwareInfrastructure, diagnostics, context)) return false; + boolean result = validate_EveryMultiplicityConforms(compositeHardwareInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryDataValueConforms(compositeHardwareInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(compositeHardwareInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(compositeHardwareInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryProxyResolves(compositeHardwareInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_UniqueID(compositeHardwareInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryKeyUnique(compositeHardwareInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(compositeHardwareInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(compositeHardwareInfrastructure, diagnostics, context); + return result; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public boolean validateHardwareInfrastructure(HardwareInfrastructure hardwareInfrastructure, DiagnosticChain diagnostics, Map<Object, Object> context) { - if (!validate_NoCircularContainment(hardwareInfrastructure, diagnostics, context)) return false; - boolean result = validate_EveryMultiplicityConforms(hardwareInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryDataValueConforms(hardwareInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(hardwareInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(hardwareInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryProxyResolves(hardwareInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_UniqueID(hardwareInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryKeyUnique(hardwareInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(hardwareInfrastructure, diagnostics, context); - if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(hardwareInfrastructure, diagnostics, context); - return result; - } + if (!validate_NoCircularContainment(hardwareInfrastructure, diagnostics, context)) return false; + boolean result = validate_EveryMultiplicityConforms(hardwareInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryDataValueConforms(hardwareInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(hardwareInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(hardwareInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryProxyResolves(hardwareInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_UniqueID(hardwareInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryKeyUnique(hardwareInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(hardwareInfrastructure, diagnostics, context); + if (result || diagnostics != null) result &= identifierValidator.validateIdentifier_idHasToBeUnique(hardwareInfrastructure, diagnostics, context); + return result; + } /** - * Returns the resource locator that will be used to fetch messages for this validator's diagnostics. - * <!-- begin-user-doc --> + * Returns the resource locator that will be used to fetch messages for this validator's diagnostics. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public ResourceLocator getResourceLocator() { - // TODO - // Specialize this to return a resource locator for messages specific to this validator. - // Ensure that you remove @generated or mark it @generated NOT - return super.getResourceLocator(); - } + // TODO + // Specialize this to return a resource locator for messages specific to this validator. + // Ensure that you remove @generated or mark it @generated NOT + return super.getResourceLocator(); + } } //ResourcelandscapeValidator diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/ResourceType.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/ResourceType.java index 87819a991a3f672b1e842b3d2ac3083d2c5cd2e6..07bd4e5ab7582c97589e8e7eeb6edd37da82b7bb 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/ResourceType.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/ResourceType.java @@ -23,31 +23,31 @@ import edu.kit.ipd.descartes.core.Entity; */ public interface ResourceType extends Entity { /** - * Returns the value of the '<em><b>Parent Resource Repository</b></em>' container reference. - * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourcetype.ResourceTypeRepository#getResourceTypes <em>Resource Types</em>}'. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Parent Resource Repository</b></em>' container reference. + * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourcetype.ResourceTypeRepository#getResourceTypes <em>Resource Types</em>}'. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Parent Resource Repository</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 Repository</em>' container reference. - * @see #setParentResourceRepository(ResourceTypeRepository) - * @see edu.kit.ipd.descartes.mm.resourcetype.ResourcetypePackage#getResourceType_ParentResourceRepository() - * @see edu.kit.ipd.descartes.mm.resourcetype.ResourceTypeRepository#getResourceTypes - * @model opposite="resourceTypes" required="true" transient="false" ordered="false" - * @generated - */ + * @return the value of the '<em>Parent Resource Repository</em>' container reference. + * @see #setParentResourceRepository(ResourceTypeRepository) + * @see edu.kit.ipd.descartes.mm.resourcetype.ResourcetypePackage#getResourceType_ParentResourceRepository() + * @see edu.kit.ipd.descartes.mm.resourcetype.ResourceTypeRepository#getResourceTypes + * @model opposite="resourceTypes" required="true" transient="false" ordered="false" + * @generated + */ ResourceTypeRepository getParentResourceRepository(); /** - * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourcetype.ResourceType#getParentResourceRepository <em>Parent Resource Repository</em>}' container reference. - * <!-- begin-user-doc --> + * Sets the value of the '{@link edu.kit.ipd.descartes.mm.resourcetype.ResourceType#getParentResourceRepository <em>Parent Resource Repository</em>}' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Parent Resource Repository</em>' container reference. - * @see #getParentResourceRepository() - * @generated - */ + * @param value the new value of the '<em>Parent Resource Repository</em>' container reference. + * @see #getParentResourceRepository() + * @generated + */ void setParentResourceRepository(ResourceTypeRepository value); } // ResourceType diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/ResourceTypeRepository.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/ResourceTypeRepository.java index e69a7060ee2dff09f0e7e5106d43265331b473da..d5e6450b03b0921c383b93c8d3c3f43eb35cdfb1 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/ResourceTypeRepository.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/ResourceTypeRepository.java @@ -25,21 +25,21 @@ import org.eclipse.emf.ecore.EObject; */ public interface ResourceTypeRepository extends EObject { /** - * Returns the value of the '<em><b>Resource Types</b></em>' containment reference list. - * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourcetype.ResourceType}. - * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourcetype.ResourceType#getParentResourceRepository <em>Parent Resource Repository</em>}'. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Resource Types</b></em>' containment reference list. + * The list contents are of type {@link edu.kit.ipd.descartes.mm.resourcetype.ResourceType}. + * It is bidirectional and its opposite is '{@link edu.kit.ipd.descartes.mm.resourcetype.ResourceType#getParentResourceRepository <em>Parent Resource Repository</em>}'. + * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Resource Types</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>Resource Types</em>' containment reference list. - * @see edu.kit.ipd.descartes.mm.resourcetype.ResourcetypePackage#getResourceTypeRepository_ResourceTypes() - * @see edu.kit.ipd.descartes.mm.resourcetype.ResourceType#getParentResourceRepository - * @model opposite="parentResourceRepository" containment="true" ordered="false" - * @generated - */ + * @return the value of the '<em>Resource Types</em>' containment reference list. + * @see edu.kit.ipd.descartes.mm.resourcetype.ResourcetypePackage#getResourceTypeRepository_ResourceTypes() + * @see edu.kit.ipd.descartes.mm.resourcetype.ResourceType#getParentResourceRepository + * @model opposite="parentResourceRepository" containment="true" ordered="false" + * @generated + */ EList<ResourceType> getResourceTypes(); } // ResourceTypeRepository diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/ResourcetypeFactory.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/ResourcetypeFactory.java index df5cbd29caf949b12c57abcdaf8a63a1db2fe027..eb71c2c8d3c4464e4d34b0566dee1cafd80aee1c 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/ResourcetypeFactory.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/ResourcetypeFactory.java @@ -15,56 +15,56 @@ import org.eclipse.emf.ecore.EFactory; */ public interface ResourcetypeFactory 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 + */ ResourcetypeFactory eINSTANCE = edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypeFactoryImpl.init(); /** - * Returns a new object of class '<em>Resource Type Repository</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Resource Type Repository</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Resource Type Repository</em>'. - * @generated - */ + * @return a new object of class '<em>Resource Type Repository</em>'. + * @generated + */ ResourceTypeRepository createResourceTypeRepository(); /** - * Returns a new object of class '<em>Processing Resource Type</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Processing Resource Type</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Processing Resource Type</em>'. - * @generated - */ + * @return a new object of class '<em>Processing Resource Type</em>'. + * @generated + */ ProcessingResourceType createProcessingResourceType(); /** - * Returns a new object of class '<em>Communication Link Resource Type</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Communication Link Resource Type</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Communication Link Resource Type</em>'. - * @generated - */ + * @return a new object of class '<em>Communication Link Resource Type</em>'. + * @generated + */ CommunicationLinkResourceType createCommunicationLinkResourceType(); /** - * Returns a new object of class '<em>Passive Resource Type</em>'. - * <!-- begin-user-doc --> + * Returns a new object of class '<em>Passive Resource Type</em>'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return a new object of class '<em>Passive Resource Type</em>'. - * @generated - */ + * @return a new object of class '<em>Passive Resource Type</em>'. + * @generated + */ PassiveResourceType createPassiveResourceType(); /** - * 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 + */ ResourcetypePackage getResourcetypePackage(); } //ResourcetypeFactory diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/ResourcetypePackage.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/ResourcetypePackage.java index 59f1160643b19b405d43309da812d289a58bd230..e237fc28c78a7f0de4fa3a4a11dec079fc6b0ee5 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/ResourcetypePackage.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/ResourcetypePackage.java @@ -26,333 +26,333 @@ import org.eclipse.emf.ecore.EReference; */ public interface ResourcetypePackage extends EPackage { /** - * The package name. - * <!-- begin-user-doc --> + * The package name. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ String eNAME = "resourcetype"; /** - * 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/resourcetype/1.0"; /** - * The package namespace name. - * <!-- begin-user-doc --> + * The package namespace name. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ String eNS_PREFIX = "resourcetype"; /** - * The singleton instance of the package. - * <!-- begin-user-doc --> + * The singleton instance of the package. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ ResourcetypePackage eINSTANCE = edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl.init(); /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.ResourceTypeRepositoryImpl <em>Resource Type Repository</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.ResourceTypeRepositoryImpl <em>Resource Type Repository</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourceTypeRepositoryImpl - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getResourceTypeRepository() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourceTypeRepositoryImpl + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getResourceTypeRepository() + * @generated + */ int RESOURCE_TYPE_REPOSITORY = 0; /** - * The feature id for the '<em><b>Resource Types</b></em>' containment reference list. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Resource Types</b></em>' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES = 0; /** - * The number of structural features of the '<em>Resource Type Repository</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Resource Type Repository</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int RESOURCE_TYPE_REPOSITORY_FEATURE_COUNT = 1; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.ResourceTypeImpl <em>Resource Type</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.ResourceTypeImpl <em>Resource Type</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourceTypeImpl - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getResourceType() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourceTypeImpl + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getResourceType() + * @generated + */ int RESOURCE_TYPE = 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 RESOURCE_TYPE__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 RESOURCE_TYPE__NAME = CorePackage.ENTITY__NAME; /** - * The feature id for the '<em><b>Parent Resource Repository</b></em>' container reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Parent Resource Repository</b></em>' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY = CorePackage.ENTITY_FEATURE_COUNT + 0; /** - * The number of structural features of the '<em>Resource Type</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Resource Type</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int RESOURCE_TYPE_FEATURE_COUNT = CorePackage.ENTITY_FEATURE_COUNT + 1; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.ProcessingResourceTypeImpl <em>Processing Resource Type</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.ProcessingResourceTypeImpl <em>Processing Resource Type</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ProcessingResourceTypeImpl - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getProcessingResourceType() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ProcessingResourceTypeImpl + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getProcessingResourceType() + * @generated + */ int PROCESSING_RESOURCE_TYPE = 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 PROCESSING_RESOURCE_TYPE__ID = RESOURCE_TYPE__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_TYPE__NAME = RESOURCE_TYPE__NAME; /** - * The feature id for the '<em><b>Parent Resource Repository</b></em>' container reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Parent Resource Repository</b></em>' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PROCESSING_RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY = RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY; /** - * The number of structural features of the '<em>Processing Resource Type</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Processing Resource Type</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PROCESSING_RESOURCE_TYPE_FEATURE_COUNT = RESOURCE_TYPE_FEATURE_COUNT + 0; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.CommunicationLinkResourceTypeImpl <em>Communication Link Resource Type</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.CommunicationLinkResourceTypeImpl <em>Communication Link Resource Type</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.CommunicationLinkResourceTypeImpl - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getCommunicationLinkResourceType() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.CommunicationLinkResourceTypeImpl + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getCommunicationLinkResourceType() + * @generated + */ int COMMUNICATION_LINK_RESOURCE_TYPE = 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 COMMUNICATION_LINK_RESOURCE_TYPE__ID = PROCESSING_RESOURCE_TYPE__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 COMMUNICATION_LINK_RESOURCE_TYPE__NAME = PROCESSING_RESOURCE_TYPE__NAME; /** - * The feature id for the '<em><b>Parent Resource Repository</b></em>' container reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Parent Resource Repository</b></em>' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int COMMUNICATION_LINK_RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY = PROCESSING_RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY; /** - * The number of structural features of the '<em>Communication Link Resource Type</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Communication Link Resource Type</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int COMMUNICATION_LINK_RESOURCE_TYPE_FEATURE_COUNT = PROCESSING_RESOURCE_TYPE_FEATURE_COUNT + 0; /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.PassiveResourceTypeImpl <em>Passive Resource Type</em>}' class. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.PassiveResourceTypeImpl <em>Passive Resource Type</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.PassiveResourceTypeImpl - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getPassiveResourceType() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.PassiveResourceTypeImpl + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getPassiveResourceType() + * @generated + */ int PASSIVE_RESOURCE_TYPE = 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 PASSIVE_RESOURCE_TYPE__ID = RESOURCE_TYPE__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_TYPE__NAME = RESOURCE_TYPE__NAME; /** - * The feature id for the '<em><b>Parent Resource Repository</b></em>' container reference. - * <!-- begin-user-doc --> + * The feature id for the '<em><b>Parent Resource Repository</b></em>' container reference. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PASSIVE_RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY = RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY; /** - * The number of structural features of the '<em>Passive Resource Type</em>' class. - * <!-- begin-user-doc --> + * The number of structural features of the '<em>Passive Resource Type</em>' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - * @ordered - */ + * @generated + * @ordered + */ int PASSIVE_RESOURCE_TYPE_FEATURE_COUNT = RESOURCE_TYPE_FEATURE_COUNT + 0; /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcetype.ResourceTypeRepository <em>Resource Type Repository</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcetype.ResourceTypeRepository <em>Resource Type Repository</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Resource Type Repository</em>'. - * @see edu.kit.ipd.descartes.mm.resourcetype.ResourceTypeRepository - * @generated - */ + * @return the meta object for class '<em>Resource Type Repository</em>'. + * @see edu.kit.ipd.descartes.mm.resourcetype.ResourceTypeRepository + * @generated + */ EClass getResourceTypeRepository(); /** - * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.resourcetype.ResourceTypeRepository#getResourceTypes <em>Resource Types</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the containment reference list '{@link edu.kit.ipd.descartes.mm.resourcetype.ResourceTypeRepository#getResourceTypes <em>Resource Types</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the containment reference list '<em>Resource Types</em>'. - * @see edu.kit.ipd.descartes.mm.resourcetype.ResourceTypeRepository#getResourceTypes() - * @see #getResourceTypeRepository() - * @generated - */ + * @return the meta object for the containment reference list '<em>Resource Types</em>'. + * @see edu.kit.ipd.descartes.mm.resourcetype.ResourceTypeRepository#getResourceTypes() + * @see #getResourceTypeRepository() + * @generated + */ EReference getResourceTypeRepository_ResourceTypes(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcetype.ResourceType <em>Resource Type</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcetype.ResourceType <em>Resource Type</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Resource Type</em>'. - * @see edu.kit.ipd.descartes.mm.resourcetype.ResourceType - * @generated - */ + * @return the meta object for class '<em>Resource Type</em>'. + * @see edu.kit.ipd.descartes.mm.resourcetype.ResourceType + * @generated + */ EClass getResourceType(); /** - * Returns the meta object for the container reference '{@link edu.kit.ipd.descartes.mm.resourcetype.ResourceType#getParentResourceRepository <em>Parent Resource Repository</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for the container reference '{@link edu.kit.ipd.descartes.mm.resourcetype.ResourceType#getParentResourceRepository <em>Parent Resource Repository</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the container reference '<em>Parent Resource Repository</em>'. - * @see edu.kit.ipd.descartes.mm.resourcetype.ResourceType#getParentResourceRepository() - * @see #getResourceType() - * @generated - */ + * @return the meta object for the container reference '<em>Parent Resource Repository</em>'. + * @see edu.kit.ipd.descartes.mm.resourcetype.ResourceType#getParentResourceRepository() + * @see #getResourceType() + * @generated + */ EReference getResourceType_ParentResourceRepository(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcetype.ProcessingResourceType <em>Processing Resource Type</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcetype.ProcessingResourceType <em>Processing Resource Type</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Processing Resource Type</em>'. - * @see edu.kit.ipd.descartes.mm.resourcetype.ProcessingResourceType - * @generated - */ + * @return the meta object for class '<em>Processing Resource Type</em>'. + * @see edu.kit.ipd.descartes.mm.resourcetype.ProcessingResourceType + * @generated + */ EClass getProcessingResourceType(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcetype.CommunicationLinkResourceType <em>Communication Link Resource Type</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcetype.CommunicationLinkResourceType <em>Communication Link Resource Type</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Communication Link Resource Type</em>'. - * @see edu.kit.ipd.descartes.mm.resourcetype.CommunicationLinkResourceType - * @generated - */ + * @return the meta object for class '<em>Communication Link Resource Type</em>'. + * @see edu.kit.ipd.descartes.mm.resourcetype.CommunicationLinkResourceType + * @generated + */ EClass getCommunicationLinkResourceType(); /** - * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcetype.PassiveResourceType <em>Passive Resource Type</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for class '{@link edu.kit.ipd.descartes.mm.resourcetype.PassiveResourceType <em>Passive Resource Type</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for class '<em>Passive Resource Type</em>'. - * @see edu.kit.ipd.descartes.mm.resourcetype.PassiveResourceType - * @generated - */ + * @return the meta object for class '<em>Passive Resource Type</em>'. + * @see edu.kit.ipd.descartes.mm.resourcetype.PassiveResourceType + * @generated + */ EClass getPassiveResourceType(); /** - * 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 + */ ResourcetypeFactory getResourcetypeFactory(); /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * Defines literals for the meta objects that represent * <ul> * <li>each class,</li> @@ -361,73 +361,73 @@ public interface ResourcetypePackage 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.resourcetype.impl.ResourceTypeRepositoryImpl <em>Resource Type Repository</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.ResourceTypeRepositoryImpl <em>Resource Type Repository</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourceTypeRepositoryImpl - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getResourceTypeRepository() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourceTypeRepositoryImpl + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getResourceTypeRepository() + * @generated + */ EClass RESOURCE_TYPE_REPOSITORY = eINSTANCE.getResourceTypeRepository(); /** - * The meta object literal for the '<em><b>Resource Types</b></em>' containment reference list feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Resource Types</b></em>' containment reference list feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES = eINSTANCE.getResourceTypeRepository_ResourceTypes(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.ResourceTypeImpl <em>Resource Type</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.ResourceTypeImpl <em>Resource Type</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourceTypeImpl - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getResourceType() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourceTypeImpl + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getResourceType() + * @generated + */ EClass RESOURCE_TYPE = eINSTANCE.getResourceType(); /** - * The meta object literal for the '<em><b>Parent Resource Repository</b></em>' container reference feature. - * <!-- begin-user-doc --> + * The meta object literal for the '<em><b>Parent Resource Repository</b></em>' container reference feature. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ EReference RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY = eINSTANCE.getResourceType_ParentResourceRepository(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.ProcessingResourceTypeImpl <em>Processing Resource Type</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.ProcessingResourceTypeImpl <em>Processing Resource Type</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ProcessingResourceTypeImpl - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getProcessingResourceType() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ProcessingResourceTypeImpl + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getProcessingResourceType() + * @generated + */ EClass PROCESSING_RESOURCE_TYPE = eINSTANCE.getProcessingResourceType(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.CommunicationLinkResourceTypeImpl <em>Communication Link Resource Type</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.CommunicationLinkResourceTypeImpl <em>Communication Link Resource Type</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.CommunicationLinkResourceTypeImpl - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getCommunicationLinkResourceType() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.CommunicationLinkResourceTypeImpl + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getCommunicationLinkResourceType() + * @generated + */ EClass COMMUNICATION_LINK_RESOURCE_TYPE = eINSTANCE.getCommunicationLinkResourceType(); /** - * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.PassiveResourceTypeImpl <em>Passive Resource Type</em>}' class. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.resourcetype.impl.PassiveResourceTypeImpl <em>Passive Resource Type</em>}' class. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.PassiveResourceTypeImpl - * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getPassiveResourceType() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.PassiveResourceTypeImpl + * @see edu.kit.ipd.descartes.mm.resourcetype.impl.ResourcetypePackageImpl#getPassiveResourceType() + * @generated + */ EClass PASSIVE_RESOURCE_TYPE = eINSTANCE.getPassiveResourceType(); } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/CommunicationLinkResourceTypeImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/CommunicationLinkResourceTypeImpl.java index 44ce08f83d4c25c2a6dde267da2aad47d8bddb95..d0c6c63f2b0d970e4215169e6d0101c80424c274 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/CommunicationLinkResourceTypeImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/CommunicationLinkResourceTypeImpl.java @@ -19,22 +19,22 @@ import org.eclipse.emf.ecore.EClass; */ public class CommunicationLinkResourceTypeImpl extends ProcessingResourceTypeImpl implements CommunicationLinkResourceType { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected CommunicationLinkResourceTypeImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourcetypePackage.Literals.COMMUNICATION_LINK_RESOURCE_TYPE; - } + return ResourcetypePackage.Literals.COMMUNICATION_LINK_RESOURCE_TYPE; + } } //CommunicationLinkResourceTypeImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/PassiveResourceTypeImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/PassiveResourceTypeImpl.java index 8e99d036e093b93b2aa8b239362a9ea0216b6ab2..1bac420df495ea4c17acea90a57901817771993a 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/PassiveResourceTypeImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/PassiveResourceTypeImpl.java @@ -19,22 +19,22 @@ import org.eclipse.emf.ecore.EClass; */ public class PassiveResourceTypeImpl extends ResourceTypeImpl implements PassiveResourceType { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected PassiveResourceTypeImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourcetypePackage.Literals.PASSIVE_RESOURCE_TYPE; - } + return ResourcetypePackage.Literals.PASSIVE_RESOURCE_TYPE; + } } //PassiveResourceTypeImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ProcessingResourceTypeImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ProcessingResourceTypeImpl.java index 0f80a2f2ab2c85f07461c2663299c68be1fbe85e..d15c9ce43a4df2ffb79d9f60b7ce4b1eca2af3fd 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ProcessingResourceTypeImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ProcessingResourceTypeImpl.java @@ -19,22 +19,22 @@ import org.eclipse.emf.ecore.EClass; */ public class ProcessingResourceTypeImpl extends ResourceTypeImpl implements ProcessingResourceType { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ProcessingResourceTypeImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourcetypePackage.Literals.PROCESSING_RESOURCE_TYPE; - } + return ResourcetypePackage.Literals.PROCESSING_RESOURCE_TYPE; + } } //ProcessingResourceTypeImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ResourceTypeImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ResourceTypeImpl.java index 3558b8446995be3181bf91b45ea39b656fde0743..a1191f2cd1ba34339c8d49764aad2965846dd4dc 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ResourceTypeImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ResourceTypeImpl.java @@ -34,165 +34,165 @@ import org.eclipse.emf.ecore.util.EcoreUtil; */ public abstract class ResourceTypeImpl extends EntityImpl implements ResourceType { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ResourceTypeImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourcetypePackage.Literals.RESOURCE_TYPE; - } + return ResourcetypePackage.Literals.RESOURCE_TYPE; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourceTypeRepository getParentResourceRepository() { - if (eContainerFeatureID() != ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY) return null; - return (ResourceTypeRepository)eContainer(); - } + if (eContainerFeatureID() != ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY) return null; + return (ResourceTypeRepository)eInternalContainer(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public NotificationChain basicSetParentResourceRepository(ResourceTypeRepository newParentResourceRepository, NotificationChain msgs) { - msgs = eBasicSetContainer((InternalEObject)newParentResourceRepository, ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY, msgs); - return msgs; - } + msgs = eBasicSetContainer((InternalEObject)newParentResourceRepository, ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY, msgs); + return msgs; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public void setParentResourceRepository(ResourceTypeRepository newParentResourceRepository) { - if (newParentResourceRepository != eInternalContainer() || (eContainerFeatureID() != ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY && newParentResourceRepository != null)) { - if (EcoreUtil.isAncestor(this, newParentResourceRepository)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newParentResourceRepository != null) - msgs = ((InternalEObject)newParentResourceRepository).eInverseAdd(this, ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES, ResourceTypeRepository.class, msgs); - msgs = basicSetParentResourceRepository(newParentResourceRepository, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY, newParentResourceRepository, newParentResourceRepository)); - } + if (newParentResourceRepository != eInternalContainer() || (eContainerFeatureID() != ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY && newParentResourceRepository != null)) { + if (EcoreUtil.isAncestor(this, newParentResourceRepository)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newParentResourceRepository != null) + msgs = ((InternalEObject)newParentResourceRepository).eInverseAdd(this, ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES, ResourceTypeRepository.class, msgs); + msgs = basicSetParentResourceRepository(newParentResourceRepository, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY, newParentResourceRepository, newParentResourceRepository)); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetParentResourceRepository((ResourceTypeRepository)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetParentResourceRepository((ResourceTypeRepository)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 ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY: - return basicSetParentResourceRepository(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY: + return basicSetParentResourceRepository(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 ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY: - return eInternalContainer().eInverseRemove(this, ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES, ResourceTypeRepository.class, msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } + switch (eContainerFeatureID()) { + case ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY: + return eInternalContainer().eInverseRemove(this, ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES, ResourceTypeRepository.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 ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY: - return getParentResourceRepository(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY: + return getParentResourceRepository(); + } + 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 ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY: - setParentResourceRepository((ResourceTypeRepository)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY: + setParentResourceRepository((ResourceTypeRepository)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 ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY: - setParentResourceRepository((ResourceTypeRepository)null); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY: + setParentResourceRepository((ResourceTypeRepository)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 ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY: - return getParentResourceRepository() != null; - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY: + return getParentResourceRepository() != null; + } + return super.eIsSet(featureID); + } } //ResourceTypeImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ResourceTypeRepositoryImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ResourceTypeRepositoryImpl.java index 8c52d5cd720dda7af6058f76414843dc540c6819..a2f5f4f1e90ac1196e8284c3482d645e6bfe8a07 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ResourceTypeRepositoryImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ResourceTypeRepositoryImpl.java @@ -36,133 +36,133 @@ import org.eclipse.emf.ecore.util.InternalEList; */ public class ResourceTypeRepositoryImpl extends EObjectImpl implements ResourceTypeRepository { /** - * The cached value of the '{@link #getResourceTypes() <em>Resource Types</em>}' containment reference list. - * <!-- begin-user-doc --> + * The cached value of the '{@link #getResourceTypes() <em>Resource Types</em>}' containment reference list. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getResourceTypes() - * @generated - * @ordered - */ + * @see #getResourceTypes() + * @generated + * @ordered + */ protected EList<ResourceType> resourceTypes; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected ResourceTypeRepositoryImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override protected EClass eStaticClass() { - return ResourcetypePackage.Literals.RESOURCE_TYPE_REPOSITORY; - } + return ResourcetypePackage.Literals.RESOURCE_TYPE_REPOSITORY; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EList<ResourceType> getResourceTypes() { - if (resourceTypes == null) { - resourceTypes = new EObjectContainmentWithInverseEList<ResourceType>(ResourceType.class, this, ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES, ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY); - } - return resourceTypes; - } + if (resourceTypes == null) { + resourceTypes = new EObjectContainmentWithInverseEList<ResourceType>(ResourceType.class, this, ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES, ResourcetypePackage.RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY); + } + return resourceTypes; + } /** - * <!-- 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 ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES: - return ((InternalEList<InternalEObject>)(InternalEList<?>)getResourceTypes()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES: + return ((InternalEList<InternalEObject>)(InternalEList<?>)getResourceTypes()).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 ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES: - return ((InternalEList<?>)getResourceTypes()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } + switch (featureID) { + case ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES: + return ((InternalEList<?>)getResourceTypes()).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 ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES: - return getResourceTypes(); - } - return super.eGet(featureID, resolve, coreType); - } + switch (featureID) { + case ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES: + return getResourceTypes(); + } + 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 ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES: - getResourceTypes().clear(); - getResourceTypes().addAll((Collection<? extends ResourceType>)newValue); - return; - } - super.eSet(featureID, newValue); - } + switch (featureID) { + case ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES: + getResourceTypes().clear(); + getResourceTypes().addAll((Collection<? extends ResourceType>)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 ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES: - getResourceTypes().clear(); - return; - } - super.eUnset(featureID); - } + switch (featureID) { + case ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES: + getResourceTypes().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 ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES: - return resourceTypes != null && !resourceTypes.isEmpty(); - } - return super.eIsSet(featureID); - } + switch (featureID) { + case ResourcetypePackage.RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES: + return resourceTypes != null && !resourceTypes.isEmpty(); + } + return super.eIsSet(featureID); + } } //ResourceTypeRepositoryImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ResourcetypeFactoryImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ResourcetypeFactoryImpl.java index 723300ba350f1109796a2d09423115ee51e6a99b..c43d5a59f3ac76de797928f154dcac30648520c4 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ResourcetypeFactoryImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ResourcetypeFactoryImpl.java @@ -21,109 +21,109 @@ import org.eclipse.emf.ecore.plugin.EcorePlugin; */ public class ResourcetypeFactoryImpl extends EFactoryImpl implements ResourcetypeFactory { /** - * Creates the default factory implementation. - * <!-- begin-user-doc --> + * Creates the default factory implementation. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static ResourcetypeFactory init() { - try { - ResourcetypeFactory theResourcetypeFactory = (ResourcetypeFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.descartes-research.net/metamodel/resourcetype/1.0"); - if (theResourcetypeFactory != null) { - return theResourcetypeFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new ResourcetypeFactoryImpl(); - } + try { + ResourcetypeFactory theResourcetypeFactory = (ResourcetypeFactory)EPackage.Registry.INSTANCE.getEFactory(ResourcetypePackage.eNS_URI); + if (theResourcetypeFactory != null) { + return theResourcetypeFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ResourcetypeFactoryImpl(); + } /** - * Creates an instance of the factory. - * <!-- begin-user-doc --> + * Creates an instance of the factory. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourcetypeFactoryImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case ResourcetypePackage.RESOURCE_TYPE_REPOSITORY: return createResourceTypeRepository(); - case ResourcetypePackage.PROCESSING_RESOURCE_TYPE: return createProcessingResourceType(); - case ResourcetypePackage.COMMUNICATION_LINK_RESOURCE_TYPE: return createCommunicationLinkResourceType(); - case ResourcetypePackage.PASSIVE_RESOURCE_TYPE: return createPassiveResourceType(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } + switch (eClass.getClassifierID()) { + case ResourcetypePackage.RESOURCE_TYPE_REPOSITORY: return createResourceTypeRepository(); + case ResourcetypePackage.PROCESSING_RESOURCE_TYPE: return createProcessingResourceType(); + case ResourcetypePackage.COMMUNICATION_LINK_RESOURCE_TYPE: return createCommunicationLinkResourceType(); + case ResourcetypePackage.PASSIVE_RESOURCE_TYPE: return createPassiveResourceType(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourceTypeRepository createResourceTypeRepository() { - ResourceTypeRepositoryImpl resourceTypeRepository = new ResourceTypeRepositoryImpl(); - return resourceTypeRepository; - } + ResourceTypeRepositoryImpl resourceTypeRepository = new ResourceTypeRepositoryImpl(); + return resourceTypeRepository; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ProcessingResourceType createProcessingResourceType() { - ProcessingResourceTypeImpl processingResourceType = new ProcessingResourceTypeImpl(); - return processingResourceType; - } + ProcessingResourceTypeImpl processingResourceType = new ProcessingResourceTypeImpl(); + return processingResourceType; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public CommunicationLinkResourceType createCommunicationLinkResourceType() { - CommunicationLinkResourceTypeImpl communicationLinkResourceType = new CommunicationLinkResourceTypeImpl(); - return communicationLinkResourceType; - } + CommunicationLinkResourceTypeImpl communicationLinkResourceType = new CommunicationLinkResourceTypeImpl(); + return communicationLinkResourceType; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public PassiveResourceType createPassiveResourceType() { - PassiveResourceTypeImpl passiveResourceType = new PassiveResourceTypeImpl(); - return passiveResourceType; - } + PassiveResourceTypeImpl passiveResourceType = new PassiveResourceTypeImpl(); + return passiveResourceType; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourcetypePackage getResourcetypePackage() { - return (ResourcetypePackage)getEPackage(); - } + return (ResourcetypePackage)getEPackage(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @deprecated - * @generated - */ + * @deprecated + * @generated + */ @Deprecated public static ResourcetypePackage getPackage() { - return ResourcetypePackage.eINSTANCE; - } + return ResourcetypePackage.eINSTANCE; + } } //ResourcetypeFactoryImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ResourcetypePackageImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ResourcetypePackageImpl.java index 44ac8a6297b20305b10406f86be790fe2f1020c2..9fbbc10b3ed8fffeb3ae111bf1be69495baaf5d5 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ResourcetypePackageImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/impl/ResourcetypePackageImpl.java @@ -43,273 +43,273 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; */ public class ResourcetypePackageImpl extends EPackageImpl implements ResourcetypePackage { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass resourceTypeRepositoryEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass resourceTypeEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass processingResourceTypeEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass communicationLinkResourceTypeEClass = null; /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EClass passiveResourceTypeEClass = 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 --> + * 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.resourcetype.ResourcetypePackage#eNS_URI - * @see #init() - * @generated - */ + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see edu.kit.ipd.descartes.mm.resourcetype.ResourcetypePackage#eNS_URI + * @see #init() + * @generated + */ private ResourcetypePackageImpl() { - super(eNS_URI, ResourcetypeFactory.eINSTANCE); - } + super(eNS_URI, ResourcetypeFactory.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 ResourcetypePackage#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 ResourcetypePackage#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 ResourcetypePackage init() { - if (isInited) return (ResourcetypePackage)EPackage.Registry.INSTANCE.getEPackage(ResourcetypePackage.eNS_URI); + if (isInited) return (ResourcetypePackage)EPackage.Registry.INSTANCE.getEPackage(ResourcetypePackage.eNS_URI); - // Obtain or create and register package - ResourcetypePackageImpl theResourcetypePackage = (ResourcetypePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ResourcetypePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ResourcetypePackageImpl()); + // Obtain or create and register package + ResourcetypePackageImpl theResourcetypePackage = (ResourcetypePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ResourcetypePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ResourcetypePackageImpl()); - 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); - ResourceconfigurationPackageImpl theResourceconfigurationPackage = (ResourceconfigurationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI) instanceof ResourceconfigurationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI) : ResourceconfigurationPackage.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); + // 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); + ResourceconfigurationPackageImpl theResourceconfigurationPackage = (ResourceconfigurationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI) instanceof ResourceconfigurationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI) : ResourceconfigurationPackage.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); - // Create package meta-data objects - theResourcetypePackage.createPackageContents(); - theResourcelandscapePackage.createPackageContents(); - theResourceconfigurationPackage.createPackageContents(); - theContainerrepositoryPackage.createPackageContents(); - theRuntimeenvironmentclassesPackage.createPackageContents(); + // Create package meta-data objects + theResourcetypePackage.createPackageContents(); + theResourcelandscapePackage.createPackageContents(); + theResourceconfigurationPackage.createPackageContents(); + theContainerrepositoryPackage.createPackageContents(); + theRuntimeenvironmentclassesPackage.createPackageContents(); - // Initialize created meta-data - theResourcetypePackage.initializePackageContents(); - theResourcelandscapePackage.initializePackageContents(); - theResourceconfigurationPackage.initializePackageContents(); - theContainerrepositoryPackage.initializePackageContents(); - theRuntimeenvironmentclassesPackage.initializePackageContents(); + // Initialize created meta-data + theResourcetypePackage.initializePackageContents(); + theResourcelandscapePackage.initializePackageContents(); + theResourceconfigurationPackage.initializePackageContents(); + theContainerrepositoryPackage.initializePackageContents(); + theRuntimeenvironmentclassesPackage.initializePackageContents(); - // Mark meta-data to indicate it can't be changed - theResourcetypePackage.freeze(); + // Mark meta-data to indicate it can't be changed + theResourcetypePackage.freeze(); - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(ResourcetypePackage.eNS_URI, theResourcetypePackage); - return theResourcetypePackage; - } + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ResourcetypePackage.eNS_URI, theResourcetypePackage); + return theResourcetypePackage; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getResourceTypeRepository() { - return resourceTypeRepositoryEClass; - } + return resourceTypeRepositoryEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getResourceTypeRepository_ResourceTypes() { - return (EReference)resourceTypeRepositoryEClass.getEStructuralFeatures().get(0); - } + return (EReference)resourceTypeRepositoryEClass.getEStructuralFeatures().get(0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getResourceType() { - return resourceTypeEClass; - } + return resourceTypeEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EReference getResourceType_ParentResourceRepository() { - return (EReference)resourceTypeEClass.getEStructuralFeatures().get(0); - } + return (EReference)resourceTypeEClass.getEStructuralFeatures().get(0); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getProcessingResourceType() { - return processingResourceTypeEClass; - } + return processingResourceTypeEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getCommunicationLinkResourceType() { - return communicationLinkResourceTypeEClass; - } + return communicationLinkResourceTypeEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EClass getPassiveResourceType() { - return passiveResourceTypeEClass; - } + return passiveResourceTypeEClass; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public ResourcetypeFactory getResourcetypeFactory() { - return (ResourcetypeFactory)getEFactoryInstance(); - } + return (ResourcetypeFactory)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 - resourceTypeRepositoryEClass = createEClass(RESOURCE_TYPE_REPOSITORY); - createEReference(resourceTypeRepositoryEClass, RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES); + // Create classes and their features + resourceTypeRepositoryEClass = createEClass(RESOURCE_TYPE_REPOSITORY); + createEReference(resourceTypeRepositoryEClass, RESOURCE_TYPE_REPOSITORY__RESOURCE_TYPES); - resourceTypeEClass = createEClass(RESOURCE_TYPE); - createEReference(resourceTypeEClass, RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY); + resourceTypeEClass = createEClass(RESOURCE_TYPE); + createEReference(resourceTypeEClass, RESOURCE_TYPE__PARENT_RESOURCE_REPOSITORY); - processingResourceTypeEClass = createEClass(PROCESSING_RESOURCE_TYPE); + processingResourceTypeEClass = createEClass(PROCESSING_RESOURCE_TYPE); - communicationLinkResourceTypeEClass = createEClass(COMMUNICATION_LINK_RESOURCE_TYPE); + communicationLinkResourceTypeEClass = createEClass(COMMUNICATION_LINK_RESOURCE_TYPE); - passiveResourceTypeEClass = createEClass(PASSIVE_RESOURCE_TYPE); - } + passiveResourceTypeEClass = createEClass(PASSIVE_RESOURCE_TYPE); + } /** - * <!-- 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; + if (isInitialized) return; + isInitialized = true; - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); - // Obtain other dependent packages - CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + // Obtain other dependent packages + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); - // Create type parameters + // Create type parameters - // Set bounds for type parameters + // Set bounds for type parameters - // Add supertypes to classes - resourceTypeEClass.getESuperTypes().add(theCorePackage.getEntity()); - processingResourceTypeEClass.getESuperTypes().add(this.getResourceType()); - communicationLinkResourceTypeEClass.getESuperTypes().add(this.getProcessingResourceType()); - passiveResourceTypeEClass.getESuperTypes().add(this.getResourceType()); + // Add supertypes to classes + resourceTypeEClass.getESuperTypes().add(theCorePackage.getEntity()); + processingResourceTypeEClass.getESuperTypes().add(this.getResourceType()); + communicationLinkResourceTypeEClass.getESuperTypes().add(this.getProcessingResourceType()); + passiveResourceTypeEClass.getESuperTypes().add(this.getResourceType()); - // Initialize classes and features; add operations and parameters - initEClass(resourceTypeRepositoryEClass, ResourceTypeRepository.class, "ResourceTypeRepository", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getResourceTypeRepository_ResourceTypes(), this.getResourceType(), this.getResourceType_ParentResourceRepository(), "resourceTypes", null, 0, -1, ResourceTypeRepository.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + // Initialize classes and features; add operations and parameters + initEClass(resourceTypeRepositoryEClass, ResourceTypeRepository.class, "ResourceTypeRepository", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getResourceTypeRepository_ResourceTypes(), this.getResourceType(), this.getResourceType_ParentResourceRepository(), "resourceTypes", null, 0, -1, ResourceTypeRepository.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - initEClass(resourceTypeEClass, ResourceType.class, "ResourceType", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getResourceType_ParentResourceRepository(), this.getResourceTypeRepository(), this.getResourceTypeRepository_ResourceTypes(), "parentResourceRepository", null, 1, 1, ResourceType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEClass(resourceTypeEClass, ResourceType.class, "ResourceType", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getResourceType_ParentResourceRepository(), this.getResourceTypeRepository(), this.getResourceTypeRepository_ResourceTypes(), "parentResourceRepository", null, 1, 1, ResourceType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - initEClass(processingResourceTypeEClass, ProcessingResourceType.class, "ProcessingResourceType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEClass(processingResourceTypeEClass, ProcessingResourceType.class, "ProcessingResourceType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEClass(communicationLinkResourceTypeEClass, CommunicationLinkResourceType.class, "CommunicationLinkResourceType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEClass(communicationLinkResourceTypeEClass, CommunicationLinkResourceType.class, "CommunicationLinkResourceType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEClass(passiveResourceTypeEClass, PassiveResourceType.class, "PassiveResourceType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEClass(passiveResourceTypeEClass, PassiveResourceType.class, "PassiveResourceType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - // Create resource - createResource(eNS_URI); - } + // Create resource + createResource(eNS_URI); + } } //ResourcetypePackageImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/util/ResourcetypeAdapterFactory.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/util/ResourcetypeAdapterFactory.java index f6a57bace5907d9724ec094441d82d7cace74545..898efacf18b8b07e331c1eb2288af028a36d813e 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/util/ResourcetypeAdapterFactory.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/util/ResourcetypeAdapterFactory.java @@ -27,226 +27,226 @@ import org.eclipse.emf.ecore.EObject; */ public class ResourcetypeAdapterFactory extends AdapterFactoryImpl { /** - * The cached model package. - * <!-- begin-user-doc --> + * The cached model package. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ protected static ResourcetypePackage 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 ResourcetypeAdapterFactory() { - if (modelPackage == null) { - modelPackage = ResourcetypePackage.eINSTANCE; - } - } + if (modelPackage == null) { + modelPackage = ResourcetypePackage.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 ResourcetypeSwitch<Adapter> modelSwitch = new ResourcetypeSwitch<Adapter>() { - @Override - public Adapter caseResourceTypeRepository(ResourceTypeRepository object) { - return createResourceTypeRepositoryAdapter(); - } - @Override - public Adapter caseResourceType(ResourceType object) { - return createResourceTypeAdapter(); - } - @Override - public Adapter caseProcessingResourceType(ProcessingResourceType object) { - return createProcessingResourceTypeAdapter(); - } - @Override - public Adapter caseCommunicationLinkResourceType(CommunicationLinkResourceType object) { - return createCommunicationLinkResourceTypeAdapter(); - } - @Override - public Adapter casePassiveResourceType(PassiveResourceType object) { - return createPassiveResourceTypeAdapter(); - } - @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 defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; + @Override + public Adapter caseResourceTypeRepository(ResourceTypeRepository object) { + return createResourceTypeRepositoryAdapter(); + } + @Override + public Adapter caseResourceType(ResourceType object) { + return createResourceTypeAdapter(); + } + @Override + public Adapter caseProcessingResourceType(ProcessingResourceType object) { + return createProcessingResourceTypeAdapter(); + } + @Override + public Adapter caseCommunicationLinkResourceType(CommunicationLinkResourceType object) { + return createCommunicationLinkResourceTypeAdapter(); + } + @Override + public Adapter casePassiveResourceType(PassiveResourceType object) { + return createPassiveResourceTypeAdapter(); + } + @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 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.resourcetype.ResourceTypeRepository <em>Resource Type Repository</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcetype.ResourceTypeRepository <em>Resource Type Repository</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.resourcetype.ResourceTypeRepository - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourcetype.ResourceTypeRepository + * @generated + */ public Adapter createResourceTypeRepositoryAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcetype.ResourceType <em>Resource Type</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcetype.ResourceType <em>Resource Type</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.resourcetype.ResourceType - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourcetype.ResourceType + * @generated + */ public Adapter createResourceTypeAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcetype.ProcessingResourceType <em>Processing Resource Type</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcetype.ProcessingResourceType <em>Processing Resource Type</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.resourcetype.ProcessingResourceType - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourcetype.ProcessingResourceType + * @generated + */ public Adapter createProcessingResourceTypeAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcetype.CommunicationLinkResourceType <em>Communication Link Resource Type</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcetype.CommunicationLinkResourceType <em>Communication Link Resource Type</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.resourcetype.CommunicationLinkResourceType - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourcetype.CommunicationLinkResourceType + * @generated + */ public Adapter createCommunicationLinkResourceTypeAdapter() { - return null; - } + return null; + } /** - * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcetype.PassiveResourceType <em>Passive Resource Type</em>}'. - * <!-- begin-user-doc --> + * Creates a new adapter for an object of class '{@link edu.kit.ipd.descartes.mm.resourcetype.PassiveResourceType <em>Passive Resource Type</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.resourcetype.PassiveResourceType - * @generated - */ + * @return the new adapter. + * @see edu.kit.ipd.descartes.mm.resourcetype.PassiveResourceType + * @generated + */ public Adapter createPassiveResourceTypeAdapter() { - 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 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; + } } //ResourcetypeAdapterFactory diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/util/ResourcetypeSwitch.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/util/ResourcetypeSwitch.java index 5e716983674be79e60c5cd89bd2cfb933a4403bf..750389cabbfa98fb0225de102f54e0b0be9a40e5 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/util/ResourcetypeSwitch.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/resourcetype/util/ResourcetypeSwitch.java @@ -30,232 +30,232 @@ import org.eclipse.emf.ecore.util.Switch; */ public class ResourcetypeSwitch<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 ResourcetypePackage 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 ResourcetypeSwitch() { - if (modelPackage == null) { - modelPackage = ResourcetypePackage.eINSTANCE; - } - } + if (modelPackage == null) { + modelPackage = ResourcetypePackage.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 ResourcetypePackage.RESOURCE_TYPE_REPOSITORY: { - ResourceTypeRepository resourceTypeRepository = (ResourceTypeRepository)theEObject; - T result = caseResourceTypeRepository(resourceTypeRepository); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourcetypePackage.RESOURCE_TYPE: { - ResourceType resourceType = (ResourceType)theEObject; - T result = caseResourceType(resourceType); - if (result == null) result = caseEntity(resourceType); - if (result == null) result = caseIdentifier(resourceType); - if (result == null) result = caseNamedElement(resourceType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourcetypePackage.PROCESSING_RESOURCE_TYPE: { - ProcessingResourceType processingResourceType = (ProcessingResourceType)theEObject; - T result = caseProcessingResourceType(processingResourceType); - if (result == null) result = caseResourceType(processingResourceType); - if (result == null) result = caseEntity(processingResourceType); - if (result == null) result = caseIdentifier(processingResourceType); - if (result == null) result = caseNamedElement(processingResourceType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourcetypePackage.COMMUNICATION_LINK_RESOURCE_TYPE: { - CommunicationLinkResourceType communicationLinkResourceType = (CommunicationLinkResourceType)theEObject; - T result = caseCommunicationLinkResourceType(communicationLinkResourceType); - if (result == null) result = caseProcessingResourceType(communicationLinkResourceType); - if (result == null) result = caseResourceType(communicationLinkResourceType); - if (result == null) result = caseEntity(communicationLinkResourceType); - if (result == null) result = caseIdentifier(communicationLinkResourceType); - if (result == null) result = caseNamedElement(communicationLinkResourceType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ResourcetypePackage.PASSIVE_RESOURCE_TYPE: { - PassiveResourceType passiveResourceType = (PassiveResourceType)theEObject; - T result = casePassiveResourceType(passiveResourceType); - if (result == null) result = caseResourceType(passiveResourceType); - if (result == null) result = caseEntity(passiveResourceType); - if (result == null) result = caseIdentifier(passiveResourceType); - if (result == null) result = caseNamedElement(passiveResourceType); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } + switch (classifierID) { + case ResourcetypePackage.RESOURCE_TYPE_REPOSITORY: { + ResourceTypeRepository resourceTypeRepository = (ResourceTypeRepository)theEObject; + T result = caseResourceTypeRepository(resourceTypeRepository); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourcetypePackage.RESOURCE_TYPE: { + ResourceType resourceType = (ResourceType)theEObject; + T result = caseResourceType(resourceType); + if (result == null) result = caseEntity(resourceType); + if (result == null) result = caseIdentifier(resourceType); + if (result == null) result = caseNamedElement(resourceType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourcetypePackage.PROCESSING_RESOURCE_TYPE: { + ProcessingResourceType processingResourceType = (ProcessingResourceType)theEObject; + T result = caseProcessingResourceType(processingResourceType); + if (result == null) result = caseResourceType(processingResourceType); + if (result == null) result = caseEntity(processingResourceType); + if (result == null) result = caseIdentifier(processingResourceType); + if (result == null) result = caseNamedElement(processingResourceType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourcetypePackage.COMMUNICATION_LINK_RESOURCE_TYPE: { + CommunicationLinkResourceType communicationLinkResourceType = (CommunicationLinkResourceType)theEObject; + T result = caseCommunicationLinkResourceType(communicationLinkResourceType); + if (result == null) result = caseProcessingResourceType(communicationLinkResourceType); + if (result == null) result = caseResourceType(communicationLinkResourceType); + if (result == null) result = caseEntity(communicationLinkResourceType); + if (result == null) result = caseIdentifier(communicationLinkResourceType); + if (result == null) result = caseNamedElement(communicationLinkResourceType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ResourcetypePackage.PASSIVE_RESOURCE_TYPE: { + PassiveResourceType passiveResourceType = (PassiveResourceType)theEObject; + T result = casePassiveResourceType(passiveResourceType); + if (result == null) result = caseResourceType(passiveResourceType); + if (result == null) result = caseEntity(passiveResourceType); + if (result == null) result = caseIdentifier(passiveResourceType); + if (result == null) result = caseNamedElement(passiveResourceType); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } /** - * Returns the result of interpreting the object as an instance of '<em>Resource Type Repository</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Resource Type Repository</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>Resource Type Repository</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>Resource Type Repository</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseResourceTypeRepository(ResourceTypeRepository object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Resource Type</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Resource Type</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>Resource Type</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>Resource Type</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseResourceType(ResourceType object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Processing Resource Type</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Processing Resource Type</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 Type</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 Type</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseProcessingResourceType(ProcessingResourceType object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Communication Link Resource Type</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Communication Link Resource Type</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>Communication Link Resource Type</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>Communication Link Resource Type</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T caseCommunicationLinkResourceType(CommunicationLinkResourceType object) { - return null; - } + return null; + } /** - * Returns the result of interpreting the object as an instance of '<em>Passive Resource Type</em>'. - * <!-- begin-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Passive Resource Type</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 Type</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 Type</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ public T casePassiveResourceType(PassiveResourceType 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>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; + } } //ResourcetypeSwitch diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/RuntimeEnvironmentClasses.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/RuntimeEnvironmentClasses.java index 05475013af63ab5e57454b2411aef1e2e11ea3eb..eafa43a4ee09593aa6b39ef48112fa8d32d63d56 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/RuntimeEnvironmentClasses.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/RuntimeEnvironmentClasses.java @@ -23,298 +23,298 @@ import org.eclipse.emf.common.util.Enumerator; */ public enum RuntimeEnvironmentClasses implements Enumerator { /** - * The '<em><b>HYPERVISOR</b></em>' literal object. - * <!-- begin-user-doc --> + * The '<em><b>HYPERVISOR</b></em>' literal object. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #HYPERVISOR_VALUE - * @generated - * @ordered - */ + * @see #HYPERVISOR_VALUE + * @generated + * @ordered + */ HYPERVISOR(1, "HYPERVISOR", "HYPERVISOR"), /** - * The '<em><b>OPERATING SYSTEM</b></em>' literal object. - * <!-- begin-user-doc --> + * The '<em><b>OPERATING SYSTEM</b></em>' literal object. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #OPERATING_SYSTEM_VALUE - * @generated - * @ordered - */ + * @see #OPERATING_SYSTEM_VALUE + * @generated + * @ordered + */ OPERATING_SYSTEM(2, "OPERATING_SYSTEM", "OPERATING SYSTEM"), /** - * The '<em><b>OS VM</b></em>' literal object. - * <!-- begin-user-doc --> + * The '<em><b>OS VM</b></em>' literal object. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #OS_VM_VALUE - * @generated - * @ordered - */ + * @see #OS_VM_VALUE + * @generated + * @ordered + */ OS_VM(3, "OS_VM", "OS VM"), /** - * The '<em><b>PROCESS VM</b></em>' literal object. - * <!-- begin-user-doc --> + * The '<em><b>PROCESS VM</b></em>' literal object. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #PROCESS_VM_VALUE - * @generated - * @ordered - */ + * @see #PROCESS_VM_VALUE + * @generated + * @ordered + */ PROCESS_VM(4, "PROCESS_VM", "PROCESS VM"), /** - * The '<em><b>MIDDLEWARE</b></em>' literal object. - * <!-- begin-user-doc --> + * The '<em><b>MIDDLEWARE</b></em>' literal object. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #MIDDLEWARE_VALUE - * @generated - * @ordered - */ + * @see #MIDDLEWARE_VALUE + * @generated + * @ordered + */ MIDDLEWARE(5, "MIDDLEWARE", "MIDDLEWARE"), /** - * The '<em><b>OTHER</b></em>' literal object. - * <!-- begin-user-doc --> + * The '<em><b>OTHER</b></em>' literal object. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #OTHER_VALUE - * @generated - * @ordered - */ + * @see #OTHER_VALUE + * @generated + * @ordered + */ OTHER(6, "OTHER", "OTHER"); /** - * The '<em><b>HYPERVISOR</b></em>' literal value. - * <!-- begin-user-doc --> + * The '<em><b>HYPERVISOR</b></em>' literal value. + * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>HYPERVISOR</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @see #HYPERVISOR - * @model - * @generated - * @ordered - */ + * @see #HYPERVISOR + * @model + * @generated + * @ordered + */ public static final int HYPERVISOR_VALUE = 1; /** - * The '<em><b>OPERATING SYSTEM</b></em>' literal value. - * <!-- begin-user-doc --> + * The '<em><b>OPERATING SYSTEM</b></em>' literal value. + * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>OPERATING SYSTEM</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @see #OPERATING_SYSTEM - * @model literal="OPERATING SYSTEM" - * @generated - * @ordered - */ + * @see #OPERATING_SYSTEM + * @model literal="OPERATING SYSTEM" + * @generated + * @ordered + */ public static final int OPERATING_SYSTEM_VALUE = 2; /** - * The '<em><b>OS VM</b></em>' literal value. - * <!-- begin-user-doc --> + * The '<em><b>OS VM</b></em>' literal value. + * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>OS VM</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @see #OS_VM - * @model literal="OS VM" - * @generated - * @ordered - */ + * @see #OS_VM + * @model literal="OS VM" + * @generated + * @ordered + */ public static final int OS_VM_VALUE = 3; /** - * The '<em><b>PROCESS VM</b></em>' literal value. - * <!-- begin-user-doc --> + * The '<em><b>PROCESS VM</b></em>' literal value. + * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>PROCESS VM</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @see #PROCESS_VM - * @model literal="PROCESS VM" - * @generated - * @ordered - */ + * @see #PROCESS_VM + * @model literal="PROCESS VM" + * @generated + * @ordered + */ public static final int PROCESS_VM_VALUE = 4; /** - * The '<em><b>MIDDLEWARE</b></em>' literal value. - * <!-- begin-user-doc --> + * The '<em><b>MIDDLEWARE</b></em>' literal value. + * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>MIDDLEWARE</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @see #MIDDLEWARE - * @model - * @generated - * @ordered - */ + * @see #MIDDLEWARE + * @model + * @generated + * @ordered + */ public static final int MIDDLEWARE_VALUE = 5; /** - * The '<em><b>OTHER</b></em>' literal value. - * <!-- begin-user-doc --> + * The '<em><b>OTHER</b></em>' literal value. + * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>OTHER</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> - * @see #OTHER - * @model - * @generated - * @ordered - */ + * @see #OTHER + * @model + * @generated + * @ordered + */ public static final int OTHER_VALUE = 6; /** - * An array of all the '<em><b>Runtime Environment Classes</b></em>' enumerators. - * <!-- begin-user-doc --> + * An array of all the '<em><b>Runtime Environment Classes</b></em>' enumerators. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private static final RuntimeEnvironmentClasses[] VALUES_ARRAY = new RuntimeEnvironmentClasses[] { - HYPERVISOR, - OPERATING_SYSTEM, - OS_VM, - PROCESS_VM, - MIDDLEWARE, - OTHER, - }; + HYPERVISOR, + OPERATING_SYSTEM, + OS_VM, + PROCESS_VM, + MIDDLEWARE, + OTHER, + }; /** - * A public read-only list of all the '<em><b>Runtime Environment Classes</b></em>' enumerators. - * <!-- begin-user-doc --> + * A public read-only list of all the '<em><b>Runtime Environment Classes</b></em>' enumerators. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static final List<RuntimeEnvironmentClasses> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** - * Returns the '<em><b>Runtime Environment Classes</b></em>' literal with the specified literal value. - * <!-- begin-user-doc --> + * Returns the '<em><b>Runtime Environment Classes</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static RuntimeEnvironmentClasses get(String literal) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - RuntimeEnvironmentClasses result = VALUES_ARRAY[i]; - if (result.toString().equals(literal)) { - return result; - } - } - return null; - } + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + RuntimeEnvironmentClasses result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } /** - * Returns the '<em><b>Runtime Environment Classes</b></em>' literal with the specified name. - * <!-- begin-user-doc --> + * Returns the '<em><b>Runtime Environment Classes</b></em>' literal with the specified name. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static RuntimeEnvironmentClasses getByName(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - RuntimeEnvironmentClasses result = VALUES_ARRAY[i]; - if (result.getName().equals(name)) { - return result; - } - } - return null; - } + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + RuntimeEnvironmentClasses result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } /** - * Returns the '<em><b>Runtime Environment Classes</b></em>' literal with the specified integer value. - * <!-- begin-user-doc --> + * Returns the '<em><b>Runtime Environment Classes</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static RuntimeEnvironmentClasses get(int value) { - switch (value) { - case HYPERVISOR_VALUE: return HYPERVISOR; - case OPERATING_SYSTEM_VALUE: return OPERATING_SYSTEM; - case OS_VM_VALUE: return OS_VM; - case PROCESS_VM_VALUE: return PROCESS_VM; - case MIDDLEWARE_VALUE: return MIDDLEWARE; - case OTHER_VALUE: return OTHER; - } - return null; - } + switch (value) { + case HYPERVISOR_VALUE: return HYPERVISOR; + case OPERATING_SYSTEM_VALUE: return OPERATING_SYSTEM; + case OS_VM_VALUE: return OS_VM; + case PROCESS_VM_VALUE: return PROCESS_VM; + case MIDDLEWARE_VALUE: return MIDDLEWARE; + case OTHER_VALUE: return OTHER; + } + 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 RuntimeEnvironmentClasses(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; + } } //RuntimeEnvironmentClasses diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/RuntimeenvironmentclassesFactory.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/RuntimeenvironmentclassesFactory.java index a105f2eaa419ac4732a8729ad42605eb6e41fd8d..03d73d416859b01fe94e357f36da996aba6358fb 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/RuntimeenvironmentclassesFactory.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/RuntimeenvironmentclassesFactory.java @@ -15,20 +15,20 @@ import org.eclipse.emf.ecore.EFactory; */ public interface RuntimeenvironmentclassesFactory 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 + */ RuntimeenvironmentclassesFactory eINSTANCE = edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.impl.RuntimeenvironmentclassesFactoryImpl.init(); /** - * 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 + */ RuntimeenvironmentclassesPackage getRuntimeenvironmentclassesPackage(); } //RuntimeenvironmentclassesFactory diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/RuntimeenvironmentclassesPackage.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/RuntimeenvironmentclassesPackage.java index a532245e86ac2b58304df23e34ede8d3f1bf8a37..064f39fc9a7bbeb66673ce17447b0153ae6fd83d 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/RuntimeenvironmentclassesPackage.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/RuntimeenvironmentclassesPackage.java @@ -23,69 +23,69 @@ import org.eclipse.emf.ecore.EPackage; */ public interface RuntimeenvironmentclassesPackage extends EPackage { /** - * The package name. - * <!-- begin-user-doc --> + * The package name. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ String eNAME = "runtimeenvironmentclasses"; /** - * 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/runtimeenvironmentclasses/1.0"; /** - * The package namespace name. - * <!-- begin-user-doc --> + * The package namespace name. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ String eNS_PREFIX = "runtimeenvironmentclasses"; /** - * The singleton instance of the package. - * <!-- begin-user-doc --> + * The singleton instance of the package. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ RuntimeenvironmentclassesPackage eINSTANCE = edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.impl.RuntimeenvironmentclassesPackageImpl.init(); /** - * The meta object id for the '{@link edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClasses <em>Runtime Environment Classes</em>}' enum. - * <!-- begin-user-doc --> + * The meta object id for the '{@link edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClasses <em>Runtime Environment Classes</em>}' enum. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClasses - * @see edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.impl.RuntimeenvironmentclassesPackageImpl#getRuntimeEnvironmentClasses() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClasses + * @see edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.impl.RuntimeenvironmentclassesPackageImpl#getRuntimeEnvironmentClasses() + * @generated + */ int RUNTIME_ENVIRONMENT_CLASSES = 0; /** - * Returns the meta object for enum '{@link edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClasses <em>Runtime Environment Classes</em>}'. - * <!-- begin-user-doc --> + * Returns the meta object for enum '{@link edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClasses <em>Runtime Environment Classes</em>}'. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for enum '<em>Runtime Environment Classes</em>'. - * @see edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClasses - * @generated - */ + * @return the meta object for enum '<em>Runtime Environment Classes</em>'. + * @see edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClasses + * @generated + */ EEnum getRuntimeEnvironmentClasses(); /** - * 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 + */ RuntimeenvironmentclassesFactory getRuntimeenvironmentclassesFactory(); /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * Defines literals for the meta objects that represent * <ul> * <li>each class,</li> @@ -94,17 +94,17 @@ public interface RuntimeenvironmentclassesPackage 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.runtimeenvironmentclasses.RuntimeEnvironmentClasses <em>Runtime Environment Classes</em>}' enum. - * <!-- begin-user-doc --> + * The meta object literal for the '{@link edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClasses <em>Runtime Environment Classes</em>}' enum. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClasses - * @see edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.impl.RuntimeenvironmentclassesPackageImpl#getRuntimeEnvironmentClasses() - * @generated - */ + * @see edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeEnvironmentClasses + * @see edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.impl.RuntimeenvironmentclassesPackageImpl#getRuntimeEnvironmentClasses() + * @generated + */ EEnum RUNTIME_ENVIRONMENT_CLASSES = eINSTANCE.getRuntimeEnvironmentClasses(); } diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/impl/RuntimeenvironmentclassesFactoryImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/impl/RuntimeenvironmentclassesFactoryImpl.java index f7b536b156de71408bec6dde26e44629778f03a9..7ea3b1d9f89d4447763199dc87a1ed2ada5827ec 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/impl/RuntimeenvironmentclassesFactoryImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/impl/RuntimeenvironmentclassesFactoryImpl.java @@ -22,115 +22,115 @@ import org.eclipse.emf.ecore.plugin.EcorePlugin; */ public class RuntimeenvironmentclassesFactoryImpl extends EFactoryImpl implements RuntimeenvironmentclassesFactory { /** - * Creates the default factory implementation. - * <!-- begin-user-doc --> + * Creates the default factory implementation. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public static RuntimeenvironmentclassesFactory init() { - try { - RuntimeenvironmentclassesFactory theRuntimeenvironmentclassesFactory = (RuntimeenvironmentclassesFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.descartes-research.net/metamodel/runtimeenvironmentclasses/1.0"); - if (theRuntimeenvironmentclassesFactory != null) { - return theRuntimeenvironmentclassesFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new RuntimeenvironmentclassesFactoryImpl(); - } + try { + RuntimeenvironmentclassesFactory theRuntimeenvironmentclassesFactory = (RuntimeenvironmentclassesFactory)EPackage.Registry.INSTANCE.getEFactory(RuntimeenvironmentclassesPackage.eNS_URI); + if (theRuntimeenvironmentclassesFactory != null) { + return theRuntimeenvironmentclassesFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new RuntimeenvironmentclassesFactoryImpl(); + } /** - * Creates an instance of the factory. - * <!-- begin-user-doc --> + * Creates an instance of the factory. + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public RuntimeenvironmentclassesFactoryImpl() { - super(); - } + super(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } + switch (eClass.getClassifierID()) { + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ @Override public Object createFromString(EDataType eDataType, String initialValue) { - switch (eDataType.getClassifierID()) { - case RuntimeenvironmentclassesPackage.RUNTIME_ENVIRONMENT_CLASSES: - return createRuntimeEnvironmentClassesFromString(eDataType, initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } + switch (eDataType.getClassifierID()) { + case RuntimeenvironmentclassesPackage.RUNTIME_ENVIRONMENT_CLASSES: + return createRuntimeEnvironmentClassesFromString(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 RuntimeenvironmentclassesPackage.RUNTIME_ENVIRONMENT_CLASSES: - return convertRuntimeEnvironmentClassesToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } + switch (eDataType.getClassifierID()) { + case RuntimeenvironmentclassesPackage.RUNTIME_ENVIRONMENT_CLASSES: + return convertRuntimeEnvironmentClassesToString(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 RuntimeEnvironmentClasses createRuntimeEnvironmentClassesFromString(EDataType eDataType, String initialValue) { - RuntimeEnvironmentClasses result = RuntimeEnvironmentClasses.get(initialValue); - if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); - return result; - } + RuntimeEnvironmentClasses result = RuntimeEnvironmentClasses.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 convertRuntimeEnvironmentClassesToString(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 RuntimeenvironmentclassesPackage getRuntimeenvironmentclassesPackage() { - return (RuntimeenvironmentclassesPackage)getEPackage(); - } + return (RuntimeenvironmentclassesPackage)getEPackage(); + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @deprecated - * @generated - */ + * @deprecated + * @generated + */ @Deprecated public static RuntimeenvironmentclassesPackage getPackage() { - return RuntimeenvironmentclassesPackage.eINSTANCE; - } + return RuntimeenvironmentclassesPackage.eINSTANCE; + } } //RuntimeenvironmentclassesFactoryImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/impl/RuntimeenvironmentclassesPackageImpl.java b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/impl/RuntimeenvironmentclassesPackageImpl.java index 449c223d4bb6f6dd06a8c8e6510b3744ee2c2329..362042a88553c0717a08874a16a0f77c09bb0b16 100644 --- a/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/impl/RuntimeenvironmentclassesPackageImpl.java +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/src/edu/kit/ipd/descartes/mm/runtimeenvironmentclasses/impl/RuntimeenvironmentclassesPackageImpl.java @@ -37,164 +37,164 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; */ public class RuntimeenvironmentclassesPackageImpl extends EPackageImpl implements RuntimeenvironmentclassesPackage { /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ private EEnum runtimeEnvironmentClassesEEnum = 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 --> + * 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.runtimeenvironmentclasses.RuntimeenvironmentclassesPackage#eNS_URI - * @see #init() - * @generated - */ + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see edu.kit.ipd.descartes.mm.runtimeenvironmentclasses.RuntimeenvironmentclassesPackage#eNS_URI + * @see #init() + * @generated + */ private RuntimeenvironmentclassesPackageImpl() { - super(eNS_URI, RuntimeenvironmentclassesFactory.eINSTANCE); - } + super(eNS_URI, RuntimeenvironmentclassesFactory.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 RuntimeenvironmentclassesPackage#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 RuntimeenvironmentclassesPackage#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 RuntimeenvironmentclassesPackage init() { - if (isInited) return (RuntimeenvironmentclassesPackage)EPackage.Registry.INSTANCE.getEPackage(RuntimeenvironmentclassesPackage.eNS_URI); + if (isInited) return (RuntimeenvironmentclassesPackage)EPackage.Registry.INSTANCE.getEPackage(RuntimeenvironmentclassesPackage.eNS_URI); - // Obtain or create and register package - RuntimeenvironmentclassesPackageImpl theRuntimeenvironmentclassesPackage = (RuntimeenvironmentclassesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof RuntimeenvironmentclassesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new RuntimeenvironmentclassesPackageImpl()); + // Obtain or create and register package + RuntimeenvironmentclassesPackageImpl theRuntimeenvironmentclassesPackage = (RuntimeenvironmentclassesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof RuntimeenvironmentclassesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new RuntimeenvironmentclassesPackageImpl()); - 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); - ResourceconfigurationPackageImpl theResourceconfigurationPackage = (ResourceconfigurationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI) instanceof ResourceconfigurationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI) : ResourceconfigurationPackage.eINSTANCE); - ContainerrepositoryPackageImpl theContainerrepositoryPackage = (ContainerrepositoryPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ContainerrepositoryPackage.eNS_URI) instanceof ContainerrepositoryPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ContainerrepositoryPackage.eNS_URI) : ContainerrepositoryPackage.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); + ResourceconfigurationPackageImpl theResourceconfigurationPackage = (ResourceconfigurationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI) instanceof ResourceconfigurationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ResourceconfigurationPackage.eNS_URI) : ResourceconfigurationPackage.eINSTANCE); + ContainerrepositoryPackageImpl theContainerrepositoryPackage = (ContainerrepositoryPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ContainerrepositoryPackage.eNS_URI) instanceof ContainerrepositoryPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ContainerrepositoryPackage.eNS_URI) : ContainerrepositoryPackage.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 - theRuntimeenvironmentclassesPackage.createPackageContents(); - theResourcelandscapePackage.createPackageContents(); - theResourceconfigurationPackage.createPackageContents(); - theContainerrepositoryPackage.createPackageContents(); - theResourcetypePackage.createPackageContents(); + // Create package meta-data objects + theRuntimeenvironmentclassesPackage.createPackageContents(); + theResourcelandscapePackage.createPackageContents(); + theResourceconfigurationPackage.createPackageContents(); + theContainerrepositoryPackage.createPackageContents(); + theResourcetypePackage.createPackageContents(); - // Initialize created meta-data - theRuntimeenvironmentclassesPackage.initializePackageContents(); - theResourcelandscapePackage.initializePackageContents(); - theResourceconfigurationPackage.initializePackageContents(); - theContainerrepositoryPackage.initializePackageContents(); - theResourcetypePackage.initializePackageContents(); + // Initialize created meta-data + theRuntimeenvironmentclassesPackage.initializePackageContents(); + theResourcelandscapePackage.initializePackageContents(); + theResourceconfigurationPackage.initializePackageContents(); + theContainerrepositoryPackage.initializePackageContents(); + theResourcetypePackage.initializePackageContents(); - // Mark meta-data to indicate it can't be changed - theRuntimeenvironmentclassesPackage.freeze(); + // Mark meta-data to indicate it can't be changed + theRuntimeenvironmentclassesPackage.freeze(); - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(RuntimeenvironmentclassesPackage.eNS_URI, theRuntimeenvironmentclassesPackage); - return theRuntimeenvironmentclassesPackage; - } + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(RuntimeenvironmentclassesPackage.eNS_URI, theRuntimeenvironmentclassesPackage); + return theRuntimeenvironmentclassesPackage; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public EEnum getRuntimeEnvironmentClasses() { - return runtimeEnvironmentClassesEEnum; - } + return runtimeEnvironmentClassesEEnum; + } /** - * <!-- begin-user-doc --> + * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @generated - */ + * @generated + */ public RuntimeenvironmentclassesFactory getRuntimeenvironmentclassesFactory() { - return (RuntimeenvironmentclassesFactory)getEFactoryInstance(); - } + return (RuntimeenvironmentclassesFactory)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 enums - runtimeEnvironmentClassesEEnum = createEEnum(RUNTIME_ENVIRONMENT_CLASSES); - } + // Create enums + runtimeEnvironmentClassesEEnum = createEEnum(RUNTIME_ENVIRONMENT_CLASSES); + } /** - * <!-- 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); - - // Initialize enums and add enum literals - initEEnum(runtimeEnvironmentClassesEEnum, RuntimeEnvironmentClasses.class, "RuntimeEnvironmentClasses"); - addEEnumLiteral(runtimeEnvironmentClassesEEnum, RuntimeEnvironmentClasses.HYPERVISOR); - addEEnumLiteral(runtimeEnvironmentClassesEEnum, RuntimeEnvironmentClasses.OPERATING_SYSTEM); - addEEnumLiteral(runtimeEnvironmentClassesEEnum, RuntimeEnvironmentClasses.OS_VM); - addEEnumLiteral(runtimeEnvironmentClassesEEnum, RuntimeEnvironmentClasses.PROCESS_VM); - addEEnumLiteral(runtimeEnvironmentClassesEEnum, RuntimeEnvironmentClasses.MIDDLEWARE); - addEEnumLiteral(runtimeEnvironmentClassesEEnum, RuntimeEnvironmentClasses.OTHER); - - // Create resource - createResource(eNS_URI); - } + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Initialize enums and add enum literals + initEEnum(runtimeEnvironmentClassesEEnum, RuntimeEnvironmentClasses.class, "RuntimeEnvironmentClasses"); + addEEnumLiteral(runtimeEnvironmentClassesEEnum, RuntimeEnvironmentClasses.HYPERVISOR); + addEEnumLiteral(runtimeEnvironmentClassesEEnum, RuntimeEnvironmentClasses.OPERATING_SYSTEM); + addEEnumLiteral(runtimeEnvironmentClassesEEnum, RuntimeEnvironmentClasses.OS_VM); + addEEnumLiteral(runtimeEnvironmentClassesEEnum, RuntimeEnvironmentClasses.PROCESS_VM); + addEEnumLiteral(runtimeEnvironmentClassesEEnum, RuntimeEnvironmentClasses.MIDDLEWARE); + addEEnumLiteral(runtimeEnvironmentClassesEEnum, RuntimeEnvironmentClasses.OTHER); + + // Create resource + createResource(eNS_URI); + } } //RuntimeenvironmentclassesPackageImpl diff --git a/edu.kit.ipd.descartes.mm.resourcelandscape/target/.gitignore b/edu.kit.ipd.descartes.mm.resourcelandscape/target/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..840e7d3120ee3206168d49bf62df2c269c38e17e --- /dev/null +++ b/edu.kit.ipd.descartes.mm.resourcelandscape/target/.gitignore @@ -0,0 +1 @@ +/classes/