From da7ba9a41cf7d4aeed1f4ba69697ec325c6a6e56 Mon Sep 17 00:00:00 2001 From: Elena Parovyshnaia Date: Mon, 5 Apr 2021 13:41:46 +0300 Subject: [PATCH] Bug 568195 unify issued licenses storage Supply read only interfaces for shipments registry entries Signed-off-by: eparovyshnaya --- .../META-INF/MANIFEST.MF | 1 + .../model/shipments.ecore | 8 +- .../plugin.properties | 2 + ...FloatingLicenseDescriptorItemProvider.java | 122 ++++++++++++++++++ .../FloatingLicenseItemProvider.java | 26 +--- ...PersonalLicenseDescriptorItemProvider.java | 122 ++++++++++++++++++ .../PersonalLicenseItemProvider.java | 26 +--- .../.settings/.api_filters | 51 ++++++++ .../model/shipments.genmodel | 4 +- .../lic/shipments/model/api/Floating.java | 3 +- .../shipments/model/api/FloatingLicense.java | 10 +- .../lic/shipments/model/api/Personal.java | 3 +- .../shipments/model/api/PersonalLicense.java | 10 +- .../shipments/model/impl/FloatingImpl.java | 8 +- .../impl/FloatingLicenseDescriptorImpl.java | 51 ++++++++ .../model/impl/FloatingLicenseImpl.java | 9 +- .../shipments/model/impl/PersonalImpl.java | 8 +- .../impl/PersonalLicenseDescriptorImpl.java | 51 ++++++++ .../model/impl/PersonalLicenseImpl.java | 9 +- .../model/impl/ShipmentsFactoryImpl.java | 11 +- .../model/impl/ShipmentsPackageImpl.java | 54 +++++++- .../model/meta/ShipmentsFactory.java | 3 +- .../model/meta/ShipmentsPackage.java | 100 ++++++++++++-- .../model/util/ShipmentsAdapterFactory.java | 52 +++++++- .../shipments/model/util/ShipmentsSwitch.java | 61 ++++++++- .../META-INF/MANIFEST.MF | 1 + .../shipments/FloatingLicenseDescriptor.java | 25 ++++ .../shipments/PersonalLicenseDescriptor.java | 25 ++++ 28 files changed, 759 insertions(+), 97 deletions(-) create mode 100644 bundles/org.eclipse.passage.lic.shipments.edit/src-gen/org/eclipse/passage/lic/shipments/edit/providers/FloatingLicenseDescriptorItemProvider.java create mode 100644 bundles/org.eclipse.passage.lic.shipments.edit/src-gen/org/eclipse/passage/lic/shipments/edit/providers/PersonalLicenseDescriptorItemProvider.java create mode 100644 bundles/org.eclipse.passage.lic.shipments.model/.settings/.api_filters create mode 100644 bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/FloatingLicenseDescriptorImpl.java create mode 100644 bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/PersonalLicenseDescriptorImpl.java create mode 100644 bundles/org.eclipse.passage.lic.shipments/src/org/eclipse/passage/lic/shipments/FloatingLicenseDescriptor.java create mode 100644 bundles/org.eclipse.passage.lic.shipments/src/org/eclipse/passage/lic/shipments/PersonalLicenseDescriptor.java diff --git a/bundles/org.eclipse.passage.lic.shipments.ecore/META-INF/MANIFEST.MF b/bundles/org.eclipse.passage.lic.shipments.ecore/META-INF/MANIFEST.MF index 758d5930a..12be18412 100644 --- a/bundles/org.eclipse.passage.lic.shipments.ecore/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.passage.lic.shipments.ecore/META-INF/MANIFEST.MF @@ -7,3 +7,4 @@ Bundle-Name: %Bundle-Name Bundle-Vendor: %Bundle-Vendor Bundle-Copyright: %Bundle-Copyright Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.eclipse.passage.lic.shipments;bundle-version="0.1.0" diff --git a/bundles/org.eclipse.passage.lic.shipments.ecore/model/shipments.ecore b/bundles/org.eclipse.passage.lic.shipments.ecore/model/shipments.ecore index da4a45c75..f4653413d 100644 --- a/bundles/org.eclipse.passage.lic.shipments.ecore/model/shipments.ecore +++ b/bundles/org.eclipse.passage.lic.shipments.ecore/model/shipments.ecore @@ -10,12 +10,16 @@ - + + - + + + * + * @generated + */ +public class FloatingLicenseDescriptorItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public FloatingLicenseDescriptorItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_FloatingLicenseDescriptor_type"); //$NON-NLS-1$ + } + + /** + * 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}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ShipmentsEditPlugin.INSTANCE; + } + +} diff --git a/bundles/org.eclipse.passage.lic.shipments.edit/src-gen/org/eclipse/passage/lic/shipments/edit/providers/FloatingLicenseItemProvider.java b/bundles/org.eclipse.passage.lic.shipments.edit/src-gen/org/eclipse/passage/lic/shipments/edit/providers/FloatingLicenseItemProvider.java index 34f7cb476..6c2fcaf97 100644 --- a/bundles/org.eclipse.passage.lic.shipments.edit/src-gen/org/eclipse/passage/lic/shipments/edit/providers/FloatingLicenseItemProvider.java +++ b/bundles/org.eclipse.passage.lic.shipments.edit/src-gen/org/eclipse/passage/lic/shipments/edit/providers/FloatingLicenseItemProvider.java @@ -17,21 +17,9 @@ import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.common.util.ResourceLocator; - import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; - -import org.eclipse.passage.lic.shipments.edit.ShipmentsEditPlugin; - import org.eclipse.passage.lic.shipments.model.api.FloatingLicense; import org.eclipse.passage.lic.shipments.model.meta.ShipmentsPackage; @@ -42,8 +30,7 @@ * * @generated */ -public class FloatingLicenseItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, - IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { +public class FloatingLicenseItemProvider extends FloatingLicenseDescriptorItemProvider { /** * This constructs an instance from a factory and a notifier. * @@ -150,15 +137,4 @@ protected void collectNewChildDescriptors(Collection newChildDescriptors super.collectNewChildDescriptors(newChildDescriptors, object); } - /** - * Return the resource locator for this item provider's resources. - * - * - * @generated - */ - @Override - public ResourceLocator getResourceLocator() { - return ShipmentsEditPlugin.INSTANCE; - } - } diff --git a/bundles/org.eclipse.passage.lic.shipments.edit/src-gen/org/eclipse/passage/lic/shipments/edit/providers/PersonalLicenseDescriptorItemProvider.java b/bundles/org.eclipse.passage.lic.shipments.edit/src-gen/org/eclipse/passage/lic/shipments/edit/providers/PersonalLicenseDescriptorItemProvider.java new file mode 100644 index 000000000..259404226 --- /dev/null +++ b/bundles/org.eclipse.passage.lic.shipments.edit/src-gen/org/eclipse/passage/lic/shipments/edit/providers/PersonalLicenseDescriptorItemProvider.java @@ -0,0 +1,122 @@ +/******************************************************************************* + * Copyright (c) 2018, 2021 ArSysOp + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * https://www.eclipse.org/legal/epl-2.0/. + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * ArSysOp - initial API and implementation + *******************************************************************************/ +package org.eclipse.passage.lic.shipments.edit.providers; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; + +import org.eclipse.passage.lic.shipments.edit.ShipmentsEditPlugin; + +/** + * This is the item provider adapter for a {@link org.eclipse.passage.lic.shipments.PersonalLicenseDescriptor} object. + * + * + * @generated + */ +public class PersonalLicenseDescriptorItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public PersonalLicenseDescriptorItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_PersonalLicenseDescriptor_type"); //$NON-NLS-1$ + } + + /** + * 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}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ShipmentsEditPlugin.INSTANCE; + } + +} diff --git a/bundles/org.eclipse.passage.lic.shipments.edit/src-gen/org/eclipse/passage/lic/shipments/edit/providers/PersonalLicenseItemProvider.java b/bundles/org.eclipse.passage.lic.shipments.edit/src-gen/org/eclipse/passage/lic/shipments/edit/providers/PersonalLicenseItemProvider.java index 07e74d095..bcd150bf8 100644 --- a/bundles/org.eclipse.passage.lic.shipments.edit/src-gen/org/eclipse/passage/lic/shipments/edit/providers/PersonalLicenseItemProvider.java +++ b/bundles/org.eclipse.passage.lic.shipments.edit/src-gen/org/eclipse/passage/lic/shipments/edit/providers/PersonalLicenseItemProvider.java @@ -17,21 +17,9 @@ import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.common.util.ResourceLocator; - import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; - -import org.eclipse.passage.lic.shipments.edit.ShipmentsEditPlugin; - import org.eclipse.passage.lic.shipments.model.api.PersonalLicense; import org.eclipse.passage.lic.shipments.model.meta.ShipmentsPackage; @@ -42,8 +30,7 @@ * * @generated */ -public class PersonalLicenseItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, - IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { +public class PersonalLicenseItemProvider extends PersonalLicenseDescriptorItemProvider { /** * This constructs an instance from a factory and a notifier. * @@ -150,15 +137,4 @@ protected void collectNewChildDescriptors(Collection newChildDescriptors super.collectNewChildDescriptors(newChildDescriptors, object); } - /** - * Return the resource locator for this item provider's resources. - * - * - * @generated - */ - @Override - public ResourceLocator getResourceLocator() { - return ShipmentsEditPlugin.INSTANCE; - } - } diff --git a/bundles/org.eclipse.passage.lic.shipments.model/.settings/.api_filters b/bundles/org.eclipse.passage.lic.shipments.model/.settings/.api_filters new file mode 100644 index 000000000..fb14f71fb --- /dev/null +++ b/bundles/org.eclipse.passage.lic.shipments.model/.settings/.api_filters @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bundles/org.eclipse.passage.lic.shipments.model/model/shipments.genmodel b/bundles/org.eclipse.passage.lic.shipments.model/model/shipments.genmodel index cb735a7db..0be0f03af 100644 --- a/bundles/org.eclipse.passage.lic.shipments.model/model/shipments.genmodel +++ b/bundles/org.eclipse.passage.lic.shipments.model/model/shipments.genmodel @@ -20,13 +20,15 @@ - + + + diff --git a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/api/Floating.java b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/api/Floating.java index 6e1f48534..64c3e3875 100644 --- a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/api/Floating.java +++ b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/api/Floating.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2018, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -13,6 +13,7 @@ package org.eclipse.passage.lic.shipments.model.api; import org.eclipse.emf.common.util.EList; + import org.eclipse.emf.ecore.EObject; /** diff --git a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/api/FloatingLicense.java b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/api/FloatingLicense.java index 2468137d2..b4080cae4 100644 --- a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/api/FloatingLicense.java +++ b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/api/FloatingLicense.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2018, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -14,6 +14,8 @@ import org.eclipse.emf.ecore.EObject; +import org.eclipse.passage.lic.shipments.FloatingLicenseDescriptor; + /** * * A representation of the model object 'Floating License'. @@ -28,10 +30,10 @@ * * * @see org.eclipse.passage.lic.shipments.model.meta.ShipmentsPackage#getFloatingLicense() - * @model + * @model superTypes="org.eclipse.passage.lic.shipments.model.api.FloatingLicenseDescriptor" * @generated */ -public interface FloatingLicense extends EObject { +public interface FloatingLicense extends EObject, FloatingLicenseDescriptor { /** * Returns the value of the 'Company' attribute. * @@ -42,6 +44,7 @@ public interface FloatingLicense extends EObject { * @model required="true" * @generated */ + @Override String getCompany(); /** @@ -64,6 +67,7 @@ public interface FloatingLicense extends EObject { * @model required="true" * @generated */ + @Override String getLicense(); /** diff --git a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/api/Personal.java b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/api/Personal.java index aad51abd5..ab4375d56 100644 --- a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/api/Personal.java +++ b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/api/Personal.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2018, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -13,6 +13,7 @@ package org.eclipse.passage.lic.shipments.model.api; import org.eclipse.emf.common.util.EList; + import org.eclipse.emf.ecore.EObject; /** diff --git a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/api/PersonalLicense.java b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/api/PersonalLicense.java index 35a03555b..2a57b85de 100644 --- a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/api/PersonalLicense.java +++ b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/api/PersonalLicense.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2018, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -14,6 +14,8 @@ import org.eclipse.emf.ecore.EObject; +import org.eclipse.passage.lic.shipments.PersonalLicenseDescriptor; + /** * * A representation of the model object 'Personal License'. @@ -28,10 +30,10 @@ * * * @see org.eclipse.passage.lic.shipments.model.meta.ShipmentsPackage#getPersonalLicense() - * @model + * @model superTypes="org.eclipse.passage.lic.shipments.model.api.PersonalLicenseDescriptor" * @generated */ -public interface PersonalLicense extends EObject { +public interface PersonalLicense extends EObject, PersonalLicenseDescriptor { /** * Returns the value of the 'User' attribute. * @@ -42,6 +44,7 @@ public interface PersonalLicense extends EObject { * @model required="true" * @generated */ + @Override String getUser(); /** @@ -64,6 +67,7 @@ public interface PersonalLicense extends EObject { * @model required="true" * @generated */ + @Override String getLicense(); /** diff --git a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/FloatingImpl.java b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/FloatingImpl.java index 9f06653c4..60561d00e 100644 --- a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/FloatingImpl.java +++ b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/FloatingImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2018, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -15,14 +15,20 @@ import java.util.Collection; import org.eclipse.emf.common.notify.NotificationChain; + import org.eclipse.emf.common.util.EList; + import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; + import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; + import org.eclipse.passage.lic.shipments.model.api.Floating; import org.eclipse.passage.lic.shipments.model.api.FloatingLicense; + import org.eclipse.passage.lic.shipments.model.meta.ShipmentsPackage; /** diff --git a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/FloatingLicenseDescriptorImpl.java b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/FloatingLicenseDescriptorImpl.java new file mode 100644 index 000000000..443c3102b --- /dev/null +++ b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/FloatingLicenseDescriptorImpl.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2018, 2021 ArSysOp + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * https://www.eclipse.org/legal/epl-2.0/. + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * ArSysOp - initial API and implementation + *******************************************************************************/ +package org.eclipse.passage.lic.shipments.model.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.passage.lic.shipments.FloatingLicenseDescriptor; + +import org.eclipse.passage.lic.shipments.model.meta.ShipmentsPackage; + +/** + * + * An implementation of the model object 'Floating License Descriptor'. + * + * + * @generated + */ +public abstract class FloatingLicenseDescriptorImpl extends MinimalEObjectImpl.Container + implements FloatingLicenseDescriptor { + /** + * + * + * @generated + */ + protected FloatingLicenseDescriptorImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ShipmentsPackage.eINSTANCE.getFloatingLicenseDescriptor(); + } + +} //FloatingLicenseDescriptorImpl diff --git a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/FloatingLicenseImpl.java b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/FloatingLicenseImpl.java index ad77d2b58..6d3ea9aca 100644 --- a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/FloatingLicenseImpl.java +++ b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/FloatingLicenseImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2018, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -15,10 +15,13 @@ import java.util.Objects; import org.eclipse.emf.common.notify.Notification; + import org.eclipse.emf.ecore.EClass; + import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + import org.eclipse.passage.lic.shipments.model.api.FloatingLicense; + import org.eclipse.passage.lic.shipments.model.meta.ShipmentsPackage; /** @@ -35,7 +38,7 @@ * * @generated */ -public class FloatingLicenseImpl extends MinimalEObjectImpl.Container implements FloatingLicense { +public class FloatingLicenseImpl extends FloatingLicenseDescriptorImpl implements FloatingLicense { /** * The default value of the '{@link #getCompany() Company}' attribute. * diff --git a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/PersonalImpl.java b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/PersonalImpl.java index 13b531e87..15578fcfd 100644 --- a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/PersonalImpl.java +++ b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/PersonalImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2018, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -15,14 +15,20 @@ import java.util.Collection; import org.eclipse.emf.common.notify.NotificationChain; + import org.eclipse.emf.common.util.EList; + import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; + import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; + import org.eclipse.passage.lic.shipments.model.api.Personal; import org.eclipse.passage.lic.shipments.model.api.PersonalLicense; + import org.eclipse.passage.lic.shipments.model.meta.ShipmentsPackage; /** diff --git a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/PersonalLicenseDescriptorImpl.java b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/PersonalLicenseDescriptorImpl.java new file mode 100644 index 000000000..591a4c70e --- /dev/null +++ b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/PersonalLicenseDescriptorImpl.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2018, 2021 ArSysOp + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * https://www.eclipse.org/legal/epl-2.0/. + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * ArSysOp - initial API and implementation + *******************************************************************************/ +package org.eclipse.passage.lic.shipments.model.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.passage.lic.shipments.PersonalLicenseDescriptor; + +import org.eclipse.passage.lic.shipments.model.meta.ShipmentsPackage; + +/** + * + * An implementation of the model object 'Personal License Descriptor'. + * + * + * @generated + */ +public abstract class PersonalLicenseDescriptorImpl extends MinimalEObjectImpl.Container + implements PersonalLicenseDescriptor { + /** + * + * + * @generated + */ + protected PersonalLicenseDescriptorImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ShipmentsPackage.eINSTANCE.getPersonalLicenseDescriptor(); + } + +} //PersonalLicenseDescriptorImpl diff --git a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/PersonalLicenseImpl.java b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/PersonalLicenseImpl.java index edcf11015..8fb957e3d 100644 --- a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/PersonalLicenseImpl.java +++ b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/PersonalLicenseImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2018, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -15,10 +15,13 @@ import java.util.Objects; import org.eclipse.emf.common.notify.Notification; + import org.eclipse.emf.ecore.EClass; + import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + import org.eclipse.passage.lic.shipments.model.api.PersonalLicense; + import org.eclipse.passage.lic.shipments.model.meta.ShipmentsPackage; /** @@ -35,7 +38,7 @@ * * @generated */ -public class PersonalLicenseImpl extends MinimalEObjectImpl.Container implements PersonalLicense { +public class PersonalLicenseImpl extends PersonalLicenseDescriptorImpl implements PersonalLicense { /** * The default value of the '{@link #getUser() User}' attribute. * diff --git a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/ShipmentsFactoryImpl.java b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/ShipmentsFactoryImpl.java index 0a25a8a0b..053691e64 100644 --- a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/ShipmentsFactoryImpl.java +++ b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/ShipmentsFactoryImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2018, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -15,12 +15,13 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; + import org.eclipse.emf.ecore.impl.EFactoryImpl; + import org.eclipse.emf.ecore.plugin.EcorePlugin; -import org.eclipse.passage.lic.shipments.model.api.Floating; -import org.eclipse.passage.lic.shipments.model.api.FloatingLicense; -import org.eclipse.passage.lic.shipments.model.api.Personal; -import org.eclipse.passage.lic.shipments.model.api.PersonalLicense; + +import org.eclipse.passage.lic.shipments.model.api.*; + import org.eclipse.passage.lic.shipments.model.meta.ShipmentsFactory; import org.eclipse.passage.lic.shipments.model.meta.ShipmentsPackage; diff --git a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/ShipmentsPackageImpl.java b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/ShipmentsPackageImpl.java index 7496191fb..44c6c5d58 100644 --- a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/ShipmentsPackageImpl.java +++ b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/impl/ShipmentsPackageImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2018, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -16,11 +16,17 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; + import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.eclipse.passage.lic.shipments.FloatingLicenseDescriptor; +import org.eclipse.passage.lic.shipments.PersonalLicenseDescriptor; + import org.eclipse.passage.lic.shipments.model.api.Floating; import org.eclipse.passage.lic.shipments.model.api.FloatingLicense; import org.eclipse.passage.lic.shipments.model.api.Personal; import org.eclipse.passage.lic.shipments.model.api.PersonalLicense; + import org.eclipse.passage.lic.shipments.model.meta.ShipmentsFactory; import org.eclipse.passage.lic.shipments.model.meta.ShipmentsPackage; @@ -45,6 +51,13 @@ public class ShipmentsPackageImpl extends EPackageImpl implements ShipmentsPacka */ private EClass floatingEClass = null; + /** + * + * + * @generated + */ + private EClass personalLicenseDescriptorEClass = null; + /** * * @@ -52,6 +65,13 @@ public class ShipmentsPackageImpl extends EPackageImpl implements ShipmentsPacka */ private EClass personalLicenseEClass = null; + /** + * + * + * @generated + */ + private EClass floatingLicenseDescriptorEClass = null; + /** * * @@ -163,6 +183,16 @@ public EReference getFloating_Licenses() { return (EReference) floatingEClass.getEStructuralFeatures().get(0); } + /** + * + * + * @generated + */ + @Override + public EClass getPersonalLicenseDescriptor() { + return personalLicenseDescriptorEClass; + } + /** * * @@ -193,6 +223,16 @@ public EAttribute getPersonalLicense_License() { return (EAttribute) personalLicenseEClass.getEStructuralFeatures().get(1); } + /** + * + * + * @generated + */ + @Override + public EClass getFloatingLicenseDescriptor() { + return floatingLicenseDescriptorEClass; + } + /** * * @@ -259,10 +299,14 @@ public void createPackageContents() { floatingEClass = createEClass(FLOATING); createEReference(floatingEClass, FLOATING__LICENSES); + personalLicenseDescriptorEClass = createEClass(PERSONAL_LICENSE_DESCRIPTOR); + personalLicenseEClass = createEClass(PERSONAL_LICENSE); createEAttribute(personalLicenseEClass, PERSONAL_LICENSE__USER); createEAttribute(personalLicenseEClass, PERSONAL_LICENSE__LICENSE); + floatingLicenseDescriptorEClass = createEClass(FLOATING_LICENSE_DESCRIPTOR); + floatingLicenseEClass = createEClass(FLOATING_LICENSE); createEAttribute(floatingLicenseEClass, FLOATING_LICENSE__COMPANY); createEAttribute(floatingLicenseEClass, FLOATING_LICENSE__LICENSE); @@ -297,6 +341,8 @@ public void initializePackageContents() { // Set bounds for type parameters // Add supertypes to classes + personalLicenseEClass.getESuperTypes().add(this.getPersonalLicenseDescriptor()); + floatingLicenseEClass.getESuperTypes().add(this.getFloatingLicenseDescriptor()); // Initialize classes, features, and operations; add parameters initEClass(personalEClass, Personal.class, "Personal", !IS_ABSTRACT, !IS_INTERFACE, //$NON-NLS-1$ @@ -311,6 +357,9 @@ public void initializePackageContents() { !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(personalLicenseDescriptorEClass, PersonalLicenseDescriptor.class, "PersonalLicenseDescriptor", //$NON-NLS-1$ + IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); + initEClass(personalLicenseEClass, PersonalLicense.class, "PersonalLicense", !IS_ABSTRACT, !IS_INTERFACE, //$NON-NLS-1$ IS_GENERATED_INSTANCE_CLASS); initEAttribute(getPersonalLicense_User(), ecorePackage.getEString(), "user", null, 1, 1, PersonalLicense.class, //$NON-NLS-1$ @@ -319,6 +368,9 @@ public void initializePackageContents() { PersonalLicense.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(floatingLicenseDescriptorEClass, FloatingLicenseDescriptor.class, "FloatingLicenseDescriptor", //$NON-NLS-1$ + IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); + initEClass(floatingLicenseEClass, FloatingLicense.class, "FloatingLicense", !IS_ABSTRACT, !IS_INTERFACE, //$NON-NLS-1$ IS_GENERATED_INSTANCE_CLASS); initEAttribute(getFloatingLicense_Company(), ecorePackage.getEString(), "company", null, 1, 1, //$NON-NLS-1$ diff --git a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/meta/ShipmentsFactory.java b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/meta/ShipmentsFactory.java index c596f0945..3150c5855 100644 --- a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/meta/ShipmentsFactory.java +++ b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/meta/ShipmentsFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2018, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -13,6 +13,7 @@ package org.eclipse.passage.lic.shipments.model.meta; import org.eclipse.emf.ecore.EFactory; + import org.eclipse.passage.lic.shipments.model.api.Floating; import org.eclipse.passage.lic.shipments.model.api.FloatingLicense; import org.eclipse.passage.lic.shipments.model.api.Personal; diff --git a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/meta/ShipmentsPackage.java b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/meta/ShipmentsPackage.java index 4f0857907..1ce09e5e2 100644 --- a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/meta/ShipmentsPackage.java +++ b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/meta/ShipmentsPackage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2018, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -140,6 +140,34 @@ public interface ShipmentsPackage extends EPackage { */ int FLOATING_OPERATION_COUNT = 0; + /** + * The meta object id for the '{@link org.eclipse.passage.lic.shipments.model.impl.PersonalLicenseDescriptorImpl Personal License Descriptor}' class. + * + * + * @see org.eclipse.passage.lic.shipments.model.impl.PersonalLicenseDescriptorImpl + * @see org.eclipse.passage.lic.shipments.model.impl.ShipmentsPackageImpl#getPersonalLicenseDescriptor() + * @generated + */ + int PERSONAL_LICENSE_DESCRIPTOR = 2; + + /** + * The number of structural features of the 'Personal License Descriptor' class. + * + * + * @generated + * @ordered + */ + int PERSONAL_LICENSE_DESCRIPTOR_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Personal License Descriptor' class. + * + * + * @generated + * @ordered + */ + int PERSONAL_LICENSE_DESCRIPTOR_OPERATION_COUNT = 0; + /** * The meta object id for the '{@link org.eclipse.passage.lic.shipments.model.impl.PersonalLicenseImpl Personal License}' class. * @@ -148,7 +176,7 @@ public interface ShipmentsPackage extends EPackage { * @see org.eclipse.passage.lic.shipments.model.impl.ShipmentsPackageImpl#getPersonalLicense() * @generated */ - int PERSONAL_LICENSE = 2; + int PERSONAL_LICENSE = 3; /** * The feature id for the 'User' attribute. @@ -157,7 +185,7 @@ public interface ShipmentsPackage extends EPackage { * @generated * @ordered */ - int PERSONAL_LICENSE__USER = 0; + int PERSONAL_LICENSE__USER = PERSONAL_LICENSE_DESCRIPTOR_FEATURE_COUNT + 0; /** * The feature id for the 'License' attribute. @@ -166,7 +194,7 @@ public interface ShipmentsPackage extends EPackage { * @generated * @ordered */ - int PERSONAL_LICENSE__LICENSE = 1; + int PERSONAL_LICENSE__LICENSE = PERSONAL_LICENSE_DESCRIPTOR_FEATURE_COUNT + 1; /** * The number of structural features of the 'Personal License' class. @@ -175,7 +203,7 @@ public interface ShipmentsPackage extends EPackage { * @generated * @ordered */ - int PERSONAL_LICENSE_FEATURE_COUNT = 2; + int PERSONAL_LICENSE_FEATURE_COUNT = PERSONAL_LICENSE_DESCRIPTOR_FEATURE_COUNT + 2; /** * The number of operations of the 'Personal License' class. @@ -184,7 +212,35 @@ public interface ShipmentsPackage extends EPackage { * @generated * @ordered */ - int PERSONAL_LICENSE_OPERATION_COUNT = 0; + int PERSONAL_LICENSE_OPERATION_COUNT = PERSONAL_LICENSE_DESCRIPTOR_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.passage.lic.shipments.model.impl.FloatingLicenseDescriptorImpl Floating License Descriptor}' class. + * + * + * @see org.eclipse.passage.lic.shipments.model.impl.FloatingLicenseDescriptorImpl + * @see org.eclipse.passage.lic.shipments.model.impl.ShipmentsPackageImpl#getFloatingLicenseDescriptor() + * @generated + */ + int FLOATING_LICENSE_DESCRIPTOR = 4; + + /** + * The number of structural features of the 'Floating License Descriptor' class. + * + * + * @generated + * @ordered + */ + int FLOATING_LICENSE_DESCRIPTOR_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Floating License Descriptor' class. + * + * + * @generated + * @ordered + */ + int FLOATING_LICENSE_DESCRIPTOR_OPERATION_COUNT = 0; /** * The meta object id for the '{@link org.eclipse.passage.lic.shipments.model.impl.FloatingLicenseImpl Floating License}' class. @@ -194,7 +250,7 @@ public interface ShipmentsPackage extends EPackage { * @see org.eclipse.passage.lic.shipments.model.impl.ShipmentsPackageImpl#getFloatingLicense() * @generated */ - int FLOATING_LICENSE = 3; + int FLOATING_LICENSE = 5; /** * The feature id for the 'Company' attribute. @@ -203,7 +259,7 @@ public interface ShipmentsPackage extends EPackage { * @generated * @ordered */ - int FLOATING_LICENSE__COMPANY = 0; + int FLOATING_LICENSE__COMPANY = FLOATING_LICENSE_DESCRIPTOR_FEATURE_COUNT + 0; /** * The feature id for the 'License' attribute. @@ -212,7 +268,7 @@ public interface ShipmentsPackage extends EPackage { * @generated * @ordered */ - int FLOATING_LICENSE__LICENSE = 1; + int FLOATING_LICENSE__LICENSE = FLOATING_LICENSE_DESCRIPTOR_FEATURE_COUNT + 1; /** * The number of structural features of the 'Floating License' class. @@ -221,7 +277,7 @@ public interface ShipmentsPackage extends EPackage { * @generated * @ordered */ - int FLOATING_LICENSE_FEATURE_COUNT = 2; + int FLOATING_LICENSE_FEATURE_COUNT = FLOATING_LICENSE_DESCRIPTOR_FEATURE_COUNT + 2; /** * The number of operations of the 'Floating License' class. @@ -230,7 +286,7 @@ public interface ShipmentsPackage extends EPackage { * @generated * @ordered */ - int FLOATING_LICENSE_OPERATION_COUNT = 0; + int FLOATING_LICENSE_OPERATION_COUNT = FLOATING_LICENSE_DESCRIPTOR_OPERATION_COUNT + 0; /** * Returns the meta object for class '{@link org.eclipse.passage.lic.shipments.model.api.Personal Personal}'. @@ -274,6 +330,17 @@ public interface ShipmentsPackage extends EPackage { */ EReference getFloating_Licenses(); + /** + * Returns the meta object for class '{@link org.eclipse.passage.lic.shipments.PersonalLicenseDescriptor Personal License Descriptor}'. + * + * + * @return the meta object for class 'Personal License Descriptor'. + * @see org.eclipse.passage.lic.shipments.PersonalLicenseDescriptor + * @model instanceClass="org.eclipse.passage.lic.shipments.PersonalLicenseDescriptor" + * @generated + */ + EClass getPersonalLicenseDescriptor(); + /** * Returns the meta object for class '{@link org.eclipse.passage.lic.shipments.model.api.PersonalLicense Personal License}'. * @@ -306,6 +373,17 @@ public interface ShipmentsPackage extends EPackage { */ EAttribute getPersonalLicense_License(); + /** + * Returns the meta object for class '{@link org.eclipse.passage.lic.shipments.FloatingLicenseDescriptor Floating License Descriptor}'. + * + * + * @return the meta object for class 'Floating License Descriptor'. + * @see org.eclipse.passage.lic.shipments.FloatingLicenseDescriptor + * @model instanceClass="org.eclipse.passage.lic.shipments.FloatingLicenseDescriptor" + * @generated + */ + EClass getFloatingLicenseDescriptor(); + /** * Returns the meta object for class '{@link org.eclipse.passage.lic.shipments.model.api.FloatingLicense Floating License}'. * diff --git a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/util/ShipmentsAdapterFactory.java b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/util/ShipmentsAdapterFactory.java index 8808d7091..9022d7555 100644 --- a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/util/ShipmentsAdapterFactory.java +++ b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/util/ShipmentsAdapterFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2018, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -14,12 +14,16 @@ import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; + import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + import org.eclipse.emf.ecore.EObject; -import org.eclipse.passage.lic.shipments.model.api.Floating; -import org.eclipse.passage.lic.shipments.model.api.FloatingLicense; -import org.eclipse.passage.lic.shipments.model.api.Personal; -import org.eclipse.passage.lic.shipments.model.api.PersonalLicense; + +import org.eclipse.passage.lic.shipments.FloatingLicenseDescriptor; +import org.eclipse.passage.lic.shipments.PersonalLicenseDescriptor; + +import org.eclipse.passage.lic.shipments.model.api.*; + import org.eclipse.passage.lic.shipments.model.meta.ShipmentsPackage; /** @@ -87,11 +91,21 @@ public Adapter caseFloating(Floating object) { return createFloatingAdapter(); } + @Override + public Adapter casePersonalLicenseDescriptor(PersonalLicenseDescriptor object) { + return createPersonalLicenseDescriptorAdapter(); + } + @Override public Adapter casePersonalLicense(PersonalLicense object) { return createPersonalLicenseAdapter(); } + @Override + public Adapter caseFloatingLicenseDescriptor(FloatingLicenseDescriptor object) { + return createFloatingLicenseDescriptorAdapter(); + } + @Override public Adapter caseFloatingLicense(FloatingLicense object) { return createFloatingLicenseAdapter(); @@ -144,6 +158,20 @@ public Adapter createFloatingAdapter() { return null; } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.passage.lic.shipments.PersonalLicenseDescriptor Personal License Descriptor}'. + * + * 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. + * + * @return the new adapter. + * @see org.eclipse.passage.lic.shipments.PersonalLicenseDescriptor + * @generated + */ + public Adapter createPersonalLicenseDescriptorAdapter() { + return null; + } + /** * Creates a new adapter for an object of class '{@link org.eclipse.passage.lic.shipments.model.api.PersonalLicense Personal License}'. * @@ -158,6 +186,20 @@ public Adapter createPersonalLicenseAdapter() { return null; } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.passage.lic.shipments.FloatingLicenseDescriptor Floating License Descriptor}'. + * + * 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. + * + * @return the new adapter. + * @see org.eclipse.passage.lic.shipments.FloatingLicenseDescriptor + * @generated + */ + public Adapter createFloatingLicenseDescriptorAdapter() { + return null; + } + /** * Creates a new adapter for an object of class '{@link org.eclipse.passage.lic.shipments.model.api.FloatingLicense Floating License}'. * diff --git a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/util/ShipmentsSwitch.java b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/util/ShipmentsSwitch.java index 00a7d5baa..245f9e1ed 100644 --- a/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/util/ShipmentsSwitch.java +++ b/bundles/org.eclipse.passage.lic.shipments.model/src-gen/org/eclipse/passage/lic/shipments/model/util/ShipmentsSwitch.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2018, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -14,11 +14,14 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; + import org.eclipse.emf.ecore.util.Switch; -import org.eclipse.passage.lic.shipments.model.api.Floating; -import org.eclipse.passage.lic.shipments.model.api.FloatingLicense; -import org.eclipse.passage.lic.shipments.model.api.Personal; -import org.eclipse.passage.lic.shipments.model.api.PersonalLicense; + +import org.eclipse.passage.lic.shipments.FloatingLicenseDescriptor; +import org.eclipse.passage.lic.shipments.PersonalLicenseDescriptor; + +import org.eclipse.passage.lic.shipments.model.api.*; + import org.eclipse.passage.lic.shipments.model.meta.ShipmentsPackage; /** @@ -92,9 +95,25 @@ protected T doSwitch(int classifierID, EObject theEObject) { result = defaultCase(theEObject); return result; } + case ShipmentsPackage.PERSONAL_LICENSE_DESCRIPTOR: { + PersonalLicenseDescriptor personalLicenseDescriptor = (PersonalLicenseDescriptor) theEObject; + T result = casePersonalLicenseDescriptor(personalLicenseDescriptor); + if (result == null) + result = defaultCase(theEObject); + return result; + } case ShipmentsPackage.PERSONAL_LICENSE: { PersonalLicense personalLicense = (PersonalLicense) theEObject; T result = casePersonalLicense(personalLicense); + if (result == null) + result = casePersonalLicenseDescriptor(personalLicense); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case ShipmentsPackage.FLOATING_LICENSE_DESCRIPTOR: { + FloatingLicenseDescriptor floatingLicenseDescriptor = (FloatingLicenseDescriptor) theEObject; + T result = caseFloatingLicenseDescriptor(floatingLicenseDescriptor); if (result == null) result = defaultCase(theEObject); return result; @@ -102,6 +121,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { case ShipmentsPackage.FLOATING_LICENSE: { FloatingLicense floatingLicense = (FloatingLicense) theEObject; T result = caseFloatingLicense(floatingLicense); + if (result == null) + result = caseFloatingLicenseDescriptor(floatingLicense); if (result == null) result = defaultCase(theEObject); return result; @@ -141,6 +162,21 @@ public T caseFloating(Floating object) { return null; } + /** + * Returns the result of interpreting the object as an instance of 'Personal License Descriptor'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Personal License Descriptor'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePersonalLicenseDescriptor(PersonalLicenseDescriptor object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'Personal License'. * @@ -156,6 +192,21 @@ public T casePersonalLicense(PersonalLicense object) { return null; } + /** + * Returns the result of interpreting the object as an instance of 'Floating License Descriptor'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Floating License Descriptor'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFloatingLicenseDescriptor(FloatingLicenseDescriptor object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'Floating License'. * diff --git a/bundles/org.eclipse.passage.lic.shipments/META-INF/MANIFEST.MF b/bundles/org.eclipse.passage.lic.shipments/META-INF/MANIFEST.MF index 9a441d3b3..6d85635ea 100644 --- a/bundles/org.eclipse.passage.lic.shipments/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.passage.lic.shipments/META-INF/MANIFEST.MF @@ -7,3 +7,4 @@ Bundle-Name: %Bundle-Name Bundle-Vendor: %Bundle-Vendor Bundle-Copyright: %Bundle-Copyright Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: org.eclipse.passage.lic.shipments;x-friends:="org.eclipse.passage.lic.shipments.ecore,org.eclipse.passage.lic.shipments.model,org.eclipse.passage.lic.shipments.edit" diff --git a/bundles/org.eclipse.passage.lic.shipments/src/org/eclipse/passage/lic/shipments/FloatingLicenseDescriptor.java b/bundles/org.eclipse.passage.lic.shipments/src/org/eclipse/passage/lic/shipments/FloatingLicenseDescriptor.java new file mode 100644 index 000000000..e3bab9a0d --- /dev/null +++ b/bundles/org.eclipse.passage.lic.shipments/src/org/eclipse/passage/lic/shipments/FloatingLicenseDescriptor.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2021 ArSysOp + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * https://www.eclipse.org/legal/epl-2.0/. + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * ArSysOp - initial API and implementation + *******************************************************************************/ +package org.eclipse.passage.lic.shipments; + +/** + * Read only EMF-like interface for {@linkplain FloatingLicense} from Shipments + * EMF model + */ +public interface FloatingLicenseDescriptor { + + String getCompany(); + + String getLicense(); + +} diff --git a/bundles/org.eclipse.passage.lic.shipments/src/org/eclipse/passage/lic/shipments/PersonalLicenseDescriptor.java b/bundles/org.eclipse.passage.lic.shipments/src/org/eclipse/passage/lic/shipments/PersonalLicenseDescriptor.java new file mode 100644 index 000000000..134969752 --- /dev/null +++ b/bundles/org.eclipse.passage.lic.shipments/src/org/eclipse/passage/lic/shipments/PersonalLicenseDescriptor.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2021 ArSysOp + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * https://www.eclipse.org/legal/epl-2.0/. + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * ArSysOp - initial API and implementation + *******************************************************************************/ +package org.eclipse.passage.lic.shipments; + +/** + * Read only EMF-like interface for {@linkplain PersonalLicense} from Shipments + * EMF model + */ +public interface PersonalLicenseDescriptor { + + String getUser(); + + String getLicense(); + +}