@return FrameworkWizardUI The instance of this class\r
\r
**/\r
- public static FrameworkWizardUI getInstance() {\r
+ public static FrameworkWizardUI getInstance(String[] args) {\r
if (fwui == null) {\r
- fwui = new FrameworkWizardUI();\r
+ fwui = new FrameworkWizardUI(args);\r
}\r
return fwui;\r
}\r
+ \r
+ /**\r
+ If the class hasn't an instnace, new one.\r
+ \r
+ @return FrameworkWizardUI The instance of this class\r
+ \r
+ **/\r
+ public static FrameworkWizardUI getInstance() {\r
+ return fwui;\r
+ }\r
\r
/**\r
This method initializes jMenuBar \r
* Main class, start the GUI\r
* \r
*/\r
- public static void main(String[] args) {\r
- FrameworkWizardUI module = FrameworkWizardUI.getInstance();\r
+ public static void main(String[] args) { \r
+ //\r
+ // Start Main UI\r
+ //\r
+ FrameworkWizardUI module = FrameworkWizardUI.getInstance(args);\r
module.setVisible(true);\r
}\r
\r
This is the default constructor\r
\r
**/\r
- public FrameworkWizardUI() {\r
+ public FrameworkWizardUI(String[] args) {\r
super();\r
- init();\r
+ init(args);\r
}\r
\r
/**\r
\r
\r
**/\r
- private void init() {\r
+ private void init(String[] args) {\r
//\r
// Set current workspace and check\r
// Check if exists WORKSPACE\r
//\r
// Show splash screen\r
//\r
- //SplashScreen ss = new SplashScreen();\r
- //ss.setVisible(true);\r
+ SplashScreen ss = new SplashScreen();\r
+ ss.setVisible(true);\r
+ \r
+ //\r
+ // Go through args to check if enable log\r
+ //\r
+ for (int index = 0; index < args.length; index++) {\r
+ if (args[index].equals("--log") || args[index].equals("-l")) {\r
+ Log.setSaveLog(true);\r
+ }\r
+ }\r
\r
//\r
// Init Global Data\r
//\r
// Close splash screen\r
//\r
- //ss.dispose();\r
+ ss.dispose();\r
\r
//\r
// Init the frame\r
String path = null;\r
IDefaultMutableTreeNode belongNode = null;\r
\r
-// try {\r
+ try {\r
//\r
// Get selected tree node\r
//\r
.findIndexOfListById(new PlatformIdentification(\r
id));\r
}\r
-// } catch (Exception e) {\r
-// Log.err("double click category: " + intCategory);\r
-// Log.err("double click belong node: " + belongNode.toString());\r
-// Log.err("double click id path: " + id);\r
-// Log.err("double click exception: " + e.getMessage());\r
-// }\r
+ } catch (Exception e) {\r
+ Log.err("double click category: " + intCategory);\r
+ Log.err("double click belong node: " + belongNode.toString());\r
+ Log.err("double click id path: " + id);\r
+ Log.err("double click exception: " + e.getMessage());\r
+ }\r
}\r
\r
/**\r