5668 - Plugin version match on fragments too restrictive (add match to fragments)
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/plugins/IModel.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/plugins/IModel.java index 3de486e..76ca625 100644 --- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/plugins/IModel.java +++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/plugins/IModel.java
@@ -23,6 +23,11 @@ public static final String FRAGMENT_VERSION = "version"; public static final String FRAGMENT_PLUGIN_ID = "plugin-id"; public static final String FRAGMENT_PLUGIN_VERSION = "plugin-version"; + public static final String FRAGMENT_PLUGIN_MATCH = "match"; + public static final String FRAGMENT_PLUGIN_MATCH_PERFECT = "perfect"; + public static final String FRAGMENT_PLUGIN_MATCH_EQUIVALENT = "equivalent"; + public static final String FRAGMENT_PLUGIN_MATCH_COMPATIBLE = "compatible"; + public static final String FRAGMENT_PLUGIN_MATCH_GREATER_OR_EQUAL = "greaterOrEqual"; public static final String PLUGIN = "plugin"; public static final String PLUGIN_ID = "id";
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/plugins/PluginParser.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/plugins/PluginParser.java index 89953bf..38a9230 100644 --- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/plugins/PluginParser.java +++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/plugins/PluginParser.java
@@ -741,23 +741,30 @@ if (attrName.equals(FRAGMENT_ID)) current.setId(attrValue); - else - if (attrName.equals(FRAGMENT_NAME)) - current.setName(attrValue); + else if (attrName.equals(FRAGMENT_NAME)) + current.setName(attrValue); + else if (attrName.equals(FRAGMENT_VERSION)) + current.setVersion(attrValue); + else if (attrName.equals(FRAGMENT_PROVIDER)) + current.setProviderName(attrValue); + else if (attrName.equals(FRAGMENT_PLUGIN_ID)) + current.setPlugin(attrValue); + else if (attrName.equals(FRAGMENT_PLUGIN_VERSION)) + current.setPluginVersion(attrValue); + else if (attrName.equals(FRAGMENT_PLUGIN_MATCH)) { + if (FRAGMENT_PLUGIN_MATCH_PERFECT.equals(attrValue)) + current.setMatch(PluginFragmentModel.FRAGMENT_MATCH_PERFECT); + else if (FRAGMENT_PLUGIN_MATCH_EQUIVALENT.equals(attrValue)) + current.setMatch(PluginFragmentModel.FRAGMENT_MATCH_EQUIVALENT); + else if (FRAGMENT_PLUGIN_MATCH_COMPATIBLE.equals(attrValue)) + current.setMatch(PluginFragmentModel.FRAGMENT_MATCH_COMPATIBLE); + else if (FRAGMENT_PLUGIN_MATCH_GREATER_OR_EQUAL.equals(attrValue)) + current.setMatch(PluginFragmentModel.FRAGMENT_MATCH_GREATER_OR_EQUAL); else - if (attrName.equals(FRAGMENT_VERSION)) - current.setVersion(attrValue); - else - if (attrName.equals(FRAGMENT_PROVIDER)) - current.setProviderName(attrValue); - else - if (attrName.equals(FRAGMENT_PLUGIN_ID)) - current.setPlugin(attrValue); - else - if (attrName.equals(FRAGMENT_PLUGIN_VERSION)) - current.setPluginVersion(attrValue); - else - internalError(Policy.bind("parse.unknownAttribute", FRAGMENT, attrName)); + internalError(Policy.bind("parse.validMatch", attrValue)); + } + else + internalError(Policy.bind("parse.unknownAttribute", FRAGMENT, attrName)); } }
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/plugins/RegistryResolver.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/plugins/RegistryResolver.java index c0c6aa8..55253a9 100644 --- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/plugins/RegistryResolver.java +++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/plugins/RegistryResolver.java
@@ -683,7 +683,41 @@ error (Policy.bind("parse.fragmentMissingIdName")); continue; } - PluginDescriptorModel plugin = reg.getPlugin(fragment.getPluginId(), fragment.getPluginVersion()); + + // Now find a plugin that fits the matching criteria specified for this fragment and + // its related plugin + PluginDescriptorModel plugin = null; + IndexEntry ix = (IndexEntry) idmap.get(fragment.getPluginId()); + byte matchType = fragment.getMatch(); + for (Iterator list = ix.versions().iterator(); list.hasNext() && plugin == null;) { + PluginDescriptorModel pd = (PluginDescriptorModel) list.next(); + if (pd.getEnabled()) { + // return the highest version that fits the matching criteria + switch (matchType) { + case PluginFragmentModel.FRAGMENT_MATCH_PERFECT: + if (getVersionIdentifier(pd).isPerfect(new PluginVersionIdentifier(fragment.getPluginVersion()))) + plugin = pd; + break; + case PluginFragmentModel.FRAGMENT_MATCH_EQUIVALENT: + if (getVersionIdentifier(pd).isEquivalentTo(new PluginVersionIdentifier(fragment.getPluginVersion()))) + plugin = pd; + break; + case PluginFragmentModel.FRAGMENT_MATCH_COMPATIBLE: + case PluginFragmentModel.FRAGMENT_MATCH_UNSPECIFIED: + if (getVersionIdentifier(pd).isCompatibleWith(new PluginVersionIdentifier(fragment.getPluginVersion()))) + plugin = pd; + break; + case PluginFragmentModel.FRAGMENT_MATCH_GREATER_OR_EQUAL: + if (getVersionIdentifier(pd).isGreaterOrEqualTo(new PluginVersionIdentifier(fragment.getPluginVersion()))) + plugin = pd; + break; + } + if (plugin != null) { + break; + } + } + } + if (plugin == null) { // We couldn't find this fragment's plugin error (Policy.bind("parse.missingFragmentPd", fragment.getPluginId(), fragment.getId())); @@ -717,11 +751,19 @@ } private void resolve() { - // Add all the fragments to their associated plugin - linkFragments(); + // Start by putting each plugin in the idmap. We are + // going to need this for the call to linkFragments. PluginDescriptorModel[] pluginList = reg.getPlugins(); idmap = new HashMap(); for (int i = 0; i < pluginList.length; i++) { + add(pluginList[i]); + } + // Add all the fragments to their associated plugin + linkFragments(); + // Now we have to cycle through the plugin list again + // to assimilate all the fragment information and + // check for 'required' fields. + for (int i = 0; i < pluginList.length; i++) { if (pluginList[i].getFragments() != null) { // Take all the information in each fragment and // embed it in the plugin descriptor @@ -746,7 +788,6 @@ // have an idmap entry. Multiple versions will have only // one entry but will be sorted in version order (largest // to smallest). - add(pluginList[i]); } // resolve root descriptors
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/messages.properties b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/messages.properties index da607e8..47f782f 100644 --- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/messages.properties +++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/messages.properties
@@ -34,7 +34,7 @@ parse.unknownTopElement = Unknown element {0}, found at the top level, ignored. parse.initializationTrouble = Parser initialization using setFeature failed. parse.internalStack = Element/end element mismatch for element {0}. -parse.validMatch = {0} is not a valid value for the attribute "match". Use "exact" or "compatible". +parse.validMatch = {0} is not a valid value for the attribute "match". Use "perfect", "equivalent", "compatible" or "greaterOrEqual". parse.validExport = {0} is not a valid value for the attribute "export". Use "true" or "false". parse.unknownAttribute = Unknown attribute {1} for element {0} ignored. parse.missingFragmentPd = Plugin descriptor {0} not found for fragment {0}. Fragment ignored.
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/model/PluginFragmentModel.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/model/PluginFragmentModel.java index df43ad1..1884046 100644 --- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/model/PluginFragmentModel.java +++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/model/PluginFragmentModel.java
@@ -5,6 +5,7 @@ * All Rights Reserved. */ +import org.eclipse.core.internal.runtime.Assert; import org.eclipse.core.runtime.PluginVersionIdentifier; /** @@ -16,9 +17,16 @@ */ public class PluginFragmentModel extends PluginModel { + public static final byte FRAGMENT_MATCH_UNSPECIFIED = 0; + public static final byte FRAGMENT_MATCH_PERFECT = 1; + public static final byte FRAGMENT_MATCH_EQUIVALENT = 2; + public static final byte FRAGMENT_MATCH_COMPATIBLE = 3; + public static final byte FRAGMENT_MATCH_GREATER_OR_EQUAL = 4; + // DTD properties (included in plug-in manifest) private String plugin = null; private String pluginVersion = null; + private byte pluginMatch = FRAGMENT_MATCH_UNSPECIFIED; /** * Creates a new plug-in descriptor model in which all fields * are <code>null</code>. @@ -27,6 +35,21 @@ super(); } /** + * Returns a byte code indicating the type of match this fragment requires + * when trying to find its associated plugin. + * The byte code can be any one of the following: + * FRAGMENT_MATCH_UNSPECIFIED initial value + * FRAGMENT_MATCH_PERFECT perfectly equal match + * FRAGMENT_MATCH_EQUIVALENT equivalent match + * FRAGMENT_MATCH_COMPATIBLE compatible match + * FRAGMENT_MATCH_GREATER_OR_EQUAL greater than or equal to match + * + * @return a byte code indicating the type of match this fragment requires + */ +public byte getMatch() { + return pluginMatch; +} +/** * Returns the fully qualified name of the plug-in for which this is a fragment * * @return the name of this fragment's plug-in or <code>null</code>. @@ -55,6 +78,27 @@ return pluginVersion; } /** + * Sets the type of match this fragment requires when trying to + * find its associated plugin. The value parameter may be any + * one of the following: + * FRAGMENT_MATCH_UNSPECIFIED initial value + * FRAGMENT_MATCH_PERFECT perfectly equal match + * FRAGMENT_MATCH_EQUIVALENT equivalent match + * FRAGMENT_MATCH_COMPATIBLE compatible match + * FRAGMENT_MATCH_GREATER_OR_EQUAL greater than or equal to match + * This object must not be read-only. + * + * @param value the type of match required with the associated plugin + */ +public void setMatch(byte value) { + assertIsWriteable(); + Assert.isTrue ((value == FRAGMENT_MATCH_PERFECT) || + (value == FRAGMENT_MATCH_EQUIVALENT) || + (value == FRAGMENT_MATCH_COMPATIBLE) || + (value == FRAGMENT_MATCH_GREATER_OR_EQUAL)); + pluginMatch = value; +} +/** * Sets the fully qualified name of the plug-in for which this is a fragment * This object must not be read-only. *
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/badPluginsTest/badFragment1AttributesTest.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/badPluginsTest/badFragment1AttributesTest.xml new file mode 100644 index 0000000..9a2da6f --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/badPluginsTest/badFragment1AttributesTest.xml
@@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Bad Fragment 1 Attributes Test" + id="badFragment1AttributesTest" + version="1.2" + vendor-name="OTI" + plugin-id="aPlugin" + plugin-version="1.1.1" + a-bad-attribute="nothing"> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/badPluginsTest/badFragment2AttributesTest.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/badPluginsTest/badFragment2AttributesTest.xml new file mode 100644 index 0000000..1c862ca --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/badPluginsTest/badFragment2AttributesTest.xml
@@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Bad Fragment 2 Attributes Test" + id="badFragment2AttributesTest" + version="1.2" + plugin-id="aPlugin" + plugin-version="1.1.1" + match="nothing"> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/badPluginsTest/badFragmentAttributesTest.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/badPluginsTest/badFragmentAttributesTest.xml deleted file mode 100644 index 8ccd395..0000000 --- a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/badPluginsTest/badFragmentAttributesTest.xml +++ /dev/null
@@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<fragment - name="Bad Fragment Attributes Test" - id="badFragmentAttributesTest" - version="1.2" - vendor-name="OTI" - a-bad-attribute="nothing"> - -</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment1.xml new file mode 100644 index 0000000..001e3d8 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment1.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment2.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment2.xml new file mode 100644 index 0000000..ad904cf --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment2.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.3"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment3.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment3.xml new file mode 100644 index 0000000..d456535 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment3.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.1"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment4.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment4.xml new file mode 100644 index 0000000..5031b98 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment4.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="2.0"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment5.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment5.xml new file mode 100644 index 0000000..ea444ee --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment5.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.1"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment6.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment6.xml new file mode 100644 index 0000000..5d6213d --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment6.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.4"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment7.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment7.xml new file mode 100644 index 0000000..f473907 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/fragment7.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.8"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/plugin1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/plugin1.xml new file mode 100644 index 0000000..904db5c --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/plugin1.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.2" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/plugin2.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/plugin2.xml new file mode 100644 index 0000000..918b315 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.1/plugin2.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.2.6" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment1.xml new file mode 100644 index 0000000..c27d998 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment1.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="5.9.8" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment2.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment2.xml new file mode 100644 index 0000000..453b2a4 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment2.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.3" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment3.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment3.xml new file mode 100644 index 0000000..e5d36a9 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment3.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.4" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment4.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment4.xml new file mode 100644 index 0000000..acb40ed --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment4.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="2.0.0" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment5.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment5.xml new file mode 100644 index 0000000..41bc5d7 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment5.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="3.0.4" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment6.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment6.xml new file mode 100644 index 0000000..2fd2eeb --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment6.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="4.6.2" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment7.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment7.xml new file mode 100644 index 0000000..11846e8 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment7.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="4.5.8" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment8.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment8.xml new file mode 100644 index 0000000..99b1f92 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment8.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="4.4.2" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment9.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment9.xml new file mode 100644 index 0000000..d0bccdd --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/fragment9.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="4.5.1" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin1.xml new file mode 100644 index 0000000..a1386e5 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin1.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.2.5" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin2.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin2.xml new file mode 100644 index 0000000..d017f40 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin2.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.2.8" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin3.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin3.xml new file mode 100644 index 0000000..bf79ac0 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin3.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.2.3" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin4.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin4.xml new file mode 100644 index 0000000..58a2910 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin4.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.3.0" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin5.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin5.xml new file mode 100644 index 0000000..c4f1aa5 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin5.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="3.0.0" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin6.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin6.xml new file mode 100644 index 0000000..f1c40b8 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.10/plugin6.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="4.5.3" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment1.xml new file mode 100644 index 0000000..405db06 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment1.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.3"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment2.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment2.xml new file mode 100644 index 0000000..224cf82 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment2.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment3.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment3.xml new file mode 100644 index 0000000..c3aebf2 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment3.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="2.1.1"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment4.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment4.xml new file mode 100644 index 0000000..9bd6294 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment4.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="2.5.0"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment5.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment5.xml new file mode 100644 index 0000000..5d6213d --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment5.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.4"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment6.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment6.xml new file mode 100644 index 0000000..78a2512 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment6.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="3.0.0"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment7.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment7.xml new file mode 100644 index 0000000..0aee2fb --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/fragment7.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="2.4.0"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/plugin1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/plugin1.xml new file mode 100644 index 0000000..170f501 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/plugin1.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.2.4" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/plugin2.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/plugin2.xml new file mode 100644 index 0000000..d27860b --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/plugin2.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.3" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/plugin3.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/plugin3.xml new file mode 100644 index 0000000..1e68778 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/plugin3.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="2.4" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/plugin4.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/plugin4.xml new file mode 100644 index 0000000..88f211f --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.2/plugin4.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.1" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment1.xml new file mode 100644 index 0000000..cd98c68 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment1.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.1" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment2.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment2.xml new file mode 100644 index 0000000..12a763e --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment2.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.2" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment3.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment3.xml new file mode 100644 index 0000000..2d2d65e --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment3.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.0" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment4.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment4.xml new file mode 100644 index 0000000..fe2346f --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment4.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.1.0" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment5.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment5.xml new file mode 100644 index 0000000..696e52c --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment5.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.1.1" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment6.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment6.xml new file mode 100644 index 0000000..db0831f --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment6.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.5.0" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment7.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment7.xml new file mode 100644 index 0000000..2b4ba5a --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment7.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.5.1" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment8.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment8.xml new file mode 100644 index 0000000..aff7e68 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment8.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="3.0.0" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment9.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment9.xml new file mode 100644 index 0000000..80383d2 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/fragment9.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="3.2.1" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/plugin1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/plugin1.xml new file mode 100644 index 0000000..504cd2f --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.3/plugin1.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.2.1" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment1.xml new file mode 100644 index 0000000..cd98c68 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment1.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.1" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment2.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment2.xml new file mode 100644 index 0000000..12a763e --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment2.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.2" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment3.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment3.xml new file mode 100644 index 0000000..2d2d65e --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment3.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.0" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment4.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment4.xml new file mode 100644 index 0000000..fe2346f --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment4.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.1.0" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment5.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment5.xml new file mode 100644 index 0000000..696e52c --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment5.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.1.1" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment6.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment6.xml new file mode 100644 index 0000000..db0831f --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment6.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.5.0" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment7.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment7.xml new file mode 100644 index 0000000..2b4ba5a --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment7.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.5.1" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment8.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment8.xml new file mode 100644 index 0000000..aff7e68 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment8.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="3.0.0" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment9.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment9.xml new file mode 100644 index 0000000..80383d2 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/fragment9.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="3.2.1" match="perfect"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/plugin1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/plugin1.xml new file mode 100644 index 0000000..504cd2f --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/plugin1.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.2.1" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/plugin2.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/plugin2.xml new file mode 100644 index 0000000..e9a7bc6 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/plugin2.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.4" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/plugin3.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/plugin3.xml new file mode 100644 index 0000000..250ccd7 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/plugin3.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.1.7" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/plugin4.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/plugin4.xml new file mode 100644 index 0000000..efb35df --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/plugin4.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="3.0.2" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/plugin5.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/plugin5.xml new file mode 100644 index 0000000..a6b1237 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.4/plugin5.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="0.2.1" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment1.xml new file mode 100644 index 0000000..d479145 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment1.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.3.2" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment10.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment10.xml new file mode 100644 index 0000000..d2967aa --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment10.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="3.0.0" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment11.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment11.xml new file mode 100644 index 0000000..fd37b9d --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment11.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="3.2.5" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment12.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment12.xml new file mode 100644 index 0000000..e1986b5 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment12.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="3.2.4" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment2.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment2.xml new file mode 100644 index 0000000..f7ddc3f --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment2.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.3.7" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment3.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment3.xml new file mode 100644 index 0000000..7baa0a0 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment3.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.5" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment4.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment4.xml new file mode 100644 index 0000000..7f1597d --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment4.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.8" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment5.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment5.xml new file mode 100644 index 0000000..2597c7f --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment5.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.2" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment6.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment6.xml new file mode 100644 index 0000000..c57ea55 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment6.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.0" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment7.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment7.xml new file mode 100644 index 0000000..21876b0 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment7.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.1.5" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment8.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment8.xml new file mode 100644 index 0000000..cf82881 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment8.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.1.0" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment9.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment9.xml new file mode 100644 index 0000000..b78317b --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/fragment9.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.3.5" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/plugin1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/plugin1.xml new file mode 100644 index 0000000..a1386e5 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.5/plugin1.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.2.5" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment1.xml new file mode 100644 index 0000000..dc6032c --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment1.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="5.9.8" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment2.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment2.xml new file mode 100644 index 0000000..d3bc8b5 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment2.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.3" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment3.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment3.xml new file mode 100644 index 0000000..c02b22b --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment3.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.4" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment4.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment4.xml new file mode 100644 index 0000000..9116852 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment4.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="2.0.0" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment5.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment5.xml new file mode 100644 index 0000000..84a4517 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment5.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="3.0.4" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment6.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment6.xml new file mode 100644 index 0000000..f1da9ef --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment6.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="4.6.2" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment7.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment7.xml new file mode 100644 index 0000000..60e3be9 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment7.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="4.5.8" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment8.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment8.xml new file mode 100644 index 0000000..36635e0 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment8.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="4.4.2" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment9.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment9.xml new file mode 100644 index 0000000..d0bccdd --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/fragment9.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="4.5.1" match="equivalent"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin1.xml new file mode 100644 index 0000000..a1386e5 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin1.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.2.5" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin2.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin2.xml new file mode 100644 index 0000000..d017f40 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin2.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.2.8" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin3.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin3.xml new file mode 100644 index 0000000..bf79ac0 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin3.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.2.3" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin4.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin4.xml new file mode 100644 index 0000000..58a2910 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin4.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.3.0" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin5.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin5.xml new file mode 100644 index 0000000..c4f1aa5 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin5.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="3.0.0" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin6.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin6.xml new file mode 100644 index 0000000..f1c40b8 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.6/plugin6.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="4.5.3" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment1.xml new file mode 100644 index 0000000..2076b4a --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment1.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2" match="compatible"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment2.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment2.xml new file mode 100644 index 0000000..8b8a01d --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment2.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.3" match="compatible"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment3.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment3.xml new file mode 100644 index 0000000..22a0dd6 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment3.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.1" match="compatible"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment4.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment4.xml new file mode 100644 index 0000000..55fcb5c --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment4.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="2.0" match="compatible"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment5.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment5.xml new file mode 100644 index 0000000..ed734e1 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment5.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.1" match="compatible"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment6.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment6.xml new file mode 100644 index 0000000..63ef3b1 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment6.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.4" match="compatible"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment7.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment7.xml new file mode 100644 index 0000000..496432b --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/fragment7.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.8" match="compatible"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/plugin1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/plugin1.xml new file mode 100644 index 0000000..904db5c --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/plugin1.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.2" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/plugin2.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/plugin2.xml new file mode 100644 index 0000000..918b315 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.7/plugin2.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.2.6" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment1.xml new file mode 100644 index 0000000..6e7002c --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment1.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.3" match="compatible"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment2.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment2.xml new file mode 100644 index 0000000..25f49d1 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment2.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1" match="compatible"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment3.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment3.xml new file mode 100644 index 0000000..456c3fe --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment3.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="2.1.1" match="compatible"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment4.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment4.xml new file mode 100644 index 0000000..32e7daa --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment4.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="2.5.0" match="compatible"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment5.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment5.xml new file mode 100644 index 0000000..63ef3b1 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment5.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.4" match="compatible"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment6.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment6.xml new file mode 100644 index 0000000..ef8de8a --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment6.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="3.0.0" match="compatible"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment7.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment7.xml new file mode 100644 index 0000000..3f72685 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/fragment7.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="2.4.0" match="compatible"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/plugin1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/plugin1.xml new file mode 100644 index 0000000..170f501 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/plugin1.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.2.4" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/plugin2.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/plugin2.xml new file mode 100644 index 0000000..d27860b --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/plugin2.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.3" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/plugin3.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/plugin3.xml new file mode 100644 index 0000000..1e68778 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/plugin3.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="2.4" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/plugin4.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/plugin4.xml new file mode 100644 index 0000000..88f211f --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.8/plugin4.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.1" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment1.xml new file mode 100644 index 0000000..5d9b6ad --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment1.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.3.2" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment10.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment10.xml new file mode 100644 index 0000000..c692384 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment10.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="3.0.0" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment11.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment11.xml new file mode 100644 index 0000000..ee8f642 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment11.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="3.2.5" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment12.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment12.xml new file mode 100644 index 0000000..9313a96 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment12.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="3.2.4" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment2.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment2.xml new file mode 100644 index 0000000..ac02460 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment2.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.3.7" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment3.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment3.xml new file mode 100644 index 0000000..1f8f91d --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment3.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.5" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment4.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment4.xml new file mode 100644 index 0000000..950f189 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment4.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.8" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment5.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment5.xml new file mode 100644 index 0000000..4b50508 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment5.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.2" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment6.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment6.xml new file mode 100644 index 0000000..37595e8 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment6.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.2.0" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment7.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment7.xml new file mode 100644 index 0000000..6bf21ef --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment7.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.1.5" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment8.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment8.xml new file mode 100644 index 0000000..c29776f --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment8.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.1.0" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment9.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment9.xml new file mode 100644 index 0000000..0493dea --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/fragment9.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fragment + name="Fragment Test" + id="fragmentTest" + version="1.0" + plugin-id="tests.a" + plugin-version="1.3.5" match="greaterOrEqual"> + + <runtime> + <library name="lib1.jar"/> + </runtime> + +</fragment>
diff --git a/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/plugin1.xml b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/plugin1.xml new file mode 100644 index 0000000..a1386e5 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/Plugin_Testing/fragment.resolve.9/plugin1.xml
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin + name="IBM Tooling Platform Core Tests" + id="tests.a" + version="1.2.5" + vendor-name="IBM"> + +</plugin>
diff --git a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/AllTests.java b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/AllTests.java index 13dedf5..c2f11ef 100644 --- a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/AllTests.java +++ b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/AllTests.java
@@ -96,6 +96,16 @@ suite.addTest(RegressionResolveTest_8.suite()); suite.addTest(RegressionResolveTest_9.suite()); suite.addTest(RegressionResolveTest_10.suite()); + suite.addTest(FragmentResolveTest_1.suite()); + suite.addTest(FragmentResolveTest_2.suite()); + suite.addTest(FragmentResolveTest_3.suite()); + suite.addTest(FragmentResolveTest_4.suite()); + suite.addTest(FragmentResolveTest_5.suite()); + suite.addTest(FragmentResolveTest_6.suite()); + suite.addTest(FragmentResolveTest_7.suite()); + suite.addTest(FragmentResolveTest_8.suite()); + suite.addTest(FragmentResolveTest_9.suite()); + suite.addTest(FragmentResolveTest_10.suite()); return suite; } }
diff --git a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/BadPluginsTest.java b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/BadPluginsTest.java index 07a25be..ed1cd95 100644 --- a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/BadPluginsTest.java +++ b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/BadPluginsTest.java
@@ -91,7 +91,7 @@ public void badAttributes() { String[] badAttrs = { "badPluginAttributesTest", - "badFragmentAttributesTest", + "badFragment1AttributesTest", "badExtensionPointAttributesTest", "badExtensionAttributesTest", "badRequiresImport1AttributesTest", @@ -99,6 +99,7 @@ "badRequiresImport3AttributesTest", "badLibrary1AttributesTest", "badLibrary2AttributesTest", + "badFragment2AttributesTest", }; String[] errorMessages = { "Unknown attribute a-bad-attribute for element plugin ignored.", @@ -107,9 +108,10 @@ "Unknown attribute hello for element extension ignored.", "Unknown attribute badImportAttr for element import ignored.", "notTrue is not a valid value for the attribute \"export\". Use \"true\" or \"false\".", - "incompatible is not a valid value for the attribute \"match\". Use \"exact\" or \"compatible\".", + "incompatible is not a valid value for the attribute \"match\". Use \"perfect\", \"equivalent\", \"compatible\" or \"greaterOrEqual\".", "Unknown attribute badAttribute for element library ignored.", "Unknown attribute badExportAttribute for element library ignored.", + "nothing is not a valid value for the attribute \"match\". Use \"perfect\", \"equivalent\", \"compatible\" or \"greaterOrEqual\".", }; PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); @@ -128,7 +130,8 @@ pluginURLs[0] = pURL; IPluginRegistry registry = ParseHelper.doParsing (factory, pluginURLs, false); String id = null; - if (badAttrs[i].equals("badFragmentAttributesTest")) { + if ((badAttrs[i].equals("badFragment1AttributesTest")) || + (badAttrs[i].equals("badFragment2AttributesTest"))) { PluginFragmentModel[] fragmentDescriptors = ((PluginRegistryModel)registry).getFragments(); assertTrue(i + ".0 Only one fragment", fragmentDescriptors.length == 1); PluginFragmentModel fragment = (PluginFragmentModel)fragmentDescriptors[0];
diff --git a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_1.java b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_1.java new file mode 100644 index 0000000..ee6dba4 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_1.java
@@ -0,0 +1,366 @@ +package org.eclipse.core.tests.internal.plugins; + +import java.net.URL; +import junit.framework.*; +import org.eclipse.core.runtime.*; +import org.eclipse.core.runtime.model.*; +import org.eclipse.core.internal.plugins.InternalFactory; +import org.eclipse.core.internal.plugins.*; +import org.eclipse.core.internal.runtime.InternalPlatform; +import org.eclipse.core.internal.runtime.Policy; +import org.eclipse.core.tests.harness.*; + +public class FragmentResolveTest_1 extends EclipseWorkspaceTest { +public FragmentResolveTest_1() { + super(null); +} +public FragmentResolveTest_1(String name) { + super(name); +} + +public void test1() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[2]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.1/plugin1.xml"); + pluginURLs[0] = new URL (pluginPath); + pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.1/fragment1.xml"); + pluginURLs[1] = new URL (pluginPath); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = ParseHelper.doParsing(factory, pluginURLs, true); + IPluginDescriptor pd = registry.getPluginDescriptor("tests.a"); + + // check descriptor + assertNotNull("1.0", pd); + assertTrue("1.1", pd.getUniqueIdentifier().equals("tests.a")); + + // check to see if we have all plugins + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("1.2", all.length == 1); + assertTrue("1.3", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.4", all[0].getVersionIdentifier().equals(new PluginVersionIdentifier("1.2.0"))); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragment = ((PluginRegistry) registry).getFragments("fragmentTest"); + assertTrue("1.5", fragment.length == 1); + assertTrue("1.6", fragment[0].getId().equals("fragmentTest")); + + // Have we got all the fragments + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("1.7", fragments.length == 1); + assertTrue("1.8", fragments[0].getId().equals("fragmentTest")); + assertTrue("1.9", fragments[0].getPluginVersion().equals("1.2.0")); + + // Now make sure we hooked this fragment and this plugin + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNotNull("1.10", linkedFragments); + assertTrue("1.11", linkedFragments.length == 1); + assertTrue("1.12", linkedFragments[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue("1.13", libraries.length == 1); + assertTrue("1.14", ((Library)libraries[0]).getName().equals("lib1.jar")); +} + +public void test2() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[2]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.1/plugin1.xml"); + pluginURLs[0] = new URL (pluginPath); + pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.1/fragment2.xml"); + pluginURLs[1] = new URL (pluginPath); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = ParseHelper.doParsing(factory, pluginURLs, true); + IPluginDescriptor pd = registry.getPluginDescriptor("tests.a"); + + // check descriptor + assertNotNull("2.0", pd); + assertTrue("2.1", pd.getUniqueIdentifier().equals("tests.a")); + + // check to see if we have all plugins + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("2.2", all.length == 1); + assertTrue("2.3", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("2.4", all[0].getVersionIdentifier().equals(new PluginVersionIdentifier("1.2.0"))); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragment = ((PluginRegistry) registry).getFragments("fragmentTest"); + assertTrue("2.5", fragment.length == 1); + assertTrue("2.6", fragment[0].getId().equals("fragmentTest")); + + // Have we got all the fragments + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("2.7", fragments.length == 1); + assertTrue("2.8", fragments[0].getId().equals("fragmentTest")); + assertTrue("2.9", fragments[0].getPluginVersion().equals("1.3.0")); + + // Now make sure we didn't hook this fragment and this plugin (they aren't compatible) + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNull("2.10", linkedFragments); + + // Finally, make sure the library entry in the fragment is + // not part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue("2.11", libraries.length == 0); +} + +public void test3() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[2]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.1/plugin1.xml"); + pluginURLs[0] = new URL (pluginPath); + pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.1/fragment3.xml"); + pluginURLs[1] = new URL (pluginPath); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = ParseHelper.doParsing(factory, pluginURLs, true); + IPluginDescriptor pd = registry.getPluginDescriptor("tests.a"); + + // check descriptor + assertNotNull("3.0", pd); + assertTrue("3.1", pd.getUniqueIdentifier().equals("tests.a")); + + // check to see if we have all plugins + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("3.2", all.length == 1); + assertTrue("3.3", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("3.4", all[0].getVersionIdentifier().equals(new PluginVersionIdentifier("1.2.0"))); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragment = ((PluginRegistry) registry).getFragments("fragmentTest"); + assertTrue("3.5", fragment.length == 1); + assertTrue("3.6", fragment[0].getId().equals("fragmentTest")); + + // Have we got all the fragments + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("3.7", fragments.length == 1); + assertTrue("3.8", fragments[0].getId().equals("fragmentTest")); + assertTrue("3.9", fragments[0].getPluginVersion().equals("1.1.0")); + + // Now make sure we hooked this fragment and this plugin + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNotNull("3.10", linkedFragments); + assertTrue("3.11", linkedFragments.length == 1); + assertTrue("3.12", linkedFragments[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue("3.13", libraries.length == 1); + assertTrue("3.14", ((Library)libraries[0]).getName().equals("lib1.jar")); +} + +public void test4() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[2]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.1/plugin1.xml"); + pluginURLs[0] = new URL (pluginPath); + pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.1/fragment4.xml"); + pluginURLs[1] = new URL (pluginPath); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = ParseHelper.doParsing(factory, pluginURLs, true); + IPluginDescriptor pd = registry.getPluginDescriptor("tests.a"); + + // check descriptor + assertNotNull("4.0", pd); + assertTrue("4.1", pd.getUniqueIdentifier().equals("tests.a")); + + // check to see if we have all plugins + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("4.2", all.length == 1); + assertTrue("4.3", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("4.4", all[0].getVersionIdentifier().equals(new PluginVersionIdentifier("1.2.0"))); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragment = ((PluginRegistry) registry).getFragments("fragmentTest"); + assertTrue("4.5", fragment.length == 1); + assertTrue("4.6", fragment[0].getId().equals("fragmentTest")); + + // Have we got all the fragments + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("4.7", fragments.length == 1); + assertTrue("4.8", fragments[0].getId().equals("fragmentTest")); + assertTrue("4.9", fragments[0].getPluginVersion().equals("2.0.0")); + + // Now make sure we didn't hook this fragment and this plugin (they aren't compatible) + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNull("4.10", linkedFragments); + + // Finally, make sure the library entry in the fragment is + // not part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue("4.11", libraries.length == 0); +} + +public void test5() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[2]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.1/plugin1.xml"); + pluginURLs[0] = new URL (pluginPath); + pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.1/fragment5.xml"); + pluginURLs[1] = new URL (pluginPath); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = ParseHelper.doParsing(factory, pluginURLs, true); + IPluginDescriptor pd = registry.getPluginDescriptor("tests.a"); + + // check descriptor + assertNotNull("5.0", pd); + assertTrue("5.1", pd.getUniqueIdentifier().equals("tests.a")); + + // check to see if we have all plugins + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("5.2", all.length == 1); + assertTrue("5.3", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("5.4", all[0].getVersionIdentifier().equals(new PluginVersionIdentifier("1.2.0"))); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragment = ((PluginRegistry) registry).getFragments("fragmentTest"); + assertTrue("5.5", fragment.length == 1); + assertTrue("5.6", fragment[0].getId().equals("fragmentTest")); + + // Have we got all the fragments + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("5.7", fragments.length == 1); + assertTrue("5.8", fragments[0].getId().equals("fragmentTest")); + assertTrue("5.9", fragments[0].getPluginVersion().equals("1.2.1")); + + // Now make sure we didn't hook this fragment and this plugin. + // They are not compatible unless the service number is 0 in this case. + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNull("5.10", linkedFragments); + + // Finally, make sure the library entry in the fragment is + // not part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue("5.11", libraries.length == 0); +} + +public void test6() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[2]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.1/plugin2.xml"); + pluginURLs[0] = new URL (pluginPath); + pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.1/fragment6.xml"); + pluginURLs[1] = new URL (pluginPath); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = ParseHelper.doParsing(factory, pluginURLs, true); + IPluginDescriptor pd = registry.getPluginDescriptor("tests.a"); + + // check descriptor + assertNotNull("6.0", pd); + assertTrue("6.1", pd.getUniqueIdentifier().equals("tests.a")); + + // check to see if we have all plugins + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("6.2", all.length == 1); + assertTrue("6.3", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("6.4", all[0].getVersionIdentifier().equals(new PluginVersionIdentifier("1.2.6"))); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragment = ((PluginRegistry) registry).getFragments("fragmentTest"); + assertTrue("6.5", fragment.length == 1); + assertTrue("6.6", fragment[0].getId().equals("fragmentTest")); + + // Have we got all the fragments + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("6.7", fragments.length == 1); + assertTrue("6.8", fragments[0].getId().equals("fragmentTest")); + assertTrue("6.9", fragments[0].getPluginVersion().equals("1.2.4")); + + // Now make sure we hooked this fragment and this plugin + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNotNull("6.10", linkedFragments); + assertTrue("6.11", linkedFragments.length == 1); + assertTrue("6.12", linkedFragments[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue("6.13", libraries.length == 1); + assertTrue("6.14", ((Library)libraries[0]).getName().equals("lib1.jar")); +} + +public void test7() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[2]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.1/plugin2.xml"); + pluginURLs[0] = new URL (pluginPath); + pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.1/fragment7.xml"); + pluginURLs[1] = new URL (pluginPath); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = ParseHelper.doParsing(factory, pluginURLs, true); + IPluginDescriptor pd = registry.getPluginDescriptor("tests.a"); + + // check descriptor + assertNotNull("7.0", pd); + assertTrue("7.1", pd.getUniqueIdentifier().equals("tests.a")); + + // check to see if we have all plugins + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("7.2", all.length == 1); + assertTrue("7.3", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("7.4", all[0].getVersionIdentifier().equals(new PluginVersionIdentifier("1.2.6"))); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragment = ((PluginRegistry) registry).getFragments("fragmentTest"); + assertTrue("7.5", fragment.length == 1); + assertTrue("7.6", fragment[0].getId().equals("fragmentTest")); + + // Have we got all the fragments + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("7.7", fragments.length == 1); + assertTrue("7.8", fragments[0].getId().equals("fragmentTest")); + assertTrue("7.9", fragments[0].getPluginVersion().equals("1.2.8")); + + // Now make sure we didn't hook this fragment and this plugin + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNull("7.10", linkedFragments); + + // Finally, make sure the library entry in the fragment is + // not part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue("7.11", libraries.length == 0); +} + +public static Test suite() { + TestSuite suite = new TestSuite(); + suite.addTest(new FragmentResolveTest_1("test1")); + suite.addTest(new FragmentResolveTest_1("test2")); + suite.addTest(new FragmentResolveTest_1("test3")); + suite.addTest(new FragmentResolveTest_1("test4")); + suite.addTest(new FragmentResolveTest_1("test5")); + suite.addTest(new FragmentResolveTest_1("test6")); + suite.addTest(new FragmentResolveTest_1("test7")); + return suite; +} +} + +
diff --git a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_10.java b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_10.java new file mode 100644 index 0000000..0aca858 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_10.java
@@ -0,0 +1,167 @@ +package org.eclipse.core.tests.internal.plugins; + +import java.net.URL; +import junit.framework.*; +import org.eclipse.core.runtime.*; +import org.eclipse.core.runtime.model.*; +import org.eclipse.core.internal.plugins.InternalFactory; +import org.eclipse.core.internal.plugins.*; +import org.eclipse.core.internal.runtime.InternalPlatform; +import org.eclipse.core.internal.runtime.Policy; +import org.eclipse.core.tests.harness.*; + +public class FragmentResolveTest_10 extends EclipseWorkspaceTest { +public FragmentResolveTest_10() { + super(null); +} +public FragmentResolveTest_10(String name) { + super(name); +} + +static PluginRegistry doParsing(InternalFactory factory, URL[] pluginPath, boolean doResolve) { + PluginRegistry registry = (PluginRegistry) RegistryLoader.parseRegistry(pluginPath, factory, false); + if (doResolve) + // don't trim the disabled plugins for these tests + registry.resolve(false, true); + registry.markReadOnly(); + registry.startup(null); + return registry; +} + +public void fullTest() { + String[] fragmentIds = {"5.9.8", "1.2.3", "1.2.4", "2.0.0", "3.0.4", + "4.6.2", "4.5.8", "4.4.2", "4.5.1"}; + boolean[] matchesPlugin = {false, true, true, true, true, + false, false, true, true}; + + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[7]; + String[] pluginPath = new String[7]; + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + try { + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.10/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.10/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.10/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.10/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.10/plugin5.xml"); + pluginPath[5] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.10/plugin6.xml"); + for (int i = 0; i < pluginPath.length - 1; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + + for (int i = 0; i < fragmentIds.length; i++) { + try { + pluginPath[6] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.10/fragment" + (i+1) + ".xml"); + pluginURLs[6] = new URL (pluginPath[6]); + } catch (java.net.MalformedURLException e) { + } + + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 6 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue(i + ".0", all.length == 6); + assertTrue(i + ".1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue(i + ".2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue(i + ".3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue(i + ".4", all[3].getUniqueIdentifier().equals("tests.a")); + assertTrue(i + ".5", all[4].getUniqueIdentifier().equals("tests.a")); + assertTrue(i + ".6", all[5].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd125 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.5")); + IPluginDescriptor pd128 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.8")); + IPluginDescriptor pd123 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.3")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd300 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("3.0.0")); + IPluginDescriptor pd453 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("4.5.3")); + assertNotNull(i + ".7", pd125); + assertNotNull(i + ".8", pd128); + assertNotNull(i + ".9", pd123); + assertNotNull(i + ".10", pd130); + assertNotNull(i + ".11", pd300); + assertNotNull(i + ".12", pd453); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue(i + ".13", fragments.length == 1); + assertTrue(i + ".14", fragments[0].getId().equals("fragmentTest")); + assertTrue(i + ".15", fragments[0].getPluginVersion().equals(fragmentIds[i])); + + if (matchesPlugin[i]) { + // Now make sure we hooked this fragment to the right plugin (and only + // one plugin) + PluginFragmentModel[] linkedFragments125 = ((PluginDescriptorModel)pd125).getFragments(); + PluginFragmentModel[] linkedFragments128 = ((PluginDescriptorModel)pd128).getFragments(); + PluginFragmentModel[] linkedFragments123 = ((PluginDescriptorModel)pd123).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments300 = ((PluginDescriptorModel)pd300).getFragments(); + PluginFragmentModel[] linkedFragments453 = ((PluginDescriptorModel)pd453).getFragments(); + assertNull(i + ".16", linkedFragments125); + assertNull(i + ".17", linkedFragments128); + assertNull(i + ".18", linkedFragments123); + assertNull(i + ".19", linkedFragments130); + assertNull(i + ".20", linkedFragments300); + assertNotNull(i + ".21", linkedFragments453); + assertTrue(i + ".22", linkedFragments453.length == 1); + assertTrue(i + ".23", linkedFragments453[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the proper plugin + ILibrary[] libraries125 = pd125.getRuntimeLibraries(); + ILibrary[] libraries128 = pd128.getRuntimeLibraries(); + ILibrary[] libraries123 = pd123.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries300 = pd300.getRuntimeLibraries(); + ILibrary[] libraries453 = pd453.getRuntimeLibraries(); + assertTrue(i + ".24", libraries125.length == 0); + assertTrue(i + ".25", libraries128.length == 0); + assertTrue(i + ".26", libraries123.length == 0); + assertTrue(i + ".27", libraries130.length == 0); + assertTrue(i + ".28", libraries300.length == 0); + assertTrue(i + ".29", libraries453.length == 1); + assertTrue(i + ".30", ((Library)libraries453[0]).getName().equals("lib1.jar")); + } else { + // Now make sure we didn't hook this fragment to any plugin + PluginFragmentModel[] linkedFragments125 = ((PluginDescriptorModel)pd125).getFragments(); + PluginFragmentModel[] linkedFragments128 = ((PluginDescriptorModel)pd128).getFragments(); + PluginFragmentModel[] linkedFragments123 = ((PluginDescriptorModel)pd123).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments300 = ((PluginDescriptorModel)pd300).getFragments(); + PluginFragmentModel[] linkedFragments453 = ((PluginDescriptorModel)pd453).getFragments(); + assertNull(i + ".16", linkedFragments125); + assertNull(i + ".17", linkedFragments128); + assertNull(i + ".18", linkedFragments123); + assertNull(i + ".19", linkedFragments130); + assertNull(i + ".20", linkedFragments300); + assertNull(i + ".21", linkedFragments453); + + // Finally, make sure the library entry in the fragment is + // not part of any plugin + ILibrary[] libraries125 = pd125.getRuntimeLibraries(); + ILibrary[] libraries128 = pd128.getRuntimeLibraries(); + ILibrary[] libraries123 = pd123.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries300 = pd300.getRuntimeLibraries(); + ILibrary[] libraries453 = pd453.getRuntimeLibraries(); + assertTrue(i + ".22", libraries125.length == 0); + assertTrue(i + ".23", libraries128.length == 0); + assertTrue(i + ".24", libraries123.length == 0); + assertTrue(i + ".25", libraries130.length == 0); + assertTrue(i + ".26", libraries300.length == 0); + assertTrue(i + ".27", libraries453.length == 0); + } + } +} + +public static Test suite() { + TestSuite suite = new TestSuite(); + suite.addTest(new FragmentResolveTest_10("fullTest")); + return suite; +} +} + +
diff --git a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_2.java b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_2.java new file mode 100644 index 0000000..ace6eb8 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_2.java
@@ -0,0 +1,519 @@ +package org.eclipse.core.tests.internal.plugins; + +import java.net.URL; +import junit.framework.*; +import org.eclipse.core.runtime.*; +import org.eclipse.core.runtime.model.*; +import org.eclipse.core.internal.plugins.InternalFactory; +import org.eclipse.core.internal.plugins.*; +import org.eclipse.core.internal.runtime.InternalPlatform; +import org.eclipse.core.internal.runtime.Policy; +import org.eclipse.core.tests.harness.*; + +public class FragmentResolveTest_2 extends EclipseWorkspaceTest { +public FragmentResolveTest_2() { + super(null); +} +public FragmentResolveTest_2(String name) { + super(name); +} + +static PluginRegistry doParsing(InternalFactory factory, URL[] pluginPath, boolean doResolve) { + PluginRegistry registry = (PluginRegistry) RegistryLoader.parseRegistry(pluginPath, factory, false); + if (doResolve) + // don't trim the disabled plugins for these tests + registry.resolve(false, true); + registry.markReadOnly(); + registry.startup(null); + return registry; +} + +public void test1() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[5]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String[] pluginPath = new String[5]; + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/fragment1.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 4 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("1.0", all.length == 4); + assertTrue("1.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.4", all[3].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd124 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.4")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd240 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("2.4.0")); + IPluginDescriptor pd110 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.1.0")); + assertNotNull("1.5", pd124); + assertNotNull("1.6", pd130); + assertNotNull("1.7", pd240); + assertNotNull("1.8", pd110); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("1.9", fragments.length == 1); + assertTrue("1.10", fragments[0].getId().equals("fragmentTest")); + assertTrue("1.11", fragments[0].getPluginVersion().equals("1.2.3")); + + // Now make sure we hooked this fragment to the right plugin (and only + // one plugin) + PluginFragmentModel[] linkedFragments124 = ((PluginDescriptorModel)pd124).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments240 = ((PluginDescriptorModel)pd240).getFragments(); + PluginFragmentModel[] linkedFragments110 = ((PluginDescriptorModel)pd110).getFragments(); + assertNull("1.12", linkedFragments124); + assertNotNull("1.13", linkedFragments130); + assertNull("1.14", linkedFragments240); + assertNull("1.15", linkedFragments110); + assertTrue("1.16", linkedFragments130.length == 1); + assertTrue("1.17", linkedFragments130[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the proper plugin + ILibrary[] libraries124 = pd124.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries240 = pd240.getRuntimeLibraries(); + ILibrary[] libraries110 = pd110.getRuntimeLibraries(); + assertTrue("1.18", libraries124.length == 0); + assertTrue("1.19", libraries130.length == 1); + assertTrue("1.20", libraries240.length == 0); + assertTrue("1.21", libraries110.length == 0); + assertTrue("1.22", ((Library)libraries130[0]).getName().equals("lib1.jar")); +} + +public void test2() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[5]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String[] pluginPath = new String[5]; + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/fragment2.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 4 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("2.0", all.length == 4); + assertTrue("2.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("2.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("2.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("2.4", all[3].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd124 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.4")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd240 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("2.4.0")); + IPluginDescriptor pd110 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.1.0")); + assertNotNull("2.5", pd124); + assertNotNull("2.6", pd130); + assertNotNull("2.7", pd240); + assertNotNull("2.8", pd110); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("2.9", fragments.length == 1); + assertTrue("2.10", fragments[0].getId().equals("fragmentTest")); + assertTrue("2.11", fragments[0].getPluginVersion().equals("1.0.0")); + + // Now make sure we hooked this fragment to the right plugin (and only + // one plugin) + PluginFragmentModel[] linkedFragments124 = ((PluginDescriptorModel)pd124).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments240 = ((PluginDescriptorModel)pd240).getFragments(); + PluginFragmentModel[] linkedFragments110 = ((PluginDescriptorModel)pd110).getFragments(); + assertNull("2.12", linkedFragments124); + assertNotNull("2.13", linkedFragments130); + assertNull("2.14", linkedFragments240); + assertNull("2.15", linkedFragments110); + assertTrue("2.16", linkedFragments130.length == 1); + assertTrue("2.17", linkedFragments130[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the proper plugin + ILibrary[] libraries124 = pd124.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries240 = pd240.getRuntimeLibraries(); + ILibrary[] libraries110 = pd110.getRuntimeLibraries(); + assertTrue("2.18", libraries124.length == 0); + assertTrue("2.19", libraries130.length == 1); + assertTrue("2.20", libraries240.length == 0); + assertTrue("2.21", libraries110.length == 0); + assertTrue("2.22", ((Library)libraries130[0]).getName().equals("lib1.jar")); +} + +public void test3() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[5]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String[] pluginPath = new String[5]; + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/fragment3.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 4 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("3.0", all.length == 4); + assertTrue("3.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("3.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("3.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("3.4", all[3].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd124 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.4")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd240 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("2.4.0")); + IPluginDescriptor pd110 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.1.0")); + assertNotNull("3.5", pd124); + assertNotNull("3.6", pd130); + assertNotNull("3.7", pd240); + assertNotNull("3.8", pd110); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("3.9", fragments.length == 1); + assertTrue("3.10", fragments[0].getId().equals("fragmentTest")); + assertTrue("3.11", fragments[0].getPluginVersion().equals("2.1.1")); + + // Now make sure we hooked this fragment to the right plugin (and only + // one plugin) + PluginFragmentModel[] linkedFragments124 = ((PluginDescriptorModel)pd124).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments240 = ((PluginDescriptorModel)pd240).getFragments(); + PluginFragmentModel[] linkedFragments110 = ((PluginDescriptorModel)pd110).getFragments(); + assertNull("3.12", linkedFragments124); + assertNull("3.13", linkedFragments130); + assertNotNull("3.14", linkedFragments240); + assertNull("3.15", linkedFragments110); + assertTrue("3.16", linkedFragments240.length == 1); + assertTrue("3.17", linkedFragments240[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the proper plugin + ILibrary[] libraries124 = pd124.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries240 = pd240.getRuntimeLibraries(); + ILibrary[] libraries110 = pd110.getRuntimeLibraries(); + assertTrue("3.18", libraries124.length == 0); + assertTrue("3.19", libraries130.length == 0); + assertTrue("3.20", libraries240.length == 1); + assertTrue("3.21", libraries110.length == 0); + assertTrue("3.22", ((Library)libraries240[0]).getName().equals("lib1.jar")); +} + +public void test4() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[5]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String[] pluginPath = new String[5]; + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/fragment4.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 4 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("4.0", all.length == 4); + assertTrue("4.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("4.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("4.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("4.4", all[3].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd124 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.4")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd240 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("2.4.0")); + IPluginDescriptor pd110 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.1.0")); + assertNotNull("4.5", pd124); + assertNotNull("4.6", pd130); + assertNotNull("4.7", pd240); + assertNotNull("4.8", pd110); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("4.9", fragments.length == 1); + assertTrue("4.10", fragments[0].getId().equals("fragmentTest")); + assertTrue("4.11", fragments[0].getPluginVersion().equals("2.5.0")); + + // Now make sure we didn't hood this fragment anywhere + PluginFragmentModel[] linkedFragments124 = ((PluginDescriptorModel)pd124).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments240 = ((PluginDescriptorModel)pd240).getFragments(); + PluginFragmentModel[] linkedFragments110 = ((PluginDescriptorModel)pd110).getFragments(); + assertNull("4.12", linkedFragments124); + assertNull("4.13", linkedFragments130); + assertNull("4.14", linkedFragments240); + assertNull("4.15", linkedFragments110); + + // Finally, make sure the library entry didn't show + // up in any of the plugins + ILibrary[] libraries124 = pd124.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries240 = pd240.getRuntimeLibraries(); + ILibrary[] libraries110 = pd110.getRuntimeLibraries(); + assertTrue("4.16", libraries124.length == 0); + assertTrue("4.17", libraries130.length == 0); + assertTrue("4.18", libraries240.length == 0); + assertTrue("4.19", libraries110.length == 0); +} + +public void test5() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[5]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String[] pluginPath = new String[5]; + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/fragment5.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 4 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("5.0", all.length == 4); + assertTrue("5.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("5.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("5.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("5.4", all[3].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd124 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.4")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd240 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("2.4.0")); + IPluginDescriptor pd110 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.1.0")); + assertNotNull("5.5", pd124); + assertNotNull("5.6", pd130); + assertNotNull("5.7", pd240); + assertNotNull("5.8", pd110); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("5.9", fragments.length == 1); + assertTrue("5.10", fragments[0].getId().equals("fragmentTest")); + assertTrue("5.11", fragments[0].getPluginVersion().equals("1.2.4")); + + // Now make sure we hooked this fragment to the right plugin (and only + // one plugin) + PluginFragmentModel[] linkedFragments124 = ((PluginDescriptorModel)pd124).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments240 = ((PluginDescriptorModel)pd240).getFragments(); + PluginFragmentModel[] linkedFragments110 = ((PluginDescriptorModel)pd110).getFragments(); + assertNull("5.12", linkedFragments124); + assertNotNull("5.13", linkedFragments130); + assertNull("5.14", linkedFragments240); + assertNull("5.15", linkedFragments110); + assertTrue("5.16", linkedFragments130.length == 1); + assertTrue("5.17", linkedFragments130[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the proper plugin + ILibrary[] libraries124 = pd124.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries240 = pd240.getRuntimeLibraries(); + ILibrary[] libraries110 = pd110.getRuntimeLibraries(); + assertTrue("5.18", libraries124.length == 0); + assertTrue("5.19", libraries130.length == 1); + assertTrue("5.20", libraries240.length == 0); + assertTrue("5.21", libraries110.length == 0); + assertTrue("5.22", ((Library)libraries130[0]).getName().equals("lib1.jar")); +} + +public void test6() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[5]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String[] pluginPath = new String[5]; + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/fragment6.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 4 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("6.0", all.length == 4); + assertTrue("6.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("6.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("6.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("6.4", all[3].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd124 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.4")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd240 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("2.4.0")); + IPluginDescriptor pd110 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.1.0")); + assertNotNull("6.5", pd124); + assertNotNull("6.6", pd130); + assertNotNull("6.7", pd240); + assertNotNull("6.8", pd110); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("6.9", fragments.length == 1); + assertTrue("6.10", fragments[0].getId().equals("fragmentTest")); + assertTrue("6.11", fragments[0].getPluginVersion().equals("3.0.0")); + + // Now make sure we didn't hook this fragment anywhere + PluginFragmentModel[] linkedFragments124 = ((PluginDescriptorModel)pd124).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments240 = ((PluginDescriptorModel)pd240).getFragments(); + PluginFragmentModel[] linkedFragments110 = ((PluginDescriptorModel)pd110).getFragments(); + assertNull("6.12", linkedFragments124); + assertNull("6.13", linkedFragments130); + assertNull("6.14", linkedFragments240); + assertNull("6.15", linkedFragments110); + + // Finally, make sure the library entry in the fragment doesn't + // show up in any of the plugins + ILibrary[] libraries124 = pd124.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries240 = pd240.getRuntimeLibraries(); + ILibrary[] libraries110 = pd110.getRuntimeLibraries(); + assertTrue("6.16", libraries124.length == 0); + assertTrue("6.17", libraries130.length == 0); + assertTrue("6.18", libraries240.length == 0); + assertTrue("6.19", libraries110.length == 0); +} + +public void test7() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[5]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String[] pluginPath = new String[5]; + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.2/fragment7.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 4 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("7.0", all.length == 4); + assertTrue("7.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("7.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("7.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("7.4", all[3].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd124 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.4")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd240 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("2.4.0")); + IPluginDescriptor pd110 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.1.0")); + assertNotNull("7.5", pd124); + assertNotNull("7.6", pd130); + assertNotNull("7.7", pd240); + assertNotNull("7.8", pd110); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("7.9", fragments.length == 1); + assertTrue("7.10", fragments[0].getId().equals("fragmentTest")); + assertTrue("7.11", fragments[0].getPluginVersion().equals("2.4.0")); + + // Now make sure we hooked this fragment to the right plugin (and only + // one plugin) + PluginFragmentModel[] linkedFragments124 = ((PluginDescriptorModel)pd124).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments240 = ((PluginDescriptorModel)pd240).getFragments(); + PluginFragmentModel[] linkedFragments110 = ((PluginDescriptorModel)pd110).getFragments(); + assertNull("7.12", linkedFragments124); + assertNull("7.13", linkedFragments130); + assertNotNull("7.14", linkedFragments240); + assertNull("7.15", linkedFragments110); + assertTrue("7.16", linkedFragments240.length == 1); + assertTrue("7.17", linkedFragments240[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the proper plugin + ILibrary[] libraries124 = pd124.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries240 = pd240.getRuntimeLibraries(); + ILibrary[] libraries110 = pd110.getRuntimeLibraries(); + assertTrue("7.18", libraries124.length == 0); + assertTrue("7.19", libraries130.length == 0); + assertTrue("7.20", libraries240.length == 1); + assertTrue("7.21", libraries110.length == 0); + assertTrue("7.22", ((Library)libraries240[0]).getName().equals("lib1.jar")); +} + +public static Test suite() { + TestSuite suite = new TestSuite(); + suite.addTest(new FragmentResolveTest_2("test1")); + suite.addTest(new FragmentResolveTest_2("test2")); + suite.addTest(new FragmentResolveTest_2("test3")); + suite.addTest(new FragmentResolveTest_2("test4")); + suite.addTest(new FragmentResolveTest_2("test5")); + suite.addTest(new FragmentResolveTest_2("test6")); + suite.addTest(new FragmentResolveTest_2("test7")); + return suite; +} +} + +
diff --git a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_3.java b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_3.java new file mode 100644 index 0000000..340a2f7 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_3.java
@@ -0,0 +1,94 @@ +package org.eclipse.core.tests.internal.plugins; + +import java.net.URL; +import junit.framework.*; +import org.eclipse.core.runtime.*; +import org.eclipse.core.runtime.model.*; +import org.eclipse.core.internal.plugins.InternalFactory; +import org.eclipse.core.internal.plugins.*; +import org.eclipse.core.internal.runtime.InternalPlatform; +import org.eclipse.core.internal.runtime.Policy; +import org.eclipse.core.tests.harness.*; + +public class FragmentResolveTest_3 extends EclipseWorkspaceTest { +public FragmentResolveTest_3() { + super(null); +} +public FragmentResolveTest_3(String name) { + super(name); +} + +public void fullTest() { + String[] fragmentIds = {"1.2.1", "1.2.2", "1.2.0", "1.1.0", + "1.1.1", "1.5.0", "1.5.1", "3.0.0", "3.2.1"}; + + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + + for (int i = 0; i < fragmentIds.length; i++) { + URL pluginURLs[] = new URL[2]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.3/plugin1.xml"); + pluginURLs[0] = new URL (pluginPath); + pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.3/fragment" + (i + 1) + ".xml"); + pluginURLs[1] = new URL (pluginPath); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = ParseHelper.doParsing(factory, pluginURLs, true); + IPluginDescriptor pd = registry.getPluginDescriptor("tests.a"); + + // check descriptor + assertNotNull(i + ".0", pd); + assertTrue(i + ".1", pd.getUniqueIdentifier().equals("tests.a")); + + // check to see if we have all plugins + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue(i + ".2", all.length == 1); + assertTrue(i + ".3", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue(i + ".4", all[0].getVersionIdentifier().equals(new PluginVersionIdentifier("1.2.1"))); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragment = ((PluginRegistry) registry).getFragments("fragmentTest"); + assertTrue(i + ".5", fragment.length == 1); + assertTrue(i + ".6", fragment[0].getId().equals("fragmentTest")); + + // Have we got all the fragments + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue(i + ".7", fragments.length == 1); + assertTrue(i + ".8", fragments[0].getId().equals("fragmentTest")); + assertTrue(i + ".9", fragments[0].getPluginVersion().equals(fragmentIds[i])); + + if (fragmentIds[i].equals("1.2.1")) { + // Now make sure we hooked this fragment and this plugin + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNotNull(i + ".10", linkedFragments); + assertTrue(i + ".11", linkedFragments.length == 1); + assertTrue(i + ".12", linkedFragments[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue(i + ".13", libraries.length == 1); + assertTrue(i + ".14", ((Library)libraries[0]).getName().equals("lib1.jar")); + } else { + // Now make sure we didn't hook this fragment and this plugin. + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNull(i + ".10", linkedFragments); + + // Finally, make sure the library entry in the fragment is + // not part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue(i + ".11", libraries.length == 0); + } + } +} + +public static Test suite() { + TestSuite suite = new TestSuite(); + suite.addTest(new FragmentResolveTest_3("fullTest")); + return suite; +} +} + +
diff --git a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_4.java b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_4.java new file mode 100644 index 0000000..e79e83a --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_4.java
@@ -0,0 +1,152 @@ +package org.eclipse.core.tests.internal.plugins; + +import java.net.URL; +import junit.framework.*; +import org.eclipse.core.runtime.*; +import org.eclipse.core.runtime.model.*; +import org.eclipse.core.internal.plugins.InternalFactory; +import org.eclipse.core.internal.plugins.*; +import org.eclipse.core.internal.runtime.InternalPlatform; +import org.eclipse.core.internal.runtime.Policy; +import org.eclipse.core.tests.harness.*; + +public class FragmentResolveTest_4 extends EclipseWorkspaceTest { +public FragmentResolveTest_4() { + super(null); +} +public FragmentResolveTest_4(String name) { + super(name); +} + +static PluginRegistry doParsing(InternalFactory factory, URL[] pluginPath, boolean doResolve) { + PluginRegistry registry = (PluginRegistry) RegistryLoader.parseRegistry(pluginPath, factory, false); + if (doResolve) + // don't trim the disabled plugins for these tests + registry.resolve(false, true); + registry.markReadOnly(); + registry.startup(null); + return registry; +} + +public void fullTest() { + String[] fragmentIds = {"1.2.1", "1.2.2", "1.2.0", "1.1.0", + "1.1.1", "1.5.0", "1.5.1", "3.0.0", "3.2.1"}; + + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[6]; + String[] pluginPath = new String[6]; + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + try { + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.4/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.4/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.4/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.4/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.4/plugin5.xml"); + for (int i = 0; i < pluginPath.length - 1; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + + for (int i = 0; i < fragmentIds.length; i++) { + pluginPath[5] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.4/fragment" + (i + 1) + ".xml"); + try { + pluginURLs[5] = new URL (pluginPath[5]); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 5 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue(i + ".0", all.length == 5); + assertTrue(i + ".1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue(i + ".2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue(i + ".3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue(i + ".4", all[3].getUniqueIdentifier().equals("tests.a")); + assertTrue(i + ".5", all[4].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd121 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.1")); + IPluginDescriptor pd140 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.4.0")); + IPluginDescriptor pd117 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.1.7")); + IPluginDescriptor pd302 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("3.0.2")); + IPluginDescriptor pd021 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("0.2.1")); + assertNotNull(i + ".6", pd121); + assertNotNull(i + ".7", pd140); + assertNotNull(i + ".8", pd117); + assertNotNull(i + ".9", pd302); + assertNotNull(i + ".10", pd021); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue(i + ".11", fragments.length == 1); + assertTrue(i + ".12", fragments[0].getId().equals("fragmentTest")); + assertTrue(i + ".13", fragments[0].getPluginVersion().equals(fragmentIds[i])); + + if (fragmentIds[i].equals("1.2.1")) { + // Now make sure we hooked this fragment to the right plugin (and only + // one plugin) + PluginFragmentModel[] linkedFragments121 = ((PluginDescriptorModel)pd121).getFragments(); + PluginFragmentModel[] linkedFragments140 = ((PluginDescriptorModel)pd140).getFragments(); + PluginFragmentModel[] linkedFragments117 = ((PluginDescriptorModel)pd117).getFragments(); + PluginFragmentModel[] linkedFragments302 = ((PluginDescriptorModel)pd302).getFragments(); + PluginFragmentModel[] linkedFragments021 = ((PluginDescriptorModel)pd021).getFragments(); + assertNotNull(i + ".14", linkedFragments121); + assertNull(i + ".15", linkedFragments140); + assertNull(i + ".16", linkedFragments117); + assertNull(i + ".17", linkedFragments302); + assertNull(i + ".18", linkedFragments021); + assertTrue(i + ".19", linkedFragments121.length == 1); + assertTrue(i + ".20", linkedFragments121[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the proper plugin + ILibrary[] libraries121 = pd121.getRuntimeLibraries(); + ILibrary[] libraries140 = pd140.getRuntimeLibraries(); + ILibrary[] libraries117 = pd117.getRuntimeLibraries(); + ILibrary[] libraries302 = pd302.getRuntimeLibraries(); + ILibrary[] libraries021 = pd021.getRuntimeLibraries(); + assertTrue(i + ".21", libraries121.length == 1); + assertTrue(i + ".22", libraries140.length == 0); + assertTrue(i + ".23", libraries117.length == 0); + assertTrue(i + ".24", libraries302.length == 0); + assertTrue(i + ".25", libraries021.length == 0); + assertTrue(i + ".26", ((Library)libraries121[0]).getName().equals("lib1.jar")); + } else { + // Now make sure we didn't hook this fragment to any plugin + PluginFragmentModel[] linkedFragments121 = ((PluginDescriptorModel)pd121).getFragments(); + PluginFragmentModel[] linkedFragments140 = ((PluginDescriptorModel)pd140).getFragments(); + PluginFragmentModel[] linkedFragments117 = ((PluginDescriptorModel)pd117).getFragments(); + PluginFragmentModel[] linkedFragments302 = ((PluginDescriptorModel)pd302).getFragments(); + PluginFragmentModel[] linkedFragments021 = ((PluginDescriptorModel)pd021).getFragments(); + assertNull(i + ".14", linkedFragments121); + assertNull(i + ".15", linkedFragments140); + assertNull(i + ".16", linkedFragments117); + assertNull(i + ".17", linkedFragments302); + assertNull(i + ".18", linkedFragments021); + + // Finally, make sure the library entry in the fragment is + // not part of the proper plugin + ILibrary[] libraries121 = pd121.getRuntimeLibraries(); + ILibrary[] libraries140 = pd140.getRuntimeLibraries(); + ILibrary[] libraries117 = pd117.getRuntimeLibraries(); + ILibrary[] libraries302 = pd302.getRuntimeLibraries(); + ILibrary[] libraries021 = pd021.getRuntimeLibraries(); + assertTrue(i + ".19", libraries121.length == 0); + assertTrue(i + ".20", libraries140.length == 0); + assertTrue(i + ".21", libraries117.length == 0); + assertTrue(i + ".22", libraries302.length == 0); + assertTrue(i + ".23", libraries021.length == 0); + } + } +} + +public static Test suite() { + TestSuite suite = new TestSuite(); + suite.addTest(new FragmentResolveTest_4("fullTest")); + return suite; +} +} + +
diff --git a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_5.java b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_5.java new file mode 100644 index 0000000..4c98781 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_5.java
@@ -0,0 +1,96 @@ +package org.eclipse.core.tests.internal.plugins; + +import java.net.URL; +import junit.framework.*; +import org.eclipse.core.runtime.*; +import org.eclipse.core.runtime.model.*; +import org.eclipse.core.internal.plugins.InternalFactory; +import org.eclipse.core.internal.plugins.*; +import org.eclipse.core.internal.runtime.InternalPlatform; +import org.eclipse.core.internal.runtime.Policy; +import org.eclipse.core.tests.harness.*; + +public class FragmentResolveTest_5 extends EclipseWorkspaceTest { +public FragmentResolveTest_5() { + super(null); +} +public FragmentResolveTest_5(String name) { + super(name); +} + +public void fullTest() { + String[] fragmentIds = {"1.3.2", "1.3.7", "1.2.5", "1.2.8", + "1.2.2", "1.2.0", "1.1.5", "1.1.0", "1.3.5", "3.0.0", "3.2.5", "3.2.4"}; + boolean[] matchesFragment = {false, false, true, false, + true, true, false, false, false, false, false, false}; + + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + + for (int i = 0; i < fragmentIds.length; i++) { + URL pluginURLs[] = new URL[2]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.5/plugin1.xml"); + pluginURLs[0] = new URL (pluginPath); + pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.5/fragment" + (i + 1) + ".xml"); + pluginURLs[1] = new URL (pluginPath); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = ParseHelper.doParsing(factory, pluginURLs, true); + IPluginDescriptor pd = registry.getPluginDescriptor("tests.a"); + + // check descriptor + assertNotNull(i + ".0", pd); + assertTrue(i + ".1", pd.getUniqueIdentifier().equals("tests.a")); + + // check to see if we have all plugins + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue(i + ".2", all.length == 1); + assertTrue(i + ".3", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue(i + ".4", all[0].getVersionIdentifier().equals(new PluginVersionIdentifier("1.2.5"))); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragment = ((PluginRegistry) registry).getFragments("fragmentTest"); + assertTrue(i + ".5", fragment.length == 1); + assertTrue(i + ".6", fragment[0].getId().equals("fragmentTest")); + + // Have we got all the fragments + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue(i + ".7", fragments.length == 1); + assertTrue(i + ".8", fragments[0].getId().equals("fragmentTest")); + assertTrue(i + ".9", fragments[0].getPluginVersion().equals(fragmentIds[i])); + + if (matchesFragment[i]) { + // Now make sure we hooked this fragment and this plugin + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNotNull(i + ".10", linkedFragments); + assertTrue(i + ".11", linkedFragments.length == 1); + assertTrue(i + ".12", linkedFragments[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue(i + ".13", libraries.length == 1); + assertTrue(i + ".14", ((Library)libraries[0]).getName().equals("lib1.jar")); + } else { + // Now make sure we didn't hook this fragment and this plugin. + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNull(i + ".10", linkedFragments); + + // Finally, make sure the library entry in the fragment is + // not part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue(i + ".11", libraries.length == 0); + } + } +} + +public static Test suite() { + TestSuite suite = new TestSuite(); + suite.addTest(new FragmentResolveTest_5("fullTest")); + return suite; +} +} + +
diff --git a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_6.java b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_6.java new file mode 100644 index 0000000..27d84dd --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_6.java
@@ -0,0 +1,796 @@ +package org.eclipse.core.tests.internal.plugins; + +import java.net.URL; +import junit.framework.*; +import org.eclipse.core.runtime.*; +import org.eclipse.core.runtime.model.*; +import org.eclipse.core.internal.plugins.InternalFactory; +import org.eclipse.core.internal.plugins.*; +import org.eclipse.core.internal.runtime.InternalPlatform; +import org.eclipse.core.internal.runtime.Policy; +import org.eclipse.core.tests.harness.*; + +public class FragmentResolveTest_6 extends EclipseWorkspaceTest { +public FragmentResolveTest_6() { + super(null); +} +public FragmentResolveTest_6(String name) { + super(name); +} + +static PluginRegistry doParsing(InternalFactory factory, URL[] pluginPath, boolean doResolve) { + PluginRegistry registry = (PluginRegistry) RegistryLoader.parseRegistry(pluginPath, factory, false); + if (doResolve) + // don't trim the disabled plugins for these tests + registry.resolve(false, true); + registry.markReadOnly(); + registry.startup(null); + return registry; +} + +public void test1() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[7]; + String[] pluginPath = new String[7]; + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + try { + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin5.xml"); + pluginPath[5] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin6.xml"); + pluginPath[6] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/fragment1.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 5 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("1.0", all.length == 6); + assertTrue("1.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.4", all[3].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.5", all[4].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.6", all[5].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd125 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.5")); + IPluginDescriptor pd128 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.8")); + IPluginDescriptor pd123 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.3")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd300 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("3.0.0")); + IPluginDescriptor pd453 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("4.5.3")); + assertNotNull("1.7", pd125); + assertNotNull("1.8", pd128); + assertNotNull("1.9", pd123); + assertNotNull("1.10", pd130); + assertNotNull("1.11", pd300); + assertNotNull("1.12", pd453); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("1.13", fragments.length == 1); + assertTrue("1.14", fragments[0].getId().equals("fragmentTest")); + assertTrue("1.15", fragments[0].getPluginVersion().equals("5.9.8")); + + // Now make sure we didn't hook this fragment to any plugin + PluginFragmentModel[] linkedFragments125 = ((PluginDescriptorModel)pd125).getFragments(); + PluginFragmentModel[] linkedFragments128 = ((PluginDescriptorModel)pd128).getFragments(); + PluginFragmentModel[] linkedFragments123 = ((PluginDescriptorModel)pd123).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments300 = ((PluginDescriptorModel)pd300).getFragments(); + PluginFragmentModel[] linkedFragments453 = ((PluginDescriptorModel)pd453).getFragments(); + assertNull("1.16", linkedFragments125); + assertNull("1.17", linkedFragments128); + assertNull("1.18", linkedFragments123); + assertNull("1.19", linkedFragments130); + assertNull("1.20", linkedFragments300); + assertNull("1.21", linkedFragments453); + + // Finally, make sure the library entry in the fragment is + // not part of any plugin + ILibrary[] libraries125 = pd125.getRuntimeLibraries(); + ILibrary[] libraries128 = pd128.getRuntimeLibraries(); + ILibrary[] libraries123 = pd123.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries300 = pd300.getRuntimeLibraries(); + ILibrary[] libraries453 = pd453.getRuntimeLibraries(); + assertTrue("1.22", libraries125.length == 0); + assertTrue("1.23", libraries128.length == 0); + assertTrue("1.24", libraries123.length == 0); + assertTrue("1.25", libraries130.length == 0); + assertTrue("1.26", libraries300.length == 0); + assertTrue("1.27", libraries453.length == 0); +} + +public void test2() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[7]; + String[] pluginPath = new String[7]; + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + try { + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin5.xml"); + pluginPath[5] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin6.xml"); + pluginPath[6] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/fragment2.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 5 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("1.0", all.length == 6); + assertTrue("1.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.4", all[3].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.5", all[4].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.6", all[5].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd125 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.5")); + IPluginDescriptor pd128 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.8")); + IPluginDescriptor pd123 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.3")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd300 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("3.0.0")); + IPluginDescriptor pd453 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("4.5.3")); + assertNotNull("1.7", pd125); + assertNotNull("1.8", pd128); + assertNotNull("1.9", pd123); + assertNotNull("1.10", pd130); + assertNotNull("1.11", pd300); + assertNotNull("1.12", pd453); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("1.13", fragments.length == 1); + assertTrue("1.14", fragments[0].getId().equals("fragmentTest")); + assertTrue("1.15", fragments[0].getPluginVersion().equals("1.2.3")); + + // Now make sure we hooked this fragment to the right plugin (and only + // one plugin) + PluginFragmentModel[] linkedFragments125 = ((PluginDescriptorModel)pd125).getFragments(); + PluginFragmentModel[] linkedFragments128 = ((PluginDescriptorModel)pd128).getFragments(); + PluginFragmentModel[] linkedFragments123 = ((PluginDescriptorModel)pd123).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments300 = ((PluginDescriptorModel)pd300).getFragments(); + PluginFragmentModel[] linkedFragments453 = ((PluginDescriptorModel)pd453).getFragments(); + assertNull("1.16", linkedFragments125); + assertNotNull("1.17", linkedFragments128); + assertNull("1.18", linkedFragments123); + assertNull("1.19", linkedFragments130); + assertNull("1.20", linkedFragments300); + assertNull("1.21", linkedFragments453); + assertTrue("1.22", linkedFragments128.length == 1); + assertTrue("1.23", linkedFragments128[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the proper plugin + ILibrary[] libraries125 = pd125.getRuntimeLibraries(); + ILibrary[] libraries128 = pd128.getRuntimeLibraries(); + ILibrary[] libraries123 = pd123.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries300 = pd300.getRuntimeLibraries(); + ILibrary[] libraries453 = pd453.getRuntimeLibraries(); + assertTrue("1.24", libraries125.length == 0); + assertTrue("1.25", libraries128.length == 1); + assertTrue("1.26", libraries123.length == 0); + assertTrue("1.27", libraries130.length == 0); + assertTrue("1.28", libraries300.length == 0); + assertTrue("1.29", libraries453.length == 0); + assertTrue("1.30", ((Library)libraries128[0]).getName().equals("lib1.jar")); +} + +public void test3() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[7]; + String[] pluginPath = new String[7]; + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + try { + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin5.xml"); + pluginPath[5] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin6.xml"); + pluginPath[6] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/fragment3.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 5 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("1.0", all.length == 6); + assertTrue("1.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.4", all[3].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.5", all[4].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.6", all[5].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd125 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.5")); + IPluginDescriptor pd128 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.8")); + IPluginDescriptor pd123 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.3")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd300 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("3.0.0")); + IPluginDescriptor pd453 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("4.5.3")); + assertNotNull("1.7", pd125); + assertNotNull("1.8", pd128); + assertNotNull("1.9", pd123); + assertNotNull("1.10", pd130); + assertNotNull("1.11", pd300); + assertNotNull("1.12", pd453); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("1.13", fragments.length == 1); + assertTrue("1.14", fragments[0].getId().equals("fragmentTest")); + assertTrue("1.15", fragments[0].getPluginVersion().equals("1.2.4")); + + // Now make sure we hooked this fragment to the right plugin (and only + // one plugin) + PluginFragmentModel[] linkedFragments125 = ((PluginDescriptorModel)pd125).getFragments(); + PluginFragmentModel[] linkedFragments128 = ((PluginDescriptorModel)pd128).getFragments(); + PluginFragmentModel[] linkedFragments123 = ((PluginDescriptorModel)pd123).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments300 = ((PluginDescriptorModel)pd300).getFragments(); + PluginFragmentModel[] linkedFragments453 = ((PluginDescriptorModel)pd453).getFragments(); + assertNull("1.16", linkedFragments125); + assertNotNull("1.17", linkedFragments128); + assertNull("1.18", linkedFragments123); + assertNull("1.19", linkedFragments130); + assertNull("1.20", linkedFragments300); + assertNull("1.21", linkedFragments453); + assertTrue("1.22", linkedFragments128.length == 1); + assertTrue("1.23", linkedFragments128[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the proper plugin + ILibrary[] libraries125 = pd125.getRuntimeLibraries(); + ILibrary[] libraries128 = pd128.getRuntimeLibraries(); + ILibrary[] libraries123 = pd123.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries300 = pd300.getRuntimeLibraries(); + ILibrary[] libraries453 = pd453.getRuntimeLibraries(); + assertTrue("1.24", libraries125.length == 0); + assertTrue("1.25", libraries128.length == 1); + assertTrue("1.26", libraries123.length == 0); + assertTrue("1.27", libraries130.length == 0); + assertTrue("1.28", libraries300.length == 0); + assertTrue("1.29", libraries453.length == 0); + assertTrue("1.30", ((Library)libraries128[0]).getName().equals("lib1.jar")); +} + +public void test4() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[7]; + String[] pluginPath = new String[7]; + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + try { + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin5.xml"); + pluginPath[5] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin6.xml"); + pluginPath[6] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/fragment4.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 5 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("1.0", all.length == 6); + assertTrue("1.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.4", all[3].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.5", all[4].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.6", all[5].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd125 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.5")); + IPluginDescriptor pd128 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.8")); + IPluginDescriptor pd123 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.3")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd300 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("3.0.0")); + IPluginDescriptor pd453 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("4.5.3")); + assertNotNull("1.7", pd125); + assertNotNull("1.8", pd128); + assertNotNull("1.9", pd123); + assertNotNull("1.10", pd130); + assertNotNull("1.11", pd300); + assertNotNull("1.12", pd453); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("1.13", fragments.length == 1); + assertTrue("1.14", fragments[0].getId().equals("fragmentTest")); + assertTrue("1.15", fragments[0].getPluginVersion().equals("2.0.0")); + + // Now make sure we didn't hook this fragment to any plugin + PluginFragmentModel[] linkedFragments125 = ((PluginDescriptorModel)pd125).getFragments(); + PluginFragmentModel[] linkedFragments128 = ((PluginDescriptorModel)pd128).getFragments(); + PluginFragmentModel[] linkedFragments123 = ((PluginDescriptorModel)pd123).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments300 = ((PluginDescriptorModel)pd300).getFragments(); + PluginFragmentModel[] linkedFragments453 = ((PluginDescriptorModel)pd453).getFragments(); + assertNull("1.16", linkedFragments125); + assertNull("1.17", linkedFragments128); + assertNull("1.18", linkedFragments123); + assertNull("1.19", linkedFragments130); + assertNull("1.20", linkedFragments300); + assertNull("1.21", linkedFragments453); + + // Finally, make sure the library entry in the fragment is + // not part of any plugin + ILibrary[] libraries125 = pd125.getRuntimeLibraries(); + ILibrary[] libraries128 = pd128.getRuntimeLibraries(); + ILibrary[] libraries123 = pd123.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries300 = pd300.getRuntimeLibraries(); + ILibrary[] libraries453 = pd453.getRuntimeLibraries(); + assertTrue("1.22", libraries125.length == 0); + assertTrue("1.23", libraries128.length == 0); + assertTrue("1.24", libraries123.length == 0); + assertTrue("1.25", libraries130.length == 0); + assertTrue("1.26", libraries300.length == 0); + assertTrue("1.27", libraries453.length == 0); +} + +public void test5() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[7]; + String[] pluginPath = new String[7]; + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + try { + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin5.xml"); + pluginPath[5] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin6.xml"); + pluginPath[6] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/fragment5.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 5 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("1.0", all.length == 6); + assertTrue("1.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.4", all[3].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.5", all[4].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.6", all[5].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd125 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.5")); + IPluginDescriptor pd128 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.8")); + IPluginDescriptor pd123 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.3")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd300 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("3.0.0")); + IPluginDescriptor pd453 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("4.5.3")); + assertNotNull("1.7", pd125); + assertNotNull("1.8", pd128); + assertNotNull("1.9", pd123); + assertNotNull("1.10", pd130); + assertNotNull("1.11", pd300); + assertNotNull("1.12", pd453); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("1.13", fragments.length == 1); + assertTrue("1.14", fragments[0].getId().equals("fragmentTest")); + assertTrue("1.15", fragments[0].getPluginVersion().equals("3.0.4")); + + // Now make sure we didn't hook this fragment to any plugin + PluginFragmentModel[] linkedFragments125 = ((PluginDescriptorModel)pd125).getFragments(); + PluginFragmentModel[] linkedFragments128 = ((PluginDescriptorModel)pd128).getFragments(); + PluginFragmentModel[] linkedFragments123 = ((PluginDescriptorModel)pd123).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments300 = ((PluginDescriptorModel)pd300).getFragments(); + PluginFragmentModel[] linkedFragments453 = ((PluginDescriptorModel)pd453).getFragments(); + assertNull("1.16", linkedFragments125); + assertNull("1.17", linkedFragments128); + assertNull("1.18", linkedFragments123); + assertNull("1.19", linkedFragments130); + assertNull("1.20", linkedFragments300); + assertNull("1.21", linkedFragments453); + + // Finally, make sure the library entry in the fragment is + // not part of any plugin + ILibrary[] libraries125 = pd125.getRuntimeLibraries(); + ILibrary[] libraries128 = pd128.getRuntimeLibraries(); + ILibrary[] libraries123 = pd123.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries300 = pd300.getRuntimeLibraries(); + ILibrary[] libraries453 = pd453.getRuntimeLibraries(); + assertTrue("1.22", libraries125.length == 0); + assertTrue("1.23", libraries128.length == 0); + assertTrue("1.24", libraries123.length == 0); + assertTrue("1.25", libraries130.length == 0); + assertTrue("1.26", libraries300.length == 0); + assertTrue("1.27", libraries453.length == 0); +} + +public void test6() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[7]; + String[] pluginPath = new String[7]; + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + try { + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin5.xml"); + pluginPath[5] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin6.xml"); + pluginPath[6] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/fragment6.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 5 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("1.0", all.length == 6); + assertTrue("1.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.4", all[3].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.5", all[4].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.6", all[5].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd125 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.5")); + IPluginDescriptor pd128 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.8")); + IPluginDescriptor pd123 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.3")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd300 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("3.0.0")); + IPluginDescriptor pd453 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("4.5.3")); + assertNotNull("1.7", pd125); + assertNotNull("1.8", pd128); + assertNotNull("1.9", pd123); + assertNotNull("1.10", pd130); + assertNotNull("1.11", pd300); + assertNotNull("1.12", pd453); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("1.13", fragments.length == 1); + assertTrue("1.14", fragments[0].getId().equals("fragmentTest")); + assertTrue("1.15", fragments[0].getPluginVersion().equals("4.6.2")); + + // Now make sure we didn't hook this fragment to any plugin + PluginFragmentModel[] linkedFragments125 = ((PluginDescriptorModel)pd125).getFragments(); + PluginFragmentModel[] linkedFragments128 = ((PluginDescriptorModel)pd128).getFragments(); + PluginFragmentModel[] linkedFragments123 = ((PluginDescriptorModel)pd123).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments300 = ((PluginDescriptorModel)pd300).getFragments(); + PluginFragmentModel[] linkedFragments453 = ((PluginDescriptorModel)pd453).getFragments(); + assertNull("1.16", linkedFragments125); + assertNull("1.17", linkedFragments128); + assertNull("1.18", linkedFragments123); + assertNull("1.19", linkedFragments130); + assertNull("1.20", linkedFragments300); + assertNull("1.21", linkedFragments453); + + // Finally, make sure the library entry in the fragment is + // not part of any plugin + ILibrary[] libraries125 = pd125.getRuntimeLibraries(); + ILibrary[] libraries128 = pd128.getRuntimeLibraries(); + ILibrary[] libraries123 = pd123.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries300 = pd300.getRuntimeLibraries(); + ILibrary[] libraries453 = pd453.getRuntimeLibraries(); + assertTrue("1.22", libraries125.length == 0); + assertTrue("1.23", libraries128.length == 0); + assertTrue("1.24", libraries123.length == 0); + assertTrue("1.25", libraries130.length == 0); + assertTrue("1.26", libraries300.length == 0); + assertTrue("1.27", libraries453.length == 0); +} + +public void test7() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[7]; + String[] pluginPath = new String[7]; + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + try { + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin5.xml"); + pluginPath[5] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin6.xml"); + pluginPath[6] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/fragment7.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 5 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("1.0", all.length == 6); + assertTrue("1.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.4", all[3].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.5", all[4].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.6", all[5].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd125 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.5")); + IPluginDescriptor pd128 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.8")); + IPluginDescriptor pd123 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.3")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd300 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("3.0.0")); + IPluginDescriptor pd453 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("4.5.3")); + assertNotNull("1.7", pd125); + assertNotNull("1.8", pd128); + assertNotNull("1.9", pd123); + assertNotNull("1.10", pd130); + assertNotNull("1.11", pd300); + assertNotNull("1.12", pd453); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("1.13", fragments.length == 1); + assertTrue("1.14", fragments[0].getId().equals("fragmentTest")); + assertTrue("1.15", fragments[0].getPluginVersion().equals("4.5.8")); + + // Now make sure we didn't hook this fragment to any plugin + PluginFragmentModel[] linkedFragments125 = ((PluginDescriptorModel)pd125).getFragments(); + PluginFragmentModel[] linkedFragments128 = ((PluginDescriptorModel)pd128).getFragments(); + PluginFragmentModel[] linkedFragments123 = ((PluginDescriptorModel)pd123).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments300 = ((PluginDescriptorModel)pd300).getFragments(); + PluginFragmentModel[] linkedFragments453 = ((PluginDescriptorModel)pd453).getFragments(); + assertNull("1.16", linkedFragments125); + assertNull("1.17", linkedFragments128); + assertNull("1.18", linkedFragments123); + assertNull("1.19", linkedFragments130); + assertNull("1.20", linkedFragments300); + assertNull("1.21", linkedFragments453); + + // Finally, make sure the library entry in the fragment is + // not part of any plugin + ILibrary[] libraries125 = pd125.getRuntimeLibraries(); + ILibrary[] libraries128 = pd128.getRuntimeLibraries(); + ILibrary[] libraries123 = pd123.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries300 = pd300.getRuntimeLibraries(); + ILibrary[] libraries453 = pd453.getRuntimeLibraries(); + assertTrue("1.22", libraries125.length == 0); + assertTrue("1.23", libraries128.length == 0); + assertTrue("1.24", libraries123.length == 0); + assertTrue("1.25", libraries130.length == 0); + assertTrue("1.26", libraries300.length == 0); + assertTrue("1.27", libraries453.length == 0); +} + +public void test8() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[7]; + String[] pluginPath = new String[7]; + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + try { + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin5.xml"); + pluginPath[5] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin6.xml"); + pluginPath[6] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/fragment8.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 5 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("1.0", all.length == 6); + assertTrue("1.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.4", all[3].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.5", all[4].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.6", all[5].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd125 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.5")); + IPluginDescriptor pd128 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.8")); + IPluginDescriptor pd123 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.3")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd300 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("3.0.0")); + IPluginDescriptor pd453 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("4.5.3")); + assertNotNull("1.7", pd125); + assertNotNull("1.8", pd128); + assertNotNull("1.9", pd123); + assertNotNull("1.10", pd130); + assertNotNull("1.11", pd300); + assertNotNull("1.12", pd453); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("1.13", fragments.length == 1); + assertTrue("1.14", fragments[0].getId().equals("fragmentTest")); + assertTrue("1.15", fragments[0].getPluginVersion().equals("4.4.2")); + + // Now make sure we didn't hook this fragment to any plugin + PluginFragmentModel[] linkedFragments125 = ((PluginDescriptorModel)pd125).getFragments(); + PluginFragmentModel[] linkedFragments128 = ((PluginDescriptorModel)pd128).getFragments(); + PluginFragmentModel[] linkedFragments123 = ((PluginDescriptorModel)pd123).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments300 = ((PluginDescriptorModel)pd300).getFragments(); + PluginFragmentModel[] linkedFragments453 = ((PluginDescriptorModel)pd453).getFragments(); + assertNull("1.16", linkedFragments125); + assertNull("1.17", linkedFragments128); + assertNull("1.18", linkedFragments123); + assertNull("1.19", linkedFragments130); + assertNull("1.20", linkedFragments300); + assertNull("1.21", linkedFragments453); + + // Finally, make sure the library entry in the fragment is + // not part of any plugin + ILibrary[] libraries125 = pd125.getRuntimeLibraries(); + ILibrary[] libraries128 = pd128.getRuntimeLibraries(); + ILibrary[] libraries123 = pd123.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries300 = pd300.getRuntimeLibraries(); + ILibrary[] libraries453 = pd453.getRuntimeLibraries(); + assertTrue("1.22", libraries125.length == 0); + assertTrue("1.23", libraries128.length == 0); + assertTrue("1.24", libraries123.length == 0); + assertTrue("1.25", libraries130.length == 0); + assertTrue("1.26", libraries300.length == 0); + assertTrue("1.27", libraries453.length == 0); +} + +public void test9() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[7]; + String[] pluginPath = new String[7]; + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + try { + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin5.xml"); + pluginPath[5] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/plugin6.xml"); + pluginPath[6] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.6/fragment9.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 5 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("1.0", all.length == 6); + assertTrue("1.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.4", all[3].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.5", all[4].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.6", all[5].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd125 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.5")); + IPluginDescriptor pd128 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.8")); + IPluginDescriptor pd123 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.3")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd300 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("3.0.0")); + IPluginDescriptor pd453 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("4.5.3")); + assertNotNull("1.7", pd125); + assertNotNull("1.8", pd128); + assertNotNull("1.9", pd123); + assertNotNull("1.10", pd130); + assertNotNull("1.11", pd300); + assertNotNull("1.12", pd453); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("1.13", fragments.length == 1); + assertTrue("1.14", fragments[0].getId().equals("fragmentTest")); + assertTrue("1.15", fragments[0].getPluginVersion().equals("4.5.1")); + + // Now make sure we hooked this fragment to the right plugin (and only + // one plugin) + PluginFragmentModel[] linkedFragments125 = ((PluginDescriptorModel)pd125).getFragments(); + PluginFragmentModel[] linkedFragments128 = ((PluginDescriptorModel)pd128).getFragments(); + PluginFragmentModel[] linkedFragments123 = ((PluginDescriptorModel)pd123).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments300 = ((PluginDescriptorModel)pd300).getFragments(); + PluginFragmentModel[] linkedFragments453 = ((PluginDescriptorModel)pd453).getFragments(); + assertNull("1.16", linkedFragments125); + assertNull("1.17", linkedFragments128); + assertNull("1.18", linkedFragments123); + assertNull("1.19", linkedFragments130); + assertNull("1.20", linkedFragments300); + assertNotNull("1.21", linkedFragments453); + assertTrue("1.22", linkedFragments453.length == 1); + assertTrue("1.23", linkedFragments453[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the proper plugin + ILibrary[] libraries125 = pd125.getRuntimeLibraries(); + ILibrary[] libraries128 = pd128.getRuntimeLibraries(); + ILibrary[] libraries123 = pd123.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries300 = pd300.getRuntimeLibraries(); + ILibrary[] libraries453 = pd453.getRuntimeLibraries(); + assertTrue("1.24", libraries125.length == 0); + assertTrue("1.25", libraries128.length == 0); + assertTrue("1.26", libraries123.length == 0); + assertTrue("1.27", libraries130.length == 0); + assertTrue("1.28", libraries300.length == 0); + assertTrue("1.29", libraries453.length == 1); + assertTrue("1.30", ((Library)libraries453[0]).getName().equals("lib1.jar")); +} + +public static Test suite() { + TestSuite suite = new TestSuite(); + suite.addTest(new FragmentResolveTest_6("test1")); + suite.addTest(new FragmentResolveTest_6("test2")); + suite.addTest(new FragmentResolveTest_6("test3")); + suite.addTest(new FragmentResolveTest_6("test4")); + suite.addTest(new FragmentResolveTest_6("test5")); + suite.addTest(new FragmentResolveTest_6("test6")); + suite.addTest(new FragmentResolveTest_6("test7")); + suite.addTest(new FragmentResolveTest_6("test8")); + suite.addTest(new FragmentResolveTest_6("test9")); + return suite; +} +} + +
diff --git a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_7.java b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_7.java new file mode 100644 index 0000000..c32ee2e --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_7.java
@@ -0,0 +1,366 @@ +package org.eclipse.core.tests.internal.plugins; + +import java.net.URL; +import junit.framework.*; +import org.eclipse.core.runtime.*; +import org.eclipse.core.runtime.model.*; +import org.eclipse.core.internal.plugins.InternalFactory; +import org.eclipse.core.internal.plugins.*; +import org.eclipse.core.internal.runtime.InternalPlatform; +import org.eclipse.core.internal.runtime.Policy; +import org.eclipse.core.tests.harness.*; + +public class FragmentResolveTest_7 extends EclipseWorkspaceTest { +public FragmentResolveTest_7() { + super(null); +} +public FragmentResolveTest_7(String name) { + super(name); +} + +public void test1() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[2]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.7/plugin1.xml"); + pluginURLs[0] = new URL (pluginPath); + pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.7/fragment1.xml"); + pluginURLs[1] = new URL (pluginPath); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = ParseHelper.doParsing(factory, pluginURLs, true); + IPluginDescriptor pd = registry.getPluginDescriptor("tests.a"); + + // check descriptor + assertNotNull("1.0", pd); + assertTrue("1.1", pd.getUniqueIdentifier().equals("tests.a")); + + // check to see if we have all plugins + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("1.2", all.length == 1); + assertTrue("1.3", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.4", all[0].getVersionIdentifier().equals(new PluginVersionIdentifier("1.2.0"))); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragment = ((PluginRegistry) registry).getFragments("fragmentTest"); + assertTrue("1.5", fragment.length == 1); + assertTrue("1.6", fragment[0].getId().equals("fragmentTest")); + + // Have we got all the fragments + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("1.7", fragments.length == 1); + assertTrue("1.8", fragments[0].getId().equals("fragmentTest")); + assertTrue("1.9", fragments[0].getPluginVersion().equals("1.2.0")); + + // Now make sure we hooked this fragment and this plugin + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNotNull("1.10", linkedFragments); + assertTrue("1.11", linkedFragments.length == 1); + assertTrue("1.12", linkedFragments[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue("1.13", libraries.length == 1); + assertTrue("1.14", ((Library)libraries[0]).getName().equals("lib1.jar")); +} + +public void test2() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[2]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.7/plugin1.xml"); + pluginURLs[0] = new URL (pluginPath); + pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.7/fragment2.xml"); + pluginURLs[1] = new URL (pluginPath); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = ParseHelper.doParsing(factory, pluginURLs, true); + IPluginDescriptor pd = registry.getPluginDescriptor("tests.a"); + + // check descriptor + assertNotNull("2.0", pd); + assertTrue("2.1", pd.getUniqueIdentifier().equals("tests.a")); + + // check to see if we have all plugins + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("2.2", all.length == 1); + assertTrue("2.3", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("2.4", all[0].getVersionIdentifier().equals(new PluginVersionIdentifier("1.2.0"))); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragment = ((PluginRegistry) registry).getFragments("fragmentTest"); + assertTrue("2.5", fragment.length == 1); + assertTrue("2.6", fragment[0].getId().equals("fragmentTest")); + + // Have we got all the fragments + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("2.7", fragments.length == 1); + assertTrue("2.8", fragments[0].getId().equals("fragmentTest")); + assertTrue("2.9", fragments[0].getPluginVersion().equals("1.3.0")); + + // Now make sure we didn't hook this fragment and this plugin (they aren't compatible) + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNull("2.10", linkedFragments); + + // Finally, make sure the library entry in the fragment is + // not part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue("2.11", libraries.length == 0); +} + +public void test3() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[2]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.7/plugin1.xml"); + pluginURLs[0] = new URL (pluginPath); + pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.7/fragment3.xml"); + pluginURLs[1] = new URL (pluginPath); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = ParseHelper.doParsing(factory, pluginURLs, true); + IPluginDescriptor pd = registry.getPluginDescriptor("tests.a"); + + // check descriptor + assertNotNull("3.0", pd); + assertTrue("3.1", pd.getUniqueIdentifier().equals("tests.a")); + + // check to see if we have all plugins + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("3.2", all.length == 1); + assertTrue("3.3", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("3.4", all[0].getVersionIdentifier().equals(new PluginVersionIdentifier("1.2.0"))); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragment = ((PluginRegistry) registry).getFragments("fragmentTest"); + assertTrue("3.5", fragment.length == 1); + assertTrue("3.6", fragment[0].getId().equals("fragmentTest")); + + // Have we got all the fragments + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("3.7", fragments.length == 1); + assertTrue("3.8", fragments[0].getId().equals("fragmentTest")); + assertTrue("3.9", fragments[0].getPluginVersion().equals("1.1.0")); + + // Now make sure we hooked this fragment and this plugin + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNotNull("3.10", linkedFragments); + assertTrue("3.11", linkedFragments.length == 1); + assertTrue("3.12", linkedFragments[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue("3.13", libraries.length == 1); + assertTrue("3.14", ((Library)libraries[0]).getName().equals("lib1.jar")); +} + +public void test4() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[2]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.7/plugin1.xml"); + pluginURLs[0] = new URL (pluginPath); + pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.7/fragment4.xml"); + pluginURLs[1] = new URL (pluginPath); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = ParseHelper.doParsing(factory, pluginURLs, true); + IPluginDescriptor pd = registry.getPluginDescriptor("tests.a"); + + // check descriptor + assertNotNull("4.0", pd); + assertTrue("4.1", pd.getUniqueIdentifier().equals("tests.a")); + + // check to see if we have all plugins + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("4.2", all.length == 1); + assertTrue("4.3", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("4.4", all[0].getVersionIdentifier().equals(new PluginVersionIdentifier("1.2.0"))); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragment = ((PluginRegistry) registry).getFragments("fragmentTest"); + assertTrue("4.5", fragment.length == 1); + assertTrue("4.6", fragment[0].getId().equals("fragmentTest")); + + // Have we got all the fragments + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("4.7", fragments.length == 1); + assertTrue("4.8", fragments[0].getId().equals("fragmentTest")); + assertTrue("4.9", fragments[0].getPluginVersion().equals("2.0.0")); + + // Now make sure we didn't hook this fragment and this plugin (they aren't compatible) + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNull("4.10", linkedFragments); + + // Finally, make sure the library entry in the fragment is + // not part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue("4.11", libraries.length == 0); +} + +public void test5() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[2]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.7/plugin1.xml"); + pluginURLs[0] = new URL (pluginPath); + pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.7/fragment5.xml"); + pluginURLs[1] = new URL (pluginPath); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = ParseHelper.doParsing(factory, pluginURLs, true); + IPluginDescriptor pd = registry.getPluginDescriptor("tests.a"); + + // check descriptor + assertNotNull("5.0", pd); + assertTrue("5.1", pd.getUniqueIdentifier().equals("tests.a")); + + // check to see if we have all plugins + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("5.2", all.length == 1); + assertTrue("5.3", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("5.4", all[0].getVersionIdentifier().equals(new PluginVersionIdentifier("1.2.0"))); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragment = ((PluginRegistry) registry).getFragments("fragmentTest"); + assertTrue("5.5", fragment.length == 1); + assertTrue("5.6", fragment[0].getId().equals("fragmentTest")); + + // Have we got all the fragments + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("5.7", fragments.length == 1); + assertTrue("5.8", fragments[0].getId().equals("fragmentTest")); + assertTrue("5.9", fragments[0].getPluginVersion().equals("1.2.1")); + + // Now make sure we didn't hook this fragment and this plugin. + // They are not compatible unless the service number is 0 in this case. + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNull("5.10", linkedFragments); + + // Finally, make sure the library entry in the fragment is + // not part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue("5.11", libraries.length == 0); +} + +public void test6() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[2]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.7/plugin2.xml"); + pluginURLs[0] = new URL (pluginPath); + pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.7/fragment6.xml"); + pluginURLs[1] = new URL (pluginPath); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = ParseHelper.doParsing(factory, pluginURLs, true); + IPluginDescriptor pd = registry.getPluginDescriptor("tests.a"); + + // check descriptor + assertNotNull("6.0", pd); + assertTrue("6.1", pd.getUniqueIdentifier().equals("tests.a")); + + // check to see if we have all plugins + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("6.2", all.length == 1); + assertTrue("6.3", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("6.4", all[0].getVersionIdentifier().equals(new PluginVersionIdentifier("1.2.6"))); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragment = ((PluginRegistry) registry).getFragments("fragmentTest"); + assertTrue("6.5", fragment.length == 1); + assertTrue("6.6", fragment[0].getId().equals("fragmentTest")); + + // Have we got all the fragments + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("6.7", fragments.length == 1); + assertTrue("6.8", fragments[0].getId().equals("fragmentTest")); + assertTrue("6.9", fragments[0].getPluginVersion().equals("1.2.4")); + + // Now make sure we hooked this fragment and this plugin + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNotNull("6.10", linkedFragments); + assertTrue("6.11", linkedFragments.length == 1); + assertTrue("6.12", linkedFragments[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue("6.13", libraries.length == 1); + assertTrue("6.14", ((Library)libraries[0]).getName().equals("lib1.jar")); +} + +public void test7() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[2]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.7/plugin2.xml"); + pluginURLs[0] = new URL (pluginPath); + pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.7/fragment7.xml"); + pluginURLs[1] = new URL (pluginPath); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = ParseHelper.doParsing(factory, pluginURLs, true); + IPluginDescriptor pd = registry.getPluginDescriptor("tests.a"); + + // check descriptor + assertNotNull("7.0", pd); + assertTrue("7.1", pd.getUniqueIdentifier().equals("tests.a")); + + // check to see if we have all plugins + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("7.2", all.length == 1); + assertTrue("7.3", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("7.4", all[0].getVersionIdentifier().equals(new PluginVersionIdentifier("1.2.6"))); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragment = ((PluginRegistry) registry).getFragments("fragmentTest"); + assertTrue("7.5", fragment.length == 1); + assertTrue("7.6", fragment[0].getId().equals("fragmentTest")); + + // Have we got all the fragments + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("7.7", fragments.length == 1); + assertTrue("7.8", fragments[0].getId().equals("fragmentTest")); + assertTrue("7.9", fragments[0].getPluginVersion().equals("1.2.8")); + + // Now make sure we didn't hook this fragment and this plugin + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNull("7.10", linkedFragments); + + // Finally, make sure the library entry in the fragment is + // not part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue("7.11", libraries.length == 0); +} + +public static Test suite() { + TestSuite suite = new TestSuite(); + suite.addTest(new FragmentResolveTest_7("test1")); + suite.addTest(new FragmentResolveTest_7("test2")); + suite.addTest(new FragmentResolveTest_7("test3")); + suite.addTest(new FragmentResolveTest_7("test4")); + suite.addTest(new FragmentResolveTest_7("test5")); + suite.addTest(new FragmentResolveTest_7("test6")); + suite.addTest(new FragmentResolveTest_7("test7")); + return suite; +} +} + +
diff --git a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_8.java b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_8.java new file mode 100644 index 0000000..28ea625 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_8.java
@@ -0,0 +1,519 @@ +package org.eclipse.core.tests.internal.plugins; + +import java.net.URL; +import junit.framework.*; +import org.eclipse.core.runtime.*; +import org.eclipse.core.runtime.model.*; +import org.eclipse.core.internal.plugins.InternalFactory; +import org.eclipse.core.internal.plugins.*; +import org.eclipse.core.internal.runtime.InternalPlatform; +import org.eclipse.core.internal.runtime.Policy; +import org.eclipse.core.tests.harness.*; + +public class FragmentResolveTest_8 extends EclipseWorkspaceTest { +public FragmentResolveTest_8() { + super(null); +} +public FragmentResolveTest_8(String name) { + super(name); +} + +static PluginRegistry doParsing(InternalFactory factory, URL[] pluginPath, boolean doResolve) { + PluginRegistry registry = (PluginRegistry) RegistryLoader.parseRegistry(pluginPath, factory, false); + if (doResolve) + // don't trim the disabled plugins for these tests + registry.resolve(false, true); + registry.markReadOnly(); + registry.startup(null); + return registry; +} + +public void test1() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[5]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String[] pluginPath = new String[5]; + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/fragment1.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 4 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("1.0", all.length == 4); + assertTrue("1.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("1.4", all[3].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd124 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.4")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd240 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("2.4.0")); + IPluginDescriptor pd110 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.1.0")); + assertNotNull("1.5", pd124); + assertNotNull("1.6", pd130); + assertNotNull("1.7", pd240); + assertNotNull("1.8", pd110); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("1.9", fragments.length == 1); + assertTrue("1.10", fragments[0].getId().equals("fragmentTest")); + assertTrue("1.11", fragments[0].getPluginVersion().equals("1.2.3")); + + // Now make sure we hooked this fragment to the right plugin (and only + // one plugin) + PluginFragmentModel[] linkedFragments124 = ((PluginDescriptorModel)pd124).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments240 = ((PluginDescriptorModel)pd240).getFragments(); + PluginFragmentModel[] linkedFragments110 = ((PluginDescriptorModel)pd110).getFragments(); + assertNull("1.12", linkedFragments124); + assertNotNull("1.13", linkedFragments130); + assertNull("1.14", linkedFragments240); + assertNull("1.15", linkedFragments110); + assertTrue("1.16", linkedFragments130.length == 1); + assertTrue("1.17", linkedFragments130[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the proper plugin + ILibrary[] libraries124 = pd124.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries240 = pd240.getRuntimeLibraries(); + ILibrary[] libraries110 = pd110.getRuntimeLibraries(); + assertTrue("1.18", libraries124.length == 0); + assertTrue("1.19", libraries130.length == 1); + assertTrue("1.20", libraries240.length == 0); + assertTrue("1.21", libraries110.length == 0); + assertTrue("1.22", ((Library)libraries130[0]).getName().equals("lib1.jar")); +} + +public void test2() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[5]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String[] pluginPath = new String[5]; + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/fragment2.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 4 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("2.0", all.length == 4); + assertTrue("2.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("2.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("2.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("2.4", all[3].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd124 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.4")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd240 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("2.4.0")); + IPluginDescriptor pd110 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.1.0")); + assertNotNull("2.5", pd124); + assertNotNull("2.6", pd130); + assertNotNull("2.7", pd240); + assertNotNull("2.8", pd110); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("2.9", fragments.length == 1); + assertTrue("2.10", fragments[0].getId().equals("fragmentTest")); + assertTrue("2.11", fragments[0].getPluginVersion().equals("1.0.0")); + + // Now make sure we hooked this fragment to the right plugin (and only + // one plugin) + PluginFragmentModel[] linkedFragments124 = ((PluginDescriptorModel)pd124).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments240 = ((PluginDescriptorModel)pd240).getFragments(); + PluginFragmentModel[] linkedFragments110 = ((PluginDescriptorModel)pd110).getFragments(); + assertNull("2.12", linkedFragments124); + assertNotNull("2.13", linkedFragments130); + assertNull("2.14", linkedFragments240); + assertNull("2.15", linkedFragments110); + assertTrue("2.16", linkedFragments130.length == 1); + assertTrue("2.17", linkedFragments130[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the proper plugin + ILibrary[] libraries124 = pd124.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries240 = pd240.getRuntimeLibraries(); + ILibrary[] libraries110 = pd110.getRuntimeLibraries(); + assertTrue("2.18", libraries124.length == 0); + assertTrue("2.19", libraries130.length == 1); + assertTrue("2.20", libraries240.length == 0); + assertTrue("2.21", libraries110.length == 0); + assertTrue("2.22", ((Library)libraries130[0]).getName().equals("lib1.jar")); +} + +public void test3() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[5]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String[] pluginPath = new String[5]; + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/fragment3.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 4 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("3.0", all.length == 4); + assertTrue("3.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("3.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("3.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("3.4", all[3].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd124 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.4")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd240 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("2.4.0")); + IPluginDescriptor pd110 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.1.0")); + assertNotNull("3.5", pd124); + assertNotNull("3.6", pd130); + assertNotNull("3.7", pd240); + assertNotNull("3.8", pd110); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("3.9", fragments.length == 1); + assertTrue("3.10", fragments[0].getId().equals("fragmentTest")); + assertTrue("3.11", fragments[0].getPluginVersion().equals("2.1.1")); + + // Now make sure we hooked this fragment to the right plugin (and only + // one plugin) + PluginFragmentModel[] linkedFragments124 = ((PluginDescriptorModel)pd124).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments240 = ((PluginDescriptorModel)pd240).getFragments(); + PluginFragmentModel[] linkedFragments110 = ((PluginDescriptorModel)pd110).getFragments(); + assertNull("3.12", linkedFragments124); + assertNull("3.13", linkedFragments130); + assertNotNull("3.14", linkedFragments240); + assertNull("3.15", linkedFragments110); + assertTrue("3.16", linkedFragments240.length == 1); + assertTrue("3.17", linkedFragments240[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the proper plugin + ILibrary[] libraries124 = pd124.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries240 = pd240.getRuntimeLibraries(); + ILibrary[] libraries110 = pd110.getRuntimeLibraries(); + assertTrue("3.18", libraries124.length == 0); + assertTrue("3.19", libraries130.length == 0); + assertTrue("3.20", libraries240.length == 1); + assertTrue("3.21", libraries110.length == 0); + assertTrue("3.22", ((Library)libraries240[0]).getName().equals("lib1.jar")); +} + +public void test4() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[5]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String[] pluginPath = new String[5]; + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/fragment4.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 4 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("4.0", all.length == 4); + assertTrue("4.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("4.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("4.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("4.4", all[3].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd124 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.4")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd240 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("2.4.0")); + IPluginDescriptor pd110 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.1.0")); + assertNotNull("4.5", pd124); + assertNotNull("4.6", pd130); + assertNotNull("4.7", pd240); + assertNotNull("4.8", pd110); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("4.9", fragments.length == 1); + assertTrue("4.10", fragments[0].getId().equals("fragmentTest")); + assertTrue("4.11", fragments[0].getPluginVersion().equals("2.5.0")); + + // Now make sure we didn't hood this fragment anywhere + PluginFragmentModel[] linkedFragments124 = ((PluginDescriptorModel)pd124).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments240 = ((PluginDescriptorModel)pd240).getFragments(); + PluginFragmentModel[] linkedFragments110 = ((PluginDescriptorModel)pd110).getFragments(); + assertNull("4.12", linkedFragments124); + assertNull("4.13", linkedFragments130); + assertNull("4.14", linkedFragments240); + assertNull("4.15", linkedFragments110); + + // Finally, make sure the library entry didn't show + // up in any of the plugins + ILibrary[] libraries124 = pd124.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries240 = pd240.getRuntimeLibraries(); + ILibrary[] libraries110 = pd110.getRuntimeLibraries(); + assertTrue("4.16", libraries124.length == 0); + assertTrue("4.17", libraries130.length == 0); + assertTrue("4.18", libraries240.length == 0); + assertTrue("4.19", libraries110.length == 0); +} + +public void test5() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[5]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String[] pluginPath = new String[5]; + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/fragment5.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 4 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("5.0", all.length == 4); + assertTrue("5.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("5.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("5.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("5.4", all[3].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd124 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.4")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd240 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("2.4.0")); + IPluginDescriptor pd110 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.1.0")); + assertNotNull("5.5", pd124); + assertNotNull("5.6", pd130); + assertNotNull("5.7", pd240); + assertNotNull("5.8", pd110); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("5.9", fragments.length == 1); + assertTrue("5.10", fragments[0].getId().equals("fragmentTest")); + assertTrue("5.11", fragments[0].getPluginVersion().equals("1.2.4")); + + // Now make sure we hooked this fragment to the right plugin (and only + // one plugin) + PluginFragmentModel[] linkedFragments124 = ((PluginDescriptorModel)pd124).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments240 = ((PluginDescriptorModel)pd240).getFragments(); + PluginFragmentModel[] linkedFragments110 = ((PluginDescriptorModel)pd110).getFragments(); + assertNull("5.12", linkedFragments124); + assertNotNull("5.13", linkedFragments130); + assertNull("5.14", linkedFragments240); + assertNull("5.15", linkedFragments110); + assertTrue("5.16", linkedFragments130.length == 1); + assertTrue("5.17", linkedFragments130[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the proper plugin + ILibrary[] libraries124 = pd124.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries240 = pd240.getRuntimeLibraries(); + ILibrary[] libraries110 = pd110.getRuntimeLibraries(); + assertTrue("5.18", libraries124.length == 0); + assertTrue("5.19", libraries130.length == 1); + assertTrue("5.20", libraries240.length == 0); + assertTrue("5.21", libraries110.length == 0); + assertTrue("5.22", ((Library)libraries130[0]).getName().equals("lib1.jar")); +} + +public void test6() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[5]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String[] pluginPath = new String[5]; + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/fragment6.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 4 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("6.0", all.length == 4); + assertTrue("6.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("6.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("6.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("6.4", all[3].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd124 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.4")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd240 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("2.4.0")); + IPluginDescriptor pd110 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.1.0")); + assertNotNull("6.5", pd124); + assertNotNull("6.6", pd130); + assertNotNull("6.7", pd240); + assertNotNull("6.8", pd110); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("6.9", fragments.length == 1); + assertTrue("6.10", fragments[0].getId().equals("fragmentTest")); + assertTrue("6.11", fragments[0].getPluginVersion().equals("3.0.0")); + + // Now make sure we didn't hook this fragment anywhere + PluginFragmentModel[] linkedFragments124 = ((PluginDescriptorModel)pd124).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments240 = ((PluginDescriptorModel)pd240).getFragments(); + PluginFragmentModel[] linkedFragments110 = ((PluginDescriptorModel)pd110).getFragments(); + assertNull("6.12", linkedFragments124); + assertNull("6.13", linkedFragments130); + assertNull("6.14", linkedFragments240); + assertNull("6.15", linkedFragments110); + + // Finally, make sure the library entry in the fragment doesn't + // show up in any of the plugins + ILibrary[] libraries124 = pd124.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries240 = pd240.getRuntimeLibraries(); + ILibrary[] libraries110 = pd110.getRuntimeLibraries(); + assertTrue("6.16", libraries124.length == 0); + assertTrue("6.17", libraries130.length == 0); + assertTrue("6.18", libraries240.length == 0); + assertTrue("6.19", libraries110.length == 0); +} + +public void test7() { + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + URL pluginURLs[] = new URL[5]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String[] pluginPath = new String[5]; + pluginPath[0] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin1.xml"); + pluginPath[1] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin2.xml"); + pluginPath[2] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin3.xml"); + pluginPath[3] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/plugin4.xml"); + pluginPath[4] = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.8/fragment7.xml"); + for (int i = 0; i < pluginPath.length; i++) { + pluginURLs[i] = new URL (pluginPath[i]); + } + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = doParsing(factory, pluginURLs, true); + + // We should have 4 plugins all with id 'tests.a' + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue("7.0", all.length == 4); + assertTrue("7.1", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue("7.2", all[1].getUniqueIdentifier().equals("tests.a")); + assertTrue("7.3", all[2].getUniqueIdentifier().equals("tests.a")); + assertTrue("7.4", all[3].getUniqueIdentifier().equals("tests.a")); + + // Make sure we got all the version numbers + IPluginDescriptor pd124 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.2.4")); + IPluginDescriptor pd130 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.3.0")); + IPluginDescriptor pd240 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("2.4.0")); + IPluginDescriptor pd110 = registry.getPluginDescriptor("tests.a", new PluginVersionIdentifier("1.1.0")); + assertNotNull("7.5", pd124); + assertNotNull("7.6", pd130); + assertNotNull("7.7", pd240); + assertNotNull("7.8", pd110); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue("7.9", fragments.length == 1); + assertTrue("7.10", fragments[0].getId().equals("fragmentTest")); + assertTrue("7.11", fragments[0].getPluginVersion().equals("2.4.0")); + + // Now make sure we hooked this fragment to the right plugin (and only + // one plugin) + PluginFragmentModel[] linkedFragments124 = ((PluginDescriptorModel)pd124).getFragments(); + PluginFragmentModel[] linkedFragments130 = ((PluginDescriptorModel)pd130).getFragments(); + PluginFragmentModel[] linkedFragments240 = ((PluginDescriptorModel)pd240).getFragments(); + PluginFragmentModel[] linkedFragments110 = ((PluginDescriptorModel)pd110).getFragments(); + assertNull("7.12", linkedFragments124); + assertNull("7.13", linkedFragments130); + assertNotNull("7.14", linkedFragments240); + assertNull("7.15", linkedFragments110); + assertTrue("7.16", linkedFragments240.length == 1); + assertTrue("7.17", linkedFragments240[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the proper plugin + ILibrary[] libraries124 = pd124.getRuntimeLibraries(); + ILibrary[] libraries130 = pd130.getRuntimeLibraries(); + ILibrary[] libraries240 = pd240.getRuntimeLibraries(); + ILibrary[] libraries110 = pd110.getRuntimeLibraries(); + assertTrue("7.18", libraries124.length == 0); + assertTrue("7.19", libraries130.length == 0); + assertTrue("7.20", libraries240.length == 1); + assertTrue("7.21", libraries110.length == 0); + assertTrue("7.22", ((Library)libraries240[0]).getName().equals("lib1.jar")); +} + +public static Test suite() { + TestSuite suite = new TestSuite(); + suite.addTest(new FragmentResolveTest_8("test1")); + suite.addTest(new FragmentResolveTest_8("test2")); + suite.addTest(new FragmentResolveTest_8("test3")); + suite.addTest(new FragmentResolveTest_8("test4")); + suite.addTest(new FragmentResolveTest_8("test5")); + suite.addTest(new FragmentResolveTest_8("test6")); + suite.addTest(new FragmentResolveTest_8("test7")); + return suite; +} +} + +
diff --git a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_9.java b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_9.java new file mode 100644 index 0000000..7898ed0 --- /dev/null +++ b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/internal/plugins/FragmentResolveTest_9.java
@@ -0,0 +1,96 @@ +package org.eclipse.core.tests.internal.plugins; + +import java.net.URL; +import junit.framework.*; +import org.eclipse.core.runtime.*; +import org.eclipse.core.runtime.model.*; +import org.eclipse.core.internal.plugins.InternalFactory; +import org.eclipse.core.internal.plugins.*; +import org.eclipse.core.internal.runtime.InternalPlatform; +import org.eclipse.core.internal.runtime.Policy; +import org.eclipse.core.tests.harness.*; + +public class FragmentResolveTest_9 extends EclipseWorkspaceTest { +public FragmentResolveTest_9() { + super(null); +} +public FragmentResolveTest_9(String name) { + super(name); +} + +public void fullTest() { + String[] fragmentIds = {"1.3.2", "1.3.7", "1.2.5", "1.2.8", + "1.2.2", "1.2.0", "1.1.5", "1.1.0", "1.3.5", "3.0.0", "3.2.5", "3.2.4"}; + boolean[] matchesFragment = {false, false, true, false, + true, true, true, true, false, false, false, false}; + + MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, Platform.PARSE_PROBLEM, "fragmentResolveTest", null); + InternalFactory factory = new InternalFactory(problems); + + for (int i = 0; i < fragmentIds.length; i++) { + URL pluginURLs[] = new URL[2]; + try { + PluginDescriptor tempPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.core.tests.runtime"); + String pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.9/plugin1.xml"); + pluginURLs[0] = new URL (pluginPath); + pluginPath = tempPlugin.getLocation().concat("Plugin_Testing/fragment.resolve.9/fragment" + (i + 1) + ".xml"); + pluginURLs[1] = new URL (pluginPath); + } catch (java.net.MalformedURLException e) { + } + IPluginRegistry registry = ParseHelper.doParsing(factory, pluginURLs, true); + IPluginDescriptor pd = registry.getPluginDescriptor("tests.a"); + + // check descriptor + assertNotNull(i + ".0", pd); + assertTrue(i + ".1", pd.getUniqueIdentifier().equals("tests.a")); + + // check to see if we have all plugins + IPluginDescriptor[] all = registry.getPluginDescriptors(); + assertTrue(i + ".2", all.length == 1); + assertTrue(i + ".3", all[0].getUniqueIdentifier().equals("tests.a")); + assertTrue(i + ".4", all[0].getVersionIdentifier().equals(new PluginVersionIdentifier("1.2.5"))); + + // Check the fragment list. There should only be one + PluginFragmentModel[] fragment = ((PluginRegistry) registry).getFragments("fragmentTest"); + assertTrue(i + ".5", fragment.length == 1); + assertTrue(i + ".6", fragment[0].getId().equals("fragmentTest")); + + // Have we got all the fragments + PluginFragmentModel[] fragments = ((PluginRegistry)registry).getFragments(); + assertTrue(i + ".7", fragments.length == 1); + assertTrue(i + ".8", fragments[0].getId().equals("fragmentTest")); + assertTrue(i + ".9", fragments[0].getPluginVersion().equals(fragmentIds[i])); + + if (matchesFragment[i]) { + // Now make sure we hooked this fragment and this plugin + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNotNull(i + ".10", linkedFragments); + assertTrue(i + ".11", linkedFragments.length == 1); + assertTrue(i + ".12", linkedFragments[0].getId().equals("fragmentTest")); + + // Finally, make sure the library entry in the fragment is + // now part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue(i + ".13", libraries.length == 1); + assertTrue(i + ".14", ((Library)libraries[0]).getName().equals("lib1.jar")); + } else { + // Now make sure we didn't hook this fragment and this plugin. + PluginFragmentModel[] linkedFragments = ((PluginDescriptorModel)pd).getFragments(); + assertNull(i + ".10", linkedFragments); + + // Finally, make sure the library entry in the fragment is + // not part of the plugin + ILibrary[] libraries = pd.getRuntimeLibraries(); + assertTrue(i + ".11", libraries.length == 0); + } + } +} + +public static Test suite() { + TestSuite suite = new TestSuite(); + suite.addTest(new FragmentResolveTest_9("fullTest")); + return suite; +} +} + +