Skip to content

Commit

Permalink
Merge pull request #854 from eclipse-passage/575160
Browse files Browse the repository at this point in the history
Bug 575160  Attach LAs to FeatureVersion
  • Loading branch information
eparovyshnaya authored Aug 3, 2021
2 parents a052a74 + 94b0855 commit 704cfe6
Show file tree
Hide file tree
Showing 31 changed files with 284 additions and 306 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,9 @@ public final void postLoad(XMLResource resource, InputStream inputStream, Map<?,
throw new RuntimeException(message, e);
}
}
evaporizeUnknownParticles(resource);
complete(resource);
}

private void evaporizeUnknownParticles(XMLResource resource) {

}

protected void convertEntry(Entry<EObject, AnyType> entry) throws MigrationException {
new RecognizeFeatures(entry.getValue(), attributes()).apply(entry.getKey());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Automatic-Module-Name: org.eclipse.passage.lic.features.ecore
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.passage.lic.features.ecore
Bundle-Version: 0.5.300.qualifier
Bundle-Version: 2.0.0.qualifier
Bundle-Name: %Bundle-Name
Bundle-Vendor: %Bundle-Vendor
Bundle-Copyright: %Bundle-Copyright
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Properties file for org.eclipse.passage.lic.features.ecore
###############################################################################
# Copyright (c) 2018, 2020 ArSysOp and others
# Copyright (c) 2018, 2021 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
Expand All @@ -14,7 +14,7 @@

Bundle-Name = Passage LIC Features Ecore
Bundle-Vendor = 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\
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="features" nsURI="http://www.eclipse.org/passage/lic/features/0.5.0"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="features" nsURI="http://www.eclipse.org/passage/lic/features/2.0.0"
nsPrefix="features">
<eClassifiers xsi:type="ecore:EClass" name="FeatureSetDescriptor" instanceClassName="org.eclipse.passage.lic.features.FeatureSetDescriptor"
abstract="true" interface="true"/>
Expand Down Expand Up @@ -33,5 +33,11 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="feature" lowerBound="1"
eType="#//Feature" eOpposite="#//Feature/featureVersions"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="news" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="agreements" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="@since 2.0"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
</ecore:EPackage>
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ Manifest-Version: 1.0
Automatic-Module-Name: org.eclipse.passage.lic.features.edit
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.passage.lic.features.edit;singleton:=true
Bundle-Version: 1.0.200.qualifier
Bundle-Version: 2.0.0.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Copyright: %Bundle-Copyright
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.core.runtime;bundle-version="0.0.0";resolution:=optional;x-installation:=greedy,
Require-Bundle: org.eclipse.core.runtime;bundle-version="0.0.0";x-installation:=greedy;resolution:=optional,
org.eclipse.passage.lic.features.model;bundle-version="1.0.0";visibility:=reexport,
org.eclipse.emf.edit;bundle-version="0.0.0";visibility:=reexport
Import-Package: org.osgi.framework
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,4 @@ _UI_Unknown_feature = Unspecified
_UI_FeatureSet_text_pattern = {1} ({0})
_UI_FeatureVersion_text_pattern = {0} {1}
_UI_Feature_provider_feature = Provider
_UI_FeatureVersion_agreements_feature = Agreements
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.eclipse.passage.lic.features.edit/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
<!-- @generated features -->
<factory
uri="http://www.eclipse.org/passage/lic/features/0.5.0"
uri="http://www.eclipse.org/passage/lic/features/2.0.0"
class="org.eclipse.passage.lic.features.edit.providers.FeaturesItemProviderAdapterFactory"
supportedTypes=
"org.eclipse.emf.edit.provider.IEditingDomainItemProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {

addVersionPropertyDescriptor(object);
addNewsPropertyDescriptor(object);
addAgreementsPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
Expand Down Expand Up @@ -105,6 +106,23 @@ protected void addNewsPropertyDescriptor(Object object) {
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}

/**
* This adds a property descriptor for the Agreements feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @since 2.0
* @generated
*/
protected void addAgreementsPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_FeatureVersion_agreements_feature"), //$NON-NLS-1$
getString("_UI_PropertyDescriptor_description", "_UI_FeatureVersion_agreements_feature", //$NON-NLS-1$//$NON-NLS-2$
"_UI_FeatureVersion_type"), //$NON-NLS-1$
FeaturesPackage.eINSTANCE.getFeatureVersion_Agreements(), true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}

