Isis-fish-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
April 2009
- 7 participants
- 108 discussions
Author: chatellier
Date: 2009-04-02 16:42:11 +0000 (Thu, 02 Apr 2009)
New Revision: 2062
Modified:
isis-fish/trunk/pom.xml
Log:
Make i18n analyse all java file (not only UI.java)
Modified: isis-fish/trunk/pom.xml
===================================================================
--- isis-fish/trunk/pom.xml 2009-04-02 16:38:10 UTC (rev 2061)
+++ isis-fish/trunk/pom.xml 2009-04-02 16:42:11 UTC (rev 2062)
@@ -456,9 +456,9 @@
<entry>
<basedir>${maven.gen.dir}/java/</basedir>
<specificGoal>parserJava</specificGoal>
- <includes>
+ <!-- <includes>
<param>**\/**UI.java</param>
- </includes>
+ </includes> -->
</entry>
</entries>
</configuration>
1
0
r2061 - isis-fish/trunk/src/main/resources/i18n
by chatellier@users.labs.libre-entreprise.org 02 Apr '09
by chatellier@users.labs.libre-entreprise.org 02 Apr '09
02 Apr '09
Author: chatellier
Date: 2009-04-02 16:38:10 +0000 (Thu, 02 Apr 2009)
New Revision: 2061
Modified:
isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties
isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties
Log:
Readd deleted entries by strictMode
Modified: isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties
===================================================================
--- isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2009-04-02 09:55:22 UTC (rev 2060)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2009-04-02 16:38:10 UTC (rev 2061)
@@ -28,6 +28,7 @@
Cut\ current\ selection\ (Ctrl-x)=
Error\ during\ vcs\ initialisation=
Error\ while\ uploading\ public\ key\ to\ remote\ serveur\ authorized_keys=
+Export\ selected\ script(s)\ to\ zip\ archive=
Generate\ next\ simulation=
Import\ one\ java\ file\ script\ source=
Import\ simulation\ file\ %s\ in\ directory\ %s\ and\ rename\ from\ %s\ to\ %s=
@@ -361,8 +362,20 @@
isisfish.export.directory=Export directory
isisfish.export.saved=Export saved
isisfish.export.title=Results export
+isisfish.factor.coefficient=Coefficient (in %)
+isisfish.factor.comment=Comment
+isisfish.factor.continue=Continue factor
+isisfish.factor.discret=Discret factor
isisfish.factor.factor=Factor
+isisfish.factor.firstValue=First value
isisfish.factor.increment=Cardinality
+isisfish.factor.lastValue=Last value
+isisfish.factor.name=Factor name
+isisfish.factor.operateur=Operator
+isisfish.factor.selectDiscretNumber=Number of factors
+isisfish.factor.title=Factor input
+isisfish.factor.validDiscretNumber=Ok
+isisfish.factor.value=Value
isisfish.filter=Filter
isisfish.filter.apply=Apply filter
isisfish.filter.cancel=Cancel
Modified: isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties
===================================================================
--- isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2009-04-02 09:55:22 UTC (rev 2060)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2009-04-02 16:38:10 UTC (rev 2061)
@@ -28,6 +28,7 @@
Cut\ current\ selection\ (Ctrl-x)=
Error\ during\ vcs\ initialisation=
Error\ while\ uploading\ public\ key\ to\ remote\ serveur\ authorized_keys=
+Export\ selected\ script(s)\ to\ zip\ archive=
Generate\ next\ simulation=
Import\ one\ java\ file\ script\ source=
Import\ simulation\ file\ %s\ in\ directory\ %s\ and\ rename\ from\ %s\ to\ %s=
@@ -361,8 +362,20 @@
isisfish.export.directory=Dossier d'export
isisfish.export.saved=Exports des r\u00E9sultats sauvegard\u00E9s
isisfish.export.title=Export des r\u00E9sultats
+isisfish.factor.coefficient=Co\u00E9fficient (en %)
+isisfish.factor.comment=Commentaires
+isisfish.factor.continue=Facteur continu
+isisfish.factor.discret=Facteur discret
isisfish.factor.factor=Facteur
+isisfish.factor.firstValue=Premi\u00E8re valeur
isisfish.factor.increment=Cardinalit\u00E9
+isisfish.factor.lastValue=Derni\u00E8re valeur
+isisfish.factor.name=Nom du facteur
+isisfish.factor.operateur=Op\u00E9rateur
+isisfish.factor.selectDiscretNumber=Nombre de facteurs
+isisfish.factor.title=Saisie d'un facteur
+isisfish.factor.validDiscretNumber=Valider
+isisfish.factor.value=Valeur
isisfish.filter=Filtrer
isisfish.filter.apply=Appliquer le filtre
isisfish.filter.cancel=Annuler
1
0
r2060 - in isis-fish/trunk/src/main: java/fr/ifremer/isisfish/ui/input java/fr/ifremer/isisfish/ui/script java/fr/ifremer/isisfish/ui/sensitivity java/fr/ifremer/isisfish/ui/simulator java/fr/ifremer/isisfish/ui/widget/renderer resources/i18n
by sletellier@users.labs.libre-entreprise.org 02 Apr '09
by sletellier@users.labs.libre-entreprise.org 02 Apr '09
02 Apr '09
Author: sletellier
Date: 2009-04-02 09:55:22 +0000 (Thu, 02 Apr 2009)
New Revision: 2060
Removed:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/SimpleToolTipListRenderer.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/ToolTipComboBoxRenderer.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/ToolTipListRenderer.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/ToolTipTableColumnRenderer.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/WithToolTipListModel.java
Modified:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/EffortDescriptionUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationGroupUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/TripTypeUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/VesselTypeUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/ScriptUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/sensitivity/EditorHelper.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/sensitivity/SensitivityTabUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ExportUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ResultChoiceUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SensUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulAction.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ToolTipListModelFactory.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/SimpleToolTipComboBoxRenderer.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/SimpleToolTipTableColumnRenderer.java
isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties
isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties
Log:
Adding ToolTips
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/EffortDescriptionUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/EffortDescriptionUI.jaxx 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/EffortDescriptionUI.jaxx 2009-04-02 09:55:22 UTC (rev 2060)
@@ -150,7 +150,7 @@
<JLabel text="isisfish.effortDescription.fishingOperationDuration" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldEffortDescriptionFishingOperationDuration" text='{getEffortDescription().getFishingOperationDuration() == null ? "" : getEffortDescription().getFishingOperationDuration().getHour()}' onKeyReleased='getEffortDescription().setFishingOperationDuration(new TimeUnit(3600 * Double.parseDouble(fieldEffortDescriptionFishingOperationDuration.getText())))' enabled='{isActif()}' decorator='boxed' _bean='{EffortDescriptionImpl.class}' _method='"FishingOperationDuration"'/>
+ <JTextField id="fieldEffortDescriptionFishingOperationDuration" text='{getEffortDescription().getFishingOperationDuration() == null ? "" : getEffortDescription().getFishingOperationDuration().getHour()}' toolTipText="in hour" onKeyReleased='getEffortDescription().setFishingOperationDuration(new TimeUnit(3600 * Double.parseDouble(fieldEffortDescriptionFishingOperationDuration.getText())))' enabled='{isActif()}' decorator='boxed' _bean='{EffortDescriptionImpl.class}' _method='"FishingOperationDuration"'/>
</cell>
</row>
<row>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationGroupUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationGroupUI.jaxx 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationGroupUI.jaxx 2009-04-02 09:55:22 UTC (rev 2060)
@@ -161,10 +161,10 @@
<JLabel text="isisfish.populationGroup.length" enabled='{isPopGroupNotNull()}'/>
</cell>
<cell fill='both' weightx='0.5'>
- <JTextField id="fieldPopulationGroupMinLength" text='{getPopulationGroup().getMinLength()}' onKeyReleased='getPopulationGroup().setMinLength(Double.parseDouble(fieldPopulationGroupMinLength.getText()))' enabled='{isPopGroupNotNull()}' decorator='boxed' _bean='{PopulationGroupImpl.class}' _method='"MinLength"'/>
+ <JTextField id="fieldPopulationGroupMinLength" text='{getPopulationGroup().getMinLength()}' toolTipText="minimum length" onKeyReleased='getPopulationGroup().setMinLength(Double.parseDouble(fieldPopulationGroupMinLength.getText()))' enabled='{isPopGroupNotNull()}' decorator='boxed' _bean='{PopulationGroupImpl.class}' _method='"MinLength"'/>
</cell>
<cell fill='both' weightx='0.5'>
- <JTextField id="fieldPopulationGroupMaxLength" text='{getPopulationGroup().getMaxLength()}' onKeyReleased='getPopulationGroup().setMaxLength(Double.parseDouble(fieldPopulationGroupMaxLength.getText()))' enabled='{isPopGroupNotNull()}' decorator='boxed' _bean='{PopulationGroupImpl.class}' _method='"MaxLength"'/>
+ <JTextField id="fieldPopulationGroupMaxLength" text='{getPopulationGroup().getMaxLength()}' toolTipText="maximum length" onKeyReleased='getPopulationGroup().setMaxLength(Double.parseDouble(fieldPopulationGroupMaxLength.getText()))' enabled='{isPopGroupNotNull()}' decorator='boxed' _bean='{PopulationGroupImpl.class}' _method='"MaxLength"'/>
</cell>
</row>
<row>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/TripTypeUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/TripTypeUI.jaxx 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/TripTypeUI.jaxx 2009-04-02 09:55:22 UTC (rev 2060)
@@ -89,7 +89,7 @@
<JLabel text="isisfish.tripType.duration" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldTripTypeDuration" text='{getBean().getTripDuration().getHour()}' onKeyReleased='getBean().setTripDuration(new TimeUnit(Double.parseDouble(fieldTripTypeDuration.getText()) * 3600))' enabled='{isActif()}' decorator='boxed' _bean='{TripTypeImpl.class}' _method='"TripDuration"'/>
+ <JTextField id="fieldTripTypeDuration" text='{getBean().getTripDuration().getHour()}' toolTipText="in hour" onKeyReleased='getBean().setTripDuration(new TimeUnit(Double.parseDouble(fieldTripTypeDuration.getText()) * 3600))' enabled='{isActif()}' decorator='boxed' _bean='{TripTypeImpl.class}' _method='"TripDuration"'/>
</cell>
</row>
<row>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/VesselTypeUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/VesselTypeUI.jaxx 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/VesselTypeUI.jaxx 2009-04-02 09:55:22 UTC (rev 2060)
@@ -126,7 +126,7 @@
<JLabel text="isisfish.vesselType.maxDuration" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldVesselTypeMaxTripDuration" text='{getBean().getMaxTripDuration().getHour()}' enabled='{isActif()}' onKeyReleased='getBean().setMaxTripDuration(new TimeUnit(Double.parseDouble(fieldVesselTypeMaxTripDuration.getText()) * 3600))' decorator='boxed' _bean='{VesselTypeImpl.class}' _method='"MaxTripDuration"'/>
+ <JTextField id="fieldVesselTypeMaxTripDuration" text='{getBean().getMaxTripDuration().getHour()}' toolTipText="in hour" enabled='{isActif()}' onKeyReleased='getBean().setMaxTripDuration(new TimeUnit(Double.parseDouble(fieldVesselTypeMaxTripDuration.getText()) * 3600))' decorator='boxed' _bean='{VesselTypeImpl.class}' _method='"MaxTripDuration"'/>
</cell>
</row>
<row>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/ScriptUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/ScriptUI.jaxx 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/ScriptUI.jaxx 2009-04-02 09:55:22 UTC (rev 2060)
@@ -316,15 +316,15 @@
<JPanel layout='{new BorderLayout()}' constraints='BorderLayout.CENTER'>
<JPanel id="buttonBar" layout='{new GridLayout()}' constraints='BorderLayout.NORTH'>
<JComboBox id="ScriptTypeChoice" model='{new DefaultComboBoxModel(getContextValue(ScriptAction.class).getScriptTypesNames())}'/>
- <JButton id="buttonScriptNew" text="isisfish.script.new" onActionPerformed='newScript()'/>
- <JButton id="buttonScriptSave" text="isisfish.script.save" enabled='false' onActionPerformed='saveScript()'/>
- <JButton id="buttonScriptExport" text="isisfish.script.txtExport" enabled='false' onActionPerformed='exportScript()'/>
- <JButton id="buttonScriptCommit" text="isisfish.script.commit" enabled='false' onActionPerformed='commitScript()'/>
- <JButton id="buttonScriptCut" text="isisfish.script.cut" enabled='false' onActionPerformed='cut()'/>
- <JButton id="buttonScriptCopy" text="isisfish.script.copy" enabled='false' onActionPerformed='copy()'/>
- <JButton id="buttonScriptPaste" text="isisfish.script.paste" enabled='false' onActionPerformed='paste()'/>
- <JButton id="buttonScriptCheck" text="isisfish.script.check" enabled='false' onActionPerformed='checkScript()'/>
- <JButton id="buttonScriptEval" text="isisfish.script.evaluate" enabled='false' onActionPerformed='evaluateScript()'/>
+ <JButton id="buttonScriptNew" text="isisfish.script.new" toolTipText='Create a new script' onActionPerformed='newScript()'/>
+ <JButton id="buttonScriptSave" text="isisfish.script.save" toolTipText="Save current script" enabled='false' onActionPerformed='saveScript()'/>
+ <JButton id="buttonScriptExport" text="isisfish.script.txtExport" toolTipText="Export selected script(s) to zip archive" enabled='false' onActionPerformed='exportScript()'/>
+ <JButton id="buttonScriptCommit" text="isisfish.script.commit" toolTipText="Commit script to CVS server" enabled='false' onActionPerformed='commitScript()'/>
+ <JButton id="buttonScriptCut" text="isisfish.script.cut" toolTipText="Cut current selection (Ctrl-x)" enabled='false' onActionPerformed='cut()'/>
+ <JButton id="buttonScriptCopy" text="isisfish.script.copy" toolTipText="Copy current selection (Ctrl-c)" enabled='false' onActionPerformed='copy()'/>
+ <JButton id="buttonScriptPaste" text="isisfish.script.paste" toolTipText="Paste current selection (Ctrl-v)" enabled='false' onActionPerformed='paste()'/>
+ <JButton id="buttonScriptCheck" text="isisfish.script.check" toolTipText="Check syntax of the current script" enabled='false' onActionPerformed='checkScript()'/>
+ <JButton id="buttonScriptEval" text="isisfish.script.evaluate" toolTipText="Try to eval current script (must be have main method)" enabled='false' onActionPerformed='evaluateScript()'/>
</JPanel>
<JSplitPane oneTouchExpandable="true" dividerLocation="250" orientation="HORIZONTAL" constraints='BorderLayout.CENTER'>
<JScrollPane>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/sensitivity/EditorHelper.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/sensitivity/EditorHelper.java 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/sensitivity/EditorHelper.java 2009-04-02 09:55:22 UTC (rev 2060)
@@ -111,10 +111,12 @@
result = listResult;
} else if (result instanceof JCheckBox){
((JCheckBox) result).setSelected((Boolean)callMethod(e, fieldName));
-
+ JCheckBox cOrigin = (JCheckBox)c;
+ ((JCheckBox) result).setText(cOrigin.getText());
} else if (result instanceof JRadioButton){
((JRadioButton) result).setSelected((Boolean)callMethod(e, fieldName));
-
+ JRadioButton cOrigin = (JRadioButton)c;
+ ((JRadioButton) result).setText(cOrigin.getText());
} else if (result instanceof SpeciesStructuredUI){
SpeciesStructuredUI origine = (SpeciesStructuredUI)c;
SpeciesStructuredUI ui = new SpeciesStructuredUI();
@@ -325,10 +327,13 @@
result = listResult;
} else if (result instanceof JCheckBox){
((JCheckBox) result).setSelected((Boolean)value);
+ JCheckBox ch = (JCheckBox)c;
+ ((JCheckBox) result).setText(ch.getText());
} else if (result instanceof JRadioButton){
((JRadioButton) result).setSelected((Boolean)value);
-
+ JRadioButton cOrigin = (JRadioButton) c;
+ ((JRadioButton) result).setText(cOrigin.getText());
} else if (result instanceof SpeciesStructuredUI){
SpeciesStructuredUI origine = (SpeciesStructuredUI)c;
SpeciesStructuredUI ui = new SpeciesStructuredUI();
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/sensitivity/SensitivityTabUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/sensitivity/SensitivityTabUI.jaxx 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/sensitivity/SensitivityTabUI.jaxx 2009-04-02 09:55:22 UTC (rev 2060)
@@ -105,9 +105,12 @@
if (Factor.class.isInstance(o)){
Factor f = (Factor)o;
FactorWizard wizard = new FactorWizard(this);
- wizard.initExisting(getSimulAction().getFactorComponent(f), f);
- wizard.pack();
- wizard.setVisible(true);
+ JComponent c = getSimulAction().getFactorComponent(f);
+ if (c != null){
+ wizard.initExisting(c, f);
+ wizard.pack();
+ wizard.setVisible(true);
+ }
}
}
}
@@ -146,7 +149,7 @@
DefaultTreeModel model = new DefaultTreeModel(null);
navigation.setModel(model);
}
-protected void setFactorModel(){
+public void setFactorModel(){
TreeNode root = new DefaultMutableTreeNode(getSimulAction().getFactors());
factors.setRootVisible(true);
FactorTreeModel model = new FactorTreeModel(root);
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ExportUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ExportUI.jaxx 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ExportUI.jaxx 2009-04-02 09:55:22 UTC (rev 2060)
@@ -35,6 +35,7 @@
<script><![CDATA[
import jaxx.runtime.swing.Item;
import fr.ifremer.isisfish.ui.WelcomePanelUI;
+ import fr.ifremer.isisfish.ui.widget.renderer.SimpleToolTipComboBoxRenderer;
refresh();
public ExportUI (SimulAction action){
@@ -56,6 +57,7 @@
items.add(new Item(s, s, s, selected));
}
listSimulExportChoose.setItems(items);
+ listSimulExportChoose.setCellRenderer(new SimpleToolTipComboBoxRenderer(ToolTipListModelFactory.createExportClassDocsModel(values)));
}
protected void exportChanged(){
if (listSimulExportChoose.getSelectedIndex() > -1){
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx 2009-04-02 09:55:22 UTC (rev 2060)
@@ -66,6 +66,8 @@
import fr.ifremer.isisfish.ui.sensitivity.SensitivityUI;
import fr.ifremer.isisfish.entities.FisheryRegionImpl;
import fr.ifremer.isisfish.datastore.StorageException;
+import fr.ifremer.isisfish.ui.widget.renderer.SimpleToolTipTableColumnRenderer;
+import fr.ifremer.isisfish.ui.widget.renderer.SimpleToolTipComboBoxRenderer;
import fr.ifremer.isisfish.simulator.launcher.SimulationServiceListener;
SimulationServiceListener simulationListener;
@@ -99,14 +101,16 @@
setListSimulParamsPopulationsItems();
setRulesItems();
fieldSimulParamsRegion.setSelectedItem(getContextValue(SimulAction.class).getSimulationParameter().getRegionName());
- if (getContextValue(SimulAction.class).getSimulationParameter().getUsePreScript()){
- SimulUI simul = getParentContainer(SimulUI.class);
- simul.enablePreSimul();
+ if (!isSensitivity()){
+ if (getContextValue(SimulAction.class).getSimulationParameter().getUsePreScript()){
+ SimulUI simul = getParentContainer(SimulUI.class);
+ simul.enablePreSimul();
+ }
+ if (getContextValue(SimulAction.class).getSimulationParameter().getUseAnalysePlan()){
+ SimulUI simul = getParentContainer(SimulUI.class);
+ simul.enableAnalysePlan();
+ }
}
- if (getContextValue(SimulAction.class).getSimulationParameter().getUseAnalysePlan()){
- SimulUI simul = getParentContainer(SimulUI.class);
- simul.enableAnalysePlan();
- }
}
protected void regionChange(ItemEvent e){
if (e.getStateChange() == ItemEvent.SELECTED) {
@@ -139,6 +143,19 @@
};
}
}
+protected void setFactor(){
+ if (isSensitivity()){
+ getParentContainer(SensitivityUI.class).getSensitivityTabUI().setFactorModel();
+ }
+}
+protected void setExportSens(){
+ if (isSensitivity()){
+ }
+}
+protected void setSensibilities(){
+ if (isSensitivity()){
+ }
+}
public void setSimulationParameter(SimulAction simulAction){
getContextValue(SimulAction.class).setSimulationParameter(simulAction.getSimulationParameter());
}
@@ -153,6 +170,9 @@
getContextValue(SimulAction.class).loadOldSimulation(selected);
refresh();
setFactorRegion();
+ setExportSens();
+ setSensibilities();
+ setFactor();
getParentContainer(WelcomePanelUI.class).setInfoText(_("isisfish.message.old.simulation.loaded"));
}
});
@@ -181,24 +201,18 @@
getParentContainer(WelcomeTabUI.class).selTab(5);
}
protected void enablePreSimul(){
- if (fieldUseSimulPreScripts.isSelected()){
+ getContextValue(SimulAction.class).getSimulationParameter().setUsePreScript(fieldUseSimulPreScripts.isSelected());
+ if (fieldUseSimulPreScripts.isSelected() && !isSensitivity()){
SimulUI simul = getParentContainer(SimulUI.class);
- if (simul != null){
- simul.enablePreSimul();
- }
+ simul.enablePreSimul();
}
}
protected void enableAnalysePlan(){
- if (fieldSimulUseAnalysePlan.isSelected()){
- getContextValue(SimulAction.class).getSimulationParameter().setUseAnalysePlan(true);
+ getContextValue(SimulAction.class).getSimulationParameter().setUseAnalysePlan(fieldSimulUseAnalysePlan.isSelected());
+ if (fieldSimulUseAnalysePlan.isSelected() && !isSensitivity()){
SimulUI simul = getParentContainer(SimulUI.class);
- if (simul != null){
- simul.enableAnalysePlan();
- }
+ simul.enableAnalysePlan();
}
- else{
- getContextValue(SimulAction.class).getSimulationParameter().setUseAnalysePlan(false);
- }
}
protected void enableOnlyExport(){
if (fieldSimulOnlyExport.isSelected()){
@@ -251,6 +265,8 @@
}
protected void setRulesItems(){
listSimulParamsMesuresList.setListData(getContextValue(SimulAction.class).getRules().toArray());
+ listSimulParamsMesuresList.setCellRenderer(new SimpleToolTipComboBoxRenderer(ToolTipListModelFactory.createRuleDescriptionsModel2(getContextValue(SimulAction.class).getSimulationParameter().getRules(),buttonSimulParamsMesuresClear,listSimulParamsMesuresList)));
+
setRulesButton();
}
protected void populationSelected(){
@@ -318,6 +334,7 @@
getContextValue(SimulAction.class).setRuleParameterValue(data.getName(), listSimulParamsMesuresList.getSelectedValue().toString(), model.getValueAt(row, 1));
}
});
+ simulParamsRules.getColumnModel().getColumn(0).setCellRenderer(new SimpleToolTipTableColumnRenderer(ToolTipListModelFactory.createRuleParamsModel(listSimulParamsMesuresList.getSelectedValue().toString())));
}
protected void selectFilter(){
try {
@@ -342,6 +359,12 @@
}
return result;
}
+protected ComboBoxModel getParamsMesuresSelectModel(){
+ java.util.List values = getContextValue(SimulAction.class).getRuleNames();
+ DefaultComboBoxModel model = new DefaultComboBoxModel(values.toArray());
+ fieldSimulParamsMesuresSelect.setRenderer(new SimpleToolTipComboBoxRenderer(ToolTipListModelFactory.createRuleDescriptionsModel(values)));
+ return model;
+}
protected void resetFilter(){
getContextValue(SimulAction.class).resetOldSimulatorNames();
}
@@ -393,6 +416,7 @@
}
return result;
}
+
]]>
</script>
<row>
@@ -526,7 +550,7 @@
</row>
<row>
<cell fill="horizontal">
- <JComboBox id="fieldSimulParamsMesuresSelect" model='{new DefaultComboBoxModel(getContextValue(SimulAction.class).getRuleNames().toArray())}'/>
+ <JComboBox id="fieldSimulParamsMesuresSelect" model='{getParamsMesuresSelectModel()}'/>
</cell>
</row>
<row>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ResultChoiceUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ResultChoiceUI.jaxx 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ResultChoiceUI.jaxx 2009-04-02 09:55:22 UTC (rev 2060)
@@ -34,6 +34,7 @@
<script><![CDATA[
import fr.ifremer.isisfish.ui.WelcomePanelUI;
import jaxx.runtime.swing.Item;
+ import fr.ifremer.isisfish.ui.widget.renderer.SimpleToolTipComboBoxRenderer;
setListSimulExportChooseModel();
public ResultChoiceUI (SimulAction action){
@@ -54,6 +55,7 @@
items.add(new Item(s, s, s, selected));
}
listResultNames.setItems(items);
+ listResultNames.setCellRenderer(new SimpleToolTipComboBoxRenderer(ToolTipListModelFactory.createResultFieldsModel(values)));
}
protected void saveResultNames(){
if (listResultNames.getSelectedIndex() != -1){
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SensUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SensUI.jaxx 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SensUI.jaxx 2009-04-02 09:55:22 UTC (rev 2060)
@@ -38,6 +38,8 @@
import javax.swing.table.TableModel;
import fr.ifremer.isisfish.ui.widget.editor.ParameterColumnEditor;
import javax.swing.table.TableColumn;
+ import fr.ifremer.isisfish.ui.widget.renderer.SimpleToolTipTableColumnRenderer;
+ import fr.ifremer.isisfish.ui.widget.renderer.SimpleToolTipComboBoxRenderer;
import fr.ifremer.isisfish.ui.widget.editor.GenericCell;
import fr.ifremer.isisfish.simulator.AnalysePlan;
import jaxx.runtime.swing.Item;
@@ -48,10 +50,13 @@
}
public void refresh(){
java.util.List<Item> items = new ArrayList<Item>();
- for (AnalysePlan ap : getContextValue(SimulAction.class).getParamAnalysePlans()){
+ java.util.List<AnalysePlan> values = getContextValue(SimulAction.class).getParamAnalysePlans();
+
+ for (AnalysePlan ap : values){
items.add(new Item(ap.toString(), fr.ifremer.isisfish.datastore.AnalysePlanStorage.getName(ap), ap, false));
}
listSimulParamsAnalysePlansList.setItems(items);
+ listSimulParamsAnalysePlansList.setCellRenderer(new SimpleToolTipComboBoxRenderer(ToolTipListModelFactory.createAnalysePlanDescriptionsModel2(values, buttonSimulParamsAnalysePlansClear, listSimulParamsAnalysePlansList)));
setSimulParamsAnalysePlans();
}
public void addAnalysePlan(){
@@ -120,6 +125,7 @@
getContextValue(SimulAction.class).setAnalysePlanParameterValue(data.getName(), (AnalysePlan)listSimulParamsAnalysePlansList.getSelectedValue(), model.getValueAt(row, 1));
}
});
+ simulParamsAnalysePlans.getColumnModel().getColumn(0).setCellRenderer(new SimpleToolTipTableColumnRenderer(ToolTipListModelFactory.createAnalysePlanParamsModel(listSimulParamsAnalysePlansList.getSelectedValue().toString())));
}
}
}
@@ -127,11 +133,16 @@
SimulUI simul = getParentContainer(SimulUI.class);
simul.selTab(0);
}
+ protected DefaultComboBoxModel getAnalysePlansSelectModel(){
+ java.util.List values = getContextValue(SimulAction.class).getAnalysePlanNames();
+ fieldSimulParamsAnalysePlansSelect.setRenderer(new SimpleToolTipComboBoxRenderer(ToolTipListModelFactory.createAnalysePlanDescriptionsModel(values)));
+ return new DefaultComboBoxModel(values.toArray());
+ }
]]>
</script>
<row>
<cell columns="2" fill="horizontal" weightx="1.0">
- <JComboBox id="fieldSimulParamsAnalysePlansSelect" model='{new DefaultComboBoxModel(getContextValue(SimulAction.class).getAnalysePlanNames().toArray())}'/>
+ <JComboBox id="fieldSimulParamsAnalysePlansSelect" model='{getAnalysePlansSelectModel()}'/>
</cell>
</row>
<row>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulAction.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulAction.java 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulAction.java 2009-04-02 09:55:22 UTC (rev 2060)
@@ -64,6 +64,7 @@
import fr.ifremer.isisfish.export.Export;
import fr.ifremer.isisfish.export.SensitivityExport;
import fr.ifremer.isisfish.logging.SimulationLoggerUtil;
+import fr.ifremer.isisfish.mexico.MexicoHelper;
import fr.ifremer.isisfish.rule.Rule;
import fr.ifremer.isisfish.simulator.AnalysePlan;
import fr.ifremer.isisfish.simulator.SimulationParameter;
@@ -82,7 +83,6 @@
import fr.ifremer.isisfish.ui.simulator.filter.SimulationFilterUtil;
import fr.ifremer.isisfish.ui.widget.ErrorDialogUI;
import fr.ifremer.isisfish.ui.widget.filter.FilterModel;
-
/**
* SimulAction.
*
@@ -280,6 +280,26 @@
// all time reset number after load
param.setAnalysePlanNumber(-1);
regionStorage = param.getRegion();
+
+ // Chargement des sensibilites
+ sensitivityCalculator = param.getSensitivityCalculator();
+
+ // Chargement des exports de sensibilites
+ for (SensitivityExport ex : param.getSensitivityExport()){
+ sensitivityExports.put(ex, ex.getExportFilename());
+ }
+
+ // Chargement des facteurs
+ File f = simulStorage.getMexicoDesignPlan(SimulationStorage.getSimulationDirectory(simulName));
+ if (f != null){
+ log.debug("Import design plan from : " + f.getPath());
+ designPlan = MexicoHelper.getDesignPlanFromXML(f.getPath());
+ factors.clear();
+ for (Factor factor : designPlan.getFactors()){
+ log.debug("Find factor : " + factor.getName());
+ factors.put(factor.getPath() + factor.getName(), factor);
+ }
+ }
} catch (Exception eee) {
log.error("Can't load old Simulation: " + simulName, eee);
showMsgBox(eee);
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ToolTipListModelFactory.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ToolTipListModelFactory.java 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ToolTipListModelFactory.java 2009-04-02 09:55:22 UTC (rev 2060)
@@ -145,8 +145,7 @@
* @param names Rule names
* @return the model builded
*/
- public static ToolTipListModel createRuleDescriptionsModel(
- List<String> names) {
+ public static ToolTipListModel createRuleDescriptionsModel(List<String> names) {
List<String> texts = new ArrayList<String>();
List<String> toolTips = new ArrayList<String>();
@@ -185,8 +184,7 @@
* @param list the list containing the renderer
* @return the model builded
*/
- public static ToolTipListModel createRuleDescriptionsModel2(
- List<Rule> rules, JButton clearButton, JList list) {
+ public static ToolTipListModel createRuleDescriptionsModel2(List<Rule> rules, JButton clearButton, JList list) {
List<String> texts = new ArrayList<String>();
List<String> toolTips = new ArrayList<String>();
@@ -224,15 +222,16 @@
* @param rules the selected rules (we only use the first one)
* @return the model builded
*/
- public static ToolTipListModel createRuleParamsModel(Collection rules) {
+ public static ToolTipListModel createRuleParamsModel(String rules) {
+ System.out.println("createRuleParamsModel for rules : " + rules);
List<String> texts = new ArrayList<String>();
List<String> toolTips = new ArrayList<String>();
- if (rules.isEmpty()) {
+ if (rules == null || rules.equals("")) {
return new ToolTipListModel(texts, toolTips);
}
- String name = RuleStorage.getName(rules.iterator().next());
+ String name = RuleStorage.getName(rules);
try {
@@ -351,15 +350,11 @@
* @param analysePlans the selected analyse plan (we only use the first one)
* @return the model builded
*/
- public static ToolTipListModel createAnalysePlanParamsModel(
- Collection analysePlans) {
+ public static ToolTipListModel createAnalysePlanParamsModel(String name) {
List<String> texts = new ArrayList<String>();
List<String> toolTips = new ArrayList<String>();
- if (analysePlans.size() > 0) {
- String name = AnalysePlanStorage.getName(
- analysePlans.iterator().next());
-
+ if (name != null && !name.equals("")) {
try {
AnalysePlanStorage storage =
AnalysePlanStorage.getAnalysePlan(name);
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/SimpleToolTipComboBoxRenderer.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/SimpleToolTipComboBoxRenderer.java 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/SimpleToolTipComboBoxRenderer.java 2009-04-02 09:55:22 UTC (rev 2060)
@@ -1,62 +1,66 @@
-//package fr.ifremer.isisfish.ui.widget.renderer;
-//
-///**
-// * Simple implementation of {@link ToolTipComboBoxRenderer} renderer with a cache
-// * to store text and tooltip to be displayed.
-// * <p/>
-// * <p/>
-// * To set the cache just use the method {@link #setModel(ToolTipListModel)} .
-// * <p/>
-// * Internal cache will be based on two list (one for text, and one for doc)
-// * <p/>
-// * <b>This is a swixat extends, so just for swixat...</b>
-// *
-// * @author chemit
-// * @see ToolTipListRenderer
-// * @see WithToolTipListModel
-// * @see ToolTipComboBoxRenderer
-// */
-//public class SimpleToolTipComboBoxRenderer extends ToolTipComboBoxRenderer {
-//
-// /** the model to use */
-// protected ToolTipListModel model;
-//
-// /**
-// * set the model to use
-// *
-// * @param model the mode to use
-// */
-// public void setModel(ToolTipListModel model) {
-// this.model = model;
-// }
-//
-// /**
-// * @param value model contrete value
-// * @param index index of the row
-// * @return the text to display (this is a pre-computed value)
-// */
-// public String getText(Object value, int index) {
-// // index should contains the row index but for some mysterious reason
-// // we don't have for ComboBox, so must find realIndex by ourself
-// if (index==-1) {
-// index = model.getIndex(value);
-// }
-// return model == null ? null : model.getText(index);
-// }
-//
-// /**
-// * @param value model concret object
-// * @param index index of the row
-// * @param text the text to be displayed
-// * @return the tooltip to display (this is a pre-computed value)
-// */
-// public String getToolTip(Object value, int index, String text) {
-// // index should contains the row index but for some mysterious reason
-// // we don't have for ComboBox, so must find realIndex by ourself
-// if (index==-1) {
-// index = model.getIndex(text);
-// }
-// return model == null ? null : model.getToolTipText(index);
-// }
-//
-//} // SimpleToolTipComboBoxRenderer
\ No newline at end of file
+package fr.ifremer.isisfish.ui.widget.renderer;
+
+import java.awt.Component;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.ListCellRenderer;
+
+/**
+ * Simple implementation of {@link ToolTipTableColumnRenderer} renderer
+ * with a cache to store text and tooltip to be displayed.
+ * <p/>
+ * <p/>
+ * To set the cache just use the method {@link #setModel(ToolTipListModel)} .
+ * <p/>
+ * Internal cache will be based on two list (one for text, and one for doc)
+ * <p/>
+ * <b>This is a swixat extends, so just for swixat...</b>
+ *
+ * @author chemit
+ * @see ToolTipListRenderer
+ * @see ToolTipListModel
+ */
+public class SimpleToolTipComboBoxRenderer extends JLabel implements ListCellRenderer {
+ /** the model to use */
+ protected ToolTipListModel model;
+
+ public SimpleToolTipComboBoxRenderer(ToolTipListModel model){
+ this.model = model;
+ }
+ /**
+ * set the model to use
+ *
+ * @param model the mode to use
+ */
+ public void setModel(ToolTipListModel model) {
+ this.model = model;
+ }
+
+ /**
+ * @param value model contrete value
+ * @param index index of the row
+ * @return the text to display (this is a pre-computed value)
+ */
+ public String getText(Object value, int index) {
+ return model == null ? null : model.getText(index);
+ }
+
+ /**
+ * @param value model concret object
+ * @param index index of the row
+ * @param text the text to be displayed
+ * @return the tooltip to display (this is a pre-computed value)
+ */
+ public String getToolTip(Object value, int index, String text) {
+ return model == null ? null : model.getToolTipText(index);
+ }
+
+ @Override
+ public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
+ String toolTip = model.getToolTipText(index);
+ setToolTipText(toolTip);
+ setText(value.toString());
+ return this;
+ }
+
+} // SimpleToolTipTableColumnRenderer
\ No newline at end of file
Deleted: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/SimpleToolTipListRenderer.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/SimpleToolTipListRenderer.java 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/SimpleToolTipListRenderer.java 2009-04-02 09:55:22 UTC (rev 2060)
@@ -1,50 +0,0 @@
-//package fr.ifremer.isisfish.ui.widget.renderer;
-//
-///**
-// * Simple implementation of {@link ToolTipListRenderer} renderer with a cache
-// * to store text and tooltip to be displayed.
-// * <p/>
-// * <p/>
-// * To set the cache just use the method {@link #setModel(ToolTipListModel)} .
-// * <p/>
-// * Internal cache will be based on two list (one for text, and one for doc)
-// * <p/>
-// * <b>This is a swixat extends, so just for swixat...</b>
-// *
-// * @author chemit
-// * @see ToolTipListRenderer
-// * @see ToolTipListModel
-// */
-//public class SimpleToolTipListRenderer extends ToolTipListRenderer {
-// /** the model to use */
-// protected ToolTipListModel model;
-//
-// /**
-// * set the model to use
-// *
-// * @param model the mode to use
-// */
-// public void setModel(ToolTipListModel model) {
-// this.model = model;
-// }
-//
-// /**
-// * @param value model contrete value
-// * @param index index of the row
-// * @return the text to display (this is a pre-computed value)
-// */
-// public String getText(Object value, int index) {
-// return model == null ? null : model.getText(index);
-// }
-//
-// /**
-// * @param value model concret object
-// * @param index index of the row
-// * @param text the text to be displayed
-// * @return the tooltip to display (this is a pre-computed value)
-// */
-// public String getToolTip(Object value, int index, String text) {
-// return model == null ? null : model.getToolTipText(index);
-// }
-//
-//} // SimpleToolTipListRenderer
\ No newline at end of file
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/SimpleToolTipTableColumnRenderer.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/SimpleToolTipTableColumnRenderer.java 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/SimpleToolTipTableColumnRenderer.java 2009-04-02 09:55:22 UTC (rev 2060)
@@ -1,50 +1,67 @@
-//package fr.ifremer.isisfish.ui.widget.renderer;
-//
-///**
-// * Simple implementation of {@link ToolTipTableColumnRenderer} renderer
-// * with a cache to store text and tooltip to be displayed.
-// * <p/>
-// * <p/>
-// * To set the cache just use the method {@link #setModel(ToolTipListModel)} .
-// * <p/>
-// * Internal cache will be based on two list (one for text, and one for doc)
-// * <p/>
-// * <b>This is a swixat extends, so just for swixat...</b>
-// *
-// * @author chemit
-// * @see ToolTipListRenderer
-// * @see ToolTipListModel
-// */
-//public class SimpleToolTipTableColumnRenderer extends ToolTipTableColumnRenderer {
-// /** the model to use */
-// protected ToolTipListModel model;
-//
-// /**
-// * set the model to use
-// *
-// * @param model the mode to use
-// */
-// public void setModel(ToolTipListModel model) {
-// this.model = model;
-// }
-//
-// /**
-// * @param value model contrete value
-// * @param index index of the row
-// * @return the text to display (this is a pre-computed value)
-// */
-// public String getText(Object value, int index) {
-// return model == null ? null : model.getText(index);
-// }
-//
-// /**
-// * @param value model concret object
-// * @param index index of the row
-// * @param text the text to be displayed
-// * @return the tooltip to display (this is a pre-computed value)
-// */
-// public String getToolTip(Object value, int index, String text) {
-// return model == null ? null : model.getToolTipText(index);
-// }
-//
-//} // SimpleToolTipTableColumnRenderer
\ No newline at end of file
+package fr.ifremer.isisfish.ui.widget.renderer;
+
+import fr.ifremer.isisfish.ui.widget.editor.GenericCell;
+import java.awt.Component;
+import javax.swing.JLabel;
+import javax.swing.JTable;
+import javax.swing.table.TableCellRenderer;
+
+/**
+ * Simple implementation of {@link ToolTipTableColumnRenderer} renderer
+ * with a cache to store text and tooltip to be displayed.
+ * <p/>
+ * <p/>
+ * To set the cache just use the method {@link #setModel(ToolTipListModel)} .
+ * <p/>
+ * Internal cache will be based on two list (one for text, and one for doc)
+ * <p/>
+ * <b>This is a swixat extends, so just for swixat...</b>
+ *
+ * @author chemit
+ * @see ToolTipListRenderer
+ * @see ToolTipListModel
+ */
+public class SimpleToolTipTableColumnRenderer extends JLabel implements TableCellRenderer {
+ /** the model to use */
+ protected ToolTipListModel model;
+
+ public SimpleToolTipTableColumnRenderer(ToolTipListModel model){
+ this.model = model;
+ }
+ /**
+ * set the model to use
+ *
+ * @param model the mode to use
+ */
+ public void setModel(ToolTipListModel model) {
+ this.model = model;
+ }
+
+ /**
+ * @param value model contrete value
+ * @param index index of the row
+ * @return the text to display (this is a pre-computed value)
+ */
+ public String getText(Object value, int index) {
+ return model == null ? null : model.getText(index);
+ }
+
+ /**
+ * @param value model concret object
+ * @param index index of the row
+ * @param text the text to be displayed
+ * @return the tooltip to display (this is a pre-computed value)
+ */
+ public String getToolTip(Object value, int index, String text) {
+ return model == null ? null : model.getToolTipText(index);
+ }
+
+ @Override
+ public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
+ String toolTip = model.getToolTipText(column);
+ setToolTipText(toolTip);
+ setText(value.toString());
+ return this;
+ }
+
+} // SimpleToolTipTableColumnRenderer
\ No newline at end of file
Deleted: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/ToolTipComboBoxRenderer.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/ToolTipComboBoxRenderer.java 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/ToolTipComboBoxRenderer.java 2009-04-02 09:55:22 UTC (rev 2060)
@@ -1,61 +0,0 @@
-//package fr.ifremer.isisfish.ui.widget.renderer;
-//
-////import org.swixat.databinding.JComboBoxRenderer;
-//
-//import org.apache.commons.logging.Log;
-//import org.apache.commons.logging.LogFactory;
-//
-//import javax.swing.JList;
-//import java.awt.Component;
-//
-///**
-// * Class to defined an abstract comboBox renderer capable of dispaying some text
-// * and tooltip using object in model.
-// * <p/>
-// * Just implements {@link #getText(Object,int)} and
-// * {@link #getToolTip(Object,int, String)}
-// * to use it.
-// * <p/>
-// * <b>This is a swixat extends, so just for swixat...</b>
-// *
-// * @author chemit
-// * @see ToolTipListModel
-// * @see WithToolTipListModel
-// */
-//public abstract class ToolTipComboBoxRenderer extends JComboBoxRenderer
-// implements WithToolTipListModel {
-//
-// /** to use log facility, just put in your code: log.info(\"...\"); */
-// static private Log log = LogFactory.getLog(ToolTipComboBoxRenderer.class);
-//
-// @Override
-// public Component getListCellRendererComponent(JList list, Object value,
-// int index, boolean selected,
-// boolean hasFocus) {
-// // log.debug(" enter for [" + index + "] " + value + "(" +
-// if (value == null) {
-// list.setToolTipText(null);
-// return this;
-// }
-//
-// String tip = null;
-// String text = null;
-//
-// try {
-//
-// text = getText(value, index);
-//
-// tip = getToolTip(value, index, text);
-//
-// } catch (Exception e) {
-// log.warn("can't get text or tooltip for " + value);
-// }
-//
-// list.setToolTipText(tip == null || "".equals(tip) ? null : tip);
-//
-// // let default behaviour for rendering with specified text computed
-// return super.getListCellRendererComponent(list, text, index,
-// selected, hasFocus);
-// }
-//
-//} // ToolTipComboBoxRenderer
\ No newline at end of file
Deleted: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/ToolTipListRenderer.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/ToolTipListRenderer.java 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/ToolTipListRenderer.java 2009-04-02 09:55:22 UTC (rev 2060)
@@ -1,63 +0,0 @@
-//package fr.ifremer.isisfish.ui.widget.renderer;
-//
-//
-//import org.swixat.databinding.JListRenderer;
-//
-//import org.apache.commons.logging.Log;
-//import org.apache.commons.logging.LogFactory;
-//
-//import javax.swing.JList;
-//import java.awt.Component;
-//
-///**
-// * Class to defined an abstract list renderer capable of dispaying some text
-// * and tooltip using object in model.
-// * <p/>
-// * Just implements {@link #getText(Object,int)} and
-// * {@link #getToolTip(Object,int, String)}
-// * to use it.
-// * <p/>
-// * <b>This is a swixat extends, so just for swixat...</b>
-// *
-// * @author chemit
-// * @see ToolTipListModel
-// * @see WithToolTipListModel
-// */
-//public abstract class ToolTipListRenderer extends JListRenderer
-// implements WithToolTipListModel {
-//
-// /** to use log facility, just put in your code: log.info(\"...\"); */
-// static private Log log = LogFactory.getLog(ToolTipListRenderer.class);
-//
-// @Override
-// public Component getListCellRendererComponent(JList list, Object value,
-// int index, boolean selected,
-// boolean hasFocus) {
-// // log.debug(" enter for [" + index + "] " + value + "(" +
-//
-// if (value == null) {
-// list.setToolTipText(null);
-// return this;
-// }
-//
-// String tip = null;
-// String text = null;
-//
-// try {
-//
-// text = getText(value, index);
-//
-// tip = getToolTip(value, index, text);
-//
-// } catch (Exception e) {
-// log.warn("can't get text or tooltip for " + value);
-// }
-//
-// list.setToolTipText(tip == null || "".equals(tip) ? null : tip);
-//
-// // let default behaviour for rendering with specified text computed
-// return super.getListCellRendererComponent(list, text, index,
-// selected, hasFocus);
-// }
-//
-//} //ToolTipListRenderer
\ No newline at end of file
Deleted: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/ToolTipTableColumnRenderer.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/ToolTipTableColumnRenderer.java 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/ToolTipTableColumnRenderer.java 2009-04-02 09:55:22 UTC (rev 2060)
@@ -1,64 +0,0 @@
-//package fr.ifremer.isisfish.ui.widget.renderer;
-//
-//
-//import org.swixat.databinding.JTableColumnRenderer;
-//
-//import org.apache.commons.logging.Log;
-//import org.apache.commons.logging.LogFactory;
-//
-//import javax.swing.JTable;
-//import java.awt.Component;
-//
-///**
-// * Class to defined an abstract list renderer capable of dispaying some text
-// * and tooltip using object in model.
-// * <p/>
-// * Just implements {@link #getText(Object,int)} and
-// * {@link #getToolTip(Object,int, String)}
-// * to use it.
-// * <p/>
-// * <b>This is a swixat extends, so just for swixat...</b>
-// *
-// * @author chemit
-// * @see ToolTipListModel
-// * @see WithToolTipListModel
-// */
-//public abstract class ToolTipTableColumnRenderer extends JTableColumnRenderer
-// implements WithToolTipListModel {
-//
-// /** to use log facility, just put in your code: log.info(\"...\"); */
-// static private Log log = LogFactory.getLog(ToolTipTableColumnRenderer.class);
-//
-// @Override
-// public Component getTableCellRendererComponent(
-// JTable table, Object value, boolean selected, boolean focus,
-// int row, int col) {
-//
-// if (value == null) {
-// table.setToolTipText(null);
-// return this;
-// }
-//
-// String tip = null;
-// Object realValue = value;
-//
-// // we only treate tooltip on first column which contains libelle
-//
-// if (col == 0) {
-// try {
-// realValue = getText(value, row);
-//
-// tip = getToolTip(value, row, (String) realValue);
-//
-// } catch (Exception e) {
-// log.warn("can't get text or tooltip for " + value);
-// }
-// }
-// table.setToolTipText(tip == null || "".equals(tip) ? null : tip);
-//
-// // let default behaviour for rendering
-// return super.getTableCellRendererComponent(table, realValue, selected,
-// focus, row, col);
-// }
-//
-//} //ToolTipTableColumnRenderer
\ No newline at end of file
Deleted: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/WithToolTipListModel.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/WithToolTipListModel.java 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/renderer/WithToolTipListModel.java 2009-04-02 09:55:22 UTC (rev 2060)
@@ -1,43 +0,0 @@
-package fr.ifremer.isisfish.ui.widget.renderer;
-
-import javax.swing.ListCellRenderer;
-import javax.swing.table.TableCellRenderer;
-
-/**
- * This is the contract ot be realised by any {@link ListCellRenderer} or {@link TableCellRenderer} which
- * wants to have an automatic text - tooltip renderer.
- * <p/>
- * It used a {@link ToolTipListModel} to store the text and tootltip that
- * renderer will display.
- *
- * @see ToolTipListModel
- * @see ToolTipComboBoxRenderer
- * @see ToolTipListRenderer
- * @see ToolTipTableColumnRenderer
- */
-public interface WithToolTipListModel {
- /**
- * the text to display
- *
- * @param value current value in model
- * @param index row index
- * @return the text to display in cell
- */
- String getText(Object value, int index);
-
- /**
- * the tooltip to display
- *
- * @param value current value in model
- * @param index row index
- * @param text the text already computed to be displayed (could be usefull)
- * @return the tootltip to display the this row
- */
- String getToolTip(Object value, int index, String text);
-
- /**
- * @param model the model to use by renderer to display text and tooltipText
- * @see ToolTipListModel
- */
- void setModel(ToolTipListModel model);
-}
Modified: isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties
===================================================================
--- isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2009-04-02 09:55:22 UTC (rev 2060)
@@ -18,9 +18,14 @@
Can't\ open\ log\ for\ %s=
Can't\ simulate\ %s=
Check\ state\ of\ local\ repository\:\ %s=
+Check\ syntax\ of\ the\ current\ script=
Checkout\ pom.xml\ to\ %s=
Command\ '%s'\ fail\ to\ execute=
+Commit\ script\ to\ CVS\ server=
+Copy\ current\ selection\ (Ctrl-c)=
Could\ not\ found\ formule\ type\ %s\ autorised\ type\ are\ %s=
+Create\ a\ new\ script=
+Cut\ current\ selection\ (Ctrl-x)=
Error\ during\ vcs\ initialisation=
Error\ while\ uploading\ public\ key\ to\ remote\ serveur\ authorized_keys=
Generate\ next\ simulation=
@@ -37,12 +42,14 @@
Month\ Gap\ BetweenRepro\ Recruitment=
Normal\ stop\ thread,\ this\ is\ not\ an\ error=
Not\ start\ simulation\ %s\ because\ user\ ask\ stop=
+Paste\ current\ selection\ (Ctrl-v)=
Process\ template\ error=
Region\ %s\ allready\ exist\ in\ repository.\ Can't\ import=
Region\ %s\ already\ inited=
Remote\ IsisFish\ server=
Remote\ control\ file\ doesn't\ exists\ %s=
Rename\ data\ directory\ to\ %s=
+Save\ current\ script=
Show\ help=
SimulationExecutor\ started\ with\ %s\ thread\ for\ %s=
Ssh\ key\ found\ '%s'\ will\ be\ used\ to\ connect\ to=
@@ -51,6 +58,7 @@
SubProcess\ start\:\ %s\ %s=
Switch\ repository\ type\ to\ none=
The\ equation\ used\ is\ the\ population's\ growth\ curve,\ it\ needs\ to\ be\ defined\ first.=
+Try\ to\ eval\ current\ script\ (must\ be\ have\ main\ method)=
Try\ to\ log\ on\ %s@%s\:%d=
Use\ branches,\ switch\ not\ needed=
User\ stop\ simulation\ %s=
@@ -67,6 +75,7 @@
destination\ already\ exists\ %s\ use\ \\'force\\'\ argument\ to\ force\ overwrite=
directory\ %s\ must\ be\ a\ directory=
filter\ loaded\ in\ %1$s\ ms\ \:\ found\ %2$s\ lines.=filter loaded in %1$s ms \: found %2$s lines.
+in\ hour=
isisfish.about.abouthtmltext=<html><b>Isis-Fish (%s)</b><br /><br />Copyright IFREMER-MAERHA 2000-2009.<br /><br /><a href\="http\://isis-fish.labs.libre-entreprise.org">http\://isis-fish.labs.libre-entreprise.org</a><br /><br />Please, report any bug you can found.<html>
isisfish.about.licensetext=You can modify and redistribute the program under the conditions of the GNU General Public License (version 2 or later). A copy of the GPL is in the file "LICENSE.txt" provided with Isis-Fish. All rights reserved. No guarantees are provided for use of this program.
isisfish.about.title=About Isis-Fish...
@@ -1014,6 +1023,8 @@
isisfish.zone.cells=Zone cells
isisfish.zone.comments=Comments
isisfish.zone.name=Name
+maximum\ length=
+minimum\ length=
not\ started=
region\ already\ exists\ %s\ use\ 'force'\ argument\ to\ force\ overwrite=
simulate\ %s\ with\ file\ %s=
Modified: isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties
===================================================================
--- isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2009-04-01 16:52:11 UTC (rev 2059)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2009-04-02 09:55:22 UTC (rev 2060)
@@ -18,9 +18,14 @@
Can't\ open\ log\ for\ %s=
Can't\ simulate\ %s=
Check\ state\ of\ local\ repository\:\ %s=
+Check\ syntax\ of\ the\ current\ script=
Checkout\ pom.xml\ to\ %s=
Command\ '%s'\ fail\ to\ execute=
+Commit\ script\ to\ CVS\ server=
+Copy\ current\ selection\ (Ctrl-c)=
Could\ not\ found\ formule\ type\ %s\ autorised\ type\ are\ %s=
+Create\ a\ new\ script=
+Cut\ current\ selection\ (Ctrl-x)=
Error\ during\ vcs\ initialisation=
Error\ while\ uploading\ public\ key\ to\ remote\ serveur\ authorized_keys=
Generate\ next\ simulation=
@@ -37,12 +42,14 @@
Month\ Gap\ BetweenRepro\ Recruitment=
Normal\ stop\ thread,\ this\ is\ not\ an\ error=
Not\ start\ simulation\ %s\ because\ user\ ask\ stop=
+Paste\ current\ selection\ (Ctrl-v)=
Process\ template\ error=
Region\ %s\ allready\ exist\ in\ repository.\ Can't\ import=
Region\ %s\ already\ inited=La r\u00E9gion %s a d\u00E9j\u00E0 \u00E9t\u00E9 initialis\u00E9e
Remote\ IsisFish\ server=
Remote\ control\ file\ doesn't\ exists\ %s=
Rename\ data\ directory\ to\ %s=
+Save\ current\ script=
Show\ help=
SimulationExecutor\ started\ with\ %s\ thread\ for\ %s=
Ssh\ key\ found\ '%s'\ will\ be\ used\ to\ connect\ to=
@@ -51,6 +58,7 @@
SubProcess\ start\:\ %s\ %s=
Switch\ repository\ type\ to\ none=
The\ equation\ used\ is\ the\ population's\ growth\ curve,\ it\ needs\ to\ be\ defined\ first.=
+Try\ to\ eval\ current\ script\ (must\ be\ have\ main\ method)=
Try\ to\ log\ on\ %s@%s\:%d=
Use\ branches,\ switch\ not\ needed=
User\ stop\ simulation\ %s=
@@ -67,6 +75,7 @@
destination\ already\ exists\ %s\ use\ \\'force\\'\ argument\ to\ force\ overwrite=
directory\ %s\ must\ be\ a\ directory=
filter\ loaded\ in\ %1$s\ ms\ \:\ found\ %2$s\ lines.=filter loaded in %1$s ms \: found %2$s lines.
+in\ hour=
isisfish.about.abouthtmltext=<html><b>Isis-Fish (%s)</b><br /><br />Copyright IFREMER-MAERHA 2000-2009.<br /><br /><a href\="http\://isis-fish.labs.libre-entreprise.org">http\://isis-fish.labs.libre-entreprise.org</a><br /><br />Merci de rapporter les bugs.<html>
isisfish.about.licensetext=Vous pouvez modifier et redistribuer ce programme sous les conditions \u00E9nonc\u00E9es par la licence GNU GPL (version 2 ou ult\u00E9rieure). Une copie de la licence GPL est dans le fichier \u00AB\u00A0LICENSE.txt\u00A0\u00BB fourni avec Isis-Fish. Tous droits r\u00E9serv\u00E9s. Aucune garantie n'est fournie pour l'utilisation de ce programme.
isisfish.about.title=\u00C0 propos de Isis-Fish...
@@ -1014,6 +1023,8 @@
isisfish.zone.cells=cellules de la Zone
isisfish.zone.comments=Commentaires
isisfish.zone.name=Nom
+maximum\ length=
+minimum\ length=
not\ started=
region\ already\ exists\ %s\ use\ 'force'\ argument\ to\ force\ overwrite=
simulate\ %s\ with\ file\ %s=
1
0
r2059 - isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher
by chatellier@users.labs.libre-entreprise.org 01 Apr '09
by chatellier@users.labs.libre-entreprise.org 01 Apr '09
01 Apr '09
Author: chatellier
Date: 2009-04-01 16:52:11 +0000 (Wed, 01 Apr 2009)
New Revision: 2059
Modified:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher/SSHSimulatorLauncher.java
Log:
Reset qsub
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher/SSHSimulatorLauncher.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher/SSHSimulatorLauncher.java 2009-04-01 16:51:28 UTC (rev 2058)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher/SSHSimulatorLauncher.java 2009-04-01 16:52:11 UTC (rev 2059)
@@ -40,7 +40,6 @@
import com.jcraft.jsch.JSch;
import com.jcraft.jsch.JSchException;
import com.jcraft.jsch.Session;
-import com.jcraft.jsch.UserInfo;
import fr.ifremer.isisfish.IsisFish;
import fr.ifremer.isisfish.datastore.SimulationStorage;
@@ -81,8 +80,8 @@
protected Configuration freemarkerConfiguration;
/** Freemarker qsub template. */
- //protected static final String QSUB_SCRIPT_TEMPLATE = "templates/ssh/launch-isis-qsub.seq";
- protected static final String QSUB_SCRIPT_TEMPLATE = "templates/ssh/launch-isis-cron.seq";
+ protected static final String QSUB_SCRIPT_TEMPLATE = "templates/ssh/launch-isis-qsub.seq";
+ //protected static final String QSUB_SCRIPT_TEMPLATE = "templates/ssh/launch-isis-cron.seq";
/**
* Opened session.
1
0
r2058 - in isis-fish/trunk/src: main/java/fr/ifremer/isisfish/simulator/launcher main/java/fr/ifremer/isisfish/simulator/launcher/ssh main/java/fr/ifremer/isisfish/ui/simulator main/java/fr/ifremer/isisfish/util main/java/fr/ifremer/isisfish/util/ssh main/java/fr/ifremer/isisfish/vcs main/resources/i18n test/java/fr/ifremer/isisfish/util test/java/fr/ifremer/isisfish/util/ssh
by chatellier@users.labs.libre-entreprise.org 01 Apr '09
by chatellier@users.labs.libre-entreprise.org 01 Apr '09
01 Apr '09
Author: chatellier
Date: 2009-04-01 16:51:28 +0000 (Wed, 01 Apr 2009)
New Revision: 2058
Added:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/util/ssh/
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/util/ssh/InvalidPassphraseException.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/util/ssh/SSHAgent.java
isis-fish/trunk/src/test/java/fr/ifremer/isisfish/util/ssh/
isis-fish/trunk/src/test/java/fr/ifremer/isisfish/util/ssh/SSHAgentTest.java
Removed:
isis-fish/trunk/src/test/java/fr/ifremer/isisfish/util/SSHUtils.java
Modified:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher/SSHSimulatorLauncher.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher/ssh/SSHUserInfo.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSSVN.java
isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties
isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties
Log:
Refactoring de la gestion des passphrases
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher/SSHSimulatorLauncher.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher/SSHSimulatorLauncher.java 2009-04-01 14:56:28 UTC (rev 2057)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher/SSHSimulatorLauncher.java 2009-04-01 16:51:28 UTC (rev 2058)
@@ -49,6 +49,8 @@
import fr.ifremer.isisfish.simulator.launcher.ssh.SSHUserInfo;
import fr.ifremer.isisfish.simulator.launcher.ssh.SSHUtils;
import fr.ifremer.isisfish.util.ClasspathTemplateLoader;
+import fr.ifremer.isisfish.util.ssh.InvalidPassphraseException;
+import fr.ifremer.isisfish.util.ssh.SSHAgent;
import freemarker.cache.TemplateLoader;
import freemarker.template.Configuration;
import freemarker.template.Template;
@@ -79,8 +81,8 @@
protected Configuration freemarkerConfiguration;
/** Freemarker qsub template. */
- protected static final String QSUB_SCRIPT_TEMPLATE = "templates/ssh/launch-isis-qsub.seq";
- //protected static final String QSUB_SCRIPT_TEMPLATE = "templates/ssh/launch-isis-cron.seq";
+ //protected static final String QSUB_SCRIPT_TEMPLATE = "templates/ssh/launch-isis-qsub.seq";
+ protected static final String QSUB_SCRIPT_TEMPLATE = "templates/ssh/launch-isis-cron.seq";
/**
* Opened session.
@@ -390,7 +392,19 @@
Session session = jsch.getSession(username, host, port);
// username and password will be given via UserInfo interface.
- UserInfo ui = new SSHUserInfo();
+ SSHUserInfo ui = new SSHUserInfo();
+ if (sshKeyUsed) {
+ String passphrase = null;
+ try {
+ passphrase = SSHAgent.getAgent().getPassphrase(sshKey);
+ ui.setPassphrase(passphrase);
+ }
+ catch(InvalidPassphraseException e) {
+ if (log.isWarnEnabled()) {
+ log.warn("Can't key passphrase for key", e);
+ }
+ }
+ }
session.setUserInfo(ui);
session.connect(60000); // timeout
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher/ssh/SSHUserInfo.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher/ssh/SSHUserInfo.java 2009-04-01 14:56:28 UTC (rev 2057)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher/ssh/SSHUserInfo.java 2009-04-01 16:51:28 UTC (rev 2058)
@@ -18,18 +18,10 @@
package fr.ifremer.isisfish.simulator.launcher.ssh;
-import java.awt.Container;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-
-import javax.swing.JLabel;
import javax.swing.JOptionPane;
-import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
-import com.jcraft.jsch.UIKeyboardInteractive;
import com.jcraft.jsch.UserInfo;
/**
@@ -43,7 +35,7 @@
* Last update : $Date: 1 déc. 2008 $
* By : $Author: chatellier $
*/
-public class SSHUserInfo implements UserInfo, UIKeyboardInteractive {
+public class SSHUserInfo implements UserInfo {
/**
* Passphrase.
@@ -53,19 +45,14 @@
protected String passphrase;
/**
- * Passphrase text field.
- */
- protected JTextField passphraseField = new JPasswordField(20);
-
- /**
* Password text field.
*/
protected String passwd;
- /**
+ /**
* Password text field.
*/
- protected JTextField passwordField = new JPasswordField(20);
+ protected JPasswordField passwordField = new JPasswordField(20);
/**
* Call to ask user in remote server key
@@ -82,31 +69,44 @@
}
@Override
- public boolean promptPassphrase(String message) {
- Object[] ob = { passphraseField };
- int result = JOptionPane.showConfirmDialog(null, ob, message,
- JOptionPane.OK_CANCEL_OPTION);
- boolean bResult = false;
- if (result == JOptionPane.OK_OPTION) {
- passphrase = passphraseField.getText();
- bResult = true;
- }
- return bResult;
+ public String getPassword() {
+ return passwd;
}
- @Override
- public String getPassword() {
+ /**
+ * @return the passwd
+ */
+ public String getPasswd() {
return passwd;
}
+ /**
+ * @param passwd the passwd to set
+ */
+ public void setPasswd(String passwd) {
+ this.passwd = passwd;
+ }
+
+ /**
+ * @param passphrase the passphrase to set
+ */
+ public void setPassphrase(String passphrase) {
+ this.passphrase = passphrase;
+ }
+
@Override
+ public boolean promptPassphrase(String arg0) {
+ return true;
+ }
+
+ @Override
public boolean promptPassword(String message) {
Object[] ob = { passwordField };
int result = JOptionPane.showConfirmDialog(null, ob, message,
JOptionPane.OK_CANCEL_OPTION);
boolean bResult = false;
if (result == JOptionPane.OK_OPTION) {
- passwd = passwordField.getText();
+ passwd = String.valueOf(passwordField.getPassword());
bResult = true;
}
return bResult;
@@ -116,53 +116,4 @@
public void showMessage(String message) {
JOptionPane.showMessageDialog(null, message);
}
-
- @Override
- public String[] promptKeyboardInteractive(String destination, String name,
- String instruction, String[] prompt, boolean[] echo) {
- final GridBagConstraints gbc = new GridBagConstraints(0, 0, 1, 1, 1, 1,
- GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
- new Insets(0, 0, 0, 0), 0, 0);
- Container panel = new JPanel();
- panel.setLayout(new GridBagLayout());
-
- gbc.weightx = 1.0;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.gridx = 0;
- panel.add(new JLabel(instruction), gbc);
- gbc.gridy++;
-
- gbc.gridwidth = GridBagConstraints.RELATIVE;
-
- JTextField[] texts = new JTextField[prompt.length];
- for (int i = 0; i < prompt.length; i++) {
- gbc.fill = GridBagConstraints.NONE;
- gbc.gridx = 0;
- gbc.weightx = 1;
- panel.add(new JLabel(prompt[i]), gbc);
-
- gbc.gridx = 1;
- gbc.fill = GridBagConstraints.HORIZONTAL;
- gbc.weighty = 1;
- if (echo[i]) {
- texts[i] = new JTextField(20);
- } else {
- texts[i] = new JPasswordField(20);
- }
- panel.add(texts[i], gbc);
- gbc.gridy++;
- }
-
- String[] response = null;
- if (JOptionPane.showConfirmDialog(null, panel, destination + ": "
- + name, JOptionPane.OK_CANCEL_OPTION,
- JOptionPane.QUESTION_MESSAGE) == JOptionPane.OK_OPTION) {
- response = new String[prompt.length];
- for (int i = 0; i < prompt.length; i++) {
- response[i] = texts[i].getText();
- }
- }
- // else = cancel
- return response;
- }
}
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx 2009-04-01 14:56:28 UTC (rev 2057)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx 2009-04-01 16:51:28 UTC (rev 2058)
@@ -425,7 +425,7 @@
<Table>
<row>
<cell fill="horizontal">
- <JLabel id='lblName' text='{isSensitivity() ? _("isisfish.params.sensibilityName") : _("isisfish.params.simulationName")}' minimumSize='{new Dimension(195,25)}' preferredSize='{new Dimension(195,25)}'/>
+ <JLabel id='lblName' text='{isSensitivity() ? _("isisfish.params.sensitivityName") : _("isisfish.params.simulationName")}' minimumSize='{new Dimension(195,25)}' preferredSize='{new Dimension(195,25)}'/>
</cell>
<cell fill="both" weightx="1.0">
<JTextField id="fieldSimulParamsName" onFocusLost='saveName()'/>
Added: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/util/ssh/InvalidPassphraseException.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/util/ssh/InvalidPassphraseException.java (rev 0)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/util/ssh/InvalidPassphraseException.java 2009-04-01 16:51:28 UTC (rev 2058)
@@ -0,0 +1,53 @@
+/* *##%
+ * Copyright (C) 2009 Code Lutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *##%*/
+
+package fr.ifremer.isisfish.util.ssh;
+
+/**
+ * TODO COMMENT ME.
+ *
+ * @author chatellier
+ * @version $Revision: 1.0 $
+ *
+ * Last update : $Date: 1 avr. 2009 $
+ * By : $Author: chatellier $
+ */
+public class InvalidPassphraseException extends Exception {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = -8878596298083203705L;
+
+ /**
+ * Constructor with message and cause.
+ *
+ * @param message message
+ * @param cause cause
+ */
+ public InvalidPassphraseException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * Constructor with message.
+ *
+ * @param message message
+ */
+ public InvalidPassphraseException(String message) {
+ super(message);
+ }
+}
Added: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/util/ssh/SSHAgent.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/util/ssh/SSHAgent.java (rev 0)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/util/ssh/SSHAgent.java 2009-04-01 16:51:28 UTC (rev 2058)
@@ -0,0 +1,165 @@
+/* *##%
+ * Copyright (C) 2009 Code Lutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *##%*/
+
+package fr.ifremer.isisfish.util.ssh;
+
+import static org.codelutin.i18n.I18n._;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPasswordField;
+
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.KeyPair;
+
+/**
+ * Isis SSH agent.
+ *
+ * This class centralize, ssh key and passphrase
+ * management.
+ *
+ * This is a singleton class.
+ *
+ * @author chatellier
+ * @version $Revision: 1.0 $
+ *
+ * Last update : $Date: 1 avr. 2009 $
+ * By : $Author: chatellier $
+ */
+public class SSHAgent {
+
+ /** JSSch instance. */
+ protected JSch jsch;
+
+ /**
+ * Passphrase associated to key file path.
+ *
+ * private key file path => passphrase.
+ *
+ * Ensure that passphrase are valid before add into.
+ */
+ protected Map<String, String> passphraseForKeys;
+
+ /** Unique agent. */
+ private static SSHAgent agent = new SSHAgent();
+
+ /**
+ * Constructor.
+ */
+ private SSHAgent() {
+ jsch = new JSch();
+ passphraseForKeys = new HashMap<String, String>();
+ }
+
+ /**
+ * Get agent instance.
+ *
+ * @return agent
+ */
+ public static SSHAgent getAgent() {
+ return agent;
+ }
+
+ /**
+ * Get passphrase for key.
+ *
+ * @param privatekeyFile private key file
+ * @return <tt>null</tt> if there is no passphrase
+ * @throws InvalidPassphraseException if user cancel authentication
+ */
+ public String getPassphrase(File privatekeyFile)
+ throws InvalidPassphraseException {
+ String passphrase = getPassphrase(privatekeyFile.getAbsolutePath());
+ return passphrase;
+ }
+
+ /**
+ * Get passphrase for key.
+ *
+ * @param privatekeyFile private key file path
+ * @return <tt>null</tt> if there is no passphrase
+ * @throws InvalidPassphraseException if user cancel authentication
+ */
+ public String getPassphrase(String privatekeyFile)
+ throws InvalidPassphraseException {
+
+ String passphrase = passphraseForKeys.get(privatekeyFile);
+
+ if (passphrase == null) {
+ try {
+ KeyPair kpair = KeyPair.load(jsch, privatekeyFile);
+
+ if (kpair.isEncrypted()) {
+
+ boolean isValid = false;
+ String message = _("isisfish.ssh.askpassphrase.message",
+ privatekeyFile);
+ do {
+ passphrase = askPassphrase(privatekeyFile, message);
+
+ if (kpair.decrypt(passphrase)) {
+ isValid = true;
+ passphraseForKeys.put(privatekeyFile, passphrase);
+ } else {
+ message = _(
+ "isisfish.ssh.askpassphrase.wrongpassphrase",
+ privatekeyFile);
+ }
+ } while (!isValid);
+ }
+ } catch (JSchException e) {
+ throw new RuntimeException("Can't find key : " + privatekeyFile);
+ }
+ }
+
+ return passphrase;
+ }
+
+ /**
+ * Ask for passphrase.
+ *
+ * @param privatekeyFile private key file path
+ * @param message message
+ * @return entrered passphrase
+ * @throws InvalidPassphraseException if user cancel authentication
+ */
+ protected String askPassphrase(String privatekeyFile, String message)
+ throws InvalidPassphraseException {
+
+ JPasswordField passwordField = new JPasswordField();
+ JLabel labelField = new JLabel(message);
+
+ Object[] objs = { labelField, passwordField };
+
+ int option = JOptionPane.showConfirmDialog(null, objs,
+ _("isisfish.ssh.askpassphrase.title"),
+ JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
+
+ if (option == JOptionPane.CANCEL_OPTION) {
+ throw new InvalidPassphraseException("User cancel passphrase ask");
+ }
+
+ return String.valueOf(passwordField.getPassword());
+ }
+
+}
\ No newline at end of file
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSSVN.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSSVN.java 2009-04-01 14:56:28 UTC (rev 2057)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSSVN.java 2009-04-01 16:51:28 UTC (rev 2058)
@@ -30,10 +30,6 @@
import java.util.Map;
import java.util.Set;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JPasswordField;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.codelutin.util.VersionNumber;
@@ -43,10 +39,7 @@
import org.tmatesoft.svn.core.SVNDirEntry;
import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.SVNURL;
-import org.tmatesoft.svn.core.auth.BasicAuthenticationManager;
import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager;
-import org.tmatesoft.svn.core.auth.SVNAuthentication;
-import org.tmatesoft.svn.core.auth.SVNSSHAuthentication;
import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory;
import org.tmatesoft.svn.core.internal.io.fs.FSRepositoryFactory;
import org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryFactoryImpl;
@@ -66,6 +59,9 @@
import org.tmatesoft.svn.core.wc.SVNWCClient;
import org.tmatesoft.svn.core.wc.SVNWCUtil;
+import fr.ifremer.isisfish.util.ssh.InvalidPassphraseException;
+import fr.ifremer.isisfish.util.ssh.SSHAgent;
+
/**
* SVN VCS.
*
@@ -150,12 +146,23 @@
+ sshKeyFile.getAbsolutePath());
}
- // FIXME following AuthenticationManager will try to connect to
- // realm and if it fail, will try to ask for passphrase
- // even if there is another error
- // FIXME 22 here
- auth = new SSHSVNAuthenticationManager(login, sshKeyFile,
- null, 22);
+ String passphrase = null;
+ try {
+ passphrase = SSHAgent.getAgent().getPassphrase(sshKeyFile);
+ }
+ catch(InvalidPassphraseException e) {
+ if(log.isWarnEnabled()) {
+ log.warn("Can't get passphrase for key", e);
+ }
+ }
+
+ auth = SVNWCUtil.createDefaultAuthenticationManager(
+ SVNWCUtil.getDefaultConfigurationDirectory(), //File configDir
+ login, // String userName
+ null, //String password
+ sshKeyFile, //File privateKey
+ passphrase, //String passphrase,
+ true); //boolean storeAuth)
} else {
// log for private key
@@ -1217,69 +1224,4 @@
return filesInConflict;
}
-}
-
-/**
- * Authentication manager, that ask for passphrase
- * if first authentication fail.
- *
- * @author chatellier
- * @version $Revision: 1.0 $
- *
- * Last update : $Date: 23 févr. 2009 $
- * By : $Author: chatellier $
- */
-class SSHSVNAuthenticationManager extends BasicAuthenticationManager {
-
- protected String userName;
- protected File keyFile;
- protected int portNumber;
- protected JPasswordField passwordField;
-
- /**
- * Creates an auth manager given a user credential - a username and an ssh private key.
- *
- * @param userName
- * @param keyFile
- * @param passphrase
- * @param portNumber
- */
- public SSHSVNAuthenticationManager(String userName, File keyFile,
- String passphrase, int portNumber) {
- super(userName, keyFile, passphrase, portNumber);
- this.userName = userName;
- this.keyFile = keyFile;
- this.portNumber = portNumber;
- passwordField = new JPasswordField();
- }
-
- /*
- * @see org.tmatesoft.svn.core.auth.BasicAuthenticationManager#getNextAuthentication(java.lang.String, java.lang.String, org.tmatesoft.svn.core.SVNURL)
- */
- @Override
- public SVNAuthentication getNextAuthentication(String kind, String realm,
- SVNURL url) throws SVNException {
-
- SVNAuthentication auth = null;
-
- if (kind.equals(ISVNAuthenticationManager.SSH) && keyFile != null) {
-
- JLabel labelField = new JLabel(_(
- "isisfish.vcs.vcssvn.connection.message", keyFile
- .getAbsolutePath()));
- Object[] ob = { labelField, passwordField };
- int option = JOptionPane.showConfirmDialog(null, ob, _(
- "isisfish.vcs.vcssvn.connection.title", realm)
- + url, JOptionPane.OK_CANCEL_OPTION,
- JOptionPane.QUESTION_MESSAGE);
-
- if (option != JOptionPane.CANCEL_OPTION) {
- auth = new SVNSSHAuthentication(userName, keyFile, new String(
- passwordField.getPassword()), portNumber, true);
- }
- } else {
- auth = super.getNextAuthentication(kind, realm, url);
- }
- return auth;
- }
}
\ No newline at end of file
Modified: isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties
===================================================================
--- isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2009-04-01 14:56:28 UTC (rev 2057)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2009-04-01 16:51:28 UTC (rev 2058)
@@ -1,13 +1,13 @@
Add\ to\ %s\ queue=
Add\ to\ default\ queue=
Analyse\ plan\ error,\ too\ many\ simulation\ for\ %s\ \:\ %s=
-Can''t\ evaluate\ simulation\ prescript=
Can't\ add\ result\ '%1$s'\ at\ date\ %2$s=Can't add result '%1$s' at date %2$s
Can't\ add\ simulation\:\ =
Can't\ create\ simulation\ logger=Can't create simulation logger
Can't\ delete\ simulation\ %s\ =
Can't\ do\ post\ action\ %s=
Can't\ do\ simulation\ %s=
+Can't\ download\ file=
Can't\ evaluate\ simulation\ prescript=
Can't\ export\ simulation\ %s=
Can't\ get\ changlog=
@@ -23,7 +23,6 @@
Could\ not\ found\ formule\ type\ %s\ autorised\ type\ are\ %s=
Error\ during\ vcs\ initialisation=
Error\ while\ uploading\ public\ key\ to\ remote\ serveur\ authorized_keys=
-Factors\ analyse\ plan=
Generate\ next\ simulation=
Import\ one\ java\ file\ script\ source=
Import\ simulation\ file\ %s\ in\ directory\ %s\ and\ rename\ from\ %s\ to\ %s=
@@ -116,7 +115,6 @@
isisfish.common.populations=populations
isisfish.common.port=port
isisfish.common.prev=previous
-isisfish.common.previous=previous
isisfish.common.region=region
isisfish.common.remove=remove
isisfish.common.reset=reset
@@ -320,7 +318,6 @@
isisfish.error.save.simulation.parameters=Can't save simulation parameters in file %1$s
isisfish.error.script.create=isisfish.error.script.create
isisfish.error.script.delete=Can't delete file %1$s for reason %2$s
-isisfish.error.script.evaluate=
isisfish.error.script.import=Can't import file for reason %1$s
isisfish.error.script.load=Can't load file %1$s for reason %2$s
isisfish.error.script.save=Can't save file %1$s for reason %2$s
@@ -355,20 +352,8 @@
isisfish.export.directory=Export directory
isisfish.export.saved=Export saved
isisfish.export.title=Results export
-isisfish.factor.coefficient=Coefficient (in %)
-isisfish.factor.comment=Comment
-isisfish.factor.continue=Continue factor
-isisfish.factor.discret=Discret factor
isisfish.factor.factor=Factor
-isisfish.factor.firstValue=First value
isisfish.factor.increment=Cardinality
-isisfish.factor.lastValue=Last value
-isisfish.factor.name=Factor name
-isisfish.factor.operateur=Operator
-isisfish.factor.selectDiscretNumber=Number of factors
-isisfish.factor.title=Factor input
-isisfish.factor.validDiscretNumber=Ok
-isisfish.factor.value=Value
isisfish.filter=Filter
isisfish.filter.apply=Apply filter
isisfish.filter.cancel=Cancel
@@ -531,7 +516,6 @@
isisfish.message.check.region=
isisfish.message.checking.cell=
isisfish.message.choose.archive=choose archive file or directory
-isisfish.message.commit=
isisfish.message.commit.cancelled=commit cancelled
isisfish.message.commit.finished=commit finished
isisfish.message.commit.region.canceled=Commit region canceled
@@ -581,7 +565,6 @@
isisfish.message.region.removed=Region removed
isisfish.message.remove.canceled=Remove canceled
isisfish.message.remove.finished=Remove finished
-isisfish.message.remove.unnecessary.cells=
isisfish.message.removing.region=Removing region %1$s ...
isisfish.message.result.verif.region=R\u00E9sultat de la v\u00E9rification de la r\u00E9gion
isisfish.message.save.finished=Save finished
@@ -633,8 +616,7 @@
isisfish.params.onlyExportSimulation=Only export simulation
isisfish.params.populationNumbers=Population numbers input
isisfish.params.ruleParameters=Rule's parameters
-isisfish.params.sensibility=Sensibility
-isisfish.params.sensibilityName=Sensitivity name
+isisfish.params.sensitivityName=Sensitivity name
isisfish.params.simulationName=Simulation name
isisfish.params.title=Parameters
isisfish.params.toString.fishery=P\u00EAcherie\: %1$s\n\n
@@ -849,21 +831,6 @@
isisfish.selectivity.title=Selectivity
isisfish.sens.backParameter=Back to parameter tab
isisfish.sens.title=Sensibility analysis
-isisfish.sensWizardPanels.add=Add
-isisfish.sensWizardPanels.clear=Clear
-isisfish.sensWizardPanels.down=Down
-isisfish.sensWizardPanels.field=Field
-isisfish.sensWizardPanels.finish=Please click Finish to validate your choices
-isisfish.sensWizardPanels.modify=Modify
-isisfish.sensWizardPanels.object=Object
-isisfish.sensWizardPanels.remove=Remove
-isisfish.sensWizardPanels.scripts=Scripts List
-isisfish.sensWizardPanels.selectType=Select the type to add
-isisfish.sensWizardPanels.type=Type
-isisfish.sensWizardPanels.up=Up
-isisfish.sensWizardPanels.validate=Validate
-isisfish.sensWizardPanels.values=Values
-isisfish.sensibilityWizard.title=Sensibility Wizard
isisfish.sensitivity.displaysecondpass=Display results
isisfish.sensitivity.export=Export
isisfish.sensitivity.secondpass=Analyze results
@@ -908,6 +875,9 @@
isisfish.species.rubbinCode=Rubbin code
isisfish.species.scientificName=Scientific name
isisfish.species.structured=Structured
+isisfish.ssh.askpassphrase.message=Enter passphrase for key '%s' \:
+isisfish.ssh.askpassphrase.title=SSH key unlocking
+isisfish.ssh.askpassphrase.wrongpassphrase=Wrong passphrase, enter a new one for key '%s' \:
isisfish.strategy.comments=Comments
isisfish.strategy.inactivity=
isisfish.strategy.inactivityEquationUsed=Use inactivity equation
@@ -974,8 +944,6 @@
isisfish.vcs.vcssvn.cleanup.error=Can't cleanup working copy
isisfish.vcs.vcssvn.commit.error=Can't commit files
isisfish.vcs.vcssvn.commit.errorreadonly=You can't commit file, this repository is readonly
-isisfish.vcs.vcssvn.connection.message=Passphrase for key %s
-isisfish.vcs.vcssvn.connection.title=Connecting to %s
isisfish.vcs.vcssvn.delete.error=Can't delete file
isisfish.vcs.vcssvn.delete.errorreadonly=You can't delete file, this repository is readonly
isisfish.vcs.vcssvn.diff.error=Can't get diff
Modified: isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties
===================================================================
--- isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2009-04-01 14:56:28 UTC (rev 2057)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2009-04-01 16:51:28 UTC (rev 2058)
@@ -1,13 +1,13 @@
Add\ to\ %s\ queue=
Add\ to\ default\ queue=
Analyse\ plan\ error,\ too\ many\ simulation\ for\ %s\ \:\ %s=
-Can''t\ evaluate\ simulation\ prescript=
Can't\ add\ result\ '%1$s'\ at\ date\ %2$s=Can't add result '%1$s' at date %2$s
Can't\ add\ simulation\:\ =
Can't\ create\ simulation\ logger=Can't create simulation logger
Can't\ delete\ simulation\ %s\ =
Can't\ do\ post\ action\ %s=
Can't\ do\ simulation\ %s=
+Can't\ download\ file=
Can't\ evaluate\ simulation\ prescript=
Can't\ export\ simulation\ %s=
Can't\ get\ changlog=Impossible d'obtenir de changelog
@@ -23,7 +23,6 @@
Could\ not\ found\ formule\ type\ %s\ autorised\ type\ are\ %s=
Error\ during\ vcs\ initialisation=
Error\ while\ uploading\ public\ key\ to\ remote\ serveur\ authorized_keys=
-Factors\ analyse\ plan=
Generate\ next\ simulation=
Import\ one\ java\ file\ script\ source=
Import\ simulation\ file\ %s\ in\ directory\ %s\ and\ rename\ from\ %s\ to\ %s=
@@ -116,7 +115,6 @@
isisfish.common.populations=Populations
isisfish.common.port=port
isisfish.common.prev=Pr\u00E9c\u00E9dent
-isisfish.common.previous=Pr\u00E9c\u00E9dent
isisfish.common.region=R\u00E9gion
isisfish.common.remove=Supprimer
isisfish.common.reset=reset
@@ -320,7 +318,6 @@
isisfish.error.save.simulation.parameters=Can't save simulation parameters in file %1$s
isisfish.error.script.create=isisfish.error.script.create
isisfish.error.script.delete=N'a pas pu supprimer le fichier %1$s pour la raison suivante %2$s
-isisfish.error.script.evaluate=
isisfish.error.script.import=N'a pas pu importer pour la raison suivante %1$s
isisfish.error.script.load=N'a pas pu charger le fichier %1$s pour la raison suivante %2$s
isisfish.error.script.save=N'a pas pu sauver le fichier %1$s pour la raison suivante %2$s
@@ -355,20 +352,8 @@
isisfish.export.directory=Dossier d'export
isisfish.export.saved=Exports des r\u00E9sultats sauvegard\u00E9s
isisfish.export.title=Export des r\u00E9sultats
-isisfish.factor.coefficient=Co\u00E9fficient (en %)
-isisfish.factor.comment=Commentaires
-isisfish.factor.continue=Facteur continu
-isisfish.factor.discret=Facteur discret
isisfish.factor.factor=Facteur
-isisfish.factor.firstValue=Premi\u00E8re valeur
isisfish.factor.increment=Cardinalit\u00E9
-isisfish.factor.lastValue=Derni\u00E8re valeur
-isisfish.factor.name=Nom du facteur
-isisfish.factor.operateur=Op\u00E9rateur
-isisfish.factor.selectDiscretNumber=Nombre de facteurs
-isisfish.factor.title=Saisie d'un facteur
-isisfish.factor.validDiscretNumber=Valider
-isisfish.factor.value=Valeur
isisfish.filter=Filtrer
isisfish.filter.apply=Appliquer le filtre
isisfish.filter.cancel=Annuler
@@ -531,7 +516,6 @@
isisfish.message.check.region=
isisfish.message.checking.cell=
isisfish.message.choose.archive=choose archive file or directory
-isisfish.message.commit=
isisfish.message.commit.cancelled=commit annul\u00E9
isisfish.message.commit.finished=commit termin\u00E9
isisfish.message.commit.region.canceled=Commit de la r\u00E9gion annul\u00E9
@@ -581,7 +565,6 @@
isisfish.message.region.removed=R\u00E9gion supprim\u00E9e
isisfish.message.remove.canceled=Suppression annul\u00E9e
isisfish.message.remove.finished=Suppresison termin\u00E9
-isisfish.message.remove.unnecessary.cells=
isisfish.message.removing.region=Suppression de la r\u00E9gion %1$s ...
isisfish.message.result.verif.region=R\u00E9sultat de la v\u00E9rification de la r\u00E9gion
isisfish.message.save.finished=Sauvegarde termin\u00E9e
@@ -633,8 +616,7 @@
isisfish.params.onlyExportSimulation=Exporter uniquement des simulations
isisfish.params.populationNumbers=Donn\u00E9es de population
isisfish.params.ruleParameters=Param\u00E8tres des r\u00E8gles
-isisfish.params.sensibility=Sensibilit\u00E9
-isisfish.params.sensibilityName=Nom de l'analyse de sensibilit\u00E9
+isisfish.params.sensitivityName=Nom de l'analyse de sensibilit\u00E9
isisfish.params.simulationName=Nom de la simulation
isisfish.params.title=Param\u00E8tres
isisfish.params.toString.fishery=P\u00EAcherie\: %1$s\n\n
@@ -849,21 +831,6 @@
isisfish.selectivity.title=S\u00E9lectivit\u00E9
isisfish.sens.backParameter=Retour aux param\u00E8tres
isisfish.sens.title=Plan de simulation
-isisfish.sensWizardPanels.add=Ajouter
-isisfish.sensWizardPanels.clear=Effacer
-isisfish.sensWizardPanels.down=Bas
-isisfish.sensWizardPanels.field=Champ
-isisfish.sensWizardPanels.finish=Cliquez sur Terminer pour valider vos choix
-isisfish.sensWizardPanels.modify=Modifier
-isisfish.sensWizardPanels.object=Objet
-isisfish.sensWizardPanels.remove=Supprimer
-isisfish.sensWizardPanels.scripts=Liste des scripts
-isisfish.sensWizardPanels.selectType=Selectionner le type \u00E0 ajouter
-isisfish.sensWizardPanels.type=Type
-isisfish.sensWizardPanels.up=Haut
-isisfish.sensWizardPanels.validate=Valider
-isisfish.sensWizardPanels.values=Valeurs
-isisfish.sensibilityWizard.title=Sensibility Wizard
isisfish.sensitivity.displaysecondpass=Afficher les r\u00E9sultats
isisfish.sensitivity.export=Export
isisfish.sensitivity.secondpass=Analyse des r\u00E9sultats
@@ -908,6 +875,9 @@
isisfish.species.rubbinCode=Code Rubbin
isisfish.species.scientificName=Scientific name
isisfish.species.structured=Structur\u00E9
+isisfish.ssh.askpassphrase.message=Entrez la passphrase pour la cl\u00E9 '%s' \:
+isisfish.ssh.askpassphrase.title=D\u00E9verrouillage de cl\u00E9 SSH
+isisfish.ssh.askpassphrase.wrongpassphrase=Mauvaise cl\u00E9, entrez une nouvelle passphrase '%s' \:
isisfish.strategy.comments=Commentaires
isisfish.strategy.inactivity=Equation d'inactivit\u00E9
isisfish.strategy.inactivityEquationUsed=Utiliser une \u00E9quation d'inactivit\u00E9
@@ -974,8 +944,6 @@
isisfish.vcs.vcssvn.cleanup.error=Impossible de d\u00E9verrouiller la copie locale
isisfish.vcs.vcssvn.commit.error=Impossible de commiter
isisfish.vcs.vcssvn.commit.errorreadonly=Vous ne pouvez pas commiter, le d\u00E9p\u00F4t est en lecture seule
-isisfish.vcs.vcssvn.connection.message=Passphrase pour la cl\u00E9 %s
-isisfish.vcs.vcssvn.connection.title=Connexion \u00E0 %s
isisfish.vcs.vcssvn.delete.error=Impossible de supprimer des fichiers
isisfish.vcs.vcssvn.delete.errorreadonly=Vous ne pouvez pas supprimer ce fichier, le d\u00E9p\u00F4t est en lecture seule
isisfish.vcs.vcssvn.diff.error=Impossible d'obtenir le diff
Deleted: isis-fish/trunk/src/test/java/fr/ifremer/isisfish/util/SSHUtils.java
===================================================================
--- isis-fish/trunk/src/test/java/fr/ifremer/isisfish/util/SSHUtils.java 2009-04-01 14:56:28 UTC (rev 2057)
+++ isis-fish/trunk/src/test/java/fr/ifremer/isisfish/util/SSHUtils.java 2009-04-01 16:51:28 UTC (rev 2058)
@@ -1,99 +0,0 @@
-/* *##%
- * Copyright (C) 2009 Code Lutin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *##%*/
-
-package fr.ifremer.isisfish.util;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import junit.framework.Assert;
-
-import org.codelutin.util.Resource;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import com.jcraft.jsch.JSch;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.KeyPair;
-
-/**
- * Class de test créé pour tester et centraliser la gestion
- * des clés SSH et leur passphrase dans Isis.
- *
- * @author chatellier
- * @version $Revision: 1.0 $
- *
- * Last update : $Date: 1 avr. 2009 $
- * By : $Author: chatellier $
- */
-public class SSHUtils {
-
- protected static File keyFile;
-
- /**
- * Find ssh key file.
- *
- * @throws URISyntaxException
- */
- @BeforeClass
- public static void init() throws URISyntaxException {
- keyFile = new File("src/test/resources/ssh/isistestkey");
- }
-
- /**
- * Test que la clé existe.
- */
- @Test
- public void testKeyExist() {
- Assert.assertNotNull(keyFile);
- Assert.assertTrue(keyFile.isFile());
- }
-
- /**
- * Test si une passphrase est valide pour une clé SSH.
- *
- * @throws JSchException
- */
- @Test
- public void testIsValidPassphrase() throws JSchException {
- String passphrase = "isispassphrase";
-
- JSch jsch=new JSch();
- KeyPair kpair=KeyPair.load(jsch, keyFile.getAbsolutePath());
-
- Assert.assertTrue(kpair.isEncrypted()); // cle protegee
- Assert.assertTrue(kpair.decrypt(passphrase)); // decodage fonctionne
-
- }
-
- /**
- * Test qu'une passphrase n'est pas valide pour une clé.
- * @throws JSchException
- */
- @Test
- public void testIsNotValidPassphrase() throws JSchException {
- String passphrase = "passphare not good";
-
- JSch jsch=new JSch();
- KeyPair kpair=KeyPair.load(jsch, keyFile.getAbsolutePath());
-
- Assert.assertTrue(kpair.isEncrypted()); // cle protegee
- Assert.assertFalse(kpair.decrypt(passphrase)); // decodage fonctionne
- }
-}
Copied: isis-fish/trunk/src/test/java/fr/ifremer/isisfish/util/ssh/SSHAgentTest.java (from rev 2057, isis-fish/trunk/src/test/java/fr/ifremer/isisfish/util/SSHUtils.java)
===================================================================
--- isis-fish/trunk/src/test/java/fr/ifremer/isisfish/util/ssh/SSHAgentTest.java (rev 0)
+++ isis-fish/trunk/src/test/java/fr/ifremer/isisfish/util/ssh/SSHAgentTest.java 2009-04-01 16:51:28 UTC (rev 2058)
@@ -0,0 +1,97 @@
+/* *##%
+ * Copyright (C) 2009 Code Lutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *##%*/
+
+package fr.ifremer.isisfish.util.ssh;
+
+import java.io.File;
+import java.net.URISyntaxException;
+
+import junit.framework.Assert;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.KeyPair;
+
+/**
+ * Class de test créé pour tester et centraliser la gestion
+ * des clés SSH et leur passphrase dans Isis.
+ *
+ * @author chatellier
+ * @version $Revision: 1.0 $
+ *
+ * Last update : $Date: 1 avr. 2009 $
+ * By : $Author: chatellier $
+ */
+public class SSHAgentTest {
+
+ protected static File keyFile;
+
+ /**
+ * Find ssh key file.
+ *
+ * @throws URISyntaxException
+ */
+ @BeforeClass
+ public static void init() throws URISyntaxException {
+ keyFile = new File("src/test/resources/ssh/isistestkey");
+ }
+
+ /**
+ * Test que la clé existe.
+ */
+ @Test
+ public void testKeyExist() {
+ Assert.assertNotNull(keyFile);
+ Assert.assertTrue(keyFile.isFile());
+ }
+
+ /**
+ * Test si une passphrase est valide pour une clé SSH.
+ *
+ * @throws JSchException
+ */
+ @Test
+ public void testIsValidPassphrase() throws JSchException {
+ String passphrase = "isispassphrase";
+
+ JSch jsch=new JSch();
+ KeyPair kpair=KeyPair.load(jsch, keyFile.getAbsolutePath());
+
+ Assert.assertTrue(kpair.isEncrypted()); // cle protegee
+ Assert.assertTrue(kpair.decrypt(passphrase)); // decodage fonctionne
+
+ }
+
+ /**
+ * Test qu'une passphrase n'est pas valide pour une clé.
+ * @throws JSchException
+ */
+ @Test
+ public void testIsNotValidPassphrase() throws JSchException {
+ String passphrase = "passphare not good";
+
+ JSch jsch=new JSch();
+ KeyPair kpair=KeyPair.load(jsch, keyFile.getAbsolutePath());
+
+ Assert.assertTrue(kpair.isEncrypted()); // cle protegee
+ Assert.assertFalse(kpair.decrypt(passphrase)); // decodage fonctionne
+ }
+}
1
0
r2057 - in isis-fish/trunk/src/test: java/fr/ifremer/isisfish/util resources resources/ssh
by chatellier@users.labs.libre-entreprise.org 01 Apr '09
by chatellier@users.labs.libre-entreprise.org 01 Apr '09
01 Apr '09
Author: chatellier
Date: 2009-04-01 14:56:28 +0000 (Wed, 01 Apr 2009)
New Revision: 2057
Added:
isis-fish/trunk/src/test/java/fr/ifremer/isisfish/util/SSHUtils.java
isis-fish/trunk/src/test/resources/ssh/
isis-fish/trunk/src/test/resources/ssh/isistestkey
isis-fish/trunk/src/test/resources/ssh/isistestkey.pub
isis-fish/trunk/src/test/resources/ssh/isistestkey.txt
Log:
Ajout d'un test unitaire pour tester la validite d'une passphrase.
Added: isis-fish/trunk/src/test/java/fr/ifremer/isisfish/util/SSHUtils.java
===================================================================
--- isis-fish/trunk/src/test/java/fr/ifremer/isisfish/util/SSHUtils.java (rev 0)
+++ isis-fish/trunk/src/test/java/fr/ifremer/isisfish/util/SSHUtils.java 2009-04-01 14:56:28 UTC (rev 2057)
@@ -0,0 +1,99 @@
+/* *##%
+ * Copyright (C) 2009 Code Lutin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *##%*/
+
+package fr.ifremer.isisfish.util;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import junit.framework.Assert;
+
+import org.codelutin.util.Resource;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.KeyPair;
+
+/**
+ * Class de test créé pour tester et centraliser la gestion
+ * des clés SSH et leur passphrase dans Isis.
+ *
+ * @author chatellier
+ * @version $Revision: 1.0 $
+ *
+ * Last update : $Date: 1 avr. 2009 $
+ * By : $Author: chatellier $
+ */
+public class SSHUtils {
+
+ protected static File keyFile;
+
+ /**
+ * Find ssh key file.
+ *
+ * @throws URISyntaxException
+ */
+ @BeforeClass
+ public static void init() throws URISyntaxException {
+ keyFile = new File("src/test/resources/ssh/isistestkey");
+ }
+
+ /**
+ * Test que la clé existe.
+ */
+ @Test
+ public void testKeyExist() {
+ Assert.assertNotNull(keyFile);
+ Assert.assertTrue(keyFile.isFile());
+ }
+
+ /**
+ * Test si une passphrase est valide pour une clé SSH.
+ *
+ * @throws JSchException
+ */
+ @Test
+ public void testIsValidPassphrase() throws JSchException {
+ String passphrase = "isispassphrase";
+
+ JSch jsch=new JSch();
+ KeyPair kpair=KeyPair.load(jsch, keyFile.getAbsolutePath());
+
+ Assert.assertTrue(kpair.isEncrypted()); // cle protegee
+ Assert.assertTrue(kpair.decrypt(passphrase)); // decodage fonctionne
+
+ }
+
+ /**
+ * Test qu'une passphrase n'est pas valide pour une clé.
+ * @throws JSchException
+ */
+ @Test
+ public void testIsNotValidPassphrase() throws JSchException {
+ String passphrase = "passphare not good";
+
+ JSch jsch=new JSch();
+ KeyPair kpair=KeyPair.load(jsch, keyFile.getAbsolutePath());
+
+ Assert.assertTrue(kpair.isEncrypted()); // cle protegee
+ Assert.assertFalse(kpair.decrypt(passphrase)); // decodage fonctionne
+ }
+}
Added: isis-fish/trunk/src/test/resources/ssh/isistestkey
===================================================================
--- isis-fish/trunk/src/test/resources/ssh/isistestkey (rev 0)
+++ isis-fish/trunk/src/test/resources/ssh/isistestkey 2009-04-01 14:56:28 UTC (rev 2057)
@@ -0,0 +1,30 @@
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,C78258F97D4516F9
+
+31azf6UcEu1zvBpQE/nZuQLR7F97paRe3AvJcfHGlz8bqQd5JP8axRA0RzbKA22+
+C3p8Sk980/oNPDnceR7fGfRWrypzsSaGkV1BsDK2wkcWgpdJIomQVjEqKmNO1jkZ
+wKHSE1rAQq1PtJLVoXEwOwpOnH2LRjuiExyIqZePciyMCd/QJ5orU+i4mCZErx3F
+1Pdz8VeDLEZRmsfbZh/OKqrZ7z9zRMtpIS9oXgw1sRH303AmU9/2hBflnhFddQFx
+d2bjAzAL/5rBIsBuwVJfcfRENWVlJcGJBmeiC8jW7GiBKNv8syPHq3DVg1JbnGWK
+0mYRzOcQlj9JOh/C3f2inU2agIJBPnpUqEmhBhXGziBVBwf7ulApjTKyFt2KZ5Tw
+aIvrm5LASrUaEDeIx0wCuAyAvgJ0CkcB5BwzTImICqjmKuLnMqV0lUUU4ZmZkDkn
+JPwaceaqwHxfHomOhUpESTSrEd6hIoAmBKi++jRWFKzEod1KlK7HL3KNhvnlHyiY
+G4i2eIbi7D76iQipynrHtOwdKswqWsz7+YifY5gY/HnJZl4AGGTNG+RXJnoWmMzp
+BCXBNbUDRWNZSVgKtcMKBV+0q4REp/EexdpaSNdmmmusMKi/41xNn68pfjGqqNgh
+XHHe93lMBdRzwhMbjZzMnGY3mcFuw+BjL3v6L1etz6j/z2mDLGqaWmHbjmWBRxni
+y+RdOoX/uUL9hY/aisX7Zm4H6rVNVgxPC7rRPzFu0Oaf5iV3Qbdp5YkMbZCZlQFD
+S/g+UOtpx7gYLMWiuqd6CljMgiYVVY/jmMbtL44cKCQbqqfncAmnrGuKMJ/uJR46
+Hw4uSv1i4fZKxb6LhFkQRjkY+yED7a9Mz3yddqeT79DsacM4ctNtnp07LWXaufKt
+FXVnBXA0YgjlJDEtDaXvJfXfoV0GjqhogOS+MyYyR0fAhbD+8MOH0wrdCN6ov1PV
++ZdKOgKgTzLg3Aeh+Bkar04W+8YnO4c12IVMe2Iv0IxUZnYPmKBy1UK9PO7qDH3G
+GQJrjxcXwFR8CaOzLGNVMvOdLIAzlxrunpTiDOO76EB4uoZCRa4NC9p9aMC0KJ5W
+FuSkdpypu3O4JtC+bs2+rjbn9kGzV1rsmTQKs5ZpX7elJZLBVTw6E3it6qCsXv7e
+Ak2B6zXd1OiwMYbWdtKGkp70UFprWbha8N46DL2LgSay4OXJLSN8Ha0+Z6vUE8dE
+4Qe4oqUGjgE9QnYRpN/sCddJKQMtNjlqkHFmNNo2uIXVZGpueLn5dLNXbOmzI5a2
+R42HIxGMiRbOLc/0X2Dl9S2PU27w2n0woFHI7C1siO8jfHcYrUJWnfTng+/wY0jC
+W+qdSsBjjbOzSwalZV7r+xUSjoVe6MemhwYM4Tg7Z/kVGIWt7F2q3GiOHLiYPNdw
+9lWQtn8yTZcLUIbwWPWkPZ0vNYUPQcd7z86ysiUtEEZDWVA98fkA8nRWP1qKbO3D
+7V9G1YD3KUx8l88kFCKAgt8N+pB9Co8L1P58FioxsXMXbSBlnrf4za80IK5CZ2IR
+C2aU6FimsuTnP19cVSj4sUdHr7zYdqJ0JQHlYn/FGb1cp+wPWNvJOw==
+-----END RSA PRIVATE KEY-----
Added: isis-fish/trunk/src/test/resources/ssh/isistestkey.pub
===================================================================
--- isis-fish/trunk/src/test/resources/ssh/isistestkey.pub (rev 0)
+++ isis-fish/trunk/src/test/resources/ssh/isistestkey.pub 2009-04-01 14:56:28 UTC (rev 2057)
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzQdBma9PwFdIx+GZg/bOlgjFINc9+iv5pe7HmD+v+RuJ7Miw7MBnttpB2mg7Q+p1V/2V2h9QX1QiRC78/JQptkQrqItpnifQduwL7p53oLC57DQXdLdg5waeqp6yhifFosTpvkhNmhni8A8GoJpd8YIAdExttOe2vboBB4NBjlj6ujqXBBwIGNQuGJ+yCN9wiitwawzCPtAn7HXfGSjWSH+vxo75DcT6BaLi2Rwni7CjHQZUoNQMK1aTL0Wn5EvqOW/vHaWQ4ARKxuuVOCwlYMaJxk3orWl90ZZuOtEHkwxTeXEnBS2JnHbiVFTj3R63rr23UofSC32tsz3+YiFTFQ== chatellier at genux
Added: isis-fish/trunk/src/test/resources/ssh/isistestkey.txt
===================================================================
--- isis-fish/trunk/src/test/resources/ssh/isistestkey.txt (rev 0)
+++ isis-fish/trunk/src/test/resources/ssh/isistestkey.txt 2009-04-01 14:56:28 UTC (rev 2057)
@@ -0,0 +1,3 @@
+Clé ssh pour les tests unitaire de ISIS.
+
+La passphrase est "isispassphrase".
1
0
Author: chatellier
Date: 2009-04-01 14:23:40 +0000 (Wed, 01 Apr 2009)
New Revision: 2056
Modified:
isis-fish/trunk/pom.xml
Log:
Update svnkit
Modified: isis-fish/trunk/pom.xml
===================================================================
--- isis-fish/trunk/pom.xml 2009-04-01 14:12:38 UTC (rev 2055)
+++ isis-fish/trunk/pom.xml 2009-04-01 14:23:40 UTC (rev 2056)
@@ -300,7 +300,7 @@
<dependency>
<groupId>org.tmatesoft</groupId>
<artifactId>svnkit</artifactId>
- <version>1.2.2.5405</version>
+ <version>1.2.3.5521</version>
<scope>compile</scope>
</dependency>
<dependency>
1
0
r2055 - isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script
by chatellier@users.labs.libre-entreprise.org 01 Apr '09
by chatellier@users.labs.libre-entreprise.org 01 Apr '09
01 Apr '09
Author: chatellier
Date: 2009-04-01 14:12:38 +0000 (Wed, 01 Apr 2009)
New Revision: 2055
Modified:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/ScriptAction.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/ScriptUI.jaxx
Log:
Update tree after deletion (and other updates)
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/ScriptAction.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/ScriptAction.java 2009-03-31 13:33:51 UTC (rev 2054)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/ScriptAction.java 2009-04-01 14:12:38 UTC (rev 2055)
@@ -674,23 +674,19 @@
Export(
ExportStorage.getExportDirectory(),
ExportStorage.EXPORT_TEMPLATE),
-
Rule(
RuleStorage.getRuleDirectory(),
RuleStorage.RULE_TEMPLATE),
-
AnalysePlan(
AnalysePlanStorage.getAnalysePlanDirectory(),
AnalysePlanStorage.ANALYSE_PLAN_TEMPLATE),
-
+ Sensitivity(
+ SensitivityStorage.getSensitivityDirectory(),
+ SensitivityStorage.SENSIVITY_TEMPLATE),
EquationModel(
FormuleStorage.getFormuleDirectory(),
- FormuleStorage.FORMULE_TEMPLATE),
+ FormuleStorage.FORMULE_TEMPLATE);
- Sensitivity(
- SensitivityStorage.getSensitivityDirectory(),
- SensitivityStorage.SENSIVITY_TEMPLATE);
-
protected File module;
protected String templatePath;
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/ScriptUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/ScriptUI.jaxx 2009-03-31 13:33:51 UTC (rev 2054)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/ScriptUI.jaxx 2009-04-01 14:12:38 UTC (rev 2055)
@@ -249,11 +249,11 @@
protected void importScript(){
setInfoText(getContextValue(ScriptAction.class).importScript());
}
- protected void deleteScript(boolean b){
- int resp = JOptionPane.showConfirmDialog(this,_("isisfish.message.confirm.remove.script" ,
+ protected void deleteScript(boolean deleteRemote) {
+ int resp = JOptionPane.showConfirmDialog(this,_("isisfish.message.confirm.remove.script",
getContextValue(ScriptAction.class).getCode().getName()), null, JOptionPane.YES_NO_OPTION);
+ setInfoText(getContextValue(ScriptAction.class).deleteScript(resp, deleteRemote));
setTreeModel();
- setInfoText(getContextValue(ScriptAction.class).deleteScript(resp,b));
}
protected void diffScript(){
setInfoText(getContextValue(ScriptAction.class).diffScript(editor.getText()));
1
0