public class GPManager
extends java.lang.Object
TopManager whenever TopManager has to be used.
It provides the same utility methods for getting services from NetBeans. New versions of NetBeans removed
TopManager completely and are changing the way those services are accessed. This class limits the impact
of the changes in your code.| Modifier and Type | Field and Description |
|---|---|
static int |
ERROR
Serious problem, application may be crippled
|
static int |
EXCEPTION
Something went wrong, though it can be recovered
|
static int |
INFORMATIONAL
Message that would be useful for tracing events but which need not be a problem
|
static int |
UNKNOWN
Undefined severity
|
static int |
USER
Something the user should be aware of
|
static int |
WARNING
Something went wrong in the software, but it is continuing and the user need not be bothered
|
| Constructor and Description |
|---|
GPManager() |
| Modifier and Type | Method and Description |
|---|---|
static java.awt.Dialog |
createDialog(org.openide.DialogDescriptor descriptor)
Get a new standard dialog.
|
static org.openide.windows.InputOutput |
getIO(java.lang.String name,
boolean newIO)
Support reading from and writing to a specific tab on the Output Window.
|
static org.openide.windows.OutputWriter |
getStdOut()
Support writing to the Output Window on the main tab.
|
static void |
notify(int severity,
java.lang.Throwable t)
Prints the exception to the log file and (possibly) notifies the user.
|
static java.lang.Object |
notify(org.openide.NotifyDescriptor descriptor)
Notify the user of something in a message box, possibly with feedback.
|
static void |
setStatusText(java.lang.String text)
Show text in the IDE's status line.
|
static void |
showURL(java.net.URL url)
Browse a document named by some URL.
|
public static final int ERROR
public static final int EXCEPTION
public static final int INFORMATIONAL
public static final int UNKNOWN
public static final int USER
public static final int WARNING
public static final void setStatusText(java.lang.String text)
text - the text to be shownpublic static final java.awt.Dialog createDialog(org.openide.DialogDescriptor descriptor)
Do not cache the resulting dialog if it is modal and try to reuse it! Always create a new dialog using this method if you need to show a dialog again. Otherwise previously closed windows can reappear.
descriptor - general description of the dialogpublic static final java.lang.Object notify(org.openide.NotifyDescriptor descriptor)
To support both GUI and non-GUI use, this method may be called from any thread (providing you are not holding any locks), and will block the caller's thread. In GUI mode, it will be run in the AWT event thread automatically. If you wish to hold locks, or do not need the result object immediately or at all, please make this call asynchronously (e.g. from the request processor).
nd - description of the notificationpublic static final org.openide.windows.OutputWriter getStdOut()
public static final org.openide.windows.InputOutput getIO(java.lang.String name,
boolean newIO)
name - desired name of the tabInputOutput class for accessing the new tabpublic static final void notify(int severity,
java.lang.Throwable t)
everity - the severity to be applied to the exception (overrides default), e.g. EXCEPTIONt - the exception to notifypublic static final void showURL(java.net.URL url)
url - URL of WWW or local document to be shownt - the exception to notify