public abstract class IOProvider
extends java.lang.Object
IOProvider.getDefault().getIO("MyTab", false) (pass true if
there may be an existing tab with the same name and you want to write to a
new tab).
Methods of this class can be called in any thread.
| Modifier and Type | Method | Description |
|---|---|---|
static IOProvider |
get(java.lang.String id) |
Gets IOProvider of selected name or delegates to getDefault() if none was
found.
|
static IOProvider |
getDefault() |
Get the default I/O provider.
|
abstract java.lang.String |
getId() |
Gets identifier of this provider.
|
abstract InputOutput |
getIO(java.lang.String name,
boolean newIO) |
Get a named instance of InputOutput, which represents an output tab in
the output window.
|
abstract InputOutput |
getIO(java.lang.String name,
boolean newIO,
org.openide.util.Lookup lookup) |
Get a named instance of InputOutput, which represents an output tab in
the output window.
|
@NonNull public static IOProvider getDefault()
Normally this is taken from Lookup.getDefault() but if there is no
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.
@NonNull public static IOProvider get(@NonNull java.lang.String id)
id - ID of provider.@NonNull public abstract java.lang.String getId()
@NonNull public abstract InputOutput getIO(@NonNull java.lang.String name, boolean newIO)
name - A localised display name for the tab.newIO - If true, a new InputOutput is
returned, else an existing InputOutput of the same name may
be returned.InputOutput instance for accessing the new tab.InputOutput@NonNull public abstract InputOutput getIO(@NonNull java.lang.String name, boolean newIO, @NonNull org.openide.util.Lookup lookup)
name - A localised display name for the tab.newIO - If true, a new InputOutput is
returned, else an existing InputOutput of the same name may
be returned.lookup - Lookup which may contain additional information for various
implementations of output window.InputOutput instance for accessing the new tab.InputOutputBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.