From d861eb572f10003d865613e036400204800b3e30 Mon Sep 17 00:00:00 2001 From: eparovyshnaya Date: Sat, 24 Oct 2020 19:23:30 +0300 Subject: [PATCH] Bug 568196 design EMF model user personal access structure - invite `FloatingLicenseAccess` structure to represent a user's personal server configuration - fix multiplicity errors in `FloatingLicensePack` model Signed-off-by: eparovyshnaya --- .../model/floating.ecore | 19 +- .../full/obj16/FloatingLicenseAccess.gif | Bin 0 -> 129 bytes .../full/obj16/FloatingServerConnection.gif | Bin 0 -> 129 bytes .../plugin.properties | 154 ++++----- .../FloatingItemProviderAdapterFactory.java | 50 +++ .../FloatingLicenseAccessItemProvider.java | 192 +++++++++++ .../FloatingServerConnectionItemProvider.java | 193 +++++++++++ .../model/floating.genmodel | 10 + .../model/api/FloatingLicenseAccess.java | 92 ++++++ .../model/api/FloatingServerConnection.java | 92 ++++++ .../model/impl/FloatingFactoryImpl.java | 27 ++ .../model/impl/FloatingLicenseAccessImpl.java | 305 ++++++++++++++++++ .../model/impl/FloatingPackageImpl.java | 134 +++++++- .../impl/FloatingServerConnectionImpl.java | 305 ++++++++++++++++++ .../floating/model/meta/FloatingFactory.java | 20 ++ .../floating/model/meta/FloatingPackage.java | 196 +++++++++++ .../model/util/FloatingAdapterFactory.java | 39 +++ .../floating/model/util/FloatingSwitch.java | 45 +++ .../model/licenses..genmodel | 2 +- 19 files changed, 1797 insertions(+), 78 deletions(-) create mode 100644 bundles/org.eclipse.passage.lic.floating.edit/icons/full/obj16/FloatingLicenseAccess.gif create mode 100644 bundles/org.eclipse.passage.lic.floating.edit/icons/full/obj16/FloatingServerConnection.gif create mode 100644 bundles/org.eclipse.passage.lic.floating.edit/src-gen/org/eclipse/passage/lic/floating/edit/providers/FloatingLicenseAccessItemProvider.java create mode 100644 bundles/org.eclipse.passage.lic.floating.edit/src-gen/org/eclipse/passage/lic/floating/edit/providers/FloatingServerConnectionItemProvider.java create mode 100644 bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/api/FloatingLicenseAccess.java create mode 100644 bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/api/FloatingServerConnection.java create mode 100644 bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/impl/FloatingLicenseAccessImpl.java create mode 100644 bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/impl/FloatingServerConnectionImpl.java diff --git a/bundles/org.eclipse.passage.lic.floating.ecore/model/floating.ecore b/bundles/org.eclipse.passage.lic.floating.ecore/model/floating.ecore index bff5eba53..1913faac4 100644 --- a/bundles/org.eclipse.passage.lic.floating.ecore/model/floating.ecore +++ b/bundles/org.eclipse.passage.lic.floating.ecore/model/floating.ecore @@ -37,14 +37,16 @@ - + - + + + + + + + + + + + diff --git a/bundles/org.eclipse.passage.lic.floating.edit/icons/full/obj16/FloatingLicenseAccess.gif b/bundles/org.eclipse.passage.lic.floating.edit/icons/full/obj16/FloatingLicenseAccess.gif new file mode 100644 index 0000000000000000000000000000000000000000..b1f8afa47661703c49bd5fa535dcb1342deb6fc4 GIT binary patch literal 129 zcmZ?wbhEHb6krfw*vtS14M4Jip`qcxfddT<4GjN*-2XuK|Nmgte-L}loH+*?9DqRa zCkrD311EzHNGHe)1{OVolb);hTD<=9O@;qqq3d>2)>|nFUJDj}wbA=HP3@{#dCy8s Se%_b*-m literal 0 HcmV?d00001 diff --git a/bundles/org.eclipse.passage.lic.floating.edit/icons/full/obj16/FloatingServerConnection.gif b/bundles/org.eclipse.passage.lic.floating.edit/icons/full/obj16/FloatingServerConnection.gif new file mode 100644 index 0000000000000000000000000000000000000000..7bac4fd3808df6247660dfb8d76e15609f279841 GIT binary patch literal 129 zcmZ?wbhEHb6krfw*vtS14M4Jip`qcxfddT<4GjN*-2XuK|Nmgt|NndTyy)qp3@myECp}m1wRrvIn+pHKLf7r4thZ7UycR6{YNPjYn%Y&f W@}8BN{JP5-JKc^<6cT1+um%9tY%ntb literal 0 HcmV?d00001 diff --git a/bundles/org.eclipse.passage.lic.floating.edit/plugin.properties b/bundles/org.eclipse.passage.lic.floating.edit/plugin.properties index 60318b945..d7f5d407d 100644 --- a/bundles/org.eclipse.passage.lic.floating.edit/plugin.properties +++ b/bundles/org.eclipse.passage.lic.floating.edit/plugin.properties @@ -1,74 +1,82 @@ -############################################################################### -# Copyright (c) 2020 ArSysOp and others -# -# 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 -############################################################################### - -pluginName = Passage LIC Floating Licenses Edit Support -providerName=Eclipse Passage - -Bundle-Copyright = Copyright (c) 2020 ArSysOp and others.\n\ -\n\ -This program and the accompanying materials are made\n\ -available under the terms of the Eclipse Public License 2.0\n\ -which is available at https://www.eclipse.org/legal/epl-2.0/\n\ -\n\ -SPDX-License-Identifier: EPL-2.0\n\ -_UI_CreateChild_text = {0} -_UI_CreateChild_text2 = {1} {0} -_UI_CreateChild_text3 = {1} -_UI_CreateChild_tooltip = Create New {0} Under {1} Feature -_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. -_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. - _UI_PropertyDescriptor_description = The {0} of the {1} - _UI_FloatingLicensePack_type = License Pack -_UI_LicenseRequisites_type = License Requisites -_UI_ProductRef_type = Product Ref -_UI_FloatingServer_type = Server -_UI_UserGrant_type = User Grant -_UI_FeatureGrant_type = Feature Grant -_UI_ValidityPeriod_type = Validity Period -_UI_ValidityPeriodClosed_type = Validity Period Closed -_UI_EvaluationInstructions_type = Evaluation Instructions -_UI_VersionMatch_type = Version Match -_UI_Unknown_type = Object - _UI_Unknown_datatype= Value - _UI_FloatingLicensePack_license_feature = License -_UI_FloatingLicensePack_host_feature = Host -_UI_FloatingLicensePack_users_feature = Users -_UI_FloatingLicensePack_features_feature = Features -_UI_LicenseRequisites_identifier_feature = Identifier -_UI_LicenseRequisites_issueDate_feature = Issue Date -_UI_LicenseRequisites_company_feature = Company -_UI_LicenseRequisites_plan_feature = Plan -_UI_LicenseRequisites_product_feature = Product -_UI_LicenseRequisites_valid_feature = Valid -_UI_ProductRef_product_feature = Product -_UI_ProductRef_version_feature = Version -_UI_FloatingServer_identifier_feature = Identifier -_UI_FloatingServer_authentication_feature = Authentication -_UI_UserGrant_user_feature = User -_UI_UserGrant_authentication_feature = Authentication -_UI_FeatureGrant_identifier_feature = Identifier -_UI_FeatureGrant_feature_feature = Feature -_UI_FeatureGrant_version_feature = Version -_UI_FeatureGrant_valid_feature = Valid -_UI_FeatureGrant_capacity_feature = Capacity -_UI_FeatureGrant_pack_feature = Pack -_UI_ValidityPeriodClosed_from_feature = From -_UI_ValidityPeriodClosed_until_feature = Until -_UI_EvaluationInstructions_type_feature = Type -_UI_EvaluationInstructions_expression_feature = Expression -_UI_VersionMatch_version_feature = Version -_UI_VersionMatch_rule_feature = Rule -_UI_Unknown_feature = Unspecified +############################################################################### +# Copyright (c) 2020 ArSysOp and others +# +# 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 +############################################################################### -_UI_CreateChild_text = {0} -_UI_FeatureGrant_vivid_feature = Vivid +pluginName = Passage LIC Floating Licenses Edit Support +providerName=Eclipse Passage + +Bundle-Copyright = Copyright (c) 2020 ArSysOp and others.\n\ +\n\ +This program and the accompanying materials are made\n\ +available under the terms of the Eclipse Public License 2.0\n\ +which is available at https://www.eclipse.org/legal/epl-2.0/\n\ +\n\ +SPDX-License-Identifier: EPL-2.0\n\ +_UI_CreateChild_text = {0} +_UI_CreateChild_text2 = {1} {0} +_UI_CreateChild_text3 = {1} +_UI_CreateChild_tooltip = Create New {0} Under {1} Feature +_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. +_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. + _UI_PropertyDescriptor_description = The {0} of the {1} + _UI_FloatingLicensePack_type = License Pack +_UI_LicenseRequisites_type = License Requisites +_UI_ProductRef_type = Product Ref +_UI_FloatingServer_type = Server +_UI_UserGrant_type = User Grant +_UI_FeatureGrant_type = Feature Grant +_UI_ValidityPeriod_type = Validity Period +_UI_ValidityPeriodClosed_type = Validity Period Closed +_UI_EvaluationInstructions_type = Evaluation Instructions +_UI_VersionMatch_type = Version Match +_UI_Unknown_type = Object + _UI_Unknown_datatype= Value + _UI_FloatingLicensePack_license_feature = License +_UI_FloatingLicensePack_host_feature = Host +_UI_FloatingLicensePack_users_feature = Users +_UI_FloatingLicensePack_features_feature = Features +_UI_LicenseRequisites_identifier_feature = Identifier +_UI_LicenseRequisites_issueDate_feature = Issue Date +_UI_LicenseRequisites_company_feature = Company +_UI_LicenseRequisites_plan_feature = Plan +_UI_LicenseRequisites_product_feature = Product +_UI_LicenseRequisites_valid_feature = Valid +_UI_ProductRef_product_feature = Product +_UI_ProductRef_version_feature = Version +_UI_FloatingServer_identifier_feature = Identifier +_UI_FloatingServer_authentication_feature = Authentication +_UI_UserGrant_user_feature = User +_UI_UserGrant_authentication_feature = Authentication +_UI_FeatureGrant_identifier_feature = Identifier +_UI_FeatureGrant_feature_feature = Feature +_UI_FeatureGrant_version_feature = Version +_UI_FeatureGrant_valid_feature = Valid +_UI_FeatureGrant_capacity_feature = Capacity +_UI_FeatureGrant_pack_feature = Pack +_UI_ValidityPeriodClosed_from_feature = From +_UI_ValidityPeriodClosed_until_feature = Until +_UI_EvaluationInstructions_type_feature = Type +_UI_EvaluationInstructions_expression_feature = Expression +_UI_VersionMatch_version_feature = Version +_UI_VersionMatch_rule_feature = Rule +_UI_Unknown_feature = Unspecified + +_UI_CreateChild_text = {0} +_UI_FeatureGrant_vivid_feature = Vivid +_UI_FloatingLicenseAccess_type = License Access +_UI_FloatingServerConnection_type = Server Connection +_UI_FloatingLicenseAccess_user_feature = User +_UI_FloatingLicenseAccess_server_feature = Server +_UI_FloatingLicenseAccess_originLicensePack_feature = Origin License Pack +_UI_FloatingServerConnection_ip_feature = Ip +_UI_FloatingServerConnection_port_feature = Port +_UI_FloatingServerConnection_authentication_feature = Authentication diff --git a/bundles/org.eclipse.passage.lic.floating.edit/src-gen/org/eclipse/passage/lic/floating/edit/providers/FloatingItemProviderAdapterFactory.java b/bundles/org.eclipse.passage.lic.floating.edit/src-gen/org/eclipse/passage/lic/floating/edit/providers/FloatingItemProviderAdapterFactory.java index d5b200f60..e5251d0b2 100644 --- a/bundles/org.eclipse.passage.lic.floating.edit/src-gen/org/eclipse/passage/lic/floating/edit/providers/FloatingItemProviderAdapterFactory.java +++ b/bundles/org.eclipse.passage.lic.floating.edit/src-gen/org/eclipse/passage/lic/floating/edit/providers/FloatingItemProviderAdapterFactory.java @@ -287,6 +287,52 @@ public Adapter createVersionMatchAdapter() { return versionMatchItemProvider; } + /** + * This keeps track of the one adapter used for all {@link org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess} instances. + * + * + * @generated + */ + protected FloatingLicenseAccessItemProvider floatingLicenseAccessItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess}. + * + * + * @generated + */ + @Override + public Adapter createFloatingLicenseAccessAdapter() { + if (floatingLicenseAccessItemProvider == null) { + floatingLicenseAccessItemProvider = new FloatingLicenseAccessItemProvider(this); + } + + return floatingLicenseAccessItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.passage.lic.floating.model.api.FloatingServerConnection} instances. + * + * + * @generated + */ + protected FloatingServerConnectionItemProvider floatingServerConnectionItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.passage.lic.floating.model.api.FloatingServerConnection}. + * + * + * @generated + */ + @Override + public Adapter createFloatingServerConnectionAdapter() { + if (floatingServerConnectionItemProvider == null) { + floatingServerConnectionItemProvider = new FloatingServerConnectionItemProvider(this); + } + + return floatingServerConnectionItemProvider; + } + /** * This returns the root adapter factory that contains this factory. * @@ -410,6 +456,10 @@ public void dispose() { evaluationInstructionsItemProvider.dispose(); if (versionMatchItemProvider != null) versionMatchItemProvider.dispose(); + if (floatingLicenseAccessItemProvider != null) + floatingLicenseAccessItemProvider.dispose(); + if (floatingServerConnectionItemProvider != null) + floatingServerConnectionItemProvider.dispose(); } } diff --git a/bundles/org.eclipse.passage.lic.floating.edit/src-gen/org/eclipse/passage/lic/floating/edit/providers/FloatingLicenseAccessItemProvider.java b/bundles/org.eclipse.passage.lic.floating.edit/src-gen/org/eclipse/passage/lic/floating/edit/providers/FloatingLicenseAccessItemProvider.java new file mode 100644 index 000000000..334d17b86 --- /dev/null +++ b/bundles/org.eclipse.passage.lic.floating.edit/src-gen/org/eclipse/passage/lic/floating/edit/providers/FloatingLicenseAccessItemProvider.java @@ -0,0 +1,192 @@ +/** + */ +package org.eclipse.passage.lic.floating.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.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.passage.lic.floating.edit.FLoatingLicensesEditPlugin; + +import org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess; + +import org.eclipse.passage.lic.floating.model.meta.FloatingPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess} object. + * + * + * @generated + */ +public class FloatingLicenseAccessItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public FloatingLicenseAccessItemProvider(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); + + addUserPropertyDescriptor(object); + addServerPropertyDescriptor(object); + addOriginLicensePackPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the User feature. + * + * + * @generated + */ + protected void addUserPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_FloatingLicenseAccess_user_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_FloatingLicenseAccess_user_feature", //$NON-NLS-1$//$NON-NLS-2$ + "_UI_FloatingLicenseAccess_type"), //$NON-NLS-1$ + FloatingPackage.eINSTANCE.getFloatingLicenseAccess_User(), true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Server feature. + * + * + * @generated + */ + protected void addServerPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_FloatingLicenseAccess_server_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_FloatingLicenseAccess_server_feature", //$NON-NLS-1$//$NON-NLS-2$ + "_UI_FloatingLicenseAccess_type"), //$NON-NLS-1$ + FloatingPackage.eINSTANCE.getFloatingLicenseAccess_Server(), true, false, true, null, null, null)); + } + + /** + * This adds a property descriptor for the Origin License Pack feature. + * + * + * @generated + */ + protected void addOriginLicensePackPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_FloatingLicenseAccess_originLicensePack_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_FloatingLicenseAccess_originLicensePack_feature", //$NON-NLS-1$//$NON-NLS-2$ + "_UI_FloatingLicenseAccess_type"), //$NON-NLS-1$ + FloatingPackage.eINSTANCE.getFloatingLicenseAccess_OriginLicensePack(), true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This returns FloatingLicenseAccess.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/FloatingLicenseAccess")); //$NON-NLS-1$ + } + + /** + * + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((FloatingLicenseAccess) object).getUser(); + return label == null || label.length() == 0 ? getString("_UI_FloatingLicenseAccess_type") : //$NON-NLS-1$ + getString("_UI_FloatingLicenseAccess_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(FloatingLicenseAccess.class)) { + case FloatingPackage.FLOATING_LICENSE_ACCESS__USER: + case FloatingPackage.FLOATING_LICENSE_ACCESS__ORIGIN_LICENSE_PACK: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + default: + super.notifyChanged(notification); + return; + } + } + + /** + * 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 FLoatingLicensesEditPlugin.INSTANCE; + } + +} diff --git a/bundles/org.eclipse.passage.lic.floating.edit/src-gen/org/eclipse/passage/lic/floating/edit/providers/FloatingServerConnectionItemProvider.java b/bundles/org.eclipse.passage.lic.floating.edit/src-gen/org/eclipse/passage/lic/floating/edit/providers/FloatingServerConnectionItemProvider.java new file mode 100644 index 000000000..51acfff38 --- /dev/null +++ b/bundles/org.eclipse.passage.lic.floating.edit/src-gen/org/eclipse/passage/lic/floating/edit/providers/FloatingServerConnectionItemProvider.java @@ -0,0 +1,193 @@ +/** + */ +package org.eclipse.passage.lic.floating.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.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.passage.lic.floating.edit.FLoatingLicensesEditPlugin; + +import org.eclipse.passage.lic.floating.model.api.FloatingServerConnection; + +import org.eclipse.passage.lic.floating.model.meta.FloatingPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.passage.lic.floating.model.api.FloatingServerConnection} object. + * + * + * @generated + */ +public class FloatingServerConnectionItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, + IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public FloatingServerConnectionItemProvider(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); + + addIpPropertyDescriptor(object); + addPortPropertyDescriptor(object); + addAuthenticationPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Ip feature. + * + * + * @generated + */ + protected void addIpPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_FloatingServerConnection_ip_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_FloatingServerConnection_ip_feature", //$NON-NLS-1$//$NON-NLS-2$ + "_UI_FloatingServerConnection_type"), //$NON-NLS-1$ + FloatingPackage.eINSTANCE.getFloatingServerConnection_Ip(), true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Port feature. + * + * + * @generated + */ + protected void addPortPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), getString("_UI_FloatingServerConnection_port_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_FloatingServerConnection_port_feature", //$NON-NLS-1$//$NON-NLS-2$ + "_UI_FloatingServerConnection_type"), //$NON-NLS-1$ + FloatingPackage.eINSTANCE.getFloatingServerConnection_Port(), true, false, false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Authentication feature. + * + * + * @generated + */ + protected void addAuthenticationPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_FloatingServerConnection_authentication_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_FloatingServerConnection_authentication_feature", //$NON-NLS-1$//$NON-NLS-2$ + "_UI_FloatingServerConnection_type"), //$NON-NLS-1$ + FloatingPackage.eINSTANCE.getFloatingServerConnection_Authentication(), true, false, true, null, null, + null)); + } + + /** + * This returns FloatingServerConnection.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/FloatingServerConnection")); //$NON-NLS-1$ + } + + /** + * + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((FloatingServerConnection) object).getIp(); + return label == null || label.length() == 0 ? getString("_UI_FloatingServerConnection_type") : //$NON-NLS-1$ + getString("_UI_FloatingServerConnection_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(FloatingServerConnection.class)) { + case FloatingPackage.FLOATING_SERVER_CONNECTION__IP: + case FloatingPackage.FLOATING_SERVER_CONNECTION__PORT: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + default: + super.notifyChanged(notification); + return; + } + } + + /** + * 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 FLoatingLicensesEditPlugin.INSTANCE; + } + +} diff --git a/bundles/org.eclipse.passage.lic.floating.model/model/floating.genmodel b/bundles/org.eclipse.passage.lic.floating.model/model/floating.genmodel index 1e6719969..1d3268183 100644 --- a/bundles/org.eclipse.passage.lic.floating.model/model/floating.genmodel +++ b/bundles/org.eclipse.passage.lic.floating.model/model/floating.genmodel @@ -65,5 +65,15 @@ + + + + + + + + + + diff --git a/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/api/FloatingLicenseAccess.java b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/api/FloatingLicenseAccess.java new file mode 100644 index 000000000..cf0e41bf7 --- /dev/null +++ b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/api/FloatingLicenseAccess.java @@ -0,0 +1,92 @@ +/** + */ +package org.eclipse.passage.lic.floating.model.api; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'License Access'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess#getUser User}
  • + *
  • {@link org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess#getServer Server}
  • + *
  • {@link org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess#getOriginLicensePack Origin License Pack}
  • + *
+ * + * @see org.eclipse.passage.lic.floating.model.meta.FloatingPackage#getFloatingLicenseAccess() + * @model + * @generated + */ +public interface FloatingLicenseAccess extends EObject { + /** + * Returns the value of the 'User' attribute. + * + * + * @return the value of the 'User' attribute. + * @see #setUser(String) + * @see org.eclipse.passage.lic.floating.model.meta.FloatingPackage#getFloatingLicenseAccess_User() + * @model required="true" + * @generated + */ + String getUser(); + + /** + * Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess#getUser User}' attribute. + * + * + * @param value the new value of the 'User' attribute. + * @see #getUser() + * @generated + */ + void setUser(String value); + + /** + * Returns the value of the 'Server' reference. + * + * + * @return the value of the 'Server' reference. + * @see #setServer(FloatingServerConnection) + * @see org.eclipse.passage.lic.floating.model.meta.FloatingPackage#getFloatingLicenseAccess_Server() + * @model required="true" + * @generated + */ + FloatingServerConnection getServer(); + + /** + * Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess#getServer Server}' reference. + * + * + * @param value the new value of the 'Server' reference. + * @see #getServer() + * @generated + */ + void setServer(FloatingServerConnection value); + + /** + * Returns the value of the 'Origin License Pack' attribute. + * + * + * @return the value of the 'Origin License Pack' attribute. + * @see #setOriginLicensePack(String) + * @see org.eclipse.passage.lic.floating.model.meta.FloatingPackage#getFloatingLicenseAccess_OriginLicensePack() + * @model required="true" + * @generated + */ + String getOriginLicensePack(); + + /** + * Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess#getOriginLicensePack Origin License Pack}' attribute. + * + * + * @param value the new value of the 'Origin License Pack' attribute. + * @see #getOriginLicensePack() + * @generated + */ + void setOriginLicensePack(String value); + +} // FloatingLicenseAccess diff --git a/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/api/FloatingServerConnection.java b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/api/FloatingServerConnection.java new file mode 100644 index 000000000..5a27420f1 --- /dev/null +++ b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/api/FloatingServerConnection.java @@ -0,0 +1,92 @@ +/** + */ +package org.eclipse.passage.lic.floating.model.api; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Server Connection'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.passage.lic.floating.model.api.FloatingServerConnection#getIp Ip}
  • + *
  • {@link org.eclipse.passage.lic.floating.model.api.FloatingServerConnection#getPort Port}
  • + *
  • {@link org.eclipse.passage.lic.floating.model.api.FloatingServerConnection#getAuthentication Authentication}
  • + *
+ * + * @see org.eclipse.passage.lic.floating.model.meta.FloatingPackage#getFloatingServerConnection() + * @model + * @generated + */ +public interface FloatingServerConnection extends EObject { + /** + * Returns the value of the 'Ip' attribute. + * + * + * @return the value of the 'Ip' attribute. + * @see #setIp(String) + * @see org.eclipse.passage.lic.floating.model.meta.FloatingPackage#getFloatingServerConnection_Ip() + * @model required="true" + * @generated + */ + String getIp(); + + /** + * Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FloatingServerConnection#getIp Ip}' attribute. + * + * + * @param value the new value of the 'Ip' attribute. + * @see #getIp() + * @generated + */ + void setIp(String value); + + /** + * Returns the value of the 'Port' attribute. + * + * + * @return the value of the 'Port' attribute. + * @see #setPort(int) + * @see org.eclipse.passage.lic.floating.model.meta.FloatingPackage#getFloatingServerConnection_Port() + * @model required="true" + * @generated + */ + int getPort(); + + /** + * Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FloatingServerConnection#getPort Port}' attribute. + * + * + * @param value the new value of the 'Port' attribute. + * @see #getPort() + * @generated + */ + void setPort(int value); + + /** + * Returns the value of the 'Authentication' reference. + * + * + * @return the value of the 'Authentication' reference. + * @see #setAuthentication(EvaluationInstructions) + * @see org.eclipse.passage.lic.floating.model.meta.FloatingPackage#getFloatingServerConnection_Authentication() + * @model required="true" ordered="false" + * @generated + */ + EvaluationInstructions getAuthentication(); + + /** + * Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FloatingServerConnection#getAuthentication Authentication}' reference. + * + * + * @param value the new value of the 'Authentication' reference. + * @see #getAuthentication() + * @generated + */ + void setAuthentication(EvaluationInstructions value); + +} // FloatingServerConnection diff --git a/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/impl/FloatingFactoryImpl.java b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/impl/FloatingFactoryImpl.java index cd1385f8f..3a652a4af 100644 --- a/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/impl/FloatingFactoryImpl.java +++ b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/impl/FloatingFactoryImpl.java @@ -17,6 +17,7 @@ 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.floating.model.api.*; import org.eclipse.passage.lic.floating.model.api.EvaluationInstructions; import org.eclipse.passage.lic.floating.model.api.FeatureGrant; import org.eclipse.passage.lic.floating.model.api.FloatingLicensePack; @@ -89,6 +90,10 @@ public EObject create(EClass eClass) { return createEvaluationInstructions(); case FloatingPackage.VERSION_MATCH: return createVersionMatch(); + case FloatingPackage.FLOATING_LICENSE_ACCESS: + return createFloatingLicenseAccess(); + case FloatingPackage.FLOATING_SERVER_CONNECTION: + return createFloatingServerConnection(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ } @@ -184,6 +189,28 @@ public VersionMatch createVersionMatch() { return versionMatch; } + /** + * + * + * @generated + */ + @Override + public FloatingLicenseAccess createFloatingLicenseAccess() { + FloatingLicenseAccessImpl floatingLicenseAccess = new FloatingLicenseAccessImpl(); + return floatingLicenseAccess; + } + + /** + * + * + * @generated + */ + @Override + public FloatingServerConnection createFloatingServerConnection() { + FloatingServerConnectionImpl floatingServerConnection = new FloatingServerConnectionImpl(); + return floatingServerConnection; + } + /** * * @generated diff --git a/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/impl/FloatingLicenseAccessImpl.java b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/impl/FloatingLicenseAccessImpl.java new file mode 100644 index 000000000..326ffc9d9 --- /dev/null +++ b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/impl/FloatingLicenseAccessImpl.java @@ -0,0 +1,305 @@ +/** + */ +package org.eclipse.passage.lic.floating.model.impl; + +import java.util.Objects; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess; +import org.eclipse.passage.lic.floating.model.api.FloatingServerConnection; + +import org.eclipse.passage.lic.floating.model.meta.FloatingPackage; + +/** + * + * An implementation of the model object 'License Access'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.passage.lic.floating.model.impl.FloatingLicenseAccessImpl#getUser User}
  • + *
  • {@link org.eclipse.passage.lic.floating.model.impl.FloatingLicenseAccessImpl#getServer Server}
  • + *
  • {@link org.eclipse.passage.lic.floating.model.impl.FloatingLicenseAccessImpl#getOriginLicensePack Origin License Pack}
  • + *
+ * + * @generated + */ +public class FloatingLicenseAccessImpl extends MinimalEObjectImpl.Container implements FloatingLicenseAccess { + /** + * The default value of the '{@link #getUser() User}' attribute. + * + * + * @see #getUser() + * @generated + * @ordered + */ + protected static final String USER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUser() User}' attribute. + * + * + * @see #getUser() + * @generated + * @ordered + */ + private String user = USER_EDEFAULT; + + /** + * The cached value of the '{@link #getServer() Server}' reference. + * + * + * @see #getServer() + * @generated + * @ordered + */ + protected FloatingServerConnection server; + + /** + * The default value of the '{@link #getOriginLicensePack() Origin License Pack}' attribute. + * + * + * @see #getOriginLicensePack() + * @generated + * @ordered + */ + protected static final String ORIGIN_LICENSE_PACK_EDEFAULT = null; + + /** + * The cached value of the '{@link #getOriginLicensePack() Origin License Pack}' attribute. + * + * + * @see #getOriginLicensePack() + * @generated + * @ordered + */ + private String originLicensePack = ORIGIN_LICENSE_PACK_EDEFAULT; + + /** + * + * + * @generated + */ + protected FloatingLicenseAccessImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FloatingPackage.eINSTANCE.getFloatingLicenseAccess(); + } + + /** + * + * + * @generated + */ + @Override + public String getUser() { + return user; + } + + /** + * + * + * @generated + */ + @Override + public void setUser(String newUser) { + String oldUser = user; + user = newUser; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, FloatingPackage.FLOATING_LICENSE_ACCESS__USER, + oldUser, user)); + } + } + + /** + * + * + * @generated + */ + @Override + public FloatingServerConnection getServer() { + if (server != null && server.eIsProxy()) { + InternalEObject oldServer = (InternalEObject) server; + server = (FloatingServerConnection) eResolveProxy(oldServer); + if (server != oldServer) { + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.RESOLVE, + FloatingPackage.FLOATING_LICENSE_ACCESS__SERVER, oldServer, server)); + } + } + } + return server; + } + + /** + * + * + * @generated + */ + public FloatingServerConnection basicGetServer() { + return server; + } + + /** + * + * + * @generated + */ + @Override + public void setServer(FloatingServerConnection newServer) { + FloatingServerConnection oldServer = server; + server = newServer; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, FloatingPackage.FLOATING_LICENSE_ACCESS__SERVER, + oldServer, server)); + } + } + + /** + * + * + * @generated + */ + @Override + public String getOriginLicensePack() { + return originLicensePack; + } + + /** + * + * + * @generated + */ + @Override + public void setOriginLicensePack(String newOriginLicensePack) { + String oldOriginLicensePack = originLicensePack; + originLicensePack = newOriginLicensePack; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, + FloatingPackage.FLOATING_LICENSE_ACCESS__ORIGIN_LICENSE_PACK, oldOriginLicensePack, + originLicensePack)); + } + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FloatingPackage.FLOATING_LICENSE_ACCESS__USER: + return getUser(); + case FloatingPackage.FLOATING_LICENSE_ACCESS__SERVER: + if (resolve) + return getServer(); + return basicGetServer(); + case FloatingPackage.FLOATING_LICENSE_ACCESS__ORIGIN_LICENSE_PACK: + return getOriginLicensePack(); + default: + return super.eGet(featureID, resolve, coreType); + } + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FloatingPackage.FLOATING_LICENSE_ACCESS__USER: + setUser((String) newValue); + return; + case FloatingPackage.FLOATING_LICENSE_ACCESS__SERVER: + setServer((FloatingServerConnection) newValue); + return; + case FloatingPackage.FLOATING_LICENSE_ACCESS__ORIGIN_LICENSE_PACK: + setOriginLicensePack((String) newValue); + return; + default: + super.eSet(featureID, newValue); + return; + } + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FloatingPackage.FLOATING_LICENSE_ACCESS__USER: + setUser(USER_EDEFAULT); + return; + case FloatingPackage.FLOATING_LICENSE_ACCESS__SERVER: + setServer((FloatingServerConnection) null); + return; + case FloatingPackage.FLOATING_LICENSE_ACCESS__ORIGIN_LICENSE_PACK: + setOriginLicensePack(ORIGIN_LICENSE_PACK_EDEFAULT); + return; + default: + super.eUnset(featureID); + return; + } + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FloatingPackage.FLOATING_LICENSE_ACCESS__USER: + return !Objects.equals(USER_EDEFAULT, user); + case FloatingPackage.FLOATING_LICENSE_ACCESS__SERVER: + return server != null; + case FloatingPackage.FLOATING_LICENSE_ACCESS__ORIGIN_LICENSE_PACK: + return !Objects.equals(ORIGIN_LICENSE_PACK_EDEFAULT, originLicensePack); + default: + return super.eIsSet(featureID); + } + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (user: "); //$NON-NLS-1$ + result.append(user); + result.append(", originLicensePack: "); //$NON-NLS-1$ + result.append(originLicensePack); + result.append(')'); + return result.toString(); + } + +} //FloatingLicenseAccessImpl diff --git a/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/impl/FloatingPackageImpl.java b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/impl/FloatingPackageImpl.java index 85d1c7c58..d4071b311 100644 --- a/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/impl/FloatingPackageImpl.java +++ b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/impl/FloatingPackageImpl.java @@ -19,8 +19,10 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; import org.eclipse.passage.lic.floating.model.api.EvaluationInstructions; import org.eclipse.passage.lic.floating.model.api.FeatureGrant; +import org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess; import org.eclipse.passage.lic.floating.model.api.FloatingLicensePack; import org.eclipse.passage.lic.floating.model.api.FloatingServer; +import org.eclipse.passage.lic.floating.model.api.FloatingServerConnection; import org.eclipse.passage.lic.floating.model.api.LicenseRequisites; import org.eclipse.passage.lic.floating.model.api.ProductRef; import org.eclipse.passage.lic.floating.model.api.UserGrant; @@ -96,6 +98,20 @@ public class FloatingPackageImpl extends EPackageImpl implements FloatingPackage */ private EClass versionMatchEClass = null; + /** + * + * + * @generated + */ + private EClass floatingLicenseAccessEClass = null; + + /** + * + * + * @generated + */ + private EClass floatingServerConnectionEClass = null; + /** * Creates an instance of the model Package, registered with * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package @@ -511,6 +527,86 @@ public EAttribute getVersionMatch_Rule() { return (EAttribute) versionMatchEClass.getEStructuralFeatures().get(1); } + /** + * + * + * @generated + */ + @Override + public EClass getFloatingLicenseAccess() { + return floatingLicenseAccessEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getFloatingLicenseAccess_User() { + return (EAttribute) floatingLicenseAccessEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getFloatingLicenseAccess_Server() { + return (EReference) floatingLicenseAccessEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getFloatingLicenseAccess_OriginLicensePack() { + return (EAttribute) floatingLicenseAccessEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + @Override + public EClass getFloatingServerConnection() { + return floatingServerConnectionEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getFloatingServerConnection_Ip() { + return (EAttribute) floatingServerConnectionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getFloatingServerConnection_Port() { + return (EAttribute) floatingServerConnectionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EReference getFloatingServerConnection_Authentication() { + return (EReference) floatingServerConnectionEClass.getEStructuralFeatures().get(2); + } + /** * * @generated @@ -587,6 +683,16 @@ public void createPackageContents() { versionMatchEClass = createEClass(VERSION_MATCH); createEAttribute(versionMatchEClass, VERSION_MATCH__VERSION); createEAttribute(versionMatchEClass, VERSION_MATCH__RULE); + + floatingLicenseAccessEClass = createEClass(FLOATING_LICENSE_ACCESS); + createEAttribute(floatingLicenseAccessEClass, FLOATING_LICENSE_ACCESS__USER); + createEReference(floatingLicenseAccessEClass, FLOATING_LICENSE_ACCESS__SERVER); + createEAttribute(floatingLicenseAccessEClass, FLOATING_LICENSE_ACCESS__ORIGIN_LICENSE_PACK); + + floatingServerConnectionEClass = createEClass(FLOATING_SERVER_CONNECTION); + createEAttribute(floatingServerConnectionEClass, FLOATING_SERVER_CONNECTION__IP); + createEAttribute(floatingServerConnectionEClass, FLOATING_SERVER_CONNECTION__PORT); + createEReference(floatingServerConnectionEClass, FLOATING_SERVER_CONNECTION__AUTHENTICATION); } /** @@ -676,7 +782,7 @@ public void initializePackageContents() { IS_GENERATED_INSTANCE_CLASS); initEAttribute(getUserGrant_User(), ecorePackage.getEString(), "user", null, 1, 1, UserGrant.class, //$NON-NLS-1$ !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getUserGrant_Authentication(), this.getEvaluationInstructions(), null, "authentication", null, 0, //$NON-NLS-1$ + initEReference(getUserGrant_Authentication(), this.getEvaluationInstructions(), null, "authentication", null, 1, //$NON-NLS-1$ 1, UserGrant.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); @@ -687,7 +793,7 @@ public void initializePackageContents() { !IS_DERIVED, IS_ORDERED); initEAttribute(getFeatureGrant_Feature(), ecorePackage.getEString(), "feature", null, 1, 1, FeatureGrant.class, //$NON-NLS-1$ !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getFeatureGrant_Version(), this.getVersionMatch(), null, "version", null, 0, 1, //$NON-NLS-1$ + initEReference(getFeatureGrant_Version(), this.getVersionMatch(), null, "version", null, 1, 1, //$NON-NLS-1$ FeatureGrant.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getFeatureGrant_Valid(), this.getValidityPeriod(), null, "valid", null, 1, 1, FeatureGrant.class, //$NON-NLS-1$ @@ -729,6 +835,30 @@ public void initializePackageContents() { initEAttribute(getVersionMatch_Rule(), ecorePackage.getEString(), "rule", null, 1, 1, VersionMatch.class, //$NON-NLS-1$ !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(floatingLicenseAccessEClass, FloatingLicenseAccess.class, "FloatingLicenseAccess", !IS_ABSTRACT, //$NON-NLS-1$ + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getFloatingLicenseAccess_User(), ecorePackage.getEString(), "user", null, 1, 1, //$NON-NLS-1$ + FloatingLicenseAccess.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getFloatingLicenseAccess_Server(), this.getFloatingServerConnection(), null, "server", null, 1, //$NON-NLS-1$ + 1, FloatingLicenseAccess.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFloatingLicenseAccess_OriginLicensePack(), ecorePackage.getEString(), "originLicensePack", //$NON-NLS-1$ + null, 1, 1, FloatingLicenseAccess.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, + !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(floatingServerConnectionEClass, FloatingServerConnection.class, "FloatingServerConnection", //$NON-NLS-1$ + !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getFloatingServerConnection_Ip(), ecorePackage.getEString(), "ip", null, 1, 1, //$NON-NLS-1$ + FloatingServerConnection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFloatingServerConnection_Port(), ecorePackage.getEInt(), "port", null, 1, 1, //$NON-NLS-1$ + FloatingServerConnection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getFloatingServerConnection_Authentication(), this.getEvaluationInstructions(), null, + "authentication", null, 1, 1, FloatingServerConnection.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$ + IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + // Create resource createResource(eNS_URI); } diff --git a/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/impl/FloatingServerConnectionImpl.java b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/impl/FloatingServerConnectionImpl.java new file mode 100644 index 000000000..5d1b337e9 --- /dev/null +++ b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/impl/FloatingServerConnectionImpl.java @@ -0,0 +1,305 @@ +/** + */ +package org.eclipse.passage.lic.floating.model.impl; + +import java.util.Objects; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.passage.lic.floating.model.api.EvaluationInstructions; +import org.eclipse.passage.lic.floating.model.api.FloatingServerConnection; + +import org.eclipse.passage.lic.floating.model.meta.FloatingPackage; + +/** + * + * An implementation of the model object 'Server Connection'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.passage.lic.floating.model.impl.FloatingServerConnectionImpl#getIp Ip}
  • + *
  • {@link org.eclipse.passage.lic.floating.model.impl.FloatingServerConnectionImpl#getPort Port}
  • + *
  • {@link org.eclipse.passage.lic.floating.model.impl.FloatingServerConnectionImpl#getAuthentication Authentication}
  • + *
+ * + * @generated + */ +public class FloatingServerConnectionImpl extends MinimalEObjectImpl.Container implements FloatingServerConnection { + /** + * The default value of the '{@link #getIp() Ip}' attribute. + * + * + * @see #getIp() + * @generated + * @ordered + */ + protected static final String IP_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIp() Ip}' attribute. + * + * + * @see #getIp() + * @generated + * @ordered + */ + private String ip = IP_EDEFAULT; + + /** + * The default value of the '{@link #getPort() Port}' attribute. + * + * + * @see #getPort() + * @generated + * @ordered + */ + protected static final int PORT_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getPort() Port}' attribute. + * + * + * @see #getPort() + * @generated + * @ordered + */ + private int port = PORT_EDEFAULT; + + /** + * The cached value of the '{@link #getAuthentication() Authentication}' reference. + * + * + * @see #getAuthentication() + * @generated + * @ordered + */ + protected EvaluationInstructions authentication; + + /** + * + * + * @generated + */ + protected FloatingServerConnectionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FloatingPackage.eINSTANCE.getFloatingServerConnection(); + } + + /** + * + * + * @generated + */ + @Override + public String getIp() { + return ip; + } + + /** + * + * + * @generated + */ + @Override + public void setIp(String newIp) { + String oldIp = ip; + ip = newIp; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, FloatingPackage.FLOATING_SERVER_CONNECTION__IP, oldIp, + ip)); + } + } + + /** + * + * + * @generated + */ + @Override + public int getPort() { + return port; + } + + /** + * + * + * @generated + */ + @Override + public void setPort(int newPort) { + int oldPort = port; + port = newPort; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, FloatingPackage.FLOATING_SERVER_CONNECTION__PORT, + oldPort, port)); + } + } + + /** + * + * + * @generated + */ + @Override + public EvaluationInstructions getAuthentication() { + if (authentication != null && authentication.eIsProxy()) { + InternalEObject oldAuthentication = (InternalEObject) authentication; + authentication = (EvaluationInstructions) eResolveProxy(oldAuthentication); + if (authentication != oldAuthentication) { + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.RESOLVE, + FloatingPackage.FLOATING_SERVER_CONNECTION__AUTHENTICATION, oldAuthentication, + authentication)); + } + } + } + return authentication; + } + + /** + * + * + * @generated + */ + public EvaluationInstructions basicGetAuthentication() { + return authentication; + } + + /** + * + * + * @generated + */ + @Override + public void setAuthentication(EvaluationInstructions newAuthentication) { + EvaluationInstructions oldAuthentication = authentication; + authentication = newAuthentication; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, + FloatingPackage.FLOATING_SERVER_CONNECTION__AUTHENTICATION, oldAuthentication, authentication)); + } + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FloatingPackage.FLOATING_SERVER_CONNECTION__IP: + return getIp(); + case FloatingPackage.FLOATING_SERVER_CONNECTION__PORT: + return getPort(); + case FloatingPackage.FLOATING_SERVER_CONNECTION__AUTHENTICATION: + if (resolve) + return getAuthentication(); + return basicGetAuthentication(); + default: + return super.eGet(featureID, resolve, coreType); + } + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FloatingPackage.FLOATING_SERVER_CONNECTION__IP: + setIp((String) newValue); + return; + case FloatingPackage.FLOATING_SERVER_CONNECTION__PORT: + setPort((Integer) newValue); + return; + case FloatingPackage.FLOATING_SERVER_CONNECTION__AUTHENTICATION: + setAuthentication((EvaluationInstructions) newValue); + return; + default: + super.eSet(featureID, newValue); + return; + } + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FloatingPackage.FLOATING_SERVER_CONNECTION__IP: + setIp(IP_EDEFAULT); + return; + case FloatingPackage.FLOATING_SERVER_CONNECTION__PORT: + setPort(PORT_EDEFAULT); + return; + case FloatingPackage.FLOATING_SERVER_CONNECTION__AUTHENTICATION: + setAuthentication((EvaluationInstructions) null); + return; + default: + super.eUnset(featureID); + return; + } + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FloatingPackage.FLOATING_SERVER_CONNECTION__IP: + return !Objects.equals(IP_EDEFAULT, ip); + case FloatingPackage.FLOATING_SERVER_CONNECTION__PORT: + return port != PORT_EDEFAULT; + case FloatingPackage.FLOATING_SERVER_CONNECTION__AUTHENTICATION: + return authentication != null; + default: + return super.eIsSet(featureID); + } + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (ip: "); //$NON-NLS-1$ + result.append(ip); + result.append(", port: "); //$NON-NLS-1$ + result.append(port); + result.append(')'); + return result.toString(); + } + +} //FloatingServerConnectionImpl diff --git a/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/meta/FloatingFactory.java b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/meta/FloatingFactory.java index cce9cc9bd..314fa61d6 100644 --- a/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/meta/FloatingFactory.java +++ b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/meta/FloatingFactory.java @@ -15,8 +15,10 @@ import org.eclipse.emf.ecore.EFactory; import org.eclipse.passage.lic.floating.model.api.EvaluationInstructions; import org.eclipse.passage.lic.floating.model.api.FeatureGrant; +import org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess; import org.eclipse.passage.lic.floating.model.api.FloatingLicensePack; import org.eclipse.passage.lic.floating.model.api.FloatingServer; +import org.eclipse.passage.lic.floating.model.api.FloatingServerConnection; import org.eclipse.passage.lic.floating.model.api.LicenseRequisites; import org.eclipse.passage.lic.floating.model.api.ProductRef; import org.eclipse.passage.lic.floating.model.api.UserGrant; @@ -119,6 +121,24 @@ public interface FloatingFactory extends EFactory { */ VersionMatch createVersionMatch(); + /** + * Returns a new object of class 'License Access'. + * + * + * @return a new object of class 'License Access'. + * @generated + */ + FloatingLicenseAccess createFloatingLicenseAccess(); + + /** + * Returns a new object of class 'Server Connection'. + * + * + * @return a new object of class 'Server Connection'. + * @generated + */ + FloatingServerConnection createFloatingServerConnection(); + /** * Returns the package supported by this factory. * + * + * @see org.eclipse.passage.lic.floating.model.impl.FloatingLicenseAccessImpl + * @see org.eclipse.passage.lic.floating.model.impl.FloatingPackageImpl#getFloatingLicenseAccess() + * @generated + */ + int FLOATING_LICENSE_ACCESS = 10; + + /** + * The feature id for the 'User' attribute. + * + * + * @generated + * @ordered + */ + int FLOATING_LICENSE_ACCESS__USER = 0; + + /** + * The feature id for the 'Server' reference. + * + * + * @generated + * @ordered + */ + int FLOATING_LICENSE_ACCESS__SERVER = 1; + + /** + * The feature id for the 'Origin License Pack' attribute. + * + * + * @generated + * @ordered + */ + int FLOATING_LICENSE_ACCESS__ORIGIN_LICENSE_PACK = 2; + + /** + * The number of structural features of the 'License Access' class. + * + * + * @generated + * @ordered + */ + int FLOATING_LICENSE_ACCESS_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'License Access' class. + * + * + * @generated + * @ordered + */ + int FLOATING_LICENSE_ACCESS_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.passage.lic.floating.model.impl.FloatingServerConnectionImpl Server Connection}' class. + * + * + * @see org.eclipse.passage.lic.floating.model.impl.FloatingServerConnectionImpl + * @see org.eclipse.passage.lic.floating.model.impl.FloatingPackageImpl#getFloatingServerConnection() + * @generated + */ + int FLOATING_SERVER_CONNECTION = 11; + + /** + * The feature id for the 'Ip' attribute. + * + * + * @generated + * @ordered + */ + int FLOATING_SERVER_CONNECTION__IP = 0; + + /** + * The feature id for the 'Port' attribute. + * + * + * @generated + * @ordered + */ + int FLOATING_SERVER_CONNECTION__PORT = 1; + + /** + * The feature id for the 'Authentication' reference. + * + * + * @generated + * @ordered + */ + int FLOATING_SERVER_CONNECTION__AUTHENTICATION = 2; + + /** + * The number of structural features of the 'Server Connection' class. + * + * + * @generated + * @ordered + */ + int FLOATING_SERVER_CONNECTION_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Server Connection' class. + * + * + * @generated + * @ordered + */ + int FLOATING_SERVER_CONNECTION_OPERATION_COUNT = 0; + /** * Returns the meta object for class '{@link org.eclipse.passage.lic.floating.model.api.FloatingLicensePack License Pack}'. * @@ -981,6 +1091,92 @@ public interface FloatingPackage extends EPackage { */ EAttribute getVersionMatch_Rule(); + /** + * Returns the meta object for class '{@link org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess License Access}'. + * + * + * @return the meta object for class 'License Access'. + * @see org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess + * @generated + */ + EClass getFloatingLicenseAccess(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess#getUser User}'. + * + * + * @return the meta object for the attribute 'User'. + * @see org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess#getUser() + * @see #getFloatingLicenseAccess() + * @generated + */ + EAttribute getFloatingLicenseAccess_User(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess#getServer Server}'. + * + * + * @return the meta object for the reference 'Server'. + * @see org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess#getServer() + * @see #getFloatingLicenseAccess() + * @generated + */ + EReference getFloatingLicenseAccess_Server(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess#getOriginLicensePack Origin License Pack}'. + * + * + * @return the meta object for the attribute 'Origin License Pack'. + * @see org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess#getOriginLicensePack() + * @see #getFloatingLicenseAccess() + * @generated + */ + EAttribute getFloatingLicenseAccess_OriginLicensePack(); + + /** + * Returns the meta object for class '{@link org.eclipse.passage.lic.floating.model.api.FloatingServerConnection Server Connection}'. + * + * + * @return the meta object for class 'Server Connection'. + * @see org.eclipse.passage.lic.floating.model.api.FloatingServerConnection + * @generated + */ + EClass getFloatingServerConnection(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.passage.lic.floating.model.api.FloatingServerConnection#getIp Ip}'. + * + * + * @return the meta object for the attribute 'Ip'. + * @see org.eclipse.passage.lic.floating.model.api.FloatingServerConnection#getIp() + * @see #getFloatingServerConnection() + * @generated + */ + EAttribute getFloatingServerConnection_Ip(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.passage.lic.floating.model.api.FloatingServerConnection#getPort Port}'. + * + * + * @return the meta object for the attribute 'Port'. + * @see org.eclipse.passage.lic.floating.model.api.FloatingServerConnection#getPort() + * @see #getFloatingServerConnection() + * @generated + */ + EAttribute getFloatingServerConnection_Port(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.passage.lic.floating.model.api.FloatingServerConnection#getAuthentication Authentication}'. + * + * + * @return the meta object for the reference 'Authentication'. + * @see org.eclipse.passage.lic.floating.model.api.FloatingServerConnection#getAuthentication() + * @see #getFloatingServerConnection() + * @generated + */ + EReference getFloatingServerConnection_Authentication(); + /** * Returns the factory that creates the instances of the model. diff --git a/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/util/FloatingAdapterFactory.java b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/util/FloatingAdapterFactory.java index fa4710d3f..8baad5642 100644 --- a/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/util/FloatingAdapterFactory.java +++ b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/util/FloatingAdapterFactory.java @@ -16,6 +16,7 @@ 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.floating.model.api.*; import org.eclipse.passage.lic.floating.model.api.EvaluationInstructions; import org.eclipse.passage.lic.floating.model.api.FeatureGrant; import org.eclipse.passage.lic.floating.model.api.FloatingLicensePack; @@ -132,6 +133,16 @@ public Adapter caseVersionMatch(VersionMatch object) { return createVersionMatchAdapter(); } + @Override + public Adapter caseFloatingLicenseAccess(FloatingLicenseAccess object) { + return createFloatingLicenseAccessAdapter(); + } + + @Override + public Adapter caseFloatingServerConnection(FloatingServerConnection object) { + return createFloatingServerConnectionAdapter(); + } + @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); @@ -285,6 +296,34 @@ public Adapter createVersionMatchAdapter() { return null; } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess License Access}'. + * + * 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.floating.model.api.FloatingLicenseAccess + * @generated + */ + public Adapter createFloatingLicenseAccessAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.passage.lic.floating.model.api.FloatingServerConnection Server Connection}'. + * + * 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.floating.model.api.FloatingServerConnection + * @generated + */ + public Adapter createFloatingServerConnectionAdapter() { + return null; + } + /** * Creates a new adapter for the default case. * This diff --git a/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/util/FloatingSwitch.java b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/util/FloatingSwitch.java index 5ffb05d71..919b2fa30 100644 --- a/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/util/FloatingSwitch.java +++ b/bundles/org.eclipse.passage.lic.floating.model/src-gen/org/eclipse/passage/lic/floating/model/util/FloatingSwitch.java @@ -15,6 +15,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.passage.lic.floating.model.api.*; import org.eclipse.passage.lic.floating.model.api.EvaluationInstructions; import org.eclipse.passage.lic.floating.model.api.FeatureGrant; import org.eclipse.passage.lic.floating.model.api.FloatingLicensePack; @@ -152,6 +153,20 @@ protected T doSwitch(int classifierID, EObject theEObject) { result = defaultCase(theEObject); return result; } + case FloatingPackage.FLOATING_LICENSE_ACCESS: { + FloatingLicenseAccess floatingLicenseAccess = (FloatingLicenseAccess) theEObject; + T result = caseFloatingLicenseAccess(floatingLicenseAccess); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case FloatingPackage.FLOATING_SERVER_CONNECTION: { + FloatingServerConnection floatingServerConnection = (FloatingServerConnection) theEObject; + T result = caseFloatingServerConnection(floatingServerConnection); + if (result == null) + result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } @@ -289,6 +304,36 @@ public T caseVersionMatch(VersionMatch object) { return null; } + /** + * Returns the result of interpreting the object as an instance of 'License Access'. + * + * 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 'License Access'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFloatingLicenseAccess(FloatingLicenseAccess object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Server Connection'. + * + * 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 'Server Connection'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFloatingServerConnection(FloatingServerConnection object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'EObject'. * This implementation returns null; diff --git a/bundles/org.eclipse.passage.lic.licenses.model/model/licenses..genmodel b/bundles/org.eclipse.passage.lic.licenses.model/model/licenses..genmodel index 0d7fcd704..13a6b858f 100644 --- a/bundles/org.eclipse.passage.lic.licenses.model/model/licenses..genmodel +++ b/bundles/org.eclipse.passage.lic.licenses.model/model/licenses..genmodel @@ -11,7 +11,7 @@ importerID="org.eclipse.emf.importer.ecore" complianceLevel="8.0" copyrightFields="false" editPluginID="org.eclipse.passage.lic.licenses.edit" editorPluginID="org.eclipse.passage.lic.licenses.editor" language="" operationReflection="true" runtimePlatform="RCP" importOrganizing="true" - cleanup="true" oSGiCompatible="true"> + pluginKey="licenses" cleanup="true" oSGiCompatible="true"> platform:/resource/org.eclipse.passage.lic.licenses.ecore/model/licenses.ecore