Index: openide/openide-spec-vers.properties =================================================================== RCS file: /cvs/openide/openide-spec-vers.properties,v retrieving revision 1.126 diff -u -r1.126 openide-spec-vers.properties --- openide/openide-spec-vers.properties 18 Dec 2003 15:25:38 -0000 1.126 +++ openide/openide-spec-vers.properties 26 Dec 2003 02:12:19 -0000 @@ -4,4 +4,4 @@ # Must always be numeric (numbers separated by '.', e.g. 4.11). # See http://openide.netbeans.org/versioning-policy.html for more. -openide.specification.version=4.18 +openide.specification.version=4.19 Index: openide/api/doc/changes/apichanges.xml =================================================================== RCS file: /cvs/openide/api/doc/changes/apichanges.xml,v retrieving revision 1.179 diff -u -r1.179 apichanges.xml --- openide/api/doc/changes/apichanges.xml 19 Dec 2003 07:28:39 -0000 1.179 +++ openide/api/doc/changes/apichanges.xml 26 Dec 2003 02:12:20 -0000 @@ -2227,6 +2227,25 @@ + + + Added method ModuleInfo.getClassLoader() + + + + + Note that although the new method is abstract, this is a compatible + change insofar as no one outside of the core module system should be + subclassing ModuleInfo. + + + Added a new method ModuleInfo.getClassLoader() making it + possible to find a Java class loader associated with an enabled module. + + + + + ErrorManager.isLoggable added Index: openide/src/org/openide/modules/ModuleInfo.java =================================================================== RCS file: /cvs/openide/src/org/openide/modules/ModuleInfo.java,v retrieving revision 1.10 diff -u -r1.10 ModuleInfo.java --- openide/src/org/openide/modules/ModuleInfo.java 22 Dec 2003 15:15:55 -0000 1.10 +++ openide/src/org/openide/modules/ModuleInfo.java 26 Dec 2003 02:12:21 -0000 @@ -128,6 +128,21 @@ */ public abstract boolean owns(Class clazz); + /** + * Get a class loader associated with this module that can load + * classes defined in the module. + *

+ * You can only call this method on an enabled module, and the + * result may change if the module is disabled and reënabled. + *

+ * The class loader may or may not be shared with any other + * module, or be the application's startup class loader, etc. + * @return a module class loader + * @throws IllegalArgumentException if this module is disabled + * @since 4.19 + */ + public abstract ClassLoader getClassLoader() throws IllegalArgumentException; + /** Get a set of capabilities which this module provides to others that may * require it. * The default implementation returns an empty array. Index: core/manifest.mf =================================================================== RCS file: /cvs/core/manifest.mf,v retrieving revision 1.32 diff -u -r1.32 manifest.mf --- core/manifest.mf 18 Dec 2003 15:25:33 -0000 1.32 +++ core/manifest.mf 26 Dec 2003 02:12:21 -0000 @@ -1,8 +1,8 @@ Manifest-Version: 1.0 OpenIDE-Module: org.netbeans.core/1 -OpenIDE-Module-Specification-Version: 1.20 +OpenIDE-Module-Specification-Version: 1.21 OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@ -OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.18 +OpenIDE-Module-IDE-Dependencies: IDE/1 > 4.19 OpenIDE-Module-Module-Dependencies: org.openide.loaders > 4.11 OpenIDE-Module-Localizing-Bundle: org/netbeans/core/Bundle.properties OpenIDE-Module-Layer: org/netbeans/core/resources/mf-layer.xml Index: core/src/org/netbeans/core/modules/Module.java =================================================================== RCS file: /cvs/core/src/org/netbeans/core/modules/Module.java,v retrieving revision 1.49 diff -u -r1.49 Module.java --- core/src/org/netbeans/core/modules/Module.java 15 May 2003 06:32:39 -0000 1.49 +++ core/src/org/netbeans/core/modules/Module.java 26 Dec 2003 02:12:22 -0000 @@ -852,16 +852,15 @@ } } - /** Get the classloader capable of retrieving - * things from this module. - * If the module is disabled, this will be null (unless this module is fixed). - * If it is enabled, it must not be null. - * It is not guaranteed that change events will be fired - * for changes in this property. - */ - public ClassLoader getClassLoader() { + // impl of ModuleInfo method + public ClassLoader getClassLoader() throws IllegalArgumentException { + if (!enabled) { + throw new IllegalArgumentException("Not enabled: " + codeNameBase); // NOI18N + } + assert classloader != null : "Should have had a non-null loader for " + this; return classloader; } + // Access from ModuleManager: /** Turn on the classloader. Passed a list of parent modules to use. * The parents should already have had their classloaders initialized.