/**
* This returns Feature.gif.
*
Expand Down Expand Up @@ -169,6 +187,7 @@ public void notifyChanged(Notification notification) {
switch (notification.getFeatureID(FeatureVersion.class)) {
case FeaturesPackage.FEATURE_VERSION__VERSION:
case FeaturesPackage.FEATURE_VERSION__NEWS:
case FeaturesPackage.FEATURE_VERSION__AGREEMENTS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
default:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.passage.lic.features.model" version="2">
<resource path="src-gen/org/eclipse/passage/lic/features/model/util/FeaturesResourceFactoryImpl.java" type="org.eclipse.passage.lic.features.model.util.FeaturesResourceFactoryImpl">
<filter id="1108344834">
<message_arguments>
<message_argument value="1.1"/>
<message_argument value="2.0"/>
<message_argument value="org.eclipse.passage.lic.features.model.util.FeaturesResourceFactoryImpl"/>
</message_arguments>
</filter>
</resource>
<resource path="src-gen/org/eclipse/passage/lic/features/model/util/FeaturesResourceImpl.java" type="org.eclipse.passage.lic.features.model.util.FeaturesResourceImpl">
<filter id="1108344834">
<message_arguments>
<message_argument value="1.1"/>
<message_argument value="2.0"/>
<message_argument value="org.eclipse.passage.lic.features.model.util.FeaturesResourceImpl"/>
</message_arguments>
</filter>
</resource>
</component>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Automatic-Module-Name: org.eclipse.passage.lic.features.model
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.passage.lic.features.model;singleton:=true
Bundle-Version: 1.1.0.qualifier
Bundle-Version: 2.0.0.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Copyright: %Bundle-Copyright
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ../../org.eclipse.passage.lic.features.ecore/model/features.ecore#//FeatureVersion/version"/>
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference ../../org.eclipse.passage.lic.features.ecore/model/features.ecore#//FeatureVersion/feature"/>
<genFeatures createChild="false" propertyMultiLine="true" ecoreFeature="ecore:EAttribute ../../org.eclipse.passage.lic.features.ecore/model/features.ecore#//FeatureVersion/news"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ../../org.eclipse.passage.lic.features.ecore/model/features.ecore#//FeatureVersion/agreements"/>
</genClasses>
</genPackages>
</genmodel:GenModel>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Properties file for org.eclipse.passage.lic.features.model
###############################################################################
# Copyright (c) 2018, 2020 ArSysOp and others
# Copyright (c) 2018, 2021 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
Expand All @@ -14,7 +14,7 @@

pluginName = Passage LIC Features Model
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\
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.eclipse.passage.lic.features.model/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<extension point="org.eclipse.emf.ecore.generated_package">
<!-- @generated features -->
<package
uri="http://www.eclipse.org/passage/lic/features/0.5.0"
uri="http://www.eclipse.org/passage/lic/features/2.0.0"
class="org.eclipse.passage.lic.features.model.meta.FeaturesPackage"
genModel="model/features.genmodel"/>
</extension>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018, 2020 ArSysOp
* Copyright (c) 2018, 2021 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -13,14 +13,14 @@
package org.eclipse.passage.lic.features.model.api;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EObject;

import org.eclipse.passage.lic.features.FeatureDescriptor;

/**
* <!-- begin-user-doc -->
*
* A representation of the model object '<em><b>Feature</b></em>'.
*
* <!-- end-user-doc -->
*
* <p>
Expand All @@ -43,10 +43,6 @@ public interface Feature extends EObject, FeatureDescriptor {
/**
* Returns the value of the '<em><b>Identifier</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Identifier</em>' attribute isn't clear, there
* really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Identifier</em>' attribute.
* @see #setIdentifier(String)
Expand All @@ -60,7 +56,6 @@ public interface Feature extends EObject, FeatureDescriptor {
/**
* Sets the value of the '{@link org.eclipse.passage.lic.features.model.api.Feature#getIdentifier <em>Identifier</em>}' attribute.
* <!-- begin-user-doc -->
*
* <!-- end-user-doc -->
* @param value the new value of the '<em>Identifier</em>' attribute.
* @see #getIdentifier()
Expand Down Expand Up @@ -94,10 +89,6 @@ public interface Feature extends EObject, FeatureDescriptor {
/**
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Name</em>' attribute isn't clear, there really
* should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
Expand All @@ -111,7 +102,6 @@ public interface Feature extends EObject, FeatureDescriptor {
/**
* Sets the value of the '{@link org.eclipse.passage.lic.features.model.api.Feature#getName <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
*
* <!-- end-user-doc -->
* @param value the new value of the '<em>Name</em>' attribute.
* @see #getName()
Expand All @@ -122,10 +112,6 @@ public interface Feature extends EObject, FeatureDescriptor {
/**
* Returns the value of the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Description</em>' attribute isn't clear, there
* really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Description</em>' attribute.
* @see #setDescription(String)
Expand All @@ -139,7 +125,6 @@ public interface Feature extends EObject, FeatureDescriptor {
/**
* Sets the value of the '{@link org.eclipse.passage.lic.features.model.api.Feature#getDescription <em>Description</em>}' attribute.
* <!-- begin-user-doc -->
*
* <!-- end-user-doc -->
* @param value the new value of the '<em>Description</em>' attribute.
* @see #getDescription()
Expand All @@ -151,10 +136,6 @@ public interface Feature extends EObject, FeatureDescriptor {
* Returns the value of the '<em><b>Feature Set</b></em>' container reference.
* It is bidirectional and its opposite is '{@link org.eclipse.passage.lic.features.model.api.FeatureSet#getFeatures <em>Features</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Feature Set</em>' container reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Feature Set</em>' container reference.
* @see #setFeatureSet(FeatureSet)
Expand All @@ -169,7 +150,6 @@ public interface Feature extends EObject, FeatureDescriptor {
/**
* Sets the value of the '{@link org.eclipse.passage.lic.features.model.api.Feature#getFeatureSet <em>Feature Set</em>}' container reference.
* <!-- begin-user-doc -->
*
* <!-- end-user-doc -->
* @param value the new value of the '<em>Feature Set</em>' container reference.
* @see #getFeatureSet()
Expand All @@ -182,10 +162,6 @@ public interface Feature extends EObject, FeatureDescriptor {
* The list contents are of type {@link org.eclipse.passage.lic.features.model.api.FeatureVersion}.
* It is bidirectional and its opposite is '{@link org.eclipse.passage.lic.features.model.api.FeatureVersion#getFeature <em>Feature</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Feature Versions</em>' containment reference list
* isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Feature Versions</em>' containment reference list.
* @see org.eclipse.passage.lic.features.model.meta.FeaturesPackage#getFeature_FeatureVersions()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018, 2020 ArSysOp
* Copyright (c) 2018, 2021 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -13,14 +13,14 @@
package org.eclipse.passage.lic.features.model.api;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EObject;

import org.eclipse.passage.lic.features.FeatureSetDescriptor;

/**
* <!-- begin-user-doc -->
*
* A representation of the model object '<em><b>Feature Set</b></em>'.
*
* <!-- end-user-doc -->
*
* <p>
Expand All @@ -41,10 +41,6 @@ public interface FeatureSet extends EObject, FeatureSetDescriptor {
/**
* Returns the value of the '<em><b>Identifier</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Identifier</em>' attribute isn't clear, there
* really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Identifier</em>' attribute.
* @see #setIdentifier(String)
Expand All @@ -58,7 +54,6 @@ public interface FeatureSet extends EObject, FeatureSetDescriptor {
/**
* Sets the value of the '{@link org.eclipse.passage.lic.features.model.api.FeatureSet#getIdentifier <em>Identifier</em>}' attribute.
* <!-- begin-user-doc -->
*
* <!-- end-user-doc -->
* @param value the new value of the '<em>Identifier</em>' attribute.
* @see #getIdentifier()
Expand All @@ -69,10 +64,6 @@ public interface FeatureSet extends EObject, FeatureSetDescriptor {
/**
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Name</em>' attribute isn't clear, there really
* should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
Expand All @@ -86,7 +77,6 @@ public interface FeatureSet extends EObject, FeatureSetDescriptor {
/**
* Sets the value of the '{@link org.eclipse.passage.lic.features.model.api.FeatureSet#getName <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
*
* <!-- end-user-doc -->
* @param value the new value of the '<em>Name</em>' attribute.
* @see #getName()
Expand All @@ -97,10 +87,6 @@ public interface FeatureSet extends EObject, FeatureSetDescriptor {
/**
* Returns the value of the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Description</em>' attribute isn't clear, there
* really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Description</em>' attribute.
* @see #setDescription(String)
Expand All @@ -114,7 +100,6 @@ public interface FeatureSet extends EObject, FeatureSetDescriptor {
/**
* Sets the value of the '{@link org.eclipse.passage.lic.features.model.api.FeatureSet#getDescription <em>Description</em>}' attribute.
* <!-- begin-user-doc -->
*
* <!-- end-user-doc -->
* @param value the new value of the '<em>Description</em>' attribute.
* @see #getDescription()
Expand All @@ -127,10 +112,6 @@ public interface FeatureSet extends EObject, FeatureSetDescriptor {
* The list contents are of type {@link org.eclipse.passage.lic.features.model.api.Feature}.
* It is bidirectional and its opposite is '{@link org.eclipse.passage.lic.features.model.api.Feature#getFeatureSet <em>Feature Set</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Features</em>' containment reference list isn't
* clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Features</em>' containment reference list.
* @see org.eclipse.passage.lic.features.model.meta.FeaturesPackage#getFeatureSet_Features()
Expand Down
Loading

0 comments on commit 704cfe6

Please sign in to comment.