Skip to content

Commit

Permalink
[581348] Provide support for locating generator models via MANIFEST.MF
Browse files Browse the repository at this point in the history
registration
  • Loading branch information
merks committed Jan 13, 2023
1 parent ad70aa0 commit 48f82c1
Show file tree
Hide file tree
Showing 36 changed files with 216 additions and 137 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*/*/*/target/
**/.oracle_jre_usage
.DS_Store
**/.tycho-consumer-pom.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2018-09.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2018-12.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2019-03.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2019-06.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2019-09.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2019-12.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2020-03.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2020-06.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2020-09.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2020-12.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2021-03.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2021-06.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2021-09.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2021-12.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2022-03.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2022-06.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2022-09.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2022-12.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/2023-03.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/helios.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/indigo.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/juno.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/kepler.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/luna.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/mars.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/neon.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/oxygen.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
1 change: 1 addition & 0 deletions releng/org.eclipse.emf.parent/tp/photon.target
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">

<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="0.0.0"/>

<unit id="com.google.appengine.eclipse.sdkbundle" version="0.0.0"/>
<unit id="com.google.gwt.eclipse.sdkbundle" version="0.0.0"/>
Expand Down
2 changes: 2 additions & 0 deletions tests/org.eclipse.emf.test.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Export-Package: org.eclipse.emf.test.core,
org.eclipse.emf.test.core.xrefsopposite.util
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.6.0,4.0.0)",
org.eclipse.pde.core;bundle-version="[3.6.0,4.0.0)",
org.eclipse.emf.ecore;bundle-version="[2.33.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.ecore.change;bundle-version="[2.15.0,3.0.0)",
org.eclipse.emf.ecore.xmi;bundle-version="[2.18.0,3.0.0)";visibility:=reexport,
Expand All @@ -37,3 +38,4 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
Eclipse-LazyStart: true
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.eclipse.emf.test.core
Provide-Capability: org.eclipse.emf.ecore.generated_package;uri="http:///org.eclipse.emf.test.models/provide-capability";class="org.eclipse.emf.models.provideCapability.ProvideCapabilityTestPackage";genModel="model/ProvideCapability/ProvideCapability.genmodel"
2 changes: 2 additions & 0 deletions tests/org.eclipse.emf.test.core/META-INF/p2.inf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
requires.1.name = org.eclipse.equinox.core.sdk.feature.group
requires.1.namespace = org.eclipse.equinox.p2.iu
3 changes: 2 additions & 1 deletion tests/org.eclipse.emf.test.core/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ bin.includes = .,\
about.html,\
plugin.properties,\
data/,\
META-INF/
META-INF/,\
model/
src.includes = about.html, \
Test EMF Core.launch
source.. = src/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +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="provideCapabilityTest" nsURI="http:///org.eclipse.emf.test.models/provide-capability"
nsPrefix="provideCapabilityTest">
<eClassifiers xsi:type="ecore:EClass" name="TestProvideCapability"/>
</ecore:EPackage>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel"
modelDirectory="" modelPluginID="org.eclipse.emf.test.common" modelName="ProvideCapability"
rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" importerID="org.eclipse.emf.importer.ecore"
complianceLevel="5.0" copyrightFields="false" testsPluginID="org.eclipse.emf.test.common.tests"
operationReflection="true" importOrganizing="true">
<foreignModel>ProvideCapability.ecore</foreignModel>
<genPackages prefix="ProvideCapabilityTest" basePackage="org.eclipse.emf.test.models.provideCapability"
disposableProviderFactory="true" ecorePackage="ProvideCapability.ecore#/">
<genClasses ecoreClass="ProvideCapability.ecore#//TestProvideCapability"/>
</genPackages>
</genmodel:GenModel>
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.Map;
import java.util.Map.Entry;

import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterImpl;
Expand All @@ -40,13 +41,17 @@
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.change.ChangeFactory;
import org.eclipse.emf.ecore.change.ChangePackage;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl;
import org.eclipse.emf.ecore.resource.impl.ResourceImpl;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.EcoreUtil.EqualityHelper;
import org.junit.Test;
import org.osgi.framework.FrameworkUtil;
import org.osgi.framework.Version;

public class EcoreTest
{
Expand Down Expand Up @@ -394,4 +399,23 @@ public void testEcoreEMap()
Map.Entry<?, ?> badMapEntry = (Entry<?, ?>)ChangeFactory.eINSTANCE.create(ChangePackage.Literals.EOBJECT_TO_CHANGES_MAP_ENTRY);
assertFalse("The dynamic Map.Entry type should check the dynamic type of the instance.", detailsEStructuralFeature.getEType().isInstance(badMapEntry));
}

@Test
public void testProvideCapabilityRegistration()
{
if (FrameworkUtil.getBundle(Platform.class).getVersion().compareTo(Version.parseVersion("3.26.100")) >=0)
{
Map<String, URI> ePackageNsURIToGenModelLocationMap = EcorePlugin.getEPackageNsURIToGenModelLocationMap(true);
assertTrue(
"The nsURI registered by Provide-Capability in the org.eclipse.emf.test.common's MANIFEST.MF should be available",
ePackageNsURIToGenModelLocationMap.containsKey("http:///org.eclipse.emf.test.models/provide-capability"));
ExtensibleURIConverterImpl uriConverter = new ExtensibleURIConverterImpl();
Map<URI, URI> uriMap = uriConverter.getURIMap();
uriMap.putAll(EcorePlugin.computePlatformURIMap(true));
URI uri = ePackageNsURIToGenModelLocationMap.get("http:///org.eclipse.emf.test.models/provide-capability");
assertTrue(
"The nsURI registered by Provide-Capability in the org.eclipse.emf.test.common's MANIFEST.MF should refer to an existing GenModel: '" + uri + "'",
uriConverter.exists(uri, null));
}
}
}

0 comments on commit 48f82c1

Please sign in to comment.