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
February 2009
- 6 participants
- 128 discussions
r1795 - in isis-fish/trunk: . src/main/java/fr/ifremer/isisfish
by tchemit@users.labs.libre-entreprise.org 05 Feb '09
by tchemit@users.labs.libre-entreprise.org 05 Feb '09
05 Feb '09
Author: tchemit
Date: 2009-02-05 18:55:54 +0000 (Thu, 05 Feb 2009)
New Revision: 1795
Modified:
isis-fish/trunk/pom.xml
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisFish.java
Log:
refactoring des versions (merci de ne plus les enlever...)
suppression du mode fork pour les tests
suppression du securityManager pour webstart (laisse en commentaire pour le moment et voir avec ben si c'est ok pour les autres utilisation d'isis sur caparmor par exemple)
Modified: isis-fish/trunk/pom.xml
===================================================================
--- isis-fish/trunk/pom.xml 2009-02-05 18:10:22 UTC (rev 1794)
+++ isis-fish/trunk/pom.xml 2009-02-05 18:55:54 UTC (rev 1795)
@@ -149,14 +149,14 @@
<dependency>
<groupId>org.apache.xmlrpc</groupId>
<artifactId>xmlrpc-client</artifactId>
- <version>3.1</version>
+ <version>${xmlrpc.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.xmlrpc</groupId>
<artifactId>xmlrpc-server</artifactId>
- <version>3.1</version>
+ <version>${xmlrpc.version}</version>
<scope>compile</scope>
</dependency>
@@ -178,21 +178,21 @@
<dependency>
<groupId>openmap</groupId>
<artifactId>openmap</artifactId>
- <version>4.6.4</version>
+ <version>${openmap.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>sshtools</groupId>
<artifactId>j2ssh-common</artifactId>
- <version>0.2.2</version>
+ <version>${sshtool.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>sshtools</groupId>
<artifactId>j2ssh-core</artifactId>
- <version>0.2.2</version>
+ <version>${sshtool.version}</version>
<scope>compile</scope>
</dependency>
@@ -231,19 +231,19 @@
<dependency>
<groupId>aspectwerkz</groupId>
<artifactId>aspectwerkz</artifactId>
- <version>2.0</version>
+ <version>${aspectwerkz.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>aspectwerkz</groupId>
<artifactId>aspectwerkz-jdk5</artifactId>
- <version>2.0</version>
+ <version>${aspectwerkz.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>aspectwerkz</groupId>
<artifactId>aspectwerkz-core</artifactId>
- <version>2.0</version>
+ <version>${aspectwerkz.version}</version>
<scope>compile</scope>
</dependency>
@@ -349,7 +349,11 @@
<lutinutil.version>1.0.3-SNAPSHOT</lutinutil.version>
<lutinwidget.version>0.12</lutinwidget.version>
<generator.version>0.64-SNAPSHOT</generator.version>
+
<openmap.version>4.6.4</openmap.version>
+ <aspectwerkz.version>2.0</aspectwerkz.version>
+ <sshtool.version>0.2.2</sshtool.version>
+ <xmlrpc.version>3.1</xmlrpc.version>
<!--Main class in JAR -->
<maven.jar.main.class>fr.ifremer.isisfish.IsisFish</maven.jar.main.class>
@@ -368,16 +372,7 @@
<build>
<plugins>
- <!-- Sans le forkMode one, les classpath sont mauvais -->
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <forkMode>once</forkMode>
- </configuration>
- </plugin>
-
- <plugin>
<groupId>org.codelutin</groupId>
<artifactId>maven-generator-plugin</artifactId>
<version>${generator.version}</version>
@@ -429,7 +424,7 @@
<goal>generate</goal>
</goals>
<configuration>
- <src>${project.basedir}/src/main/java</src>
+ <!--src>${project.basedir}/src/main/java</src-->
<addSourcesToClassPath>true</addSourcesToClassPath>
<addProjectClassPath>true</addProjectClassPath>
</configuration>
@@ -463,7 +458,7 @@
</configuration>
<executions>
<execution>
- <phase>generate-resources</phase>
+ <!--phase>generate-resources</phase-->
<goals>
<goal>parserJava</goal>
<goal>gen</goal>
@@ -506,20 +501,24 @@
</configuration>
</plugin>
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- <classpathPrefix>./lib/</classpathPrefix>
- </manifest>
- </archive>
- </configuration>
- </plugin>
-
</plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>./lib/</classpathPrefix>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
</build>
<!-- ************************************************************* -->
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisFish.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisFish.java 2009-02-05 18:10:22 UTC (rev 1794)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisFish.java 2009-02-05 18:55:54 UTC (rev 1795)
@@ -114,6 +114,9 @@
static public void main(String... args) {
try {
+ // permet de faire fonctionner la compilation en webstart
+ //System.setSecurityManager(null);
+
// initialisation de l'application
IsisFish.init(args);
1
0
Author: tchemit
Date: 2009-02-05 18:10:22 +0000 (Thu, 05 Feb 2009)
New Revision: 1794
Modified:
isis-fish/trunk/pom.xml
Log:
- webstart fonctionne (suite ?\195?\160 modif dans toopia-service)
- les tests aussi sans fork du coup
Modified: isis-fish/trunk/pom.xml
===================================================================
--- isis-fish/trunk/pom.xml 2009-02-05 13:37:22 UTC (rev 1793)
+++ isis-fish/trunk/pom.xml 2009-02-05 18:10:22 UTC (rev 1794)
@@ -40,7 +40,7 @@
<dependency>
<groupId>org.codelutin</groupId>
<artifactId>topia-service</artifactId>
- <version>1.0.1</version>
+ <version>1.0.2-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
@@ -341,8 +341,6 @@
<!-- nom du projet du labs -->
<labs.project>isis-fish</labs.project>
- <maven.test.forkMode>once</maven.test.forkMode>
-
<!-- Custom version -->
<jaxx.version>1.1-SNAPSHOT</jaxx.version>
<generator.version>0.63</generator.version>
@@ -362,9 +360,9 @@
<keystorepass>codelutin</keystorepass>
<jnlp.build.directory>${project.build.directory}/jnlp</jnlp.build.directory>
- <!--jnlpCodebase>${project.url}</jnlpCodebase-->
+ <jnlpCodebase>${project.url}</jnlpCodebase>
<!-- to test jnlp file locally -->
- <jnlpCodebase>file://${jnlp.build.directory}</jnlpCodebase>
+ <!--jnlpCodebase>file://${jnlp.build.directory}</jnlpCodebase-->
</properties>
<build>
1
0
r1793 - isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input
by sletellier@users.labs.libre-entreprise.org 05 Feb '09
by sletellier@users.labs.libre-entreprise.org 05 Feb '09
05 Feb '09
Author: sletellier
Date: 2009-02-05 13:37:22 +0000 (Thu, 05 Feb 2009)
New Revision: 1793
Modified:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/CellUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PortUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyOneMonthInfoUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/VesselTypeUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx
Log:
Debug inputUI
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/CellUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/CellUI.jaxx 2009-02-04 16:45:44 UTC (rev 1792)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/CellUI.jaxx 2009-02-05 13:37:22 UTC (rev 1793)
@@ -49,9 +49,17 @@
protected OMToolSet toolSet = new OMToolSet();
protected OpenMapEvents mapListener = null;
+boolean cellChanged = true;
+cellMap = new fr.ifremer.isisfish.map.IsisMapBean();
setButtonTitle(_("isisfish.input.continueZones"));
setNextPath("$root/$zones");
+cellMap.setFisheryRegion(getRegion());
+cellMap.setSelectionMode(CellSelectionLayer.SINGLE_SELECTION);
+cellMap.setActiveMouseMode(new SelectMouseMode());
+toolSet.setupListeners(cellMap);
+toolMap.add((Component)toolSet);
+setMapListener();
addPropertyChangeListener("bean", new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
if (evt.getOldValue() != null || evt.getNewValue() == null) {
@@ -74,19 +82,10 @@
getVerifier().setCancelButton(cancel);
Cell cell = getVerifier().getEntity(Cell.class);
setBean((CellImpl) cell);
+ cellChanged = false;
jaxx.runtime.swing.Utils.fillComboBox(fieldCell,getRegion().getCell(), getBean());
- cellMap.setFisheryRegion(getRegion());
- if (mapListener == null){
- cellMap.setSelectionMode(CellSelectionLayer.SINGLE_SELECTION);
- cellMap.setActiveMouseMode(new SelectMouseMode());
- toolSet.setupListeners(cellMap);
- toolMap.add((Component)toolSet);
- setMapListener();
- }
-
- if (getBean() != null){
- cellMap.setSelectedCells(getBean());
- }
+ cellChanged = true;
+ cellMap.setSelectedCells(getBean());
}
protected void setMapListener(){
if (mapListener == null){
@@ -95,7 +94,10 @@
@Override
public boolean onMouseClicked() {
for (Cell c : cellMap.getSelectedCells()){
- getParentContainer(InputUI.class).setTreeSelection("$root/$cells/" + c.getTopiaId());
+ if (!c.getTopiaId().equals(getBean().getTopiaId())){
+ jaxx.runtime.swing.Utils.fillComboBox(fieldCell,getRegion().getCell(), c);
+ return true;
+ }
}
return true;
}
@@ -104,16 +106,18 @@
}
protected void fieldCellChanged() {
- Cell c = (Cell)fieldCell.getSelectedItem();
- if (c==null) {
- return;
+ if (cellChanged){
+ Cell c = (Cell)fieldCell.getSelectedItem();
+ if (c==null) {
+ return;
+ }
+ Cell oldC = getBean();
+ if (oldC != null && c.getTopiaId().equals(oldC.getTopiaId())) {
+ // avoid reentrant code
+ return;
+ }
+ getParentContainer(InputUI.class).setTreeSelection("$root/$cells/"+c.getTopiaId());
}
- Cell oldC = getBean();
- if (oldC != null && c.getTopiaId().equals(oldC.getTopiaId())) {
- // avoid reentrant code
- return;
- }
- getParentContainer(InputUI.class).setTreeSelection("$root/$cells/"+c.getTopiaId());
}
]]></script>
<JPanel id='body' layout='{new BorderLayout()}'>
@@ -180,7 +184,7 @@
</Table>
<JPanel id='map' layout='{new BorderLayout()}'>
<fr.ifremer.isisfish.map.OpenMapToolPanel id='toolMap' javaBean='new fr.ifremer.isisfish.map.OpenMapToolPanel()' constraints='BorderLayout.NORTH'/>
- <fr.ifremer.isisfish.map.IsisMapBean id='cellMap' javaBean='new fr.ifremer.isisfish.map.IsisMapBean()' constraints='BorderLayout.CENTER'/>
+ <fr.ifremer.isisfish.map.IsisMapBean id='cellMap' constraints='BorderLayout.CENTER'/>
</JPanel>
</JSplitPane>
</JPanel>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PortUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PortUI.jaxx 2009-02-04 16:45:44 UTC (rev 1792)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PortUI.jaxx 2009-02-05 13:37:22 UTC (rev 1793)
@@ -107,7 +107,16 @@
public boolean onMouseClicked() {
for (Cell c : portMap.getSelectedCells()){
if (getBean() != null){
- getBean().setCell(c);
+ if (getBean().getCell() != null){
+ if (getBean().getCell().getTopiaId().equals(c.getTopiaId())){
+ getBean().setCell(c);
+ return true;
+ }
+ }
+ else{
+ getBean().setCell(c);
+ return true;
+ }
}
}
return true;
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyOneMonthInfoUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyOneMonthInfoUI.jaxx 2009-02-04 16:45:44 UTC (rev 1792)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyOneMonthInfoUI.jaxx 2009-02-05 13:37:22 UTC (rev 1793)
@@ -130,7 +130,7 @@
</row>
<row>
<cell columns='2' fill='both' weightx='1.0' weighty='1.0'>
- <org.codelutin.math.matrix.gui.MatrixPanelEditor id="fieldStrategyMonthInfoProportion" linearModelShowDefault='{true}' linearModel='{true}' matrix='{getStrategyMonthInfo().getProportionMetier().copy()}' enabled='{isActif()}'/>
+ <org.codelutin.math.matrix.gui.MatrixPanelEditor id="fieldStrategyMonthInfoProportion" linearModelShowDefault='{true}' linearModel='{true}' matrix='{getStrategyMonthInfo().getProportionMetier() == null ? null : getStrategyMonthInfo().getProportionMetier().copy()}' enabled='{isActif()}'/>
</cell>
</row>
</Table>
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-02-04 16:45:44 UTC (rev 1792)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/VesselTypeUI.jaxx 2009-02-05 13:37:22 UTC (rev 1793)
@@ -76,7 +76,7 @@
setBean((VesselTypeImpl) vesselType);
if (getBean() != null){
tripTypeChanged = false;
- vesselTypeTripType.fillList(getRegion().getTripType(), getBean().getTripType() == null ? null : getBean().getTripType());
+ vesselTypeTripType.fillList(getRegion().getTripType(), getBean().getTripType() == null ? (Object) null : getBean().getTripType());
tripTypeChanged = true;
}
}
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx 2009-02-04 16:45:44 UTC (rev 1792)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx 2009-02-05 13:37:22 UTC (rev 1793)
@@ -51,7 +51,14 @@
protected OMToolSet toolSet = new OMToolSet();
protected MapMouseListener mapListener = null;
-
+boolean cellChanged = true;
+zoneMap = new fr.ifremer.isisfish.map.IsisMapBean();
+zoneMap.setFisheryRegion(getRegion());
+zoneMap.setActiveMouseMode(new SelectMouseMode(false));
+zoneMap.setSelectionMode(CellSelectionLayer.MULT_SELECTION);
+toolSet.setupListeners(zoneMap);
+toolMap.add((Component)toolSet);
+setMapListener();
setButtonTitle(_("isisfish.input.continuePorts"));
setNextPath("$root/$ports");
addPropertyChangeListener("bean", new PropertyChangeListener() {
@@ -64,7 +71,6 @@
// jaxx.runtime.Util.removeDataBinding($InputContentUI0, "fieldZoneName.text", "fieldZoneComment.text");
fieldZoneName.setText("");
fieldZoneComment.setText("");
- //zoneCells.fillList(getRegion().getCell(), java.util.Collections.EMPTY_LIST);
}
if (evt.getNewValue() != null) {
// add binding on getBean()
@@ -80,23 +86,13 @@
getVerifier().setDeleteButton(remove);
Zone zone = getVerifier().getEntity(Zone.class);
setBean((ZoneImpl) zone);
- if (log.isDebugEnabled()) {
- log.debug("zone nb cells : "+ ( zone==null ? 0 : zone.getCell().size() ) );
- }
setZoneCells();
- zoneMap.setFisheryRegion(getRegion());
- if (mapListener == null){
- zoneMap.setActiveMouseMode(new SelectMouseMode(false));
- zoneMap.setSelectionMode(CellSelectionLayer.MULT_SELECTION);
- toolSet.setupListeners(zoneMap);
- toolMap.add((Component)toolSet);
- setMapListener();
- }
- refreshMap();
}
protected void setZoneCells(){
if (getBean() != null){
+ cellChanged = false;
zoneCells.fillList(getRegion().getCell(), getBean().getCell());
+ cellChanged = true;
}
}
protected void setMapListener(){
@@ -104,25 +100,22 @@
mapListener = new OpenMapEvents(zoneMap, new SelectMouseMode(false), CellSelectionLayer.MULT_SELECTION) {
@Override
public boolean onMouseClicked() {
- java.util.List<Cell> selectedCell = zoneMap.getSelectedCells();
- getBean().setCell(selectedCell);
- setZoneCells();
- return true;
+ zoneCells.fillList(getRegion().getCell(), zoneMap.getSelectedCells());
+ zoneCellsChange();
+ return false;
}
};
zoneMap.addMapMouseListener(mapListener);
}
}
-protected void refreshMap(){
- zoneMap.setSelectedCells(getBean() == null ? java.util.Collections.EMPTY_LIST : getBean().getCell());
-}
protected void zoneCellsChange() {
- java.util.List<Cell> cells = new ArrayList<Cell>();
- for (Object o : zoneCells.getSelectedValues()){
- cells.add((Cell) o);
+ if (cellChanged){
+ java.util.List<Cell> cells = new ArrayList<Cell>();
+ for (Object o : zoneCells.getSelectedValues()){
+ cells.add((Cell) o);
+ }
+ getBean().setCell(cells);
}
- getBean().setCell(cells);
- refreshMap();
}
]]>
</script>
@@ -194,7 +187,7 @@
javaBean='new fr.ifremer.isisfish.map.OpenMapToolPanel()'
constraints='BorderLayout.NORTH'/>
<fr.ifremer.isisfish.map.IsisMapBean id='zoneMap'
- javaBean='new fr.ifremer.isisfish.map.IsisMapBean()'
+ selectedCells='{getBean().getCell()}'
constraints='BorderLayout.CENTER'/>
</JPanel>
</JSplitPane>
1
0
r1792 - isis-fish/trunk/src/main/java/fr/ifremer/isisfish/datastore
by chatellier@users.labs.libre-entreprise.org 04 Feb '09
by chatellier@users.labs.libre-entreprise.org 04 Feb '09
04 Feb '09
Author: chatellier
Date: 2009-02-04 16:45:44 +0000 (Wed, 04 Feb 2009)
New Revision: 1792
Modified:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/datastore/VersionStorage.java
Log:
Fix la construction des zip vide dans le cas de storage pas dans le home d'Isis
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/datastore/VersionStorage.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/datastore/VersionStorage.java 2009-02-04 15:42:57 UTC (rev 1791)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/datastore/VersionStorage.java 2009-02-04 16:45:44 UTC (rev 1792)
@@ -31,24 +31,23 @@
package fr.ifremer.isisfish.datastore;
-import fr.ifremer.isisfish.IsisConfig;
-import fr.ifremer.isisfish.IsisFish;
-import fr.ifremer.isisfish.vcs.VCS;
-import fr.ifremer.isisfish.vcs.VCSException;
-
import static org.codelutin.i18n.I18n._;
-import org.codelutin.util.FileUtil;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import java.io.File;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.util.FileUtil;
import org.codelutin.util.VersionNumber;
+import fr.ifremer.isisfish.IsisConfig;
+import fr.ifremer.isisfish.IsisFish;
+import fr.ifremer.isisfish.vcs.VCS;
+import fr.ifremer.isisfish.vcs.VCSException;
+
/**
* Classe permettant de géré l'interaction avec le cvs
*
@@ -120,7 +119,22 @@
* @return <code>true</code> si le fichier est versionné
*/
protected boolean isVersionnableAbleFile(File file) {
- return getVCS().isVersionnableAbleFile(file);
+
+ // Dans le cas ou on essaye de savoir si file
+ // est versionnable dans le storage courant
+ // mais le VCS est toujours celui d'ISIs en static,
+ // si le storage est alleur que ce VCS
+ // cela ne fonctionne pas.
+
+ // FIXME il ne faurdrait pas que le VCS soit
+ // statique , mais contextuel au this.file
+ // du storage
+
+ boolean result = true;
+ if(getVCS().getLocalRepository().equals(this.file)) {
+ result = getVCS().isVersionnableAbleFile(file);
+ }
+ return result;
}
/**
1
0
r1791 - isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator
by sletellier@users.labs.libre-entreprise.org 04 Feb '09
by sletellier@users.labs.libre-entreprise.org 04 Feb '09
04 Feb '09
Author: sletellier
Date: 2009-02-04 15:42:57 +0000 (Wed, 04 Feb 2009)
New Revision: 1791
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/SimulAction.java
Log:
Debug multi plan d'analyse
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-02-04 15:41:44 UTC (rev 1790)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SensUI.jaxx 2009-02-04 15:42:57 UTC (rev 1791)
@@ -39,21 +39,28 @@
import fr.ifremer.isisfish.ui.widget.editor.ParameterColumnEditor;
import javax.swing.table.TableColumn;
import fr.ifremer.isisfish.ui.widget.editor.GenericCell;
+ import fr.ifremer.isisfish.simulator.AnalysePlan;
+ import jaxx.runtime.swing.Item;
public SensUI (SimulAction action){
setContextValue(action);
}
public void refresh(){
- listSimulParamsAnalysePlansList.setModel(new DefaultComboBoxModel(getContextValue(SimulAction.class).getParamAnalysePlans().toArray()));
+ java.util.List<Item> items = new ArrayList<Item>();
+ for (AnalysePlan ap : getContextValue(SimulAction.class).getParamAnalysePlans()){
+ items.add(new Item(ap.toString(), fr.ifremer.isisfish.datastore.AnalysePlanStorage.getName(ap), ap, false));
+ }
+ listSimulParamsAnalysePlansList.setItems(items);
setSimulParamsAnalysePlans();
}
public void addAnalysePlan(){
getContextValue(SimulAction.class).addAnalysePlan(fieldSimulParamsAnalysePlansSelect.getSelectedItem().toString());
+ setAnalysePlanButton();
refresh();
}
public void removeAnalysePlan(){
- getContextValue(SimulAction.class).removeAnalysePlan(fieldSimulParamsAnalysePlansSelect.getSelectedItem().toString());
+ getContextValue(SimulAction.class).removeAnalysePlan((AnalysePlan)listSimulParamsAnalysePlansList.getSelectedValue());
refresh();
}
public void clearAnalysePlan(){
@@ -75,7 +82,7 @@
}
protected void setSimulParamsAnalysePlans(){
if (listSimulParamsAnalysePlansList.getSelectedIndex() != -1){
- Map<String, Class> values = getContextValue(SimulAction.class).getAnalysePlanParameterName(listSimulParamsAnalysePlansList.getSelectedValue().toString());
+ Map<String, Class> values = getContextValue(SimulAction.class).getAnalysePlanParameterName((AnalysePlan)listSimulParamsAnalysePlansList.getSelectedValue());
int row = 0;
if (values != null){
DefaultTableModel model = new DefaultTableModel(){
@@ -92,7 +99,7 @@
java.util.List<Object> propertyList = new ArrayList<Object>();
for (Iterator<String> it = values.keySet().iterator(); it.hasNext();) {
String name = it.next();
- Object properties = getContextValue(SimulAction.class).getAnalysePlanParameterValue(name, listSimulParamsAnalysePlansList.getSelectedValue().toString());
+ Object properties = getContextValue(SimulAction.class).getAnalysePlanParameterValue(name, (AnalysePlan)listSimulParamsAnalysePlansList.getSelectedValue());
GenericCell value = new GenericCell(name, values.get(name), null);
valuesList.add(value);
propertyList.add(properties);
@@ -110,7 +117,7 @@
int row = e.getFirstRow();
TableModel model = (TableModel)e.getSource();
GenericCell data = (GenericCell) model.getValueAt(row, 0);
- getContextValue(SimulAction.class).setAnalysePlanParameterValue(data.getName(), listSimulParamsAnalysePlansList.getSelectedValue().toString(), model.getValueAt(row, 1));
+ getContextValue(SimulAction.class).setAnalysePlanParameterValue(data.getName(), (AnalysePlan)listSimulParamsAnalysePlansList.getSelectedValue(), model.getValueAt(row, 1));
}
});
}
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-02-04 15:41:44 UTC (rev 1790)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulAction.java 2009-02-04 15:42:57 UTC (rev 1791)
@@ -97,7 +97,6 @@
protected RuleStorage ruleStorage = null;
protected List<String> analysePlan = null;
protected Map<Rule, String> rules = new HashMap<Rule, String>();
- protected Map<AnalysePlan, String> analysePlans = new HashMap<AnalysePlan, String>();
static private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd-HH-mm");
protected List<String> oldSimulNames = null;
protected String simulName = null;
@@ -545,55 +544,36 @@
public List<String> getAnalysePlanNames(){
return analysePlan;
}
- public List<String> getParamAnalysePlans(){
- List<String> result = new LinkedList<String>();
- for (AnalysePlan a : param.getAnalysePlans()){
- result.add(analysePlans.get(a));
- }
- return result;
+ public List<AnalysePlan> getParamAnalysePlans(){
+ return param.getAnalysePlans();
}
public void addAnalysePlan(String name){
try {
AnalysePlan ap = AnalysePlanStorage.getAnalysePlan(name).getNewAnalysePlanInstance();
- analysePlans.put(ap, name);
getSimulationParameter().addAnalysePlan(ap);
} catch (IsisFishException ex) {
Logger.getLogger(SimulAction.class.getName()).log(Level.SEVERE, null, ex);
showMsgBox(ex);
}
}
- public void removeAnalysePlan(String name){
- AnalysePlan ap = getAnalysePlan(name);
- analysePlans.remove(ap);
+ public void removeAnalysePlan(AnalysePlan ap){
getSimulationParameter().removeAnalysePlan(ap);
}
public void clearAnalysePlan(){
getSimulationParameter().clearPlans();
}
- public AnalysePlan getAnalysePlan(String name){
- AnalysePlan r = null;
- for (Map.Entry<AnalysePlan, String> entry : analysePlans.entrySet()) {
- if (entry.getValue().equals(name)) {
- r = entry.getKey();
- }
- }
- return r;
- }
- public Map<String, Class> getAnalysePlanParameterName(String analysePlanName) {
+ public Map<String, Class> getAnalysePlanParameterName(AnalysePlan ap) {
Map<String, Class> result = null;
- if (analysePlanName != null) {
- AnalysePlan a = getAnalysePlan(analysePlanName);
- if (a != null){
- result = AnalysePlanStorage.getParameterNames(a);
- }
+ if (ap != null) {
+ result = AnalysePlanStorage.getParameterNames(ap);
}
return result;
}
- public Object getAnalysePlanParameterValue(String paramName, String analysePlanName){
+ public Object getAnalysePlanParameterValue(String paramName, AnalysePlan ap){
Object result = null;
- if (analysePlanName != null) {
+ if (ap != null) {
try {
- result = AnalysePlanStorage.getParameterValue(getAnalysePlan(analysePlanName), paramName);
+ result = AnalysePlanStorage.getParameterValue(ap, paramName);
} catch (IsisFishException ex) {
Logger.getLogger(SimulAction.class.getName()).log(Level.SEVERE, null, ex);
showMsgBox(ex);
@@ -601,15 +581,16 @@
}
return result;
}
- public void setAnalysePlanParameterValue(String paramName, String analysePlanName, Object o){
- if (analysePlanName != null) {
- try {
- AnalysePlanStorage.setParameterValue(getAnalysePlan(analysePlanName), paramName, o);
- } catch (IsisFishException ex) {
- Logger.getLogger(SimulAction.class.getName()).log(Level.SEVERE, null, ex);
- showMsgBox(ex);
- }
+ public void setAnalysePlanParameterValue(String paramName, AnalysePlan ap, Object value){
+ if (log.isDebugEnabled()){
+ log.debug("paramName : " + paramName + " analysePlanName : " + ap + " value : " + value);
}
+ try {
+ AnalysePlanStorage.setParameterValue(ap, paramName, value);
+ } catch (IsisFishException ex) {
+ Logger.getLogger(SimulAction.class.getName()).log(Level.SEVERE, null, ex);
+ showMsgBox(ex);
+ }
}
/*
1
0
r1790 - isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script
by sletellier@users.labs.libre-entreprise.org 04 Feb '09
by sletellier@users.labs.libre-entreprise.org 04 Feb '09
04 Feb '09
Author: sletellier
Date: 2009-02-04 15:41:44 +0000 (Wed, 04 Feb 2009)
New Revision: 1790
Modified:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/ScriptUI.jaxx
Log:
Debug gestion de l'arbre script
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-02-04 15:41:06 UTC (rev 1789)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/ScriptUI.jaxx 2009-02-04 15:41:44 UTC (rev 1790)
@@ -246,6 +246,7 @@
protected void deleteScript(boolean b){
int resp = JOptionPane.showConfirmDialog(this,_("isisfish.message.confirm.remove.script" ,
getContextValue(ScriptAction.class).getCode().getName()), null, JOptionPane.YES_NO_OPTION);
+ setTreeModel();
setInfoText(getContextValue(ScriptAction.class).deleteScript(resp,b));
}
protected void diffScript(){
1
0
r1789 - isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input
by sletellier@users.labs.libre-entreprise.org 04 Feb '09
by sletellier@users.labs.libre-entreprise.org 04 Feb '09
04 Feb '09
Author: sletellier
Date: 2009-02-04 15:41:06 +0000 (Wed, 04 Feb 2009)
New Revision: 1789
Modified:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputAction.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputSaveVerifier.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/NoneUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PortUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/VesselTypeUI.jaxx
Log:
Utilisation d'un de saisie par d?\195?\169fault
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputAction.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputAction.java 2009-02-04 15:39:12 UTC (rev 1788)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputAction.java 2009-02-04 15:41:06 UTC (rev 1789)
@@ -321,7 +321,7 @@
*
* @param name name of region
*/
- public void loadRegion(InputUI ui, String name) {
+ public FisheryRegion loadRegion(InputUI ui, String name) {
if (log.isTraceEnabled()) {
log.trace("loadRegion called");
}
@@ -335,16 +335,18 @@
fisheryRegion = RegionStorage.getFisheryRegion(isisContext);
ui.setContextValue(regionStorage);
ui.setContextValue(isisContext);
- ui.setContextValue(fisheryRegion);
+ return fisheryRegion;
// FIXME session shoul be closed
// but make lazy init later
//isisContext.rollbackTransaction();
//isisContext.closeContext();
}
+ return null;
} catch (Exception eee) {
log.error("Can't load region", eee);
showMsgBox(eee);
}
+ return null;
}
/**
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputSaveVerifier.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputSaveVerifier.java 2009-02-04 15:39:12 UTC (rev 1788)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputSaveVerifier.java 2009-02-04 15:41:06 UTC (rev 1789)
@@ -294,6 +294,9 @@
currentEntity.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
+ if (log.isDebugEnabled()){
+ log.debug("PropetyChanged : " + evt.getPropertyName() + " New Value : " + evt.getNewValue());
+ }
topiaChanged();
}
});
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputUI.jaxx 2009-02-04 15:39:12 UTC (rev 1788)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputUI.jaxx 2009-02-04 15:41:06 UTC (rev 1789)
@@ -36,6 +36,10 @@
<jaxx.runtime.swing.CardLayout2 id='cardlayout'/>
+ <java.awt.CardLayout id='cardlayoutPrincipal'/>
+
+ <fr.ifremer.isisfish.entities.FisheryRegionImpl id='region' javaBean='null'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.ui.Common;
import fr.ifremer.isisfish.ui.WelcomeSaveVerifier;
@@ -68,6 +72,7 @@
import jaxx.runtime.swing.navigation.NavigationTreeModelBuilder;
import jaxx.runtime.swing.navigation.NavigationUtil;
import fr.ifremer.isisfish.entities.FisheryRegion;
+import fr.ifremer.isisfish.entities.FisheryRegionImpl;
import jaxx.runtime.swing.navigation.NavigationTreeCellRenderer;
import jaxx.runtime.swing.navigation.NavigationTreeModel;
import jaxx.runtime.Decorator;
@@ -77,9 +82,7 @@
import fr.ifremer.isisfish.datastore.RegionStorage;
getContextValue(WelcomeSaveVerifier.class).addSaveVerifier(getVerifier());
-protected FisheryRegion getRegion(){
- return getContextValue(FisheryRegion.class);
-}
+
protected InputAction getAction(){
return getContextValue(InputAction.class);
}
@@ -108,7 +111,14 @@
});
}
protected void loadRegion(String name){
- getAction().loadRegion(this, name);
+ setRegion((FisheryRegionImpl)getAction().loadRegion(this, name));
+ if (getRegion() == null){
+ regionNull();
+ }
+ else{
+ setTreeModel();
+ getCardlayoutPrincipal().show(inputPanePrincipal,"normale");
+ }
}
protected void setTreeModel(){
if (getRegion() != null){
@@ -148,8 +158,14 @@
setFieldCurrentRegionModel();
fieldCurrentRegion.setSelectedItem(name);
JButtonNewRegion.setEnabled(false);
+ fieldNewRegion.setText("");
setInfoText(_("isisfish.message.creation.finished"));
}
+protected void regionNull(){
+ getCardlayoutPrincipal().show(inputPanePrincipal,"none");
+ DefaultTreeModel model = new DefaultTreeModel(null);
+ navigation.setModel(model);
+}
protected void newChanged(){
JButtonNewRegion.setEnabled(true);
}
@@ -183,8 +199,9 @@
}
protected void removeRegion(){
setInfoText(_("isisfish.message.removing.region" + getRegionStorage().getName()));
+ setInfoText(getContextValue(InputAction.class).removeRegion(getRegionStorage(), false));
setFieldCurrentRegionModel();
- setInfoText(getContextValue(InputAction.class).removeRegion(getRegionStorage(), false));
+ regionNull();
}
protected void commitRegionInCVS(){
setInfoText(_("isisfish.message.commiting.region" + getRegionStorage().getName()));
@@ -237,6 +254,9 @@
</JScrollPane>
</JPanel>
</JPanel>
- <JPanel id="inputPane" layout='{cardlayout}'/>
+ <JPanel id='inputPanePrincipal' layout='{getCardlayoutPrincipal()}'>
+ <NoneUI id='noneUI' constraints='{"none"}'/>
+ <JPanel id="inputPane" layout='{getCardlayout()}' constraints='{"normale"}'/>
+ </JPanel>
</JSplitPane>
</JPanel>
\ No newline at end of file
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/NoneUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/NoneUI.jaxx 2009-02-04 15:39:12 UTC (rev 1788)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/NoneUI.jaxx 2009-02-04 15:41:06 UTC (rev 1789)
@@ -1,3 +1,3 @@
<JPanel layout='{new BorderLayout()}'>
- <JLabel id='none' horizontalAlignment="0" text="isisfish.input.selectNodeTree" constraints='BorderLayout.CENTER'/>
+ <JLabel id='none' horizontalAlignment="0" text="isisfish.input.selectRegion" constraints='BorderLayout.CENTER'/>
</JPanel>
\ No newline at end of file
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PortUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PortUI.jaxx 2009-02-04 15:39:12 UTC (rev 1788)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PortUI.jaxx 2009-02-04 15:41:06 UTC (rev 1789)
@@ -58,6 +58,14 @@
protected OMToolSet toolSet = new OMToolSet();
protected OpenMapEvents mapListener = null;
+boolean portChanged = true;
+
+portMap.setFisheryRegion(getRegion());
+portMap.setSelectionMode(CellSelectionLayer.SINGLE_SELECTION);
+portMap.setActiveMouseMode(new SelectMouseMode());
+toolSet.setupListeners(portMap);
+toolMap.add((Component)toolSet);
+setMapListener();
setButtonTitle(_("isisfish.input.continueSpecies"));
setNextPath("$root/$species");
addPropertyChangeListener("bean", new PropertyChangeListener() {
@@ -81,24 +89,16 @@
getVerifier().setDeleteButton(remove);
Port port = getVerifier().getEntity(Port.class);
setBean((PortImpl) port);
- portMap.setFisheryRegion(getRegion());
- if(mapListener == null){
- portMap.setSelectionMode(CellSelectionLayer.SINGLE_SELECTION);
- portMap.setActiveMouseMode(new SelectMouseMode());
- toolSet.setupListeners(portMap);
- toolMap.add((Component)toolSet);
- setMapListener();
- }
+ fillList();
+}
+protected void fillList(){
if (getBean() != null){
+ portChanged = false;
portCell.fillList(getRegion().getCell(), getBean().getCell());
+ portCell.setSelectedValue(getBean().getCell());
+ portChanged = true;
}
- refreshMap();
}
-protected void refreshMap(){
- java.util.List<Cell> cells = new ArrayList<Cell>();
- cells.add((Cell)portCell.getSelectedValue());
- portMap.setSelectedCells(cells);
-}
protected void setMapListener(){
if (mapListener == null){
mapListener = new OpenMapEvents(portMap, new SelectMouseMode(false), CellSelectionLayer.SINGLE_SELECTION) {
@@ -110,12 +110,16 @@
getBean().setCell(c);
}
}
- refresh();
return true;
}
};
}
}
+protected void portChanged(){
+ if (portChanged){
+ getBean().setCell((Cell)portCell.getSelectedValue());
+ }
+}
]]>
</script>
<Table id='body'>
@@ -143,7 +147,7 @@
<row>
<cell columns='2' fill='both' weighty='0.7' weightx='1.0'>
<JScrollPane>
- <JList id="portCell" selectionMode="0" onMouseClicked='getBean().setCell((Cell)portCell.getSelectedValue());refreshMap();' enabled='{isActif()}'/>
+ <JList id="portCell" selectedValue='{getBean().getCell()}' selectionMode="0" onMouseClicked='portChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
@@ -178,7 +182,7 @@
</Table>
<JPanel id='map' layout='{new BorderLayout()}'>
<fr.ifremer.isisfish.map.OpenMapToolPanel id='toolMap' javaBean='new fr.ifremer.isisfish.map.OpenMapToolPanel()' constraints='BorderLayout.NORTH'/>
- <fr.ifremer.isisfish.map.IsisMapBean id='portMap' javaBean='new fr.ifremer.isisfish.map.IsisMapBean()' constraints='BorderLayout.CENTER'/>
+ <fr.ifremer.isisfish.map.IsisMapBean id='portMap' selectedCells='{getBean().getCell()}' javaBean='new fr.ifremer.isisfish.map.IsisMapBean()' constraints='BorderLayout.CENTER'/>
</JPanel>
</JSplitPane>
</cell>
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-02-04 15:39:12 UTC (rev 1788)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/VesselTypeUI.jaxx 2009-02-04 15:41:06 UTC (rev 1789)
@@ -42,6 +42,8 @@
import fr.ifremer.isisfish.entities.TripType;
import fr.ifremer.isisfish.types.TimeUnit;
+boolean tripTypeChanged = true;
+
setButtonTitle(_("isisfish.input.continueSetOfVessels"));
setNextPath("$root/$setOfVessels");
addPropertyChangeListener("bean", new PropertyChangeListener() {
@@ -73,16 +75,20 @@
VesselType vesselType = getVerifier().getEntity(VesselType.class);
setBean((VesselTypeImpl) vesselType);
if (getBean() != null){
+ tripTypeChanged = false;
vesselTypeTripType.fillList(getRegion().getTripType(), getBean().getTripType() == null ? null : getBean().getTripType());
+ tripTypeChanged = true;
}
}
protected void tripTypeChanged(){
- Object[] values = vesselTypeTripType.getSelectedValues();
- Collection<TripType> tripTypes = new LinkedList<TripType>();
- for (Object o : values){
- tripTypes.add((TripType)o);
+ if (tripTypeChanged){
+ Object[] values = vesselTypeTripType.getSelectedValues();
+ Collection<TripType> tripTypes = new LinkedList<TripType>();
+ for (Object o : values){
+ tripTypes.add((TripType)o);
+ }
+ getBean().setTripType(tripTypes);
}
- getBean().setTripType(tripTypes);
}
]]></script>
<Table id='body' constraints='BorderLayout.CENTER'>
1
0
r1788 - isis-fish/trunk/src/main/resources/i18n
by sletellier@users.labs.libre-entreprise.org 04 Feb '09
by sletellier@users.labs.libre-entreprise.org 04 Feb '09
04 Feb '09
Author: sletellier
Date: 2009-02-04 15:39:12 +0000 (Wed, 04 Feb 2009)
New Revision: 1788
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:
Debug traduction
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-02-04 14:58:44 UTC (rev 1787)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2009-02-04 15:39:12 UTC (rev 1788)
@@ -472,6 +472,7 @@
isisfish.input.menu.server=Server
isisfish.input.newRegion=New region
isisfish.input.selectNodeTree=Select node in tree
+isisfish.input.selectRegion=Select region
isisfish.input.title=Fishery input
isisfish.launch.anonymous=read only
isisfish.launch.debugMode=debug mode
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-02-04 14:58:44 UTC (rev 1787)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2009-02-04 15:39:12 UTC (rev 1788)
@@ -472,6 +472,7 @@
isisfish.input.menu.server=Serveur
isisfish.input.newRegion=Nouvelle r\u00E9gion
isisfish.input.selectNodeTree=S\u00E9lectionnez un noeud de l'arbre
+isisfish.input.selectRegion=S\u00E9lectionnez une r\u00E9gion
isisfish.input.title=Saisie de la p\u00EAcherie
isisfish.launch.anonymous=lecture seule
isisfish.launch.debugMode=debug mode
@@ -568,7 +569,7 @@
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 lar\u00E9gion %1$s ...
+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
isisfish.message.saveModel.dialog=Nom du model \u00E0 sauvegarder
1
0
r1787 - in isis-fish/trunk/src: main/java/fr/ifremer/isisfish/vcs test/java/fr/ifremer/isisfish/vcs
by chatellier@users.labs.libre-entreprise.org 04 Feb '09
by chatellier@users.labs.libre-entreprise.org 04 Feb '09
04 Feb '09
Author: chatellier
Date: 2009-02-04 14:58:44 +0000 (Wed, 04 Feb 2009)
New Revision: 1787
Modified:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSSVN.java
isis-fish/trunk/src/test/java/fr/ifremer/isisfish/vcs/VCSSVNTest.java
Log:
MOdification de certains parametres, pour pesser les lock...
Ajout de tests.
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-02-04 10:31:59 UTC (rev 1786)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSSVN.java 2009-02-04 14:58:44 UTC (rev 1787)
@@ -962,7 +962,7 @@
long newRevision = updateClient.doUpdate(localFile, // File file
SVNRevision.HEAD, // SVNRevision revision
recurse ? SVNDepth.INFINITY : SVNDepth.FILES, // SVNDepth depth
- false, // boolean allowUnversionedObstructions
+ true, // boolean allowUnversionedObstructions
false); // boolean depthIsSticky
if (log.isInfoEnabled()) {
@@ -1097,7 +1097,7 @@
//getSVNManager().getUpdateClient().doSwitch(
// localRoot, newUrl, SVNRevision.HEAD, true);
- // svnkit 1.3 code
+ // svnkit 1.2 code
SVNUpdateClient updateClient = getSVNManager()
.getUpdateClient();
long newRevision = updateClient.doSwitch(localRoot, // File path
@@ -1105,9 +1105,13 @@
SVNRevision.HEAD, // SVNRevision pegRevision
SVNRevision.HEAD, // SVNRevision revision
SVNDepth.INFINITY, // SVNDepth depth
- false, // boolean allowUnversionedObstructions
- true);// boolean depthIsSticky
+ true, // boolean allowUnversionedObstructions
+ false);// boolean depthIsSticky
+ // chatellier: allowUnversionedObstructions must be true
+ // if there is unversionned file or folder in repo, update will fail
+ // with org.tmatesoft.svn.core.SVNException: svn: Unable to lock 'xxx'
+
if (log.isInfoEnabled()) {
log.info(_("isisfish.vcs.vcssvn.global.torevision", newRevision));
}
Modified: isis-fish/trunk/src/test/java/fr/ifremer/isisfish/vcs/VCSSVNTest.java
===================================================================
--- isis-fish/trunk/src/test/java/fr/ifremer/isisfish/vcs/VCSSVNTest.java 2009-02-04 10:31:59 UTC (rev 1786)
+++ isis-fish/trunk/src/test/java/fr/ifremer/isisfish/vcs/VCSSVNTest.java 2009-02-04 14:58:44 UTC (rev 1787)
@@ -35,6 +35,7 @@
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
+import org.tmatesoft.svn.core.SVNCommitInfo;
import org.tmatesoft.svn.core.SVNDepth;
import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.SVNURL;
@@ -43,8 +44,11 @@
import org.tmatesoft.svn.core.wc.SVNCopySource;
import org.tmatesoft.svn.core.wc.SVNRevision;
import org.tmatesoft.svn.core.wc.SVNStatus;
+import org.tmatesoft.svn.core.wc.SVNUpdateClient;
import org.tmatesoft.svn.core.wc.SVNWCClient;
+import fr.ifremer.isisfish.IsisFish;
+
/**
* Class de test VCS.
*
@@ -60,35 +64,38 @@
/** Class logger */
private static Log log = LogFactory.getLog(VCSSVNTest.class);
-
+
public static final String TMPDIR = System.getProperty("java.io.tmpdir");
-
+
public static final String FILECONTENTTAG = "Version 3.1.0";
public static final String FILECONTENTTRUNK = "Version 3.2.0";
-
+
protected static File template;
protected static File remoteRepo;
protected static File localRepo;
protected static File localRepoTrunk;
-
+
protected VCSSVN vcs = null;
-
+
/**
* Constructor.
*/
public VCSSVNTest() {
-
+
}
-
+
/**
* Static test init.
+ * @throws Exception
*/
@BeforeClass
- public static void init() {
- template = new File(TMPDIR + "/testsvn-template");
- remoteRepo = new File(TMPDIR + "/testsvn-repo");
- localRepo = new File(TMPDIR + "/testsvn-local");
- localRepoTrunk = new File(TMPDIR + "/testsvn-localTrunk");
+ public static void init() throws Exception {
+ IsisFish.init();
+
+ template = new File(TMPDIR, "testsvn-template");
+ remoteRepo = new File(TMPDIR, "testsvn-repo");
+ localRepo = new File(TMPDIR, "testsvn-local");
+ localRepoTrunk = new File(TMPDIR, "testsvn-localTrunk");
}
/**
@@ -110,7 +117,7 @@
FileUtil.deleteRecursively(localRepoTrunk);
}
}
-
+
/**
* Init call before each test.
* @throws IOException
@@ -118,62 +125,61 @@
*/
@Before
public void setUp() throws IOException, SVNException {
-
+
// un peu de nettoyage
clean();
-
+
// creation de l'instance de notre VCS pour les tests
// on le fait au debut pour que la l'init de la lib svn soit fait
// par la classe elle meme et ainsi tester que ca marche
- vcs = new VCSSVN(
- localRepo,
- "file",
- "",
- remoteRepo.getAbsolutePath() + "/isis-fish-data",
- null,
- "", "");
-
+ vcs = new VCSSVN(localRepo, "file", "", remoteRepo.getAbsolutePath()
+ + "/isis-fish-data", null, "", "");
+
// Creation d'un repo local avec un trunk et un tag
// durant le test, on modifie version.txt pour utiliser
// fileContentTrunk et modifier le contenu. On peut alors tester
// le changement de tag en fonction du contenu du fichier
-
+
// creation d'un template de directory
- new File(template, "regions" + File.separator + "DemoRegion" + File.separator + "data").mkdirs();
- new File(template, "simulations" + File.separator + "simu1" + File.separator + "data").mkdirs();
+ new File(template, "regions" + File.separator + "DemoRegion"
+ + File.separator + "data").mkdirs();
+ new File(template, "simulations" + File.separator + "simu1"
+ + File.separator + "data").mkdirs();
new File(template, "scripts").mkdirs();
- FileUtil.writeString(new File(template, "scripts" + File.separator + "version.txt"), FILECONTENTTAG);
+ FileUtil.writeString(new File(template, "scripts" + File.separator
+ + "version.txt"), FILECONTENTTAG);
// creation du repo pour les tests
SVNRepositoryFactory.createLocalRepository(remoteRepo, false, true);
-
+
// ajout de source dans le repo
- SVNURL svnURL = SVNURL.parseURIDecoded("file://" + remoteRepo.getAbsolutePath());
+ SVNURL svnURL = SVNURL.parseURIDecoded("file://"
+ + remoteRepo.getAbsolutePath());
SVNURL svnRoot = svnURL.appendPath("isis-fish-data", false);
SVNURL svnTrunk = svnRoot.appendPath("trunk", false);
SVNURL svnTags = svnRoot.appendPath("tags", false);
-
+
SVNClientManager svnManager = SVNClientManager.newInstance();
// creation de l'arborescence
- svnManager.getCommitClient().doMkDir(new SVNURL[]{svnRoot, svnTrunk, svnTags}, "add dir");
+ svnManager.getCommitClient().doMkDir(
+ new SVNURL[] { svnRoot, svnTrunk, svnTags }, "add dir");
//svnManager.getCommitClient().doImport(template, svnTrunk, "initial import", true, true);
- svnManager.getCommitClient().doImport(template, svnTrunk, "initial import", null, true, true, SVNDepth.INFINITY);
+ svnManager.getCommitClient().doImport(template, svnTrunk,
+ "initial import", null, true, true, SVNDepth.INFINITY);
// 1.1.x svnManager.getCopyClient().doCopy(svnTrunk, SVNRevision.HEAD, svnTags.appendPath("3.1.0", false), false, true, "Create tag");
- SVNCopySource source = new SVNCopySource(SVNRevision.HEAD, SVNRevision.HEAD, svnTrunk);
-
- svnManager.getCopyClient().doCopy(
- new SVNCopySource[]{source},
- svnTags.appendPath("3.1.0", false),
- false, /*isMove*/
+ SVNCopySource source = new SVNCopySource(SVNRevision.HEAD,
+ SVNRevision.HEAD, svnTrunk);
+
+ svnManager.getCopyClient().doCopy(new SVNCopySource[] { source },
+ svnTags.appendPath("3.1.0", false), false, /*isMove*/
true, /*makeParents*/
true, /*failWhenDstExists*/
- "Create tag",
- null);
+ "Create tag", null);
}
-
+
/**
* After each test.
*/
@@ -182,57 +188,58 @@
// un peu de nettoyage
//clean();
}
-
+
/**
* Test of getSVNManager method, of class VCSSVN.
*/
@Test
public void testgetSVNManager() {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testgetSVNManager()");
}
-
+
SVNClientManager result = vcs.getSVNManager();
Assert.assertNotNull(result);
}
-
+
/**
* Test of getRemoteURL method, of class VCSSVN.
* @throws SVNException
*/
@Test
public void testgetRemoteURL() throws SVNException {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testgetRemoteURL()");
}
-
- SVNURL expResult = SVNURL.create("file", null, "", -1,
- remoteRepo.getAbsolutePath() + "/" + "isis-fish-data", true);
+
+ SVNURL expResult = SVNURL.create("file", null, "", -1, remoteRepo
+ .getAbsolutePath()
+ + "/" + "isis-fish-data", true);
SVNURL result = vcs.getRemoteURL();
Assert.assertEquals(expResult, result);
}
-
+
/**
* Test of isVersionnableAbleFile method, of class VCSSVN.
*/
@Test
public void testIsVersionnableAbleFile() {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testIsVersionnableAbleFile()");
}
-
+
// un fichier special, on refuse
File file = new File(".svn");
boolean result = vcs.isVersionnableAbleFile(file);
Assert.assertFalse(result);
-
+
// Pas dans le repository local, on refuse
file = new File("Toto.java");
result = vcs.isVersionnableAbleFile(file);
@@ -242,33 +249,33 @@
file = new File(vcs.getLocalRepository(), "Toto.java");
result = vcs.isVersionnableAbleFile(file);
Assert.assertEquals(true, result);
-
+
// match pas (svn ignore)
file = new File(vcs.getLocalRepository(), "libaudio.la");
result = vcs.isVersionnableAbleFile(file);
Assert.assertFalse(result);
-
+
// match pas (svn ignore)
file = new File(vcs.getLocalRepository(), "libaudio.lo");
result = vcs.isVersionnableAbleFile(file);
Assert.assertFalse(result);
-
+
// match (svn ignore)
file = new File(vcs.getLocalRepository(), "libaudio.lads");
result = vcs.isVersionnableAbleFile(file);
Assert.assertTrue(result);
-
+
// match pas (svn ignore)
file = new File(vcs.getLocalRepository(), "libaudio.lads~");
result = vcs.isVersionnableAbleFile(file);
Assert.assertFalse(result);
-
+
// match pas (svn ignore)
file = new File(vcs.getLocalRepository(), "commit.rev1234.rej");
result = vcs.isVersionnableAbleFile(file);
Assert.assertFalse(result);
}
-
+
/**
* Test of checkout method, of class VCSSVN.
* @throws IOException
@@ -276,133 +283,140 @@
*/
@Test
public void testAll() throws IOException, VCSException {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testIsVersionnableAbleFile()");
}
-
+
// trunk contient une copie complete de trunk, elle permet de test
// status lors que l'on fait des commits sur le trunk sur instance
- VCSSVN trunk = new VCSSVN(
- localRepoTrunk,
- "file",
- "",
- remoteRepo.getAbsolutePath() + "/" + "isis-fish-data",
- null,
- "", "");
-
+ VCSSVN trunk = new VCSSVN(localRepoTrunk, "file", "", remoteRepo
+ .getAbsolutePath()
+ + "/" + "isis-fish-data", null, "", "");
+
trunk.checkout(null, true);
// on ne checkout rien juste le .svn dans le repertoire racine
vcs.checkout(null, false);
Assert.assertTrue(vcs.getLocalRepository().exists());
Assert.assertTrue(vcs.getTag().startsWith("/trunk"));
-
+
// update scripts dir
vcs.update(new File(vcs.getLocalRepository(), "scripts"), true);
- File version = new File(vcs.getLocalRepository(), "scripts" + File.separator + "version.txt");
+ File version = new File(vcs.getLocalRepository(), "scripts"
+ + File.separator + "version.txt");
Assert.assertTrue(version.exists());
Assert.assertEquals(FILECONTENTTAG, FileUtil.readAsString(version));
-
+
// modification du fichier version.txt
FileUtil.writeString(version, FILECONTENTTRUNK);
vcs.commit(null, "modif du fichier version");
Assert.assertEquals(FILECONTENTTRUNK, FileUtil.readAsString(version));
-
+
// recuperation de DemoRegion
- File demo = new File(vcs.getLocalRepository(), "regions" + File.separator + "DemoRegion");
+ File demo = new File(vcs.getLocalRepository(), "regions"
+ + File.separator + "DemoRegion");
vcs.update(demo, true);
Assert.assertTrue(demo.exists());
-
+
// suppression de DemoRegion
vcs.delete(Arrays.asList(demo), "suppression d'une region");
Assert.assertFalse(demo.exists());
-
+
// ajout d'un fichier sur le trunk avant passage sur le tag
File fileToAdd = new File(vcs.getLocalRepository(), "newfile.txt");
String lecontent = "Le nouveau fichier";
FileUtil.writeString(fileToAdd, lecontent);
vcs.add(Arrays.asList(fileToAdd), "ajout d'un fichier");
-
+
// test switchTag
vcs.setTag(new VersionNumber(3, 1, 0));
Assert.assertTrue(vcs.getTag().startsWith("/tags/3.1.0"));
Assert.assertEquals(FILECONTENTTAG, FileUtil.readAsString(version));
Assert.assertTrue(demo.exists());
-
+
// recherche du status des fichiers
- File fileVersion = new File(trunk.getLocalRepository(), "scripts" + File.separator + "version.txt");
- File fileDeleted = new File(trunk.getLocalRepository(), "regions" + File.separator + "DemoRegion");
- Map<File, SVNStatus> map = trunk.getRemoteStatus(trunk.getLocalRepository(), true);
+ File fileVersion = new File(trunk.getLocalRepository(), "scripts"
+ + File.separator + "version.txt");
+ File fileDeleted = new File(trunk.getLocalRepository(), "regions"
+ + File.separator + "DemoRegion");
+ Map<File, SVNStatus> map = trunk.getRemoteStatus(trunk
+ .getLocalRepository(), true);
Assert.assertEquals(2, map.size()); // version.txt modifie, DemoRegion supprimee
Assert.assertTrue(map.containsKey(fileVersion));
Assert.assertTrue(map.containsKey(fileDeleted));
-
+
// modif dans repo trunk de version pour qu'il y ait un conflit
FileUtil.writeString(fileVersion, "Le nouveau content de version");
-
+
// update global du repo trunk
List<File> conflictFile = trunk.update(null, true);
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("conflictFile: " + conflictFile.toString());
}
Assert.assertEquals(1, conflictFile.size());
Assert.assertTrue(conflictFile.contains(fileVersion));
-
+
File fileAdded = new File(trunk.getLocalRepository(), "newfile.txt");
Assert.assertEquals(lecontent, FileUtil.readAsString(fileAdded));
Assert.assertFalse(fileDeleted.exists());
// recherche du status des fichiers en remote, il ne doit plus y avoir de diff
- Map<File, SVNStatus> map2 = trunk.getRemoteStatus(trunk.getLocalRepository(), true);
+ Map<File, SVNStatus> map2 = trunk.getRemoteStatus(trunk
+ .getLocalRepository(), true);
Assert.assertEquals(0, map2.size());
// il doit toujours y avoir version.txt qui est modifier localement
- Map<File, SVNStatus> map3 = trunk.getLocalStatus(trunk.getLocalRepository(), true);
+ Map<File, SVNStatus> map3 = trunk.getLocalStatus(trunk
+ .getLocalRepository(), true);
Assert.assertEquals(1, map3.size());
Assert.assertTrue(map3.containsKey(fileVersion));
-
+
// on commit le fichier version.txt pour verifier qu'en local et remote
// il n'y a plus de modif
- trunk.commit(Arrays.asList(fileVersion), "Commit fichier version, avec les conflits");
- Map<File, SVNStatus> map4 = trunk.getRemoteStatus(trunk.getLocalRepository(), true);
+ trunk.commit(Arrays.asList(fileVersion),
+ "Commit fichier version, avec les conflits");
+ Map<File, SVNStatus> map4 = trunk.getRemoteStatus(trunk
+ .getLocalRepository(), true);
Assert.assertEquals(0, map4.size());
- Map<File, SVNStatus> map5 = trunk.getLocalStatus(trunk.getLocalRepository(), true);
+ Map<File, SVNStatus> map5 = trunk.getLocalStatus(trunk
+ .getLocalRepository(), true);
Assert.assertEquals(0, map5.size());
}
-
+
/**
* Test of add method, of class VCSSVN.
* @throws VCSException
*/
@Test
public void testAdd() throws VCSException {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testAdd()");
}
-
+
List<File> files = new ArrayList<File>();
String msg = "";
// checkout a TAG
- vcs.checkout(new VersionNumber(3, 1, 0),false);
+ vcs.checkout(new VersionNumber(3, 1, 0), false);
try {
vcs.add(files, msg);
-
- Assert.fail("Une exception aurait du etre leve, car instance est" +
- " sur un tag, donc en readonly");
+
+ Assert.fail("Une exception aurait du etre leve, car instance est"
+ + " sur un tag, donc en readonly");
} catch (VCSException e) {
// l'exception est normal et fait partie du test
- if(log.isDebugEnabled()) {
- log.debug("VCSException has normally been thrown : " + e.getMessage());
+ if (log.isDebugEnabled()) {
+ log.debug("VCSException has normally been thrown : "
+ + e.getMessage());
}
}
}
-
+
/**
* Verifie la connexion et si le protocole a change, switch le repository
* pour utiliser le nouveau protocole. Si on est en mode interface (mode
@@ -412,12 +426,12 @@
*/
@Test
public void testCheckProtocol() throws VCSException {
-
+
vcs.checkout(null, false);
-
+
vcs.checkProtocol();
}
-
+
/**
* Return all changelog between local file version and remote repository
* file version.
@@ -427,40 +441,45 @@
*
*/
@Ignore
- public void testGetChanglog() throws VCSException, IOException, SVNException {
-
+ public void testGetChanglog() throws VCSException, IOException,
+ SVNException {
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testGetChanglog()");
}
-
- File firstFile = new File(vcs.getLocalRepository() + File.separator + "scripts" + File.separator + "version.txt");
- File secondFile = new File(vcs.getLocalRepository() + File.separator + "simulations" + File.separator + "simu1" + File.separator + "simulation.properties");
+
+ File firstFile = new File(vcs.getLocalRepository() + File.separator
+ + "scripts" + File.separator + "version.txt");
+ File secondFile = new File(vcs.getLocalRepository() + File.separator
+ + "simulations" + File.separator + "simu1" + File.separator
+ + "simulation.properties");
List<File> files = new ArrayList<File>();
files.add(firstFile);
files.add(secondFile);
-
+
Map<File, String> expResult = new HashMap<File, String>();
expResult.put(new File("ooo"), "eee");
-
+
// first, checkout trunk
vcs.checkout(null, true);
-
+
// now, make a modification, on LOCAL repo
FileUtil.writeString(firstFile, "version 3.2.1");
FileUtil.writeString(secondFile, "name = test1");
SVNClientManager svnManager = SVNClientManager.newInstance();
- svnManager.getWCClient().doAdd(
- secondFile, // File path
+ svnManager.getWCClient().doAdd(secondFile, // File path
true, // boolean force
false, // boolean mkdir
true, // boolean climbUnversionedParents
SVNDepth.FILES, // SVNDepth depth
false, // boolean includeIgnored
true); // boolean makeParents
- svnManager.getCommitClient().doCommit(new File[]{firstFile, secondFile}, false,
- "mise a jour de la version", null, null, false, true, SVNDepth.INFINITY);
-
+ svnManager.getCommitClient().doCommit(
+ new File[] { firstFile, secondFile }, false,
+ "mise a jour de la version", null, null, false, true,
+ SVNDepth.INFINITY);
+
Map<File, String> result = vcs.getChanglog(files);
Assert.assertEquals(expResult, result);
}
@@ -472,21 +491,22 @@
*/
@Test
public void testGetDiff() throws VCSException, IOException {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testGetDiff()");
}
-
- File firstFile = new File(vcs.getLocalRepository() + File.separator + "scripts" + File.separator + "version.txt");
-
+
+ File firstFile = new File(vcs.getLocalRepository() + File.separator
+ + "scripts" + File.separator + "version.txt");
+
vcs.checkout(null, true);
-
+
// now, make a modification, on LOCAL repo
FileUtil.writeString(firstFile, "Version 3.2.1");
String result = vcs.getDiff(firstFile);
-
+
// quelques tests sur la sortie, pas
// d'égalité parfaite
Assert.assertTrue(result.indexOf("version.txt") > 0);
@@ -501,14 +521,14 @@
*/
@Test
public void testGetFileList() throws VCSException {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testGetFileList()");
}
vcs.checkout(null, true);
-
+
File directory = null;
List<String> expResult = new ArrayList<String>(3);
expResult.add("regions");
@@ -517,7 +537,7 @@
List<String> result = vcs.getFileList(directory);
Assert.assertEquals(expResult, result);
}
-
+
/**
* Test of getFileList method, of class VCSSVN.
* @throws VCSException
@@ -525,28 +545,27 @@
*/
@Test
public void testGetFileList2() throws VCSException, SVNException {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testGetFileList2()");
}
vcs.checkout(null, true);
-
+
// add new directory
File newDir = new File(vcs.getLocalRepository() + "/testadddir");
newDir.mkdir();
-
+
SVNWCClient wcClient = vcs.getSVNManager().getWCClient();
- wcClient.doAdd(
- newDir, // File path
+ wcClient.doAdd(newDir, // File path
true, // boolean force
false, // boolean mkdir
true, // boolean climbUnversionedParents
SVNDepth.FILES, // SVNDepth depth
false, // boolean includeIgnored
true); // boolean makeParents
-
+
// previous added dir, should not appear in list
File directory = null;
List<String> expResult = new ArrayList<String>(3);
@@ -567,22 +586,23 @@
*/
@Test
public void testGetFileList3() throws VCSException, SVNException {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testGetFileList3()");
}
-
+
// checkout current trunk
vcs.checkout(null, true);
// now, make a modification, on REMOTE repo
- SVNURL svnURL = SVNURL.parseURIDecoded("file://" + remoteRepo.getAbsolutePath());
+ SVNURL svnURL = SVNURL.parseURIDecoded("file://"
+ + remoteRepo.getAbsolutePath());
SVNURL svnURLNewDir = svnURL.appendPath("isis-fish-data", false)
- .appendPath("trunk", false)
- .appendPath("test", false);
+ .appendPath("trunk", false).appendPath("test", false);
SVNClientManager svnManager = SVNClientManager.newInstance();
- svnManager.getCommitClient().doMkDir(new SVNURL[]{svnURLNewDir}, "add test dir");
+ svnManager.getCommitClient().doMkDir(new SVNURL[] { svnURLNewDir },
+ "add test dir");
// previous added dir, should appear in list
File directory = null;
@@ -594,7 +614,7 @@
List<String> result = vcs.getFileList(directory);
Assert.assertEquals(expResult, result);
}
-
+
/**
* Test of getUpdatedFile method, of class VCSSVN.
* @throws VCSException
@@ -602,32 +622,35 @@
* @throws SVNException
*/
@Test
- public void testGetUpdatedFile() throws VCSException, IOException, SVNException {
-
+ public void testGetUpdatedFile() throws VCSException, IOException,
+ SVNException {
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testGetUpdatedFile()");
}
-
+
List<File> expResult = new ArrayList<File>();
- expResult.add(new File(vcs.getLocalRepository().getAbsolutePath() + File.separator + "test"));
+ expResult.add(new File(vcs.getLocalRepository().getAbsolutePath()
+ + File.separator + "test"));
expResult.add(vcs.getLocalRepository());
-
+
// checkout current trunk
vcs.checkout(null, true);
-
+
// now, make a modification, on REMOTE repo
- SVNURL svnURL = SVNURL.parseURIDecoded("file://" + remoteRepo.getAbsolutePath());
+ SVNURL svnURL = SVNURL.parseURIDecoded("file://"
+ + remoteRepo.getAbsolutePath());
SVNURL svnURLNewDir = svnURL.appendPath("isis-fish-data", false)
- .appendPath("trunk", false)
- .appendPath("test", false);
+ .appendPath("trunk", false).appendPath("test", false);
SVNClientManager svnManager = SVNClientManager.newInstance();
- svnManager.getCommitClient().doMkDir(new SVNURL[]{svnURLNewDir}, "add test dir");
-
+ svnManager.getCommitClient().doMkDir(new SVNURL[] { svnURLNewDir },
+ "add test dir");
+
List<File> result = vcs.getUpdatedFile();
Assert.assertEquals(expResult, result);
}
-
+
/**
* Test of getUpdatedFile method, of class VCSSVN.
* @throws VCSException
@@ -635,21 +658,22 @@
* @throws SVNException
*/
@Test
- public void testGetUpdatedFileEmptyResult() throws VCSException, IOException, SVNException {
-
+ public void testGetUpdatedFileEmptyResult() throws VCSException,
+ IOException, SVNException {
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testGetUpdatedFile()");
}
List<File> expResult = new ArrayList<File>();
-
+
// checkout current trunk
vcs.checkout(null, true);
-
+
List<File> result = vcs.getUpdatedFile();
Assert.assertEquals(expResult, result);
-
+
}
/**
@@ -660,27 +684,28 @@
*/
@Test
public void testHaveUpdate() throws VCSException, SVNException {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testHaveUpdate()");
}
// checkout current trunk
vcs.checkout(null, true);
-
+
// now, make a modification, on REMOTE repo
- SVNURL svnURL = SVNURL.parseURIDecoded("file://" + remoteRepo.getAbsolutePath());
+ SVNURL svnURL = SVNURL.parseURIDecoded("file://"
+ + remoteRepo.getAbsolutePath());
SVNURL svnURLNewDir = svnURL.appendPath("isis-fish-data", false)
- .appendPath("trunk", false)
- .appendPath("test", false);
+ .appendPath("trunk", false).appendPath("test", false);
SVNClientManager svnManager = SVNClientManager.newInstance();
- svnManager.getCommitClient().doMkDir(new SVNURL[]{svnURLNewDir}, "add test dir");
-
+ svnManager.getCommitClient().doMkDir(new SVNURL[] { svnURLNewDir },
+ "add test dir");
+
boolean result = vcs.haveUpdate();
Assert.assertTrue(result);
}
-
+
/**
* Ask if there are some new or modified files on server.
*
@@ -689,15 +714,15 @@
*/
@Test
public void testHaveNoUpdate() throws VCSException, SVNException {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testHaveNoUpdate()");
}
// checkout current trunk
vcs.checkout(null, true);
-
+
boolean result = vcs.haveUpdate();
Assert.assertFalse(result);
}
@@ -707,9 +732,9 @@
*/
@Test
public void testIsConnected() {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testIsConnected()");
}
@@ -723,38 +748,39 @@
*/
@Test
public void testIsOnRemote() throws VCSException {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testIsOnRemote()");
}
vcs.checkout(null, false);
-
+
File file = null;
boolean result = vcs.isOnRemote(file);
Assert.assertTrue(result);
}
-
+
/**
* Test of isOnRemote method, of class VCSSVN.
* @throws VCSException
*/
@Test
public void testIsOnRemote2() throws VCSException {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testIsOnRemote2()");
}
vcs.checkout(null, false);
-
- File file = new File(vcs.getLocalRepository() + File.separator + "scripts" + File.separator + "version.txt");
+
+ File file = new File(vcs.getLocalRepository() + File.separator
+ + "scripts" + File.separator + "version.txt");
boolean result = vcs.isOnRemote(file);
Assert.assertTrue(result);
}
-
+
/**
* Test of isOnRemote method, of class VCSSVN.
* @throws VCSException
@@ -762,27 +788,28 @@
*/
@Test
public void testIsOnRemote3() throws VCSException, SVNException {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testIsOnRemote3()");
}
vcs.checkout(null, false);
-
+
// now, make a modification, on REMOTE repo
- SVNURL svnURL = SVNURL.parseURIDecoded("file://" + remoteRepo.getAbsolutePath());
+ SVNURL svnURL = SVNURL.parseURIDecoded("file://"
+ + remoteRepo.getAbsolutePath());
SVNURL svnURLNewDir = svnURL.appendPath("isis-fish-data", false)
- .appendPath("trunk", false)
- .appendPath("test", false);
+ .appendPath("trunk", false).appendPath("test", false);
SVNClientManager svnManager = SVNClientManager.newInstance();
- svnManager.getCommitClient().doMkDir(new SVNURL[]{svnURLNewDir}, "add test dir");
-
+ svnManager.getCommitClient().doMkDir(new SVNURL[] { svnURLNewDir },
+ "add test dir");
+
File file = new File(vcs.getLocalRepository() + File.separator + "test");
boolean result = vcs.isOnRemote(file);
Assert.assertTrue(result);
}
-
+
/**
* Test of isOnRemote method, of class VCSSVN.
* @throws VCSException
@@ -790,27 +817,29 @@
*/
@Test
public void testIsOnRemote4() throws VCSException, SVNException {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testIsOnRemote4()");
}
vcs.checkout(null, false);
-
+
// now, make a modification, on REMOTE repo
- SVNURL svnURL = SVNURL.parseURIDecoded("file://" + remoteRepo.getAbsolutePath());
+ SVNURL svnURL = SVNURL.parseURIDecoded("file://"
+ + remoteRepo.getAbsolutePath());
SVNURL svnURLNewDir = svnURL.appendPath("isis-fish-data", false)
- .appendPath("trunk", false)
- .appendPath("scripts", false);
+ .appendPath("trunk", false).appendPath("scripts", false);
SVNClientManager svnManager = SVNClientManager.newInstance();
- svnManager.getCommitClient().doDelete(new SVNURL[]{svnURLNewDir}, "del scripts dir");
-
- File file = new File(vcs.getLocalRepository() + File.separator + "scripts");
+ svnManager.getCommitClient().doDelete(new SVNURL[] { svnURLNewDir },
+ "del scripts dir");
+
+ File file = new File(vcs.getLocalRepository() + File.separator
+ + "scripts");
boolean result = vcs.isOnRemote(file);
Assert.assertFalse(result);
}
-
+
/**
* Test of isOnRemote method, of class VCSSVN.
* @throws VCSException
@@ -818,21 +847,22 @@
* @throws IOException
*/
@Test
- public void testIsOnRemote5() throws VCSException, SVNException, IOException {
-
+ public void testIsOnRemote5() throws VCSException, SVNException,
+ IOException {
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testIsOnRemote5()");
}
vcs.checkout(null, false);
-
+
// modif on local repo
- File file = new File(vcs.getLocalRepository() + File.separator + "test.txt");
+ File file = new File(vcs.getLocalRepository() + File.separator
+ + "test.txt");
FileUtil.writeString(file, "name = test1");
SVNClientManager svnManager = SVNClientManager.newInstance();
- svnManager.getWCClient().doAdd(
- file, // File path
+ svnManager.getWCClient().doAdd(file, // File path
true, // boolean force
false, // boolean mkdir
true, // boolean climbUnversionedParents
@@ -850,18 +880,18 @@
*/
@Test
public void testIsTag() throws VCSException {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testGetDiff()");
}
- VersionNumber version = new VersionNumber(3,1,0);
+ VersionNumber version = new VersionNumber(3, 1, 0);
boolean expResult = true;
boolean result = vcs.isTag(version);
Assert.assertEquals(expResult, result);
- version = new VersionNumber(3,2,0);
+ version = new VersionNumber(3, 2, 0);
expResult = false;
result = vcs.isTag(version);
Assert.assertEquals(expResult, result);
@@ -873,20 +903,20 @@
*/
@Test
public void testIsUpToDate() throws VCSException {
-
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testIsUpToDate()");
}
vcs.checkout(null, false);
-
+
File file = null;
boolean result = vcs.isUpToDate(file);
Assert.assertTrue(result);
-
+
}
-
+
/**
* Test of isUpToDate method, of class VCSSVN.
* @throws VCSException
@@ -894,22 +924,23 @@
* @throws SVNException
*/
@Test
- public void testIsUpToDate2() throws VCSException, IOException, SVNException {
-
+ public void testIsUpToDate2() throws VCSException, IOException,
+ SVNException {
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testIsUpToDate2()");
}
// chechout
vcs.checkout(null, false);
-
+
// modif on local repo
- File file = new File(vcs.getLocalRepository() + File.separator + "test.txt");
+ File file = new File(vcs.getLocalRepository() + File.separator
+ + "test.txt");
FileUtil.writeString(file, "name = test1");
SVNClientManager svnManager = SVNClientManager.newInstance();
- svnManager.getWCClient().doAdd(
- file, // File path
+ svnManager.getWCClient().doAdd(file, // File path
true, // boolean force
false, // boolean mkdir
true, // boolean climbUnversionedParents
@@ -919,9 +950,9 @@
boolean result = vcs.isUpToDate(file);
Assert.assertFalse(result);
-
+
}
-
+
/**
* Test of isUpToDate method, of class VCSSVN.
* @throws VCSException
@@ -929,27 +960,98 @@
* @throws SVNException
*/
@Test
- public void testIsUpToDate3() throws VCSException, IOException, SVNException {
-
+ public void testIsUpToDate3() throws VCSException, IOException,
+ SVNException {
+
// log
- if(log.isInfoEnabled()) {
+ if (log.isInfoEnabled()) {
log.info("testIsUpToDate3()");
}
// chechout
vcs.checkout(null, false);
-
+
// now, make a modification, on REMOTE repo
- SVNURL svnURL = SVNURL.parseURIDecoded("file://" + remoteRepo.getAbsolutePath());
+ SVNURL svnURL = SVNURL.parseURIDecoded("file://"
+ + remoteRepo.getAbsolutePath());
SVNURL svnURLNewDir = svnURL.appendPath("isis-fish-data", false)
- .appendPath("trunk", false)
- .appendPath("test", false);
+ .appendPath("trunk", false).appendPath("test", false);
SVNClientManager svnManager = SVNClientManager.newInstance();
- svnManager.getCommitClient().doMkDir(new SVNURL[]{svnURLNewDir}, "add test dir");
+ svnManager.getCommitClient().doMkDir(new SVNURL[] { svnURLNewDir },
+ "add test dir");
File file = new File(vcs.getLocalRepository() + File.separator + "test");
boolean result = vcs.isUpToDate(file);
Assert.assertFalse(result);
+
+ }
+
+ /**
+ * Test an update with a local locked file.
+ *
+ * - Checkout
+ * - commit modification
+ * - update at revision -1
+ * - lock one file
+ * - update at head
+ *
+ * @throws VCSException
+ * @throws SVNException
+ * @throws IOException
+ */
+ @Test
+ public void testUpdateWithLock() throws VCSException, SVNException,
+ IOException {
+
+ // log
+ if (log.isInfoEnabled()) {
+ log.info("testUpdateWithLock()");
+ }
+
+ // chechout
+ vcs.checkout(null, false);
+
+ // modif on remote repo
+ File file = new File(vcs.getLocalRepository(), "scripts"
+ + File.separator + "version.txt");
+ FileUtil.writeString(file, "aaaaaz");
+ SVNClientManager svnManager = SVNClientManager.newInstance();
+ SVNCommitInfo rev = svnManager.getCommitClient().doCommit(
+ new File[] { file },// File[] paths,
+ false, //boolean keepLocks,
+ "modify version", //String commitMessage,
+ null, //SVNProperties revisionProperties,
+ null,// String[] changelists,
+ false, //boolean keepChangelist,
+ false, //boolean force,
+ SVNDepth.INFINITY); //SVNDepth depth);
+
+ // display : At revision 4
+ log.debug("Commited, new revision is " + rev.getNewRevision());
+
+ // do a new checkout at revision n-1
+ SVNRevision revision = SVNRevision.create(rev.getNewRevision() - 1);
+ SVNClientManager svnManagerLocal = vcs.getSVNManager();
+ SVNUpdateClient updateClient = svnManagerLocal.getUpdateClient();
+ long newRevision = updateClient.doUpdate(vcs.getLocalRepository(), // File file
+ revision, // SVNRevision revision
+ SVNDepth.INFINITY, // SVNDepth depth
+ false, // boolean allowUnversionedObstructions
+ false); // boolean depthIsSticky
+ log.debug("Updated at revision " + newRevision);
+
+ // lock that file
+ /*File[] filesLocal = { new File(vcs.getLocalRepository(), "scripts"
+ + File.separator + "version.txt") };
+ SVNWCClient wcClient = svnManagerLocal.getWCClient();
+ wcClient.doLock(filesLocal, true, "add lock");*/
+
+ Map<File, SVNStatus> files = vcs.getRemoteStatus(null, true);
+ log.info("Will update file = " + files.keySet());
+ Assert.assertTrue("Must be one file updated", files.size() == 1);
+ // try to update...
+ List<File> filesInConflict = vcs.update(null, true);
+ Assert.assertTrue("No file should be in conflit", filesInConflict.isEmpty());
}
}
\ No newline at end of file
1
0
r1786 - isis-fish/trunk/src/main/resources/i18n
by chatellier@users.labs.libre-entreprise.org 04 Feb '09
by chatellier@users.labs.libre-entreprise.org 04 Feb '09
04 Feb '09
Author: chatellier
Date: 2009-02-04 10:31:59 +0000 (Wed, 04 Feb 2009)
New Revision: 1786
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:
Ajout des cl?\195?\169s de configuration (qsub, remote tmp dir)
Doc
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-02-04 10:31:47 UTC (rev 1785)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2009-02-04 10:31:59 UTC (rev 1786)
@@ -159,10 +159,14 @@
isisfish.config.main.regionMap.description=
isisfish.config.main.remoteCaparmor.description=
isisfish.config.main.resultExport.description=
+isisfish.config.main.simulation.ssh.addscripttoqueuecommand.description=
+isisfish.config.main.simulation.ssh.control.check.interval.description=
isisfish.config.main.simulation.ssh.datapath.description=
+isisfish.config.main.simulation.ssh.isis.home.description=
isisfish.config.main.simulation.ssh.jarpath.description=
isisfish.config.main.simulation.ssh.login.description=
isisfish.config.main.simulation.ssh.server.description=
+isisfish.config.main.simulation.ssh.tmppath.description=
isisfish.config.main.simulationServer.description=
isisfish.config.main.simulationShowOnlyError.description=
isisfish.config.main.simulationShowOnlyQueue.description=
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-02-04 10:31:47 UTC (rev 1785)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2009-02-04 10:31:59 UTC (rev 1786)
@@ -159,10 +159,14 @@
isisfish.config.main.regionMap.description=le nom du r\u00E9pertoire contenant les maps d'une r\u00E9gion
isisfish.config.main.remoteCaparmor.description=lance les simulations sur un serveur distant
isisfish.config.main.resultExport.description=TODO
+isisfish.config.main.simulation.ssh.addscripttoqueuecommand.description=
+isisfish.config.main.simulation.ssh.control.check.interval.description=
isisfish.config.main.simulation.ssh.datapath.description=
+isisfish.config.main.simulation.ssh.isis.home.description=
isisfish.config.main.simulation.ssh.jarpath.description=
isisfish.config.main.simulation.ssh.login.description=
isisfish.config.main.simulation.ssh.server.description=
+isisfish.config.main.simulation.ssh.tmppath.description=
isisfish.config.main.simulationServer.description=l'url du serveur de simulations distant
isisfish.config.main.simulationShowOnlyError.description=pour indiquer si l'on doit conserver dans l'UI des simulations termin\u00E9es uniquement celles avec erreur
isisfish.config.main.simulationShowOnlyQueue.description=pour indiquer si l'on doit conserver dans l'UI des simulations termin\u00E9es uniquement celles effectu\u00E9es localement
1
0