|
From: <de...@us...> - 2014-06-03 22:04:08
|
Revision: 8752
http://sourceforge.net/p/fudaa/svn/8752
Author: deniger
Date: 2014-06-03 22:04:01 +0000 (Tue, 03 Jun 2014)
Log Message:
-----------
correction bogues OTFA/Rapport
Modified Paths:
--------------
trunk/soft/fudaa-crue/crue-core/src/main/resources/org/fudaa/dodico/crue/common/businessMessages.properties
trunk/soft/fudaa-crue/crue-otfa/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaContentValidator.java
trunk/soft/fudaa-crue/crue-otfa/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaExecutor.java
trunk/soft/fudaa-crue/crue-otfa/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaReportExecutor.java
trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/node/OtfaCampagneLineNode.java
trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/property/RapportCustomEditor.java
trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/property/RapportProperty.java
trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/property/RapportPropertyEditorSupport.java
trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/property/ScenarioProperty.java
Modified: trunk/soft/fudaa-crue/crue-core/src/main/resources/org/fudaa/dodico/crue/common/businessMessages.properties
===================================================================
--- trunk/soft/fudaa-crue/crue-core/src/main/resources/org/fudaa/dodico/crue/common/businessMessages.properties 2014-06-03 21:11:23 UTC (rev 8751)
+++ trunk/soft/fudaa-crue/crue-core/src/main/resources/org/fudaa/dodico/crue/common/businessMessages.properties 2014-06-03 22:04:01 UTC (rev 8752)
@@ -3,6 +3,7 @@
otfa.validator.cibleEtuFileNotFound=Le fichier etu cible {0} n''existe pas
otfa.validator.reportNotFoundReference=Le rapport {0} n''existe pas pour la r\u00e9f\u00e9rence
otfa.validator.reportNotFoundCible=Le rapport {0} n''existe pas pour la cible
+otfa.validator.reportNotEmptyButCibleEmpty=Un rapport est d\u00e9fini pour une cible vide
otfa.scenarionNotFound.detail=Le sc\u00e9nario {0} n''a pas \u00e9t\u00e9 trouv\u00e9
otfa.scenarioNotFound=Sc\u00e9nario introuvable
migrate.isChildrenFilesTester.isNotChild=Le fichier {0} n''est pas contenu dans le r\u00e9pertoire de l''\u00e9tude initiale
Modified: trunk/soft/fudaa-crue/crue-otfa/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaContentValidator.java
===================================================================
--- trunk/soft/fudaa-crue/crue-otfa/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaContentValidator.java 2014-06-03 21:11:23 UTC (rev 8751)
+++ trunk/soft/fudaa-crue/crue-otfa/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaContentValidator.java 2014-06-03 22:04:01 UTC (rev 8752)
@@ -318,8 +318,11 @@
log.addSevereError("otfa.validator.reportNotFoundReference", line.getReference().getRapport());
}
if (!rapportIsBlankOrExists(campagne, line.getFinalCible(), log)) {
- log.addSevereError("otfa.validator.reportNotFoundCible", line.getReference().getRapport());
+ log.addSevereError("otfa.validator.reportNotFoundCible", line.getFinalCible().getRapport());
}
+ if (StringUtils.isNotEmpty(line.getCible().getRapport()) && line.getCible().isEmpty()) {
+ log.addSevereError("otfa.validator.reportNotEmptyButCibleEmpty");
+ }
}
}
Modified: trunk/soft/fudaa-crue/crue-otfa/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaExecutor.java
===================================================================
--- trunk/soft/fudaa-crue/crue-otfa/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaExecutor.java 2014-06-03 21:11:23 UTC (rev 8751)
+++ trunk/soft/fudaa-crue/crue-otfa/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaExecutor.java 2014-06-03 22:04:01 UTC (rev 8752)
@@ -373,14 +373,9 @@
final CtuluLogGroup reportGroup = logs.createGroup("otfa.reportCreation");
reportGroup.setDescriptionArgs(item.getRapport());
- if (managerScenario.getRunCourant() == null) {
- reportGroup.createNewLog("otfa.report.loading").addSevereError("otfa.report.notGenerated.NoCurrentRun");
- } else {
- OtfaReportExecutor report = new OtfaReportExecutor(projet, managerScenario, emhScenario, item, campagne);
- report.exportCSV(reportGroup);
+ OtfaReportExecutor report = new OtfaReportExecutor(projet, managerScenario, emhScenario, item, campagne);
+ report.exportCSV(reportGroup);
- }
-
}
}
Modified: trunk/soft/fudaa-crue/crue-otfa/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaReportExecutor.java
===================================================================
--- trunk/soft/fudaa-crue/crue-otfa/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaReportExecutor.java 2014-06-03 21:11:23 UTC (rev 8751)
+++ trunk/soft/fudaa-crue/crue-otfa/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaReportExecutor.java 2014-06-03 22:04:01 UTC (rev 8752)
@@ -76,6 +76,9 @@
void exportCSV(CtuluLogGroup logs) {
final EMHRun run = managerScenario.getRunCourant();
CtuluLog log = logs.createNewLog("otfa.report.loading");
+ if (run == null) {
+ log.addWarn("otfa.report.notGenerated.NoCurrentRun");
+ }
ReportIndexReaderHelper helper = new ReportIndexReaderHelper(projet);
final ReportContentType contentType = ReportViewLineInfoAndType.getContentType(item.getRapport());
if (contentType == null) {
Modified: trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/node/OtfaCampagneLineNode.java
===================================================================
--- trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/node/OtfaCampagneLineNode.java 2014-06-03 21:11:23 UTC (rev 8751)
+++ trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/node/OtfaCampagneLineNode.java 2014-06-03 22:04:01 UTC (rev 8752)
@@ -276,7 +276,7 @@
rapport.setName("referenceRapport");
rapport.setDisplayName(NbBundle.getMessage(OtfaCampagneLineNode.class, "rapportName"));
rapport.setShortDescription(NbBundle.getMessage(OtfaCampagneLineNode.class, "rapportDescription"));
-
+ PropertyCrueUtils.configureNoEditAsText(rapport);
set.put(etude);
set.put(scenario);
set.put(coeur);
@@ -355,6 +355,7 @@
rapport.setName("cibleRapport");
rapport.setDisplayName(NbBundle.getMessage(OtfaCampagneLineNode.class, "rapportName"));
rapport.setShortDescription(NbBundle.getMessage(OtfaCampagneLineNode.class, "rapportDescription"));
+ PropertyCrueUtils.configureNoEditAsText(rapport);
set.put(etude);
set.put(scenario);
Modified: trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/property/RapportCustomEditor.java
===================================================================
--- trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/property/RapportCustomEditor.java 2014-06-03 21:11:23 UTC (rev 8751)
+++ trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/property/RapportCustomEditor.java 2014-06-03 22:04:01 UTC (rev 8752)
@@ -44,7 +44,15 @@
@Override
protected JComponent createComponent() {
RapportPropertyEditorSupport scenarioEditor = (RapportPropertyEditorSupport) editor;
- File etuFile = scenarioEditor.getCampagneItem().getEtuFile(scenarioEditor.getCampagne().getOtfaDir());
+ //test == voulu car test sur référence
+ boolean isCible = scenarioEditor.getCampagneligne().getCible() == scenarioEditor.getCampagneItem();
+ File etuFile = null;
+ if (isCible && StringUtils.isEmpty(scenarioEditor.getCampagneItem().getEtuPath())) {
+ //dans ce cas on tente avec la référence
+ etuFile = scenarioEditor.getCampagneligne().getReference().getEtuFile(scenarioEditor.getCampagne().getOtfaDir());
+ } else {
+ etuFile = scenarioEditor.getCampagneItem().getEtuFile(scenarioEditor.getCampagne().getOtfaDir());
+ }
if (etuFile == null || !etuFile.isFile()) {
JLabel lb = new JLabel();
lb.setForeground(Color.RED);
Modified: trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/property/RapportProperty.java
===================================================================
--- trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/property/RapportProperty.java 2014-06-03 21:11:23 UTC (rev 8751)
+++ trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/property/RapportProperty.java 2014-06-03 22:04:01 UTC (rev 8752)
@@ -4,18 +4,14 @@
*/
package org.fudaa.fudaa.crue.otfa.property;
-import java.awt.Component;
import java.beans.PropertyEditor;
-import java.beans.PropertyEditorSupport;
-import java.io.File;
+import org.fudaa.dodico.crue.io.rtfa.RTFAResultLine;
import org.fudaa.dodico.crue.projet.otfa.OtfaCampagne;
import org.fudaa.dodico.crue.projet.otfa.OtfaCampagneItem;
import org.fudaa.fudaa.crue.common.property.AbstractNodeFirable;
+import org.fudaa.fudaa.crue.common.property.PropertyCrueUtils;
import org.fudaa.fudaa.crue.common.property.PropertySupportReflection;
-import org.fudaa.fudaa.crue.options.services.ConfigurationManagerService;
import org.fudaa.fudaa.crue.otfa.perspective.PerspectiveServiceOtfa;
-import org.openide.explorer.propertysheet.ExPropertyEditor;
-import org.openide.explorer.propertysheet.PropertyEnv;
import org.openide.util.Lookup;
/**
@@ -30,6 +26,7 @@
public RapportProperty(AbstractNodeFirable node, OtfaCampagne campagne, OtfaCampagneItem instance, String getter, String setter) throws NoSuchMethodException {
super(node, instance, String.class, getter, setter);
this.campagne = campagne;
+
}
@Override
@@ -39,6 +36,7 @@
@Override
public PropertyEditor getPropertyEditor() {
- return new RapportPropertyEditorSupport(campagne, (OtfaCampagneItem) instance);
+ final RTFAResultLine line = node.getLookup().lookup(RTFAResultLine.class);
+ return new RapportPropertyEditorSupport(campagne, line == null ? null : line.getInitialLine(), (OtfaCampagneItem) instance);
}
}
Modified: trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/property/RapportPropertyEditorSupport.java
===================================================================
--- trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/property/RapportPropertyEditorSupport.java 2014-06-03 21:11:23 UTC (rev 8751)
+++ trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/property/RapportPropertyEditorSupport.java 2014-06-03 22:04:01 UTC (rev 8752)
@@ -9,6 +9,8 @@
import java.io.File;
import org.fudaa.dodico.crue.projet.otfa.OtfaCampagne;
import org.fudaa.dodico.crue.projet.otfa.OtfaCampagneItem;
+import org.fudaa.dodico.crue.projet.otfa.OtfaCampagneLine;
+import org.fudaa.fudaa.crue.common.property.PropertyCrueUtils;
import org.openide.explorer.propertysheet.ExPropertyEditor;
import org.openide.explorer.propertysheet.PropertyEnv;
@@ -19,13 +21,20 @@
public class RapportPropertyEditorSupport extends PropertyEditorSupport implements ExPropertyEditor {
private final OtfaCampagne campagne;
private final OtfaCampagneItem campagneItem;
+ private final OtfaCampagneLine campagneligne;
private PropertyEnv env;
- public RapportPropertyEditorSupport(OtfaCampagne campagne, OtfaCampagneItem item) {
+ public RapportPropertyEditorSupport(OtfaCampagne campagne, OtfaCampagneLine ligne, OtfaCampagneItem item) {
this.campagne = campagne;
+ this.campagneligne = ligne;
this.campagneItem = item;
}
+ public OtfaCampagneLine getCampagneligne() {
+ return campagneligne;
+ }
+
+
public OtfaCampagne getCampagne() {
return campagne;
}
@@ -46,8 +55,7 @@
@Override
public boolean supportsCustomEditor() {
- final File etuFile = campagneItem.getEtuFile(campagne.getOtfaDir());
- return etuFile != null && etuFile.isFile();
+ return true;
}
@Override
Modified: trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/property/ScenarioProperty.java
===================================================================
--- trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/property/ScenarioProperty.java 2014-06-03 21:11:23 UTC (rev 8751)
+++ trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/property/ScenarioProperty.java 2014-06-03 22:04:01 UTC (rev 8752)
@@ -4,18 +4,12 @@
*/
package org.fudaa.fudaa.crue.otfa.property;
-import java.awt.Component;
import java.beans.PropertyEditor;
-import java.beans.PropertyEditorSupport;
-import java.io.File;
import org.fudaa.dodico.crue.projet.otfa.OtfaCampagne;
import org.fudaa.dodico.crue.projet.otfa.OtfaCampagneItem;
import org.fudaa.fudaa.crue.common.property.AbstractNodeFirable;
import org.fudaa.fudaa.crue.common.property.PropertySupportReflection;
-import org.fudaa.fudaa.crue.options.services.ConfigurationManagerService;
import org.fudaa.fudaa.crue.otfa.perspective.PerspectiveServiceOtfa;
-import org.openide.explorer.propertysheet.ExPropertyEditor;
-import org.openide.explorer.propertysheet.PropertyEnv;
import org.openide.util.Lookup;
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|