Index: IOProvider.java =================================================================== RCS file: /cvs/openide/io/src/org/openide/windows/IOProvider.java,v --- IOProvider.java 1.4 +++ IOProvider.java @@ -22,0 +22,1 @@ +import javax.swing.Action; @@ -65,0 +66,21 @@ + + /** + * Get a named instance of InputOutput, which represents an output tab in + * the output window. Streams for reading/writing can be accessed via + * getters on the returned instance. + * Additional actoins are displayed on the output's toolbar. + * + * @param name A localized 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 + * @param additionalActions array of actions that are added to the toolbar + * @return an InputOutput instance for accessing the new tab + * @see InputOutput + * @since 1.6
+ * Note: The method is non-abstract for backward compatibility reasons only. If you are + * extending IOProvider and implementing it's abstract classes, you are encouraged to override + * this method as well. The default implementation fallbacks to the getIO(name, newIO) method, ignoring the actions passed. + */ + public InputOutput getIO(String name, boolean newIO, Action[] additionalActions) { + return getIO(name, newIO); + } + Index: changes.xml =================================================================== RCS file: /cvs/openide/io/api/doc/changes/changes.xml,v --- changes.xml 1.2 +++ changes.xml @@ -78,0 +78,23 @@ + + + Added API to add actions to output's toolbar + + + + + +

Added an additional method InputOutput getIO(String name, boolean newIO, Action[] additionalActions) + that accepts additional array of javax.swing.Action instances. It allows to define domain-specific additional actions + that can be performed on the content of the output.

+

The method +should be ideally abstract but because it's uncertain how many +implementations are there, the method is non-abstract and in it's +default impl, delegates to the InputOutput getIO(String name, boolean newIO) method, +ignoring the boolean parameter. Implementors of the class are +encourages to implement the new method. +

+
+ + +
+