diff options
Diffstat (limited to 'src/toolsconfig/ToolsConfig.java')
-rw-r--r-- | src/toolsconfig/ToolsConfig.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/toolsconfig/ToolsConfig.java b/src/toolsconfig/ToolsConfig.java new file mode 100644 index 0000000..7d55fb2 --- /dev/null +++ b/src/toolsconfig/ToolsConfig.java | |||
@@ -0,0 +1,36 @@ | |||
1 | package toolsconfig; | ||
2 | |||
3 | import cppcheckplus.control.UIFrame; | ||
4 | import cppcheckplus.text.MyTextPanel1; | ||
5 | import java.awt.TextArea; | ||
6 | |||
7 | public abstract class ToolsConfig { | ||
8 | public static final int SUCCESS = 0; // 表示程序执行成功 | ||
9 | public static final String SUCCESS_MESSAGE = "程序执行成功!"; | ||
10 | public static final String ERROR_MESSAGE = "程序执行出错:"; | ||
11 | public static final String ENTERWindows = "\r\n"; | ||
12 | public MyTextPanel1 textPanel; | ||
13 | protected String path; | ||
14 | protected String params; | ||
15 | protected UIFrame uiFrame; | ||
16 | protected TextArea result; | ||
17 | protected String name; | ||
18 | |||
19 | public abstract void execute(String src); | ||
20 | |||
21 | public void init(String path, String params, UIFrame uiFrame) { | ||
22 | this.path = path; | ||
23 | this.params = params; | ||
24 | this.textPanel = new MyTextPanel1(); | ||
25 | this.result = this.textPanel.getTextArea(); | ||
26 | this.uiFrame = uiFrame; | ||
27 | } | ||
28 | |||
29 | public boolean checkInit() { | ||
30 | return path != null && params != null && uiFrame != null; | ||
31 | } | ||
32 | |||
33 | public void clear() { | ||
34 | this.result.setText(""); | ||
35 | } | ||
36 | } | ||