Class LaunchAppropriateUI
java.lang.Object
edu.umd.cs.findbugs.LaunchAppropriateUI
Class to launch the appropriate textUI or GUI. This class is the Main-Class
in the findbugs.jar manifest, and is responsible for running an appropriate
main() method.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String[]Command line arguments.static final intUI code for the old Swing GUI.static final intUI code for the new Swing GUI.static final intUI code for displaying command line help.static final intUI code for displaying command line version information.static final intUI code for the text (command line) UI.Map of UI name strings to integer UI codes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intFind out what UI should be launched.voidlaunch()Launch the appropriate UI.static voidmain() method.
-
Field Details
-
TEXTUI
public static final int TEXTUIUI code for the text (command line) UI.- See Also:
-
GUI1
public static final int GUI1UI code for the old Swing GUI. This is deprecated now.- See Also:
-
GUI2
public static final int GUI2UI code for the new Swing GUI.- See Also:
-
SHOW_HELP
public static final int SHOW_HELPUI code for displaying command line help.- See Also:
-
SHOW_VERSION
public static final int SHOW_VERSIONUI code for displaying command line version information.- See Also:
-
uiNameToCodeMap
Map of UI name strings to integer UI codes. -
args
Command line arguments.
-
-
Constructor Details
-
LaunchAppropriateUI
-
-
Method Details
-
launch
-
getLaunchProperty
private int getLaunchProperty()Find out what UI should be launched.First, we check the command line arguments to see if the first argument specifies the UI (e.g., "-textui", "-gui", etc.)
If the first command line argument does not specify the UI, then we check the
findbugs.launchUIsystem property to one of the following values:- -Dfindbugs.launchUI=textui for textui,
- -Dfindbugs.launchUI=gui1 for the original swing gui,
- -Dfindbugs.launchUI=gui2 for the new swing gui,
- -Dfindbugs.launchUI=version for the ShowVersion main() method, or
- -Dfindbugs.launchUI=help for the ShowHelp main() method.
- Returns:
- an integer UI code: TEXTUI, GUI1, GUI2, SHOW_VERSION, SHOW_HELP, or possibly another user-set int value
-
main
-