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

Bug 567032 issue floating license configuration wizard #511

Merged
merged 1 commit into from
Nov 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
23 changes: 13 additions & 10 deletions bundles/org.eclipse.passage.lic.floating.ecore/model/floating.ecore
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
nsPrefix="org.eclipse.passage.lic">
<eClassifiers xsi:type="ecore:EClass" name="FloatingLicensePack">
<eStructuralFeatures xsi:type="ecore:EReference" name="license" lowerBound="1"
eType="#//LicenseRequisites"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="host" lowerBound="1" eType="#//FloatingServer"/>
eType="#//LicenseRequisites" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="host" lowerBound="1" eType="#//FloatingServer"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="users" lowerBound="1" upperBound="-1"
eType="#//UserGrant"/>
eType="#//UserGrant" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="features" lowerBound="1"
upperBound="-1" eType="#//FeatureGrant" eOpposite="#//FeatureGrant/pack"/>
upperBound="-1" eType="#//FeatureGrant" containment="true" eOpposite="#//FeatureGrant/pack"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="LicenseRequisites">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="identifier" lowerBound="1"
Expand All @@ -20,8 +21,9 @@
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="plan" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="product" lowerBound="1"
eType="#//ProductRef"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="valid" lowerBound="1" eType="#//ValidityPeriod"/>
eType="#//ProductRef" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="valid" lowerBound="1" eType="#//ValidityPeriod"
containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ProductRef">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="product" lowerBound="1"
Expand All @@ -33,21 +35,22 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="identifier" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" iD="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="authentication" ordered="false"
unique="false" lowerBound="1" eType="#//EvaluationInstructions"/>
unique="false" lowerBound="1" eType="#//EvaluationInstructions" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="UserGrant">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="user" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="authentication" lowerBound="1"
eType="#//EvaluationInstructions"/>
eType="#//EvaluationInstructions" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="FeatureGrant">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="identifier" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" iD="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="feature" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="version" lowerBound="1"
eType="#//VersionMatch"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="valid" lowerBound="1" eType="#//ValidityPeriod"/>
eType="#//VersionMatch" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="valid" lowerBound="1" eType="#//ValidityPeriod"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="vivid" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="capacity" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,9 @@ protected boolean shouldComposeCreationImage() {
*/
@Override
public String getText(Object object) {
EvaluationInstructions eval = (EvaluationInstructions) object;
return getString("_UI_EvaluationInstructions_type_detailed", //$NON-NLS-1$
new Object[] { //
new GetOrUnknown(eval.getExpression()).get(), //
new GetOrUnknown(eval.getType()).get()//
});
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$
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,6 @@ protected void addOriginLicensePackPropertyDescriptor(Object object) {
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}

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

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,6 @@ protected void addAuthenticationPropertyDescriptor(Object object) {
null));
}

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

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,9 @@ public String getText(Object object) {
.orElse("unknown"); //$NON-NLS-1$
return getString("_UI_LicenseRequisites_type_detailed", //$NON-NLS-1$
new Object[] { //
company,//
product,//
version
});
company, //
product, //
version });
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
package org.eclipse.passage.lic.floating.edit.providers;

