Added support in ILibrary and LibraryModel for bug 26011. (classloader package prefix enhancement)
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/ILibrary.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/ILibrary.java
index 1e53f66..b500f4e 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/ILibrary.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/ILibrary.java
@@ -87,4 +87,12 @@
* <code>false</code> if it is private or has filtered content
*/
public boolean isFullyExported();
+/**
+ * Returns the array of package prefixes that this library declares. This
+ * is used in classloader enhancements and is an optional entry in the plugin.xml.
+ *
+ * @return the array of package prefixes or <code>null</code>
+ * @since 2.1
+ */
+public String[] getPackagePrefixes();
}
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/model/LibraryModel.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/model/LibraryModel.java
index 3e34ddf..84d3efb 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/model/LibraryModel.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/model/LibraryModel.java
@@ -30,6 +30,7 @@
// DTD properties (included in plug-in manifest)
private String[] exports = null;
private String type = CODE;
+ private String[] packagePrefixes = null;
// transient properties (not included in plug-in manifest)
private boolean isExported = false;
@@ -120,4 +121,16 @@
Assert.isTrue (lcValue.equals(CODE) || lcValue.equals(RESOURCE));
type = lcValue;
}
+/**
+ * @see ILibrary#getPackagePrefixes
+ */
+public String[] getPackagePrefixes() {
+ return packagePrefixes;
+}
+/**
+ * Sets this library's package prefixes to be the specified array or <code>null</code>.
+ */
+public void setPackagePrefixes(String[] packagePrefixes) {
+ this.packagePrefixes = packagePrefixes;
+}
}