59 import org.apache.tools.ant.Project;
60 import org.apache.tools.ant.Task;
61
62 /**
63 * Task to allow the user to control langtools tools built when using NetBeans.
64 *
65 * There are two primary modes.
66 * 1) Property mode. In this mode, property names are provided to get values
67 * that may be specified by the user, either directly in a GUI dialog, or
68 * read from a properties file. If the GUI dialog is invoked, values may
69 * optionally be set for future use.
70 * 2) Setup mode. In this mode, no property names are provided, and the GUI
71 * is invoked to allow the user to set or reset values for use in property mode.
72 */
73 public class SelectToolTask extends Task {
74
75 enum ToolChoices {
76 NONE(""),
77 JAVAC("javac"),
78 JAVADOC("javadoc"),
79 JAVAH("javah"),
80 JAVAP("javap"),
81 JSHELL("jshell");
82
83 String toolName;
84 boolean bootstrap;
85
86 ToolChoices(String toolName) {
87 this(toolName, false);
88 }
89
90 ToolChoices(String toolName, boolean bootstrap) {
91 this.toolName = toolName;
92 this.bootstrap = bootstrap;
93 }
94
95 @Override
96 public String toString() {
97 return toolName;
98 }
99 }
|
59 import org.apache.tools.ant.Project;
60 import org.apache.tools.ant.Task;
61
62 /**
63 * Task to allow the user to control langtools tools built when using NetBeans.
64 *
65 * There are two primary modes.
66 * 1) Property mode. In this mode, property names are provided to get values
67 * that may be specified by the user, either directly in a GUI dialog, or
68 * read from a properties file. If the GUI dialog is invoked, values may
69 * optionally be set for future use.
70 * 2) Setup mode. In this mode, no property names are provided, and the GUI
71 * is invoked to allow the user to set or reset values for use in property mode.
72 */
73 public class SelectToolTask extends Task {
74
75 enum ToolChoices {
76 NONE(""),
77 JAVAC("javac"),
78 JAVADOC("javadoc"),
79 JAVAP("javap"),
80 JSHELL("jshell");
81
82 String toolName;
83 boolean bootstrap;
84
85 ToolChoices(String toolName) {
86 this(toolName, false);
87 }
88
89 ToolChoices(String toolName, boolean bootstrap) {
90 this.toolName = toolName;
91 this.bootstrap = bootstrap;
92 }
93
94 @Override
95 public String toString() {
96 return toolName;
97 }
98 }
|