From: rkv Date: Wed, 5 Dec 2012 11:52:02 +0000 (+0000) Subject: During checkout call run_salome_siman.sh. X-Git-Tag: Root_Delivery1_2012_12_06~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2c68ccb9279b6a3db783cc120ba5eb98901983a2;p=tools%2Fsiman.git During checkout call run_salome_siman.sh. Show message about downloaded data after successful checkout. --- diff --git a/Workspace/Siman/WebContent/jap/splat-launcher.jar b/Workspace/Siman/WebContent/jap/splat-launcher.jar index 40a4ad4..4c5e772 100644 Binary files a/Workspace/Siman/WebContent/jap/splat-launcher.jar and b/Workspace/Siman/WebContent/jap/splat-launcher.jar differ diff --git a/Workspace/Siman/WebContent/jap/splat-signedlauncher.jar b/Workspace/Siman/WebContent/jap/splat-signedlauncher.jar index 7b9637f..c4f5926 100644 Binary files a/Workspace/Siman/WebContent/jap/splat-signedlauncher.jar and b/Workspace/Siman/WebContent/jap/splat-signedlauncher.jar differ diff --git a/Workspace/Siman/WebContent/jsp/toolbar.jsp b/Workspace/Siman/WebContent/jsp/toolbar.jsp index 369aa47..d6cab32 100644 --- a/Workspace/Siman/WebContent/jsp/toolbar.jsp +++ b/Workspace/Siman/WebContent/jsp/toolbar.jsp @@ -34,11 +34,20 @@ " border="none" title="" /> + + + + /tmp/SimanSalome//download + + <%-- URL for refreshing scenario view after checkin --%> + namespace="/study" action="open-%{#entitype}" includeParams="none" escapeAmp="no"> + + " border="none" /> - --siman --siman-study=--siman-study= --siman-scenario= --siman-user= -k + value="connectedUser.username" /> + " @@ -92,4 +102,4 @@ - \ No newline at end of file + diff --git a/Workspace/Siman/WebContent/layout/baseLayout.jsp b/Workspace/Siman/WebContent/layout/baseLayout.jsp index ffbc1e3..7356f06 100644 --- a/Workspace/Siman/WebContent/layout/baseLayout.jsp +++ b/Workspace/Siman/WebContent/layout/baseLayout.jsp @@ -38,6 +38,10 @@
- + + + \ No newline at end of file diff --git a/Workspace/Siman/src/labels.properties b/Workspace/Siman/src/labels.properties index ccdb361..b826000 100644 --- a/Workspace/Siman/src/labels.properties +++ b/Workspace/Siman/src/labels.properties @@ -294,6 +294,7 @@ message.info.type = Si besoin, modifiez le nom ci-dessous, message.info.step = Si besoin, sélectionnez une autre activité ci-dessous: message.info.value = Si besoin, modifiez la valeur ci-dessous: message.info.context = ou sélectionnez une valeur déjà utilisée. +message.info.data = You can find checked out data in the directory {0}. message.error.internal = Erreur interne. Contactez votre administrateur. message.error.launch = Erreur fatale lors du démarrage de l''application {0}. Contactez votre administrateur. diff --git a/Workspace/Siman/src/labels_en.properties b/Workspace/Siman/src/labels_en.properties index a62244d..09111f5 100644 --- a/Workspace/Siman/src/labels_en.properties +++ b/Workspace/Siman/src/labels_en.properties @@ -295,6 +295,7 @@ message.info.type = If needed, edit the name below, providing that it is message.info.step = If needed, select another activity below: message.info.value = If needed, change the value below: message.info.context = or select a value already used. +message.info.data = You can find checked out data in the directory {0}. message.error.internal = Internal error. Contact your system administrator. message.error.launch = Fatal error when starting {0}. Contact your system administrator. diff --git a/Workspace/Siman/src/org/splat/launcher/ToolbarApplet.java b/Workspace/Siman/src/org/splat/launcher/ToolbarApplet.java index dd4d356..92632e2 100644 --- a/Workspace/Siman/src/org/splat/launcher/ToolbarApplet.java +++ b/Workspace/Siman/src/org/splat/launcher/ToolbarApplet.java @@ -32,6 +32,14 @@ public class ToolbarApplet extends java.applet.Applet implements ActionListener */ private static final long serialVersionUID = 3243053622061086715L; + /** + * The name of the script to run Salome. + */ + private static final String RUN_SALOME_SCRIPT = "run_salome_siman"; + /** + * Possible script extensions. + */ + private static final String[] SCRIPT_EXT = { "", ".sh", ".bat", ".cmd" }; /** * The response key string: '"canCheckout" :'. */ @@ -198,16 +206,16 @@ public class ToolbarApplet extends java.applet.Applet implements ActionListener } else if (!SALOME_HOME.endsWith(File.separator)) { SALOME_HOME += File.separator; } - String pathToScript = SALOME_HOME + "KERNEL" + File.separator + "bin" - + File.separator + "salome" + File.separator + "runSalome"; - - // Look for the launching script in the file system + String pathToScript = SALOME_HOME + File.separator + RUN_SALOME_SCRIPT; File script = new File(pathToScript); - if (!script.exists()) { - script = new File(pathToScript + ".bat"); - if (!script.exists()) { - script = new File(pathToScript + ".cmd"); + String extensions = ""; + // Look for the launching script in the file system + for (String ext : SCRIPT_EXT) { + script = new File(pathToScript + ext); //RKV: NOPMD: There are not so much extensions + if (script.exists()) { + break; } + extensions += "|" + ext; } if (script.exists()) { @@ -215,8 +223,7 @@ public class ToolbarApplet extends java.applet.Applet implements ActionListener // Call to the Siman server to checkout the scenario URL checkoutUrl = new URL(getCodeBase().toString() + "checkout.action?" - + params.replaceAll("siman-", "").replaceAll("--", "-") - .replaceAll("-", "&").replaceAll("\\s", "")); + + params.replaceAll("--siman-", "&").replaceAll("\\s", "")); BufferedReader buffer = new BufferedReader(new InputStreamReader( checkoutUrl.openStream())); @@ -252,9 +259,10 @@ public class ToolbarApplet extends java.applet.Applet implements ActionListener showError(response); } } else { - showError("SALOME module is not found: " + script.getAbsolutePath()); + extensions = "[" + extensions.replaceAll("\\|\\|", "") + "]"; + showError("SALOME module is not found: " + pathToScript + extensions); throw new ConfigurationException("SALOME module is not found: " - + script.getAbsolutePath()); + + pathToScript + extensions); } } diff --git a/Workspace/Siman/src/org/splat/simer/Action.java b/Workspace/Siman/src/org/splat/simer/Action.java index a6eb8c3..04a6253 100644 --- a/Workspace/Siman/src/org/splat/simer/Action.java +++ b/Workspace/Siman/src/org/splat/simer/Action.java @@ -69,6 +69,10 @@ public class Action extends ActionSupport implements ServletRequestAware, * Error code. */ private String _errorCode; + /** + * The message to show when the page is loaded. + */ + private String _message = ""; /** * ActionType for specifying the type of the operaion. */ @@ -683,4 +687,20 @@ public class Action extends ActionSupport implements ServletRequestAware, public void setActionType(final String actionType) { _actionType = actionType; } + + /** + * Get the message. + * @return the message + */ + public String getMessage() { + return _message; + } + + /** + * Set the message. + * @param message the message to set + */ + public void setMessage(final String message) { + _message = message; + } } \ No newline at end of file