//\r
SplashScreen ss = new SplashScreen();\r
ss.setVisible(true);\r
- \r
+\r
//\r
// Init Global Data\r
//\r
if (arg0.getSource() == this.jMenuItemFileRefresh) {\r
if (this.closeAll() == 0) {\r
this.refresh();\r
- this.makeEmptyTree(); \r
+ this.makeEmptyTree();\r
}\r
}\r
\r
if (!GlobalData.openingModuleList.getModuleSaved(currentOpeningModuleIndex)) {\r
int result = showSaveDialog();\r
if (result == JOptionPane.YES_OPTION) {\r
- this.saveAll();\r
+ this.save();\r
}\r
if (result == JOptionPane.NO_OPTION) {\r
// Do nothing\r
if (!GlobalData.openingPackageList.getPackageSaved(currentOpeningPackageIndex)) {\r
int result = showSaveDialog();\r
if (result == JOptionPane.YES_OPTION) {\r
- this.saveAll();\r
+ this.save();\r
}\r
if (result == JOptionPane.NO_OPTION) {\r
// Do nothing\r
if (!GlobalData.openingPlatformList.getPlatformSaved(currentOpeningPlatformIndex)) {\r
int result = showSaveDialog();\r
if (result == JOptionPane.YES_OPTION) {\r
- this.saveAll();\r
+ this.save();\r
}\r
if (result == JOptionPane.NO_OPTION) {\r
// Do nothing\r
GlobalData.openingModuleList.closeAll();\r
GlobalData.openingPackageList.closeAll();\r
GlobalData.openingPlatformList.closeAll();\r
- \r
+\r
return 0;\r
}\r
\r
//\r
// Enable close/close all if some files are opened\r
//\r
- jMenuItemFileClose.setEnabled(GlobalData.openingModuleList.isOpen()\r
- || GlobalData.openingPackageList.isOpen()\r
- || GlobalData.openingPlatformList.isOpen());\r
+ switch (this.jTabbedPaneEditor.getSelectedIndex()) {\r
+ case 0:\r
+ jMenuItemFileClose\r
+ .setEnabled(GlobalData.openingModuleList\r
+ .getModuleOpen(this.currentOpeningModuleIndex));\r
+ jMenuItemFileSave\r
+ .setEnabled(!GlobalData.openingModuleList\r
+ .getModuleSaved(this.currentOpeningModuleIndex));\r
+ break;\r
+ case 1:\r
+ jMenuItemFileClose\r
+ .setEnabled(GlobalData.openingPackageList\r
+ .getPackageOpen(this.currentOpeningPackageIndex));\r
+ jMenuItemFileSave\r
+ .setEnabled(!GlobalData.openingPackageList\r
+ .getPackageSaved(this.currentOpeningPackageIndex));\r
+ break;\r
+ case 2:\r
+ jMenuItemFileClose\r
+ .setEnabled(GlobalData.openingPlatformList\r
+ .getPlatformOpen(this.currentOpeningPlatformIndex));\r
+ jMenuItemFileSave\r
+ .setEnabled(!GlobalData.openingPlatformList\r
+ .getPlatformSaved(this.currentOpeningPlatformIndex));\r
+ break;\r
+ }\r
jMenuItemFileCloseAll.setEnabled(GlobalData.openingModuleList.isOpen()\r
|| GlobalData.openingPackageList.isOpen()\r
|| GlobalData.openingPlatformList.isOpen());\r
//\r
// Enable save/save all if some files are changed\r
//\r
- jMenuItemFileSave.setEnabled(!GlobalData.openingModuleList.isSaved()\r
- || !GlobalData.openingPackageList.isSaved()\r
- || !GlobalData.openingPlatformList.isSaved());\r
jMenuItemFileSaveAll.setEnabled(!GlobalData.openingModuleList.isSaved()\r
|| !GlobalData.openingPackageList.isSaved()\r
|| !GlobalData.openingPlatformList.isSaved());\r
JOptionPane\r
.showConfirmDialog(\r
null,\r
- "WORKSPACE Environment Variable Is Not Defined, Please select a valid WORKSPACE directory. " +\r
- DataType.LINE_SEPARATOR + DataType.LINE_SEPARATOR + "NOTICE:" +\r
- DataType.LINE_SEPARATOR + "This does not change the System Environment Variable." +\r
- DataType.LINE_SEPARATOR + "It only applies to where the Wizard will manage modification and file creations.",\r
+ "WORKSPACE Environment Variable Is Not Defined, Please select a valid WORKSPACE directory. "\r
+ + DataType.LINE_SEPARATOR\r
+ + DataType.LINE_SEPARATOR\r
+ + "NOTICE:"\r
+ + DataType.LINE_SEPARATOR\r
+ + "This does not change the System Environment Variable."\r
+ + DataType.LINE_SEPARATOR\r
+ + "It only applies to where the Wizard will manage modification and file creations.",\r
"Error", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);\r
SwitchWorkspace sw = new SwitchWorkspace(this, true);\r
int result = sw.showDialog();\r
this.dispose();\r
System.exit(0);\r
case Workspace.WORKSPACE_NO_TARGET_FILE:\r
- JOptionPane.showConfirmDialog(null, "Target.txt File Is Not Existed", "Error",\r
- JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);\r
+ JOptionPane.showConfirmDialog(null, "Target.txt File Is Not Existed", "Error", JOptionPane.DEFAULT_OPTION,\r
+ JOptionPane.ERROR_MESSAGE);\r
this.dispose();\r
System.exit(0);\r
}\r