diff --git a/doc/config_linux.xml b/doc/config_linux.xml index 018a7d853ea10e5356c661a154fb9f338ed3b338..41256f6989412a8ddfb9ee911cee35c0b1cda59a 100755 --- a/doc/config_linux.xml +++ b/doc/config_linux.xml @@ -4,6 +4,7 @@ <DOTTYPath data="/bin/dotty" /> <DOTTYHost data="localhost" /> <FILEPath data="../modeling/" /> +<DownloadedFILEPath data="../modeling/" /> <LIBPath data="../lib" /> <IMGPath data="../figures" /> <LOTOSPath data="../lotos/" /> diff --git a/doc/config_macosx.xml b/doc/config_macosx.xml index 25aa7427338625c0ae02674a74e10a6fe64920d3..051791d18aa106f6962f4c189af6a7501c03e1d9 100755 --- a/doc/config_macosx.xml +++ b/doc/config_macosx.xml @@ -4,6 +4,7 @@ <DOTTYPath data="/bin/dotty" /> <DOTTYHost data="localhost" /> <FILEPath data="../modeling/" /> +<DownloadedFILEPath data="../modeling/" /> <LIBPath data="../lib" /> <IMGPath data="../figures" /> <LOTOSPath data="../lotos/" /> diff --git a/doc/config_windows.xml b/doc/config_windows.xml index 2e9af8b6b7440c77380500cfd961753d90b45e4a..5b62ce8058011c2121715ed3a09d0c253c07aa68 100755 --- a/doc/config_windows.xml +++ b/doc/config_windows.xml @@ -4,6 +4,7 @@ <DOTTYPath data="/bin/dotty" /> <DOTTYHost data="localhost" /> <FILEPath data="../modeling/" /> +<DownloadedFILEPath data="../modeling/" /> <LIBPath data="../lib" /> <IMGPath data="../figures" /> <LOTOSPath data="../lotos/" /> diff --git a/src/main/java/common/SpecConfigTTool.java b/src/main/java/common/SpecConfigTTool.java index e46d7b61b07b6f6be715964119b2e1ae47e87442..2287b901a258e2584804721a5cf5d994b3d24760 100644 --- a/src/main/java/common/SpecConfigTTool.java +++ b/src/main/java/common/SpecConfigTTool.java @@ -61,6 +61,10 @@ import java.io.IOException; * @version 1.0 */ public class SpecConfigTTool { + + public static String DEFAULT_CONFIG = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n\n<PROJECTCONFIGURATION>\n<LastVCD data=\"\"/>\n<LastOpenDiagram tab=\"0\" panel=\"0\"/>\n</PROJECTCONFIGURATION>\n"; + + public static String SystemCCodeDirectory = ""; public static String SystemCCodeCompileCommand = ""; public static String SystemCCodeExecuteCommand = ""; @@ -168,12 +172,12 @@ public class SpecConfigTTool { VCDPath = dir.getAbsolutePath() + ProjectVCDDirectory; NCDirectory = dir.getAbsolutePath() + ProjectNCDirectory; - TraceManager.addDev("Before replace SystemCCodeCompileCommand:" + SystemCCodeCompileCommand + " with " + ConfigurationTTool.SystemCCodeDirectory + - " to " + SystemCCodeDirectory); + //TraceManager.addDev("Before replace SystemCCodeCompileCommand:" + SystemCCodeCompileCommand + " with " + ConfigurationTTool.SystemCCodeDirectory + + // " to " + SystemCCodeDirectory); SystemCCodeCompileCommand = ConfigurationTTool.SystemCCodeCompileCommand.replace( ConfigurationTTool.SystemCCodeDirectory, SystemCCodeDirectory); - TraceManager.addDev("After replace SystemCCodeCompileCommand:" + SystemCCodeCompileCommand); + //TraceManager.addDev("After replace SystemCCodeCompileCommand:" + SystemCCodeCompileCommand); SystemCCodeExecuteCommand = ConfigurationTTool.SystemCCodeExecuteCommand.replace(ConfigurationTTool.SystemCCodeDirectory, SystemCCodeDirectory); SystemCCodeInteractiveExecuteCommand = ConfigurationTTool.SystemCCodeInteractiveExecuteCommand.replace(ConfigurationTTool.SystemCCodeDirectory, SystemCCodeDirectory); @@ -207,7 +211,15 @@ public class SpecConfigTTool { TGraph.mkdir(); } - File test = new File("./"); + File projectConfig = new File(dir + File.separator + "project_config.xml"); + try { + FileUtils.saveFile(projectConfig, DEFAULT_CONFIG); + return projectConfig; + } catch (Exception e) { + System.err.println(e.getMessage()); + } + + /*File test = new File("./"); File base; if (test.getAbsolutePath().contains("TTool/bin/")) base = new File("../ttool/project_config.xml"); @@ -218,19 +230,19 @@ public class SpecConfigTTool { return new File(dir + File.separator + "project_config.xml"); } catch (IOException e) { System.err.println(e.getMessage()); - } + }*/ return null; } public static void loadConfigFile(File f) throws MalformedConfigurationException { if (!FileUtils.checkFileForOpen(f)) { - throw new MalformedConfigurationException("Filepb"); + throw new MalformedConfigurationException("Filepb 1"); } String data = FileUtils.loadFileData(f); if (data == null) { - throw new MalformedConfigurationException("Filepb"); + throw new MalformedConfigurationException("Filepb 2"); } loadConfigurationFromXML(data); @@ -286,13 +298,13 @@ public class SpecConfigTTool { boolean write = false; if (!FileUtils.checkFileForOpen(f)) { - throw new MalformedConfigurationException("Filepb"); + throw new MalformedConfigurationException("Filepb 3"); } String data = FileUtils.loadFileData(f); if (data == null) { - throw new MalformedConfigurationException("Filepb"); + throw new MalformedConfigurationException("Filepb 4"); } index0 = data.indexOf("LastVCD"); diff --git a/src/main/java/ui/networkmodelloader/JDialogLoadingNetworkModel.java b/src/main/java/ui/networkmodelloader/JDialogLoadingNetworkModel.java index fea1d4ee988e271b119a9d2d5a45e28cba7a522d..287d223eb558b0313c299e08a31ee116e913c53e 100644 --- a/src/main/java/ui/networkmodelloader/JDialogLoadingNetworkModel.java +++ b/src/main/java/ui/networkmodelloader/JDialogLoadingNetworkModel.java @@ -249,6 +249,8 @@ public class JDialogLoadingNetworkModel extends javax.swing.JFrame implements Ac // Loading main file describing models, giving information on this, and filling the array of models // Accessing the main file try { + + int delay = 10000; //milliseconds ActionListener taskPerformer = new ActionListener() { public void actionPerformed(ActionEvent evt) {