import java.util.Collection;
import java.util.Date;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
Expand Down Expand Up @@ -117,12 +118,10 @@ protected boolean shouldComposeCreationImage() {
*/
@Override
public String getText(Object object) {
ValidityPeriodClosed period = (ValidityPeriodClosed) object;
return getString("_UI_ValidityPeriodClosed_type_detailed", //$NON-NLS-1$
new Object[] { //
new DatePrinted(period.getFrom()).get(), //
new DatePrinted(period.getUntil()).get() //
});
Date labelValue = ((ValidityPeriodClosed) object).getFrom();
String label = labelValue == null ? null : labelValue.toString();
return label == null || label.length() == 0 ? getString("_UI_ValidityPeriodClosed_type") : //$NON-NLS-1$
getString("_UI_ValidityPeriodClosed_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ Export-Package: org.eclipse.passage.lic.floating.model.api;
org.eclipse.passage.lic.floating.edit,
org.eclipse.passage.loc.licenses.core,
org.eclipse.passage.loc.floating.emfforms",
org.eclipse.passage.lic.floating.model.util;x-friends:="org.eclipse.passage.lic.floating.edit",
org.eclipse.passage.lic.internal.floating.model;x-friends:="org.eclipse.passage.loc.dashboard.ui"
org.eclipse.passage.lic.floating.model.util;
x-friends:="org.eclipse.passage.lic.floating.edit",
org.eclipse.passage.lic.internal.floating.model;
x-friends:="org.eclipse.passage.loc.dashboard.ui"
Bundle-ClassPath: .
Bundle-ActivationPolicy: lazy
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ public interface FeatureGrant extends EObject {
VersionMatch getVersion();

/**
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FeatureGrant#getVersion <em>Version</em>}' reference.
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FeatureGrant#getVersion <em>Version</em>}' containment reference.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @param value the new value of the '<em>Version</em>' reference.
* @param value the new value of the '<em>Version</em>' containment reference.
* @see #getVersion()
* @generated
*/
Expand All @@ -115,9 +115,9 @@ public interface FeatureGrant extends EObject {
ValidityPeriod getValid();

/**
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FeatureGrant#getValid <em>Valid</em>}' reference.
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FeatureGrant#getValid <em>Valid</em>}' containment reference.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @param value the new value of the '<em>Valid</em>' reference.
* @param value the new value of the '<em>Valid</em>' containment reference.
* @see #getValid()
* @generated
*/
Expand Down Expand Up @@ -167,22 +167,22 @@ public interface FeatureGrant extends EObject {
void setCapacity(int value);

/**
* Returns the value of the '<em><b>Pack</b></em>' reference.
* Returns the value of the '<em><b>Pack</b></em>' container reference.
* It is bidirectional and its opposite is '{@link org.eclipse.passage.lic.floating.model.api.FloatingLicensePack#getFeatures <em>Features</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @return the value of the '<em>Pack</em>' reference.
* @return the value of the '<em>Pack</em>' container reference.
* @see #setPack(FloatingLicensePack)
* @see org.eclipse.passage.lic.floating.model.meta.FloatingPackage#getFeatureGrant_Pack()
* @see org.eclipse.passage.lic.floating.model.api.FloatingLicensePack#getFeatures
* @model opposite="features" required="true"
* @model opposite="features" required="true" transient="false"
* @generated
*/
FloatingLicensePack getPack();

/**
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FeatureGrant#getPack <em>Pack</em>}' reference.
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FeatureGrant#getPack <em>Pack</em>}' container reference.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @param value the new value of the '<em>Pack</em>' reference.
* @param value the new value of the '<em>Pack</em>' container reference.
* @see #getPack()
* @generated
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public interface FloatingLicensePack extends EObject {
LicenseRequisites getLicense();

/**
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FloatingLicensePack#getLicense <em>License</em>}' reference.
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FloatingLicensePack#getLicense <em>License</em>}' containment reference.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @param value the new value of the '<em>License</em>' reference.
* @param value the new value of the '<em>License</em>' containment reference.
* @see #getLicense()
* @generated
*/
Expand All @@ -68,9 +68,9 @@ public interface FloatingLicensePack extends EObject {
FloatingServer getHost();

/**
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FloatingLicensePack#getHost <em>Host</em>}' reference.
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FloatingLicensePack#getHost <em>Host</em>}' containment reference.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @param value the new value of the '<em>Host</em>' reference.
* @param value the new value of the '<em>Host</em>' containment reference.
* @see #getHost()
* @generated
*/
Expand All @@ -90,14 +90,14 @@ public interface FloatingLicensePack extends EObject {
EList<UserGrant> getUsers();

/**
* Returns the value of the '<em><b>Features</b></em>' reference list.
* Returns the value of the '<em><b>Features</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.passage.lic.floating.model.api.FeatureGrant}.
* It is bidirectional and its opposite is '{@link org.eclipse.passage.lic.floating.model.api.FeatureGrant#getPack <em>Pack</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @return the value of the '<em>Features</em>' reference list.
* @return the value of the '<em>Features</em>' containment reference list.
* @see org.eclipse.passage.lic.floating.model.meta.FloatingPackage#getFloatingLicensePack_Features()
* @see org.eclipse.passage.lic.floating.model.api.FeatureGrant#getPack
* @model opposite="pack" required="true"
* @model opposite="pack" containment="true" required="true"
* @generated
*/
EList<FeatureGrant> getFeatures();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ public interface FloatingServer extends EObject {
EvaluationInstructions getAuthentication();

/**
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FloatingServer#getAuthentication <em>Authentication</em>}' reference.
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.FloatingServer#getAuthentication <em>Authentication</em>}' containment reference.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
* @param value the new value of the '<em>Authentication</em>' reference.
* @param value the new value of the '<em>Authentication</em>' containment reference.
* @see #getAuthentication()
* @generated
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ public interface LicenseRequisites extends EObject {
ProductRef getProduct();

/**
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.LicenseRequisites#getProduct <em>Product</em>}' reference.
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.LicenseRequisites#getProduct <em>Product</em>}' containment reference.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @param value the new value of the '<em>Product</em>' reference.
* @param value the new value of the '<em>Product</em>' containment reference.
* @see #getProduct()
* @generated
*/
Expand All @@ -161,9 +161,9 @@ public interface LicenseRequisites extends EObject {
ValidityPeriod getValid();

/**
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.LicenseRequisites#getValid <em>Valid</em>}' reference.
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.LicenseRequisites#getValid <em>Valid</em>}' containment reference.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @param value the new value of the '<em>Valid</em>' reference.
* @param value the new value of the '<em>Valid</em>' containment reference.
* @see #getValid()
* @generated
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ public interface UserGrant extends EObject {
EvaluationInstructions getAuthentication();

/**
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.UserGrant#getAuthentication <em>Authentication</em>}' reference.
* Sets the value of the '{@link org.eclipse.passage.lic.floating.model.api.UserGrant#getAuthentication <em>Authentication</em>}' containment reference.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
* @param value the new value of the '<em>Authentication</em>' reference.
* @param value the new value of the '<em>Authentication</em>' containment reference.
* @see #getAuthentication()
* @generated
*/
Expand Down
Loading