+
+
+ No need to require IOProvider token anymore
+
+
+
+
+
+ If your module depends on org.openide.io > 1.11
or higher
+ there is no need to specify that it also requires an implementation of
+ the API by use of OpenIDE-Module-Requires: org.openide.windows.IOProvider
,
+ this token will be requested automatically by the org.openide.io
+ module itself.
+
+
+
+
+
+
Added API to add actions to output's toolbar
Index: openide/io/src/org/openide/windows/IOProvider.java
===================================================================
RCS file: /shared/data/ccvs/repository/openide/io/src/org/openide/windows/IOProvider.java,v
retrieving revision 1.8
diff -u -r1.8 IOProvider.java
--- openide/io/src/org/openide/windows/IOProvider.java 1 Jul 2006 09:08:15 -0000 1.8
+++ openide/io/src/org/openide/windows/IOProvider.java 13 Jul 2006 14:58:21 -0000
@@ -45,10 +45,6 @@
* instance in lookup, a fallback instance is created which just uses the
* standard system I/O streams. This is useful for unit tests and perhaps
* for standalone usage of various libraries.
- *
- * Assuming you want to ensure that a real output window implementation is actually
- * installed and enabled, you must require the token org.openide.windows.IOProvider
- * from the module calling this method.
* @return the default instance (never null)
*/
public static IOProvider getDefault() {
@@ -67,7 +63,7 @@
* the output window. Streams for reading/writing can be accessed via
* getters on the returned instance.
*
- * @param name A localized display name for the tab
+ * @param name A localised display name for the tab
* @param newIO if true, a new InputOutput
is returned, else an existing InputOutput
of the same name may be returned
* @return an InputOutput
instance for accessing the new tab
* @see InputOutput
Index: openide/modules/apichanges.xml
===================================================================
RCS file: /shared/data/ccvs/repository/openide/modules/apichanges.xml,v
retrieving revision 1.7
diff -u -r1.7 apichanges.xml
--- openide/modules/apichanges.xml 1 Jul 2006 09:08:52 -0000 1.7
+++ openide/modules/apichanges.xml 13 Jul 2006 14:58:21 -0000
@@ -24,6 +24,22 @@
Modules API
+
+
+ Requires/Provides and Needs
+
+
+
+
+
+ It is possible to require some implementation using
+ OpenIDE-Module-Needs: token
and OpenIDE-Module-Recommends: token
which are slightly
+ less restrictive than usual
+ OpenIDE-Module-Requires: token
as
+ explain in the documentation.
+
+
+
Generified Interfaces
Index: openide/modules/manifest.mf
===================================================================
RCS file: /shared/data/ccvs/repository/openide/modules/manifest.mf,v
retrieving revision 1.11
diff -u -r1.11 manifest.mf
--- openide/modules/manifest.mf 22 Mar 2006 06:37:52 -0000 1.11
+++ openide/modules/manifest.mf 13 Jul 2006 14:58:21 -0000
@@ -1,5 +1,5 @@
Manifest-Version: 1.0
OpenIDE-Module: org.openide.modules
OpenIDE-Module-Localizing-Bundle: org/openide/modules/Bundle.properties
-OpenIDE-Module-Specification-Version: 7.0
+OpenIDE-Module-Specification-Version: 7.1
Index: openide/modules/src/org/openide/modules/Dependency.java
===================================================================
RCS file: /shared/data/ccvs/repository/openide/modules/src/org/openide/modules/Dependency.java,v
retrieving revision 1.6
diff -u -r1.6 Dependency.java
--- openide/modules/src/org/openide/modules/Dependency.java 1 Jul 2006 09:08:53 -0000 1.6
+++ openide/modules/src/org/openide/modules/Dependency.java 13 Jul 2006 14:58:22 -0000
@@ -53,6 +53,21 @@
*/
public final static int TYPE_REQUIRES = 5;
+ /** Dependency on a token, but without need to have token provider be initialised sooner.
+ * @see ModuleInfo#getProvides
+ * @since 7.1
+ */
+ public final static int TYPE_NEEDS = 6;
+
+ /** An advisory dependency on a token. If at least one provider of such token is
+ * available, it is enabled. If there is no such provider, then nothing is done
+ * or reported.
+ *
+ * @see ModuleInfo#getProvides
+ * @since 7.1
+ */
+ public final static int TYPE_RECOMMENDS = 7;
+
/** Comparison by specification version. */
public final static int COMPARE_SPEC = 1;
@@ -316,6 +331,18 @@
} else if (type == Dependency.TYPE_REQUIRES) {
if (comparison != Dependency.COMPARE_ANY) {
throw new IllegalArgumentException("Cannot give a comparison for a token requires dep: " + body); // NOI18N
+ }
+
+ checkCodeName(name, false);
+ } else if (type == Dependency.TYPE_NEEDS) {
+ if (comparison != Dependency.COMPARE_ANY) {
+ throw new IllegalArgumentException("Cannot give a comparison for a token needs dep: " + body); // NOI18N
+ }
+
+ checkCodeName(name, false);
+ } else if (type == Dependency.TYPE_RECOMMENDS) {
+ if (comparison != Dependency.COMPARE_ANY) {
+ throw new IllegalArgumentException("Cannot give a comparison for a token needs dep: " + body); // NOI18N
}
checkCodeName(name, false);
Index: openide/modules/src/org/openide/modules/doc-files/api.html
===================================================================
RCS file: /shared/data/ccvs/repository/openide/modules/src/org/openide/modules/doc-files/api.html,v
retrieving revision 1.10
diff -u -r1.10 api.html
--- openide/modules/src/org/openide/modules/doc-files/api.html 1 Jul 2006 09:08:53 -0000 1.10
+++ openide/modules/src/org/openide/modules/doc-files/api.html 13 Jul 2006 14:58:22 -0000
@@ -774,8 +774,19 @@
be supplied to the lookup system, though there could be other meanings. A module
may also require one or more tokens. A module which requires some tokens
may only be enabled by the system if for each such token, there is at least one other
-module which provides that token and is already enabled.
+module which provides that token and is already enabled.
+
+Since version 7.1 there is also support for OpenIDE-Module-Needs
+which is a weaker version of requires as it does not impose any restriction on
+the ordering of module. The OpenIDE-Module-Needs
is useful for
+modules that define some API and require an implementation of it. Just
+specify the need
for an implementation and make other modules depend
+on your module and OpenIDE-Module-Provides
the implementation token.
+Moreover there is also OpenIDE-Module-Recommends
which is even
+weaker version as it creates a conditional dependency - e.g. enables the module
+providing the token only if it is available, however if it is not, no dependency
+is broken.
At the heart of all these tags are the conventions used in the
Index: platform/samples/minicomposer/manifest.mf
===================================================================
RCS file: /shared/data/ccvs/repository/platform/samples/minicomposer/manifest.mf,v
retrieving revision 1.2
diff -u -r1.2 manifest.mf
--- platform/samples/minicomposer/manifest.mf 19 Jul 2005 11:59:24 -0000 1.2
+++ platform/samples/minicomposer/manifest.mf 13 Jul 2006 14:58:22 -0000
@@ -2,7 +2,7 @@
OpenIDE-Module: org.netbeans.examples.modules.minicomposer
OpenIDE-Module-Localizing-Bundle: org/netbeans/examples/modules/minicomposer/resources/Bundle.properties
OpenIDE-Module-Specification-Version: 1.2
-OpenIDE-Module-Requires: org.netbeans.api.javahelp.Help, org.openide.windows.IOProvider
+OpenIDE-Module-Requires: org.netbeans.api.javahelp.Help
OpenIDE-Module-Layer: org/netbeans/examples/modules/minicomposer/resources/layer.xml
Name: org/netbeans/examples/modules/minicomposer/ScoreDataLoader.class
Index: platform/samples/minicomposer/nbproject/project.xml
===================================================================
RCS file: /shared/data/ccvs/repository/platform/samples/minicomposer/nbproject/project.xml,v
retrieving revision 1.3
diff -u -r1.3 project.xml
--- platform/samples/minicomposer/nbproject/project.xml 30 Jun 2006 14:13:03 -0000 1.3
+++ platform/samples/minicomposer/nbproject/project.xml 13 Jul 2006 14:58:22 -0000
@@ -104,7 +104,7 @@
- 1.0
+ 1.11