Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

572623 redesign license containment #713

Merged
merged 14 commits into from
Apr 7, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 56 additions & 1 deletion bundles/org.eclipse.passage.lic.licenses.edit/plugin.properties
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
pluginName = Passage LIC Licenses Edit Support
providerName=Eclipse Passage

Bundle-Copyright = Copyright (c) 2018, 2020 ArSysOp and others.\n\
Bundle-Copyright = Copyright (c) 2018, 2021 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\
@@ -74,3 +74,58 @@ _UI_LicensePlanFeature_matchRule_feature = Match Rule
_UI_LicensePlanFeature_licensePlan_feature = License Plan
_UI_LicensePlan_text_pattern={1} ({0})
_UI_LicensePlanFeature_text_pattern={0} ({1})
_UI_FloatingLicensePack_type = Floating License Pack
_UI_LicenseRequisites_type = License Requisites
_UI_ProductRef_type = Product Ref
_UI_FloatingServer_type = Floating 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_FloatingLicenseAccess_type = Floating License Access
_UI_FloatingServerConnection_type = Floating Server Connection
_UI_GrantAcqisition_type = Grant Acqisition
_UI_LicensePlan_personal_feature = Personal
_UI_LicensePlan_floating_feature = Floating
_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_vivid_feature = Vivid
_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_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
_UI_GrantAcqisition_identifier_feature = Identifier
_UI_GrantAcqisition_feature_feature = Feature
_UI_GrantAcqisition_grant_feature = Grant
_UI_GrantAcqisition_user_feature = User
_UI_GrantAcqisition_created_feature = Created
2 changes: 1 addition & 1 deletion bundles/org.eclipse.passage.lic.licenses.edit/plugin.xml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
<extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
<!-- @generated licenses. -->
<factory
uri="http://www.eclipse.org/passage/lic/licenses/1.0.0"
uri="http://www.eclipse.org/passage/lic/licenses/1.1.0"
class="org.eclipse.passage.lic.licenses.edit.providers.LicensesItemProviderAdapterFactory"
supportedTypes=
"org.eclipse.emf.edit.provider.IEditingDomainItemProvider
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
/*******************************************************************************
* 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.licenses.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.licenses.edit.LicensesEditPlugin;

import org.eclipse.passage.lic.licenses.model.api.EvaluationInstructions;

import org.eclipse.passage.lic.licenses.model.meta.LicensesPackage;

/**
* This is the item provider adapter for a {@link org.eclipse.passage.lic.licenses.model.api.EvaluationInstructions} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class EvaluationInstructionsItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EvaluationInstructionsItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}

/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);

addTypePropertyDescriptor(object);
addExpressionPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}

/**
* This adds a property descriptor for the Type feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addTypePropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_EvaluationInstructions_type_feature"), //$NON-NLS-1$
getString("_UI_PropertyDescriptor_description", "_UI_EvaluationInstructions_type_feature", //$NON-NLS-1$//$NON-NLS-2$
"_UI_EvaluationInstructions_type"), //$NON-NLS-1$
LicensesPackage.eINSTANCE.getEvaluationInstructions_Type(), true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}

/**
* This adds a property descriptor for the Expression feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addExpressionPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_EvaluationInstructions_expression_feature"), //$NON-NLS-1$
getString("_UI_PropertyDescriptor_description", "_UI_EvaluationInstructions_expression_feature", //$NON-NLS-1$//$NON-NLS-2$
"_UI_EvaluationInstructions_type"), //$NON-NLS-1$
LicensesPackage.eINSTANCE.getEvaluationInstructions_Expression(), true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}

/**
* This returns EvaluationInstructions.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/EvaluationInstructions")); //$NON-NLS-1$
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected boolean shouldComposeCreationImage() {
return true;
}

/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((EvaluationInstructions) object).getType();
return label == null || label.length() == 0 ? getString("_UI_EvaluationInstructions_type") : //$NON-NLS-1$
getString("_UI_EvaluationInstructions_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}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);

switch (notification.getFeatureID(EvaluationInstructions.class)) {
case LicensesPackage.EVALUATION_INSTRUCTIONS__TYPE:
case LicensesPackage.EVALUATION_INSTRUCTIONS__EXPRESSION:
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.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}

/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return LicensesEditPlugin.INSTANCE;
}

}
Loading