|
From: <de...@us...> - 2011-03-18 10:13:15
|
Revision: 6167
http://fudaa.svn.sourceforge.net/fudaa/?rev=6167&view=rev
Author: deniger
Date: 2011-03-18 10:13:07 +0000 (Fri, 18 Mar 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/io/common/CrueDataImpl.java
trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/metier/emh/EMH.java
trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/metier/emh/EMHScenario.java
trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/projet/ScenarioLoaderCrue10.java
trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/comparaison/TestRequete.java
trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationTemplate.java
trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationV1_1_0.java
trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationV1_1_1.java
trunk/soft/fudaa-crue/crue-server/src/test/resources/integration/v1.1.1.zip
trunk/soft/fudaa-crue/crue-ui/src/main/java/org/fudaa/fudaa/crue/builder/CrueTreeProject.java
trunk/soft/fudaa-crue/crue-ui/src/main/java/org/fudaa/fudaa/crue/common/CrueEditorImplementation.java
trunk/soft/fudaa-crue/crue-ui/src/main/java/org/fudaa/fudaa/crue/common/CruePreferencesPanel.java
trunk/soft/fudaa-crue/crue-ui/src/main/java/org/fudaa/fudaa/crue/explorer/CrueLauncher.java
trunk/soft/fudaa-crue/crue-ui/src/main/resources/org/fudaa/fudaa/crue/common/ihmMessages.properties
Modified: trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/io/common/CrueDataImpl.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/io/common/CrueDataImpl.java 2011-03-15 23:58:30 UTC (rev 6166)
+++ trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/io/common/CrueDataImpl.java 2011-03-18 10:13:07 UTC (rev 6167)
@@ -136,7 +136,7 @@
}
public CrueDataImpl(final EMHNoeudFactory nodeFactory, final CrueProperties cruePropperties,final CrueOptions crueOptions) {
- scenarioData = new EMHScenario(cruePropperties);
+ scenarioData = new EMHScenario(cruePropperties,crueOptions);
scenarioData.getLoiConteneur();
this.crueProperties = cruePropperties;
ssModele = new EMHSousModele(cruePropperties,crueOptions);
Modified: trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/metier/emh/EMH.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/metier/emh/EMH.java 2011-03-15 23:58:30 UTC (rev 6166)
+++ trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/metier/emh/EMH.java 2011-03-18 10:13:07 UTC (rev 6167)
@@ -231,6 +231,7 @@
}
}
+ @SuppressWarnings("unchecked")
protected void sortRelationEMH(CrueOptions options) {
if (relationEMH != null) {
Map<RelationEMH, Integer> positionForEMHNotSorted = new HashMap<RelationEMH, Integer>();
Modified: trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/metier/emh/EMHScenario.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/metier/emh/EMHScenario.java 2011-03-15 23:58:30 UTC (rev 6166)
+++ trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/metier/emh/EMHScenario.java 2011-03-18 10:13:07 UTC (rev 6167)
@@ -8,6 +8,7 @@
import java.util.List;
import org.apache.commons.collections.CollectionUtils;
+import org.fudaa.dodico.crue.config.CrueOptions;
import org.fudaa.dodico.crue.config.CrueProperties;
import org.fudaa.dodico.crue.io.neuf.FCBSequentialReader.ResultatCalculPasDeTemps;
import org.fudaa.dodico.crue.metier.helper.EMHHelper;
@@ -16,9 +17,11 @@
public class EMHScenario extends EMHConteneurDeSousModele {
// il faudra les enlever
private ResPrtReseau rptg;
+ private final CrueOptions crueOptions;
- public EMHScenario(CrueProperties defContainer) {
+ public EMHScenario(CrueProperties defContainer,final CrueOptions crueOptions) {
super(defContainer);
+ this.crueOptions=crueOptions;
}
@Override
@@ -131,4 +134,11 @@
return (DonCLimMScenario) EMHHelper.selectInfoEMH(this, EnumInfosEMH.DON_CLIM_SCENARIO);
}
+ /**
+ * @return the crueOptions
+ */
+ public CrueOptions getCrueOptions() {
+ return crueOptions;
+ }
+
}
\ No newline at end of file
Modified: trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/projet/ScenarioLoaderCrue10.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/projet/ScenarioLoaderCrue10.java 2011-03-15 23:58:30 UTC (rev 6166)
+++ trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/projet/ScenarioLoaderCrue10.java 2011-03-18 10:13:07 UTC (rev 6167)
@@ -121,7 +121,8 @@
final List<CrueFileType> typesSsModele = ordonnanceurCrue10.getSousModele();
final List<CrueFileType> typesModele = ordonnanceurCrue10.getModele();
final List<CrueFileType> typesScenario = ordonnanceurCrue10.getScenario();
- final EMHScenario emhScenario = new EMHScenario(propDefinition);
+ CrueOptions crueOptions=new CrueOptions();
+ final EMHScenario emhScenario = new EMHScenario(propDefinition,crueOptions);
emhScenario.setUserActive(scenario.isActive());
final EMHNoeudFactory factory = new EMHNoeudFactory();
for (final ManagerEMHModeleBase modele : scenario.getFils()) {
@@ -135,7 +136,7 @@
final EMHModeleBase emhModele = new EMHModeleBase(propDefinition);
emhModele.setNom(modele.getNom());
emhModele.setUserActive(modele.isActive());
- CrueOptions crueOptions=new CrueOptions();
+
for (final ManagerEMHSousModele managerSousModele : fils) {
final CrueData tmp = new CrueDataImpl(factory, propDefinition,crueOptions);
readFile(typesSsModele, file, managerSousModele, tmp, tmp.getSousModele());
Modified: trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/comparaison/TestRequete.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/comparaison/TestRequete.java 2011-03-15 23:58:30 UTC (rev 6166)
+++ trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/comparaison/TestRequete.java 2011-03-18 10:13:07 UTC (rev 6167)
@@ -181,7 +181,7 @@
final EMHSousModele ss = createModele();
final EMHModeleBase modele = new EMHModeleBase(null);
modele.addRelationEMH(EMHRelationFactory.createRelationContient(ss));
- final EMHScenario res = new EMHScenario(null);
+ final EMHScenario res = new EMHScenario(null,new CrueOptions(false));
res.addRelationEMH(EMHRelationFactory.createRelationContient(modele));
final OrdCalcScenario ord = new OrdCalcScenario();
res.addInfosEMH(ord);
Modified: trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationTemplate.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationTemplate.java 2011-03-15 23:58:30 UTC (rev 6166)
+++ trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationTemplate.java 2011-03-18 10:13:07 UTC (rev 6167)
@@ -72,8 +72,8 @@
@Override
protected void setUp() throws Exception {
if (targetDir != null) return;
- // targetDir = CtuluLibFile.createTempDir();
- targetDir = new File("/home/deniger/temp");
+ targetDir = CtuluLibFile.createTempDir();
+// targetDir = new File("/home/deniger/temp");
targetDir.mkdir();
LOGGER.debug("dest directory is {}", targetDir.getAbsolutePath());
final InputStream inStream = getClass().getResourceAsStream(zipFile);
@@ -114,7 +114,11 @@
assertFalse(fileFormatResult.log.containsErrorOrFatalError());
Crue10FileFormat<EMHProjet> fileFormat = fileFormatResult.fileFormatFound;
CtuluAnalyze log = new CtuluAnalyze();
- assertTrue(fileFormat.isValide(etuFile, log));
+ boolean valide = fileFormat.isValide(etuFile, log);
+ if(!valide){
+ log.printResume();
+ }
+ assertTrue(valide);
CrueConfigMetierLoader natureLoader = new CrueConfigMetierLoader();
CrueIOResu<CrueProperties> propertiesReadResultat = natureLoader.load();
if (propertiesReadResultat.getAnalyse().containsErrorOrFatalError()) {
Modified: trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationV1_1_0.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationV1_1_0.java 2011-03-15 23:58:30 UTC (rev 6166)
+++ trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationV1_1_0.java 2011-03-18 10:13:07 UTC (rev 6167)
@@ -300,7 +300,7 @@
"COM3", "COM5", "PCAL1", "PNUM1"));// différences
Map<String, ErrorBilanTester> bilans = createMapBilans();
bilans.put("Sc_M4-0_c9", new ErrorBilanTester(0, 0, 3, 2));
- bilans.put("Sc_M4-0_c9c9", new ErrorBilanTester(0, 0, 4, 2));
+ bilans.put("Sc_M4-0_c9c9", new ErrorBilanTester(0, 0, 3, 2));
bilans.put("Sc_M4-0_c9c10", new ErrorBilanTester(0, 0, 2, 2));
bilans.put("Sc_M4-0_v1c9", new ErrorBilanTester(0, 0, 3, 1));
bilans.put("Sc_M4-0_e1c9", new ErrorBilanTester(1, 0, 0, 0));
@@ -490,10 +490,10 @@
File etuFile = getEtuFileUpdated(etuId);
EMHProjet projet = loadEtu(etuFile);
// assertNotNull(projet);
- exportToCrue9(etuFile.getParentFile(), projet, "Sc_M7-0_c9", "Sc_M7-0_c9c9", "M7-0_c9c9", Arrays.asList("DPTG01.1","DCLM5"));
+ exportToCrue9(etuFile.getParentFile(), projet, "Sc_M7-0_c9", "Sc_M7-0_c9c9", "M7-0_c9c9", Arrays.asList("DPTG01.1"));
exportToCrue9(etuFile.getParentFile(), projet, "Sc_M7-0_c10", "Sc_M7-0_c10c9", "M7-0_c10c9", Arrays.asList("COM5",
- "DPTG01.1", "COM1", "COM3","DCLM5"));
+ "DPTG01.1", "COM1", "COM3"));
exportToCrue10(etuFile.getParentFile(), projet, "Sc_M7-0_c9", "Sc_M7-0_c9c10", "M7-0_c9c10", Arrays.asList("COM5",
"COM1", "COM3"));// différences
exportToCrue10(etuFile.getParentFile(), projet, "Sc_M7-0_c10", "Sc_M7-0_c10c10", "M7-0_c10c10", true, 0);// différences
Modified: trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationV1_1_1.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationV1_1_1.java 2011-03-15 23:58:30 UTC (rev 6166)
+++ trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationV1_1_1.java 2011-03-18 10:13:07 UTC (rev 6167)
@@ -5,16 +5,9 @@
import java.util.HashMap;
import java.util.Map;
-import org.fudaa.dodico.crue.integration.TestIntegrationTemplate.ErrorBilanTester;
import org.fudaa.dodico.crue.io.Crue10FileFormatFactory;
-import org.fudaa.dodico.crue.metier.emh.EMHScenario;
-import org.fudaa.dodico.crue.metier.emh.EnumInfosEMH;
-import org.fudaa.dodico.crue.metier.emh.ParamNumModeleBase;
-import org.fudaa.dodico.crue.metier.emh.Pdt;
-import org.fudaa.dodico.crue.metier.emh.PdtCst;
import org.fudaa.dodico.crue.metier.etude.EMHProjet;
import org.fudaa.dodico.crue.metier.etude.ManagerEMHScenario;
-import org.fudaa.dodico.crue.metier.helper.EMHHelper;
public class TestIntegrationV1_1_1 extends TestIntegrationTemplate {
@@ -81,20 +74,23 @@
bilans.put("Sc_M3-0_v9c9", new ErrorBilanTester(0, 0, 7, 0));
bilans.put("Sc_M3-0_v10c9", noMessage);
bilans.put("Sc_M3-0_v11c9", noMessage);
+ bilans.put("Sc_M3-0_v12c9", noMessage);
bilans.put("Sc_Vierge_c10", sixInfos);
bilans.put("Sc_Poub_c10", sixInfos);
bilans.put("Sc_M3-0_c9c10", noMessage);
- bilans.put("Sc_M3_c10", noMessage);
bilans.put("Sc_M3-0_c10", noMessage);
bilans.put("Sc_M3-0_c10c9", noMessage);
bilans.put("Sc_M3-0_c10c10", noMessage);
bilans.put("Sc_M3-0_v1c10", noMessage);
- bilans.put("Sc_M3-0_v2c10", new ErrorBilanTester(0, 0, 1, 0));//un warning car CaclPseudoPerm non constant en EMH,type
+ bilans.put("Sc_M3-0_v2c10", new ErrorBilanTester(0, 0, 1, 0));// un warning car CaclPseudoPerm non constant en
+ // EMH,type
bilans.put("Sc_M3-0_v3c10", noMessage);
bilans.put("Sc_M3-0_v4c10", noMessage);
bilans.put("Sc_M3-0_v5c10", noMessage);
bilans.put("Sc_M3-0_v6c10", noMessage);
bilans.put("Sc_M3-0_v7c10", new ErrorBilanTester(0, 0, 7, 0));
+ bilans.put("Sc_M3-0_v8c10", new ErrorBilanTester(0, 0, 1, 0));
+ bilans.put("Sc_M3-0_v9c10", noMessage);
bilans.put("Sc_M3-0_v10c10", noMessage);
// les scenarios avec erreurs:
bilans.put("Sc_M3_e1c9", new ErrorBilanTester(1, 0, 1, 0));
@@ -104,7 +100,7 @@
bilans.put("Sc_M3-0_e3c9", new ErrorBilanTester(0, 8, 0, 0));
bilans.put("Sc_M3-0_e1c10", new ErrorBilanTester(1, 0, 0, 0));
bilans.put("Sc_M3-0_e2c10", new ErrorBilanTester(5, 0, 0, 0));
- bilans.put("Sc_M3-0_e3c10", new ErrorBilanTester(0, 0, 1, 0));
+ bilans.put("Sc_M3-0_e3c10", new ErrorBilanTester(4, 0, 0, 0));
bilans.put("Sc_M3-0_e4c10", new ErrorBilanTester(1, 0, 0, 0));
bilans.put("Sc_M3-0_e5c10", new ErrorBilanTester(1, 0, 0, 0));
bilans.put("Sc_M3-0_e6c10", new ErrorBilanTester(1, 0, 0, 0));
@@ -112,6 +108,12 @@
bilans.put("Sc_M3-0_e8c10", new ErrorBilanTester(10, 0, 0, 0));
bilans.put("Sc_M3-0_e9c10", new ErrorBilanTester(10, 0, 0, 0));
testAllScenario(bilans, projet);
+ // on fait le test pour l'export de ce scenario car DCLM dans ordres differents:
+ // COM5, DPTG01.1, DFRT4, COM1, COM3, DLHY3 expected:<0> but was:<6>
+
+ exportToCrue9(etuFile.getParentFile(), projet, "Sc_M3-0_v9c10", "Sc_Poub_c9", "Poub_c9", Arrays.asList("COM5",
+ "DPTG01.1", "DFRT4", "COM1", "COM3", "DLHY3"));
+ exportToCrue10(etuFile.getParentFile(), projet, "Sc_M3-0_v9c10", "Sc_Poub_c10", "Poub_c10", true, 0);
// on finit par comparer les résultats.
ManagerEMHScenario runv8 = loadRun("Sc_M3-0_v8c9", projet, 0);
ManagerEMHScenario runc9 = loadRun("Sc_M3-0_c9c9", projet, 0);
@@ -250,13 +252,13 @@
assertNotNull(projet);
// scenario 3-0 pour tests:
exportToCrue9(etuFile.getParentFile(), projet, "Sc_M3-0_c9", "Sc_Poub_c9", "Poub_c9", true, 0);// différences
- exportToCrue9(etuFile.getParentFile(), projet, "Sc_M3-5_c10_2Sm", "Sc_M3-5_c10c9", "M3-5_c10c9",Arrays.asList("COM5","DPTG01.1", "DFRT4", "COM1", "COM3", "DLHY3"));
+ exportToCrue9(etuFile.getParentFile(), projet, "Sc_M3-5_c10_2Sm", "Sc_M3-5_c10c9", "M3-5_c10c9", Arrays.asList(
+ "COM5", "DPTG01.1", "DFRT4", "COM1", "COM3", "DLHY3"));
- exportToCrue10(etuFile.getParentFile(), projet, "Sc_M3-0_c10", "Sc_Poub_c10", "Poub_c10",true,0);
+ exportToCrue10(etuFile.getParentFile(), projet, "Sc_M3-0_c10", "Sc_Poub_c10", "Poub_c10", true, 0);
exportToCrue10(etuFile.getParentFile(), projet, "Sc_M3-5_c10c9", "Sc_M3-5_c9c10", "M3-5_c9c10", true, 3);
exportToCrue10(etuFile.getParentFile(), projet, "Sc_M3-5_c10_2Sm", "Sc_M3-5_c10c10", "M3-5_c10c10", Arrays
.asList("COM5"));
-
Map<String, ErrorBilanTester> bilans = createMapBilans();
ErrorBilanTester noError = new ErrorBilanTester(0, 0, 0, 0);
@@ -273,12 +275,13 @@
bilans.put("Sc_M3-5_c10c9", noError);
bilans.put("Sc_Poub_c10", noError);
bilans.put("Sc_M3-5_c10c10", noError);
- bilans.put("Sc_M3-5_c10c10_2Sm", new ErrorBilanTester(8, 0, 0, 0));//impossible pour l'instant d'export avec 2 sous-modele.
+ bilans.put("Sc_M3-5_c10c10_2Sm", new ErrorBilanTester(8, 0, 0, 0));// impossible pour l'instant d'export avec 2
+ // sous-modele.
testAllScenario(bilans, projet);
-
+
ManagerEMHScenario scenario1 = load("Sc_M3-0_c10", projet, false);
ManagerEMHScenario scenario2 = load("Sc_M3-5_c10c10", projet, false);
- assertEquals(2, compare(projet, scenario1, scenario2).size());
+ assertEquals(2, compare(projet, scenario1, scenario2).size());
super.testOnEtuDone(etuId);
}
@@ -293,14 +296,15 @@
EMHProjet projet = loadEtu(etuFile);
// assertNotNull(projet);
exportToCrue9(etuFile.getParentFile(), projet, "Sc_M4-0_c9", "Sc_M4-0_c9c9", "M4-0_c9c9", true, 0);
- exportToCrue9(etuFile.getParentFile(), projet, "Sc_M4-0_c10", "Sc_M4-0_c10c9", "M4-0_c10c9", Arrays.asList("COM5", "COM1", "COM3","PCAL1", "DLHY1", "DCLM4","PNUM1"));
+ exportToCrue9(etuFile.getParentFile(), projet, "Sc_M4-0_c10", "Sc_M4-0_c10c9", "M4-0_c10c9", Arrays.asList("COM5",
+ "COM1", "COM3", "PCAL1", "DLHY1", "DCLM4", "PNUM1"));
exportToCrue10(etuFile.getParentFile(), projet, "Sc_M4-0_c10", "Sc_M4-0_c10c10", "M4-0_c10c10", true, 0);// différences
exportToCrue10(etuFile.getParentFile(), projet, "Sc_M4-0_c10", "Sc_Poub_c10", "Poub_c10", true, 0);// différences
exportToCrue10(etuFile.getParentFile(), projet, "Sc_M4-0_c9", "Sc_M4-0_c9c10", "M4-0_c9c10", Arrays.asList("COM1",
"COM3", "COM5"));// différences
Map<String, ErrorBilanTester> bilans = createMapBilans();
bilans.put("Sc_M4-0_c9", new ErrorBilanTester(0, 0, 3, 2));
- bilans.put("Sc_M4-0_c9c9", new ErrorBilanTester(0, 0, 4, 2));
+ bilans.put("Sc_M4-0_c9c9", new ErrorBilanTester(0, 0, 3, 2));
bilans.put("Sc_M4-0_c9c10", new ErrorBilanTester(0, 0, 2, 2));
bilans.put("Sc_M4-0_v1c9", new ErrorBilanTester(0, 0, 3, 1));
bilans.put("Sc_M4-0_e1c9", new ErrorBilanTester(1, 0, 0, 0));
@@ -326,7 +330,7 @@
exportToCrue9(etuFile.getParentFile(), projet, "Sc_M4-1_c9", "Sc_M4-1_c9c9", "M4-1_c9c9", true, 0);
exportToCrue9(etuFile.getParentFile(), projet, "Sc_M4-1_c9", "Sc_Poub_c9", "Poub_c9", true, 0);
exportToCrue9(etuFile.getParentFile(), projet, "Sc_M4-1_c10", "Sc_M4-1_c10c9", "M4-1_c10c9", Arrays.asList("COM5",
- "COM1", "COM3","PCAL1", "PNUM1"));
+ "COM1", "COM3", "PCAL1", "PNUM1"));
exportToCrue10(etuFile.getParentFile(), projet, "Sc_M4-1_c10", "Sc_M4-1_c10c10", "M4-1_c10c10", true, 0);// différences
exportToCrue10(etuFile.getParentFile(), projet, "Sc_M4-1_c9", "Sc_M4-1_c9c10", "M4-1_c9c10", Arrays.asList("COM1",
"COM3", "COM5"));// différences
@@ -352,12 +356,12 @@
File etuFile = getEtuFileUpdated(etuId);
EMHProjet projet = loadEtu(etuFile);
// assertNotNull(projet);
- exportToCrue9(etuFile.getParentFile(), projet, "Sc_M5-0_c10", "Sc_M5-0_c10c9", "M5-0_c10c9", Arrays.asList("COM1",
- "COM3", "COM5","PCAL1", "PNUM1"));
+ exportToCrue9(etuFile.getParentFile(), projet, "Sc_M5-0_c10", "Sc_M5-0_c10c9", "M5-0_c10c9", Arrays.asList("COM1",
+ "COM3", "COM5", "PCAL1", "PNUM1"));
exportToCrue9(etuFile.getParentFile(), projet, "Sc_M5_c9", "Sc_M5_c9c9", "M5_c9c9", true, 0);
exportToCrue10(etuFile.getParentFile(), projet, "Sc_M5-0_c9", "Sc_M5-0_c9c10", "M5-0_c9c10", Arrays.asList("COM1",
"COM3", "COM5"));// différences
- exportToCrue10(etuFile.getParentFile(), projet, "Sc_M5-0_c10", "Sc_M5-0_c10c10", "M5-0_c10c10",true,0);// différences
+ exportToCrue10(etuFile.getParentFile(), projet, "Sc_M5-0_c10", "Sc_M5-0_c10c10", "M5-0_c10c10", true, 0);// différences
exportToCrue10(etuFile.getParentFile(), projet, "Sc_M5-0_c9", "Sc_Poub_c10", "Poub_c10", Arrays.asList("COM1",
"COM3", "COM5"));// différences
Map<String, ErrorBilanTester> bilans = createMapBilans();
@@ -410,7 +414,6 @@
super.testOnEtuDone(etuId);
}
-
/**
* Dans le cas du scenario 3-5, le scenario crue 00 contient 2 sous-modele ce qui rend les résultats de comparaisons
* hasardeux.
@@ -421,10 +424,10 @@
File etuFile = getEtuFileUpdated(etuId);
EMHProjet projet = loadEtu(etuFile);
// assertNotNull(projet);
- exportToCrue9(etuFile.getParentFile(), projet, "Sc_M7-0_c9", "Sc_M7-0_c9c9", "M7-0_c9c9", Arrays.asList("DPTG01.1","DCLM5"));
+ exportToCrue9(etuFile.getParentFile(), projet, "Sc_M7-0_c9", "Sc_M7-0_c9c9", "M7-0_c9c9", Arrays.asList("DPTG01.1"));
exportToCrue9(etuFile.getParentFile(), projet, "Sc_M7-0_c10", "Sc_M7-0_c10c9", "M7-0_c10c9", Arrays.asList("COM5",
- "DPTG01.1", "COM1", "COM3","DCLM5"));
+ "DPTG01.1", "COM1", "COM3"));
exportToCrue10(etuFile.getParentFile(), projet, "Sc_M7-0_c9", "Sc_M7-0_c9c10", "M7-0_c9c10", Arrays.asList("COM5",
"COM1", "COM3"));// différences
exportToCrue10(etuFile.getParentFile(), projet, "Sc_M7-0_c10", "Sc_M7-0_c10c10", "M7-0_c10c10", true, 0);// différences
Modified: trunk/soft/fudaa-crue/crue-server/src/test/resources/integration/v1.1.1.zip
===================================================================
(Binary files differ)
Modified: trunk/soft/fudaa-crue/crue-ui/src/main/java/org/fudaa/fudaa/crue/builder/CrueTreeProject.java
===================================================================
--- trunk/soft/fudaa-crue/crue-ui/src/main/java/org/fudaa/fudaa/crue/builder/CrueTreeProject.java 2011-03-15 23:58:30 UTC (rev 6166)
+++ trunk/soft/fudaa-crue/crue-ui/src/main/java/org/fudaa/fudaa/crue/builder/CrueTreeProject.java 2011-03-18 10:13:07 UTC (rev 6167)
@@ -18,6 +18,7 @@
import com.memoire.bu.BuIcon;
import org.apache.commons.lang.StringUtils;
+import org.fudaa.dodico.crue.config.CrueOptions;
import org.fudaa.dodico.crue.metier.emh.EMH;
import org.fudaa.dodico.crue.metier.emh.EnumTypeEMH;
import org.fudaa.dodico.crue.metier.etude.EMHInfosVersion;
@@ -30,6 +31,7 @@
import org.fudaa.dodico.crue.metier.etude.ManagerEMHSousModele;
import org.fudaa.fudaa.crue.common.FCrueResource;
import org.fudaa.fudaa.crue.common.IconFileNotExist;
+import org.fudaa.fudaa.crue.common.Messages;
import org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode;
import org.jdesktop.swingx.treetable.DefaultTreeTableModel;
import org.joda.time.format.DateTimeFormat;
@@ -269,17 +271,33 @@
super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
setToolTipText(null);
if (value instanceof TreeNodeScenario) {
+ ManagerEMHScenario emhScenario = ((TreeNodeScenario) value).getS();
if (((TreeNodeScenario) value).isCourant()) {
- setIcon(((TreeNodeScenario) value).getS().isLoaded() ? iconeScenarioCourantCharge : iconeScenarioCourant);
+ setIcon(emhScenario.isLoaded() ? iconeScenarioCourantCharge : iconeScenarioCourant);
+ if (emhScenario.isLoaded()) {
+ String string = "treeProject.scenario.loaded";
+ String nomEMH = emhScenario.getNom();
+ CrueOptions crueOptions = emhScenario.getEmh().getCrueOptions();
+ setCrueOptionsTooltipText(string, nomEMH, crueOptions);
+ } else {
+ setToolTipText(Messages.getString("treeProject.scenario", emhScenario.getNom()));
+ }
+
} else {
setIcon(iconeScenario);
+ setToolTipText(Messages.getString("treeProject.scenario", emhScenario.getNom()));
}
- setToolTipText("Scénario");
} else if (value instanceof TreeNodeRunDefault) {
- setIcon(((TreeNodeRunDefault) value).isCourant() ? (((TreeNodeRunDefault) value).isLoaded() ? iconeRunCourantCharge
- : iconeRunCourant)
- : iconeRun);
+ TreeNodeRunDefault treeNodeRunDefault = (TreeNodeRunDefault) value;
+ setIcon(treeNodeRunDefault.isCourant() ? (treeNodeRunDefault.isLoaded() ? iconeRunCourantCharge
+ : iconeRunCourant) : iconeRun);
+ if (treeNodeRunDefault.isLoaded()) {
+ setCrueOptionsTooltipText("treeProject.run.loaded", treeNodeRunDefault.getRun().getNom(), treeNodeRunDefault
+ .getScenario().getEmh().getCrueOptions());
+ } else {
+ setToolTipText(Messages.getString("treeProject.run", treeNodeRunDefault.getRun().getNom()));
+ }
} else if ((value instanceof TreeNodeModele) || (value instanceof TreeNodeModeleRun)) {
setIcon(iconeModele);
} else if (value instanceof TreeNodeSousModele) {
@@ -302,6 +320,17 @@
return this;
}
+ private void setCrueOptionsTooltipText(String string, String nomEMH, CrueOptions crueOptions) {
+ String branche = getStringForOrder(crueOptions.isBrancheOrderKept());
+ String casier = getStringForOrder(crueOptions.isCasierOrderKept());
+ String section = getStringForOrder(crueOptions.isSectionOrderKept());
+ setToolTipText(Messages.getString(string, nomEMH, branche, casier, section));
+ }
+
+ private String getStringForOrder(boolean brancheOrderKept) {
+ return Messages.getString(brancheOrderKept ? "order.initialKept" : "order.alphabeticallySorted");
+ }
+
private void updateBorder(boolean hasFocus, boolean isSelected) {
if (hasFocus) {
Border border = null;
Modified: trunk/soft/fudaa-crue/crue-ui/src/main/java/org/fudaa/fudaa/crue/common/CrueEditorImplementation.java
===================================================================
--- trunk/soft/fudaa-crue/crue-ui/src/main/java/org/fudaa/fudaa/crue/common/CrueEditorImplementation.java 2011-03-15 23:58:30 UTC (rev 6166)
+++ trunk/soft/fudaa-crue/crue-ui/src/main/java/org/fudaa/fudaa/crue/common/CrueEditorImplementation.java 2011-03-18 10:13:07 UTC (rev 6167)
@@ -7,13 +7,17 @@
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
import java.io.File;
+import java.util.ArrayList;
import java.util.List;
import javax.swing.JFrame;
+import com.memoire.bu.BuAbstractPreferencesPanel;
import com.memoire.bu.BuMenu;
import com.memoire.bu.BuMenuBar;
import com.memoire.bu.BuPreferences;
+import com.memoire.bu.BuPreferencesDialog;
+import com.memoire.bu.BuPreferencesMainPanel;
import com.memoire.bu.BuResource;
import com.memoire.bu.BuScrollPane;
import com.memoire.bu.BuTaskView;
@@ -419,8 +423,29 @@
}
+ /**
+ * Description de la methode.
+ */
+ protected void preferences() {
+
+ final BuPreferencesMainPanel pn = new BuPreferencesMainPanel();
+
+ final List r = new ArrayList();
+ buildPreferences(r);
+ final int nb = r.size();
+ for (int i = 0; i < nb; i++) {
+ pn.addTab((BuAbstractPreferencesPanel) r.get(i));
+ }
+ pn.setPreferredSize(new Dimension(850, 500));
+ final BuPreferencesDialog d = new BuPreferencesDialog(getFrame(), pn);
+ d.pack();
+ d.setLocationRelativeTo(getFrame());
+ d.setVisible(true);
+ d.dispose();
+ }
+
protected void buildPreferences(final List _frAddTab) {
-// super.buildPreferences(_frAddTab);
+ // super.buildPreferences(_frAddTab);
_frAddTab.add(new CruePreferencesPanel(this, getApplicationPreferences()));
}
Modified: trunk/soft/fudaa-crue/crue-ui/src/main/java/org/fudaa/fudaa/crue/common/CruePreferencesPanel.java
===================================================================
--- trunk/soft/fudaa-crue/crue-ui/src/main/java/org/fudaa/fudaa/crue/common/CruePreferencesPanel.java 2011-03-15 23:58:30 UTC (rev 6166)
+++ trunk/soft/fudaa-crue/crue-ui/src/main/java/org/fudaa/fudaa/crue/common/CruePreferencesPanel.java 2011-03-18 10:13:07 UTC (rev 6167)
@@ -54,14 +54,13 @@
*/
public CruePreferencesPanel(final BuCommonImplementation _app, final BuPreferences _options) {
super();
- setPreferredSize(new Dimension(550,500));
setLayout(new BuVerticalLayout(5, true, false));
setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
app_ = _app;
options_ = _options;
// astuces
- List<String> ids = Arrays.asList(CrueOptions.KEEP_INITIAL_ORDER_BRANCHE, CrueOptions.KEEP_INITIAL_ORDER_SECTION,
- CrueOptions.KEEP_INITIAL_ORDER_CASIER);
+ List<String> ids = Arrays.asList(CrueOptions.KEEP_INITIAL_ORDER_BRANCHE, CrueOptions.KEEP_INITIAL_ORDER_CASIER,
+ CrueOptions.KEEP_INITIAL_ORDER_SECTION);
cbKeepInitalOrder = new ArrayList<BuCheckBox>();
ActionListener actionListener = new ActionListener() {
Modified: trunk/soft/fudaa-crue/crue-ui/src/main/java/org/fudaa/fudaa/crue/explorer/CrueLauncher.java
===================================================================
--- trunk/soft/fudaa-crue/crue-ui/src/main/java/org/fudaa/fudaa/crue/explorer/CrueLauncher.java 2011-03-15 23:58:30 UTC (rev 6166)
+++ trunk/soft/fudaa-crue/crue-ui/src/main/java/org/fudaa/fudaa/crue/explorer/CrueLauncher.java 2011-03-18 10:13:07 UTC (rev 6167)
@@ -69,8 +69,8 @@
infoCrue_.banner = new BuIcon(pathLogo);
// infoCrue_.logo = new BuIcon(pathLogo);
infoCrue_.name = "Fudaa-Crue";
- infoCrue_.version = "0.44";
- infoCrue_.date = "16-Mars-2011";
+ infoCrue_.version = "0.45";
+ infoCrue_.date = "18-Mars-2011";
infoCrue_.rights = "";
infoCrue_.contact = "fu...@ge...";
infoCrue_.license = "GPL2";
Modified: trunk/soft/fudaa-crue/crue-ui/src/main/resources/org/fudaa/fudaa/crue/common/ihmMessages.properties
===================================================================
--- trunk/soft/fudaa-crue/crue-ui/src/main/resources/org/fudaa/fudaa/crue/common/ihmMessages.properties 2011-03-15 23:58:30 UTC (rev 6166)
+++ trunk/soft/fudaa-crue/crue-ui/src/main/resources/org/fudaa/fudaa/crue/common/ihmMessages.properties 2011-03-18 10:13:07 UTC (rev 6167)
@@ -148,4 +148,10 @@
etu.versionLoaded=La version du fichier etu est: {0}
keepInitialOrder.branche=Conserver l'ordre initial des EMHBranches, plut\xF4t que l'ordre alphab\xE9tique
keepInitialOrder.section=Conserver l'ordre initial des EMHSections, plut\xF4t que l'ordre alphab\xE9tique
-keepInitialOrder.casier=Conserver l'ordre initial des EMHCasiers, plut\xF4t que l'ordre alphab\xE9tique
\ No newline at end of file
+keepInitialOrder.casier=Conserver l'ordre initial des EMHCasiers, plut\xF4t que l'ordre alphab\xE9tique
+treeProject.scenario=EMHScenario {0}
+treeProject.run=EMHRun {0}
+treeProject.scenario.loaded=<html><body>EMHScenario {0}<br><b>Options</b><br><table><tr><th>CatEMHBranche</th><td>:{1}</td></tr><tr><th>CatEMHCasier</th><td>{2}</td></tr><tr><th>CatEMHSection</th><td>:{3}</td></tr></table>
+treeProject.run.loaded=<html><body>EMHRun {0}<br><b>Options</b><br><table><tr><th>CatEMHBranche</th><td>:{1}</td></tr><tr><th>CatEMHCasier</th><td>:{2}</td></tr><tr><th>CatEMHSection</th><td>:{3}</td></tr></table>
+order.initialKept=<span color='#D2691E'>Ordre initial conserv\xE9</span>
+order.alphabeticallySorted=Tri\xE9s alphab\xE9tiquement
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|