|
From: <de...@us...> - 2011-12-01 08:46:54
|
Revision: 6740
http://fudaa.svn.sourceforge.net/fudaa/?rev=6740&view=rev
Author: deniger
Date: 2011-12-01 08:46:47 +0000 (Thu, 01 Dec 2011)
Log Message:
-----------
maj
Modified Paths:
--------------
trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaCampagneLineResult.java
trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaCampagneResult.java
trunk/soft/fudaa-crue/ui-comparison/src/main/java/org/fudaa/fudaa/crue/comparison/ScenarioComparaisonController.java
trunk/soft/fudaa-crue/ui-comparison/src/main/java/org/fudaa/fudaa/crue/comparison/ScenarioComparaisonLauncher.java
trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/OtfaCampagneTopComponent.java
trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/action/LaunchAction.java
trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/action/NewFileAction.java
trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/action/OpenFileAction.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/node/OtfaCampagneLinesChildren.java
trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/node/OtfaCampagneLinesNode.java
trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/process/OpenOtfaCampagneProcess.java
trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/process/SaveOtfaCampagneProcess.java
Added Paths:
-----------
trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/process/OtfaCampagneContainer.java
trunk/soft/fudaa-crue/ui-otfa/src/main/resources/org/fudaa/fudaa/crue/otfa/process/
trunk/soft/fudaa-crue/ui-otfa/src/main/resources/org/fudaa/fudaa/crue/otfa/process/Bundle.properties
Modified: trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaCampagneLineResult.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaCampagneLineResult.java 2011-12-01 08:11:58 UTC (rev 6739)
+++ trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaCampagneLineResult.java 2011-12-01 08:46:47 UTC (rev 6740)
@@ -10,7 +10,7 @@
* @author deniger
*
*/
-public class OtfaCampagneLineResult {
+ public class OtfaCampagneLineResult {
private List<ExecuteComparaisonResult> comparisonResult;
private CtuluLogGroup logs;//contains all logs from read, run,...
Modified: trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaCampagneResult.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaCampagneResult.java 2011-12-01 08:11:58 UTC (rev 6739)
+++ trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/projet/otfa/OtfaCampagneResult.java 2011-12-01 08:46:47 UTC (rev 6740)
@@ -1,6 +1,5 @@
package org.fudaa.dodico.crue.projet.otfa;
-import java.util.ArrayList;
import java.util.List;
import org.fudaa.ctulu.CtuluLogGroup;
Modified: trunk/soft/fudaa-crue/ui-comparison/src/main/java/org/fudaa/fudaa/crue/comparison/ScenarioComparaisonController.java
===================================================================
--- trunk/soft/fudaa-crue/ui-comparison/src/main/java/org/fudaa/fudaa/crue/comparison/ScenarioComparaisonController.java 2011-12-01 08:11:58 UTC (rev 6739)
+++ trunk/soft/fudaa-crue/ui-comparison/src/main/java/org/fudaa/fudaa/crue/comparison/ScenarioComparaisonController.java 2011-12-01 08:46:47 UTC (rev 6740)
@@ -28,7 +28,6 @@
import org.fudaa.dodico.crue.comparaison.ExecuteComparaison.ExecuteComparaisonResult;
import org.fudaa.dodico.crue.comparaison.tester.ResultatTest;
import org.fudaa.fudaa.crue.common.helper.JXTreeTableExtended;
-import org.fudaa.fudaa.crue.common.helper.UiContext;
import org.fudaa.fudaa.crue.common.UserPreferencesSaver;
import org.jdesktop.swingx.JXTreeTable;
import org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode;
Modified: trunk/soft/fudaa-crue/ui-comparison/src/main/java/org/fudaa/fudaa/crue/comparison/ScenarioComparaisonLauncher.java
===================================================================
--- trunk/soft/fudaa-crue/ui-comparison/src/main/java/org/fudaa/fudaa/crue/comparison/ScenarioComparaisonLauncher.java 2011-12-01 08:11:58 UTC (rev 6739)
+++ trunk/soft/fudaa-crue/ui-comparison/src/main/java/org/fudaa/fudaa/crue/comparison/ScenarioComparaisonLauncher.java 2011-12-01 08:46:47 UTC (rev 6740)
@@ -29,9 +29,7 @@
import org.fudaa.dodico.crue.metier.etude.EMHRun;
import org.fudaa.dodico.crue.metier.etude.ManagerEMHScenario;
import org.fudaa.fudaa.crue.common.helper.DialogHelper;
-import org.fudaa.fudaa.crue.common.helper.UiContext;
import org.fudaa.fudaa.crue.loader.LoaderService;
-import org.fudaa.fudaa.crue.loader.ScenarioLoaderServiceAbstract;
import org.jdesktop.swingx.JXTree;
import org.openide.util.Lookup;
import org.openide.windows.WindowManager;
Modified: trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/OtfaCampagneTopComponent.java
===================================================================
--- trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/OtfaCampagneTopComponent.java 2011-12-01 08:11:58 UTC (rev 6739)
+++ trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/OtfaCampagneTopComponent.java 2011-12-01 08:46:47 UTC (rev 6740)
@@ -25,6 +25,7 @@
import org.fudaa.fudaa.crue.otfa.action.SaveFileAction;
import org.fudaa.fudaa.crue.otfa.action.UpLineAction;
import org.fudaa.fudaa.crue.otfa.node.OtfaCampagneLinesNode;
+import org.fudaa.fudaa.crue.otfa.process.OtfaCampagneContainer;
import org.netbeans.api.settings.ConvertAsProperties;
import org.openide.awt.ActionID;
import org.openide.explorer.ExplorerUtils;
@@ -46,6 +47,7 @@
public class OtfaCampagneTopComponent extends TopComponent implements ExplorerManager.Provider {
private final ExplorerManager mgr = new ExplorerManager();
+ private OtfaCampagneContainer campagneContainer;
private OtfaCampagne campaign;
/** Creates new form OtfaCampagneTopComponent */
@@ -102,11 +104,12 @@
ExplorerUtils.activateActions(mgr, false);
}
- public void setCampagne(OtfaCampagne campagne) {
- this.campaign = campagne;
+ public void setCampagne(OtfaCampagneContainer campagne) {
+ campagneContainer = campagne;
+ this.campaign = campagne.getOtfaCampagne();
this.updateCampagneInformations();
- mgr.setRootContext(new OtfaCampagneLinesNode(campagne.getLines()));
+ mgr.setRootContext(new OtfaCampagneLinesNode(campagneContainer));
this.outlineView.getOutline().setRootVisible(false);
}
Modified: trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/action/LaunchAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/action/LaunchAction.java 2011-12-01 08:11:58 UTC (rev 6739)
+++ trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/action/LaunchAction.java 2011-12-01 08:46:47 UTC (rev 6740)
@@ -5,10 +5,11 @@
package org.fudaa.fudaa.crue.otfa.action;
import java.awt.event.ActionEvent;
+import java.util.List;
import javax.swing.AbstractAction;
import javax.swing.Action;
+import org.fudaa.dodico.crue.projet.otfa.OtfaCampagneLineResult;
import org.fudaa.dodico.crue.projet.otfa.OtfaCampagneResult;
-import org.fudaa.dodico.crue.projet.otfa.OtfaCampagneResultLogsPart;
import org.fudaa.dodico.crue.projet.otfa.OtfaExecutor;
import org.fudaa.fudaa.crue.common.log.LogsDisplayer;
import org.fudaa.fudaa.crue.options.services.ConfigurationManagerService;
@@ -38,8 +39,7 @@
if (result.getResults() != null) {
// final OtfaCampagneResultComparaisonsPart comparaisonsPart = result.getComparaisonsPart();
- final OtfaCampagneResultLogsPart logsPart = result.getLogsPart();
-
+ final List<OtfaCampagneLineResult> logsPart = result.getResults();
//TODO mettre ces objets dans l'arbre.
}
}
Modified: trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/action/NewFileAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/action/NewFileAction.java 2011-12-01 08:11:58 UTC (rev 6739)
+++ trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/action/NewFileAction.java 2011-12-01 08:46:47 UTC (rev 6740)
@@ -11,6 +11,7 @@
import org.fudaa.dodico.crue.projet.otfa.OtfaCampagne;
import org.fudaa.dodico.crue.projet.otfa.OtfaCampagneLine;
import org.fudaa.fudaa.crue.otfa.OtfaCampagneTopComponent;
+import org.fudaa.fudaa.crue.otfa.process.OtfaCampagneContainer;
/**
*
@@ -30,7 +31,7 @@
this.editor.setCampagne(createBlankCampagne());
}
- private static OtfaCampagne createBlankCampagne() {
+ private static OtfaCampagneContainer createBlankCampagne() {
final OtfaCampagne campagne = new OtfaCampagne();
final OtfaCampagne.OtfaRunOptions ref = new OtfaCampagne.OtfaRunOptions();
@@ -56,6 +57,6 @@
campagne.setComparaisonOptions(options);
campagne.setLines(new ArrayList<OtfaCampagneLine>());
- return campagne;
+ return new OtfaCampagneContainer(campagne);
}
}
Modified: trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/action/OpenFileAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/action/OpenFileAction.java 2011-12-01 08:11:58 UTC (rev 6739)
+++ trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/action/OpenFileAction.java 2011-12-01 08:46:47 UTC (rev 6740)
@@ -12,6 +12,7 @@
import org.fudaa.fudaa.crue.otfa.OtfaCampagneTopComponent;
import org.fudaa.fudaa.crue.otfa.filter.OtfaFileFilter;
import org.fudaa.fudaa.crue.otfa.process.OpenOtfaCampagneProcess;
+import org.fudaa.fudaa.crue.otfa.process.OtfaCampagneContainer;
import org.netbeans.api.progress.ProgressUtils;
import org.openide.filesystems.FileChooserBuilder;
@@ -43,7 +44,7 @@
if (toOpen != null) {
OpenOtfaCampagneProcess process = new OpenOtfaCampagneProcess(toOpen);
- OtfaCampagne campagne = ProgressUtils.showProgressDialogAndRun(process, "Chargement de la campagne OTFA", false);
+ OtfaCampagneContainer campagne = ProgressUtils.showProgressDialogAndRun(process, "Chargement de la campagne OTFA", false);
if (campagne != null) {
this.editor.setCampagne(campagne);
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 2011-12-01 08:11:58 UTC (rev 6739)
+++ trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/node/OtfaCampagneLineNode.java 2011-12-01 08:46:47 UTC (rev 6740)
@@ -8,6 +8,7 @@
import java.io.File;
import javax.swing.Action;
import org.fudaa.dodico.crue.projet.otfa.OtfaCampagneLine;
+import org.fudaa.dodico.crue.projet.otfa.OtfaCampagneLineResult;
import org.fudaa.fudaa.crue.otfa.action.AddLineAction;
import org.fudaa.fudaa.crue.otfa.action.DownLineAction;
import org.fudaa.fudaa.crue.otfa.action.RemoveLineAction;
@@ -26,11 +27,21 @@
* @author Christophe CANEL (Genesis)
*/
public class OtfaCampagneLineNode extends AbstractNode {
+
+
public OtfaCampagneLineNode(OtfaCampagneLine line) {
super(Children.LEAF, Lookups.singleton(line));
displayCorrectName();
}
+
+ public OtfaCampagneLineNode(OtfaCampagneLine line,OtfaCampagneLineResult lineResult) {
+ super(Children.LEAF, Lookups.fixed(line,lineResult));
+ displayCorrectName();
+ }
+
+
+
public void displayCorrectName() {
setDisplayName(NbBundle.getMessage(OtfaCampagneLineNode.class, "OtfaLigne",getLine().getIndice()));
Modified: trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/node/OtfaCampagneLinesChildren.java
===================================================================
--- trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/node/OtfaCampagneLinesChildren.java 2011-12-01 08:11:58 UTC (rev 6739)
+++ trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/node/OtfaCampagneLinesChildren.java 2011-12-01 08:46:47 UTC (rev 6740)
@@ -4,14 +4,14 @@
*/
package org.fudaa.fudaa.crue.otfa.node;
-import java.beans.IntrospectionException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.fudaa.dodico.crue.projet.otfa.OtfaCampagneLine;
+import org.fudaa.dodico.crue.projet.otfa.OtfaCampagneLineResult;
+import org.fudaa.fudaa.crue.otfa.process.OtfaCampagneContainer;
import org.openide.nodes.Index.ArrayChildren;
import org.openide.nodes.Node;
-import org.openide.util.Exceptions;
/**
*
@@ -19,22 +19,29 @@
*/
public class OtfaCampagneLinesChildren extends ArrayChildren {
- private List<OtfaCampagneLine> lines;
+ private OtfaCampagneContainer container;
- public OtfaCampagneLinesChildren(List<OtfaCampagneLine> lines) {
- this.lines = lines;
- }
+ public OtfaCampagneLinesChildren(OtfaCampagneContainer container) {
+ this.container = container;
+ }
- @Override
- protected List<Node> initCollection() {
- final int nbLines = this.lines.size();
+ @Override
+ protected List<Node> initCollection() {
+ final List<OtfaCampagneLine> lines = this.container.getOtfaCampagne().getLines();
+ final int nbLines = lines.size();
- Node[] nodes = new Node[nbLines];
+ Node[] nodes = new Node[nbLines];
- for (int i = 0; i < nbLines; i++) {
- nodes[i] = new OtfaCampagneLineNode(this.lines.get(i));
- }
+ for (int i = 0; i < nbLines; i++) {
+ final OtfaCampagneLine line = lines.get(i);
+ OtfaCampagneLineResult resultFor = container.getResultFor(line);
+ if (resultFor != null) {
+ nodes[i] = new OtfaCampagneLineNode(line, resultFor);
+ } else {
+ nodes[i] = new OtfaCampagneLineNode(line);
+ }
+ }
- return new ArrayList<Node>(Arrays.asList(nodes));
- }
+ return new ArrayList<Node>(Arrays.asList(nodes));
+ }
}
Modified: trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/node/OtfaCampagneLinesNode.java
===================================================================
--- trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/node/OtfaCampagneLinesNode.java 2011-12-01 08:11:58 UTC (rev 6739)
+++ trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/node/OtfaCampagneLinesNode.java 2011-12-01 08:46:47 UTC (rev 6740)
@@ -11,6 +11,7 @@
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import org.fudaa.dodico.crue.projet.otfa.OtfaCampagneLine;
+import org.fudaa.fudaa.crue.otfa.process.OtfaCampagneContainer;
import org.openide.nodes.AbstractNode;
import org.openide.nodes.Index.ArrayChildren;
import org.openide.nodes.Node;
@@ -22,58 +23,57 @@
*/
public class OtfaCampagneLinesNode extends AbstractNode implements ChangeListener {
- private static class OtfaCampagneLineComparator implements Comparator<OtfaCampagneLine> {
+ private static class OtfaCampagneLineComparator implements Comparator<OtfaCampagneLine> {
- @Override
- public int compare(OtfaCampagneLine o1, OtfaCampagneLine o2) {
- return ((Integer) o1.getIndice()).compareTo(o2.getIndice());
- }
+ @Override
+ public int compare(OtfaCampagneLine o1, OtfaCampagneLine o2) {
+ return ((Integer) o1.getIndice()).compareTo(o2.getIndice());
}
+ }
- public OtfaCampagneLinesNode(List<OtfaCampagneLine> lines) {
- super(new OtfaCampagneLinesChildren(lines), Lookups.singleton(lines));
+ public OtfaCampagneLinesNode(OtfaCampagneContainer container) {
+ super(new OtfaCampagneLinesChildren(container), Lookups.singleton(container));
+ ((OtfaCampagneLinesChildren) this.getChildren()).addChangeListener(this);
- ((OtfaCampagneLinesChildren) this.getChildren()).addChangeListener(this);
+ setDisplayName("Lignes");
+ }
- setDisplayName("Lignes");
- }
+ @Override
+ public Action[] getActions(boolean context) {
+ return new Action[]{};
+ }
- @Override
- public Action[] getActions(boolean context) {
- return new Action[]{};
- }
+ @Override
+ public void stateChanged(ChangeEvent e) {
+ final List<OtfaCampagneLine> lines = getLookup().lookup(List.class);
- @Override
- public void stateChanged(ChangeEvent e) {
- final List<OtfaCampagneLine> lines = getLookup().lookup(List.class);
+ Collections.sort(lines, new OtfaCampagneLineComparator());
+ }
- Collections.sort(lines, new OtfaCampagneLineComparator());
- }
+ public void remove(OtfaCampagneLineNode lineNode) {
+ final ArrayChildren children = (ArrayChildren) this.getChildren();
+ final int indice = children.indexOf(lineNode);
- public void remove(OtfaCampagneLineNode lineNode) {
- final ArrayChildren children = (ArrayChildren) this.getChildren();
- final int indice = children.indexOf(lineNode);
+ for (int i = indice + 1; i < children.getNodesCount(); i++) {
+ OtfaCampagneLineNode node = (OtfaCampagneLineNode) children.getNodeAt(i);
- for (int i = indice + 1; i < children.getNodesCount(); i++) {
- OtfaCampagneLineNode node = (OtfaCampagneLineNode) children.getNodeAt(i);
+ final OtfaCampagneLine line = node.getLine();
+ line.setIndice(line.getIndice() - 1);
+ node.displayCorrectName();
+ }
- final OtfaCampagneLine line = node.getLine();
- line.setIndice(line.getIndice() - 1);
- node.displayCorrectName();
- }
+ getLookup().lookup(List.class).remove(lineNode.getLine());
+ children.remove(new Node[]{lineNode});
+ }
- getLookup().lookup(List.class).remove(lineNode.getLine());
- children.remove(new Node[]{lineNode});
- }
+ public void add(OtfaCampagneLineNode lineNode) {
+ final OtfaCampagneLine line = lineNode.getLine();
+ final List<OtfaCampagneLine> lines = this.getLookup().lookup(List.class);
- public void add(OtfaCampagneLineNode lineNode) {
- final OtfaCampagneLine line = lineNode.getLine();
- final List<OtfaCampagneLine> lines = this.getLookup().lookup(List.class);
+ line.setIndice(lines.size() + 1);
+ lineNode.displayCorrectName();
- line.setIndice(lines.size() + 1);
- lineNode.displayCorrectName();
-
- lines.add(line);
- this.getChildren().add(new Node[]{lineNode});
- }
+ lines.add(line);
+ this.getChildren().add(new Node[]{lineNode});
+ }
}
Modified: trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/process/OpenOtfaCampagneProcess.java
===================================================================
--- trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/process/OpenOtfaCampagneProcess.java 2011-12-01 08:11:58 UTC (rev 6739)
+++ trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/process/OpenOtfaCampagneProcess.java 2011-12-01 08:46:47 UTC (rev 6740)
@@ -12,14 +12,16 @@
import org.fudaa.dodico.crue.io.common.CrueIOResu;
import org.fudaa.dodico.crue.io.otfa.CrueOTFAReaderWriter;
import org.fudaa.dodico.crue.projet.otfa.OtfaCampagne;
+import org.fudaa.fudaa.crue.common.log.LogsDisplayer;
import org.netbeans.api.progress.ProgressHandle;
import org.netbeans.api.progress.ProgressRunnable;
+import org.openide.util.NbBundle;
/**
*
* @author Chris
*/
-public class OpenOtfaCampagneProcess implements ProgressRunnable<OtfaCampagne> {
+public class OpenOtfaCampagneProcess implements ProgressRunnable<OtfaCampagneContainer> {
private File otfaFile;
@@ -28,17 +30,28 @@
}
@Override
- public OtfaCampagne run(ProgressHandle handle) {
+ public OtfaCampagneContainer run(ProgressHandle handle) {
handle.switchToIndeterminate();
//TODO A verifier avec Fred pour version, crue data, ...
final CrueOTFAReaderWriter reader = new CrueOTFAReaderWriter("1.2", otfaFile.getParentFile());
final CtuluLog log = new CtuluLog(BusinessMessages.RESOURCE_BUNDLE);
- final CrueIOResu<OtfaCampagne> result = reader.readXML(otfaFile, log, new CrueDataImpl(null,new CrueOptions(false)));
+ final CrueIOResu<OtfaCampagne> result = reader.readXML(otfaFile, log, new CrueDataImpl(null, new CrueOptions(false)));
+ if (log.isNotEmpty()) {
+ LogsDisplayer.displayError(log, NbBundle.getMessage(OpenOtfaCampagneProcess.class, "OpenOtfa.BilanDialog", otfaFile.getName()));
+ }
+ //TODO FRED lire resultat et cr si present.
+ //merger cr et resultat ensemble en testant les index.
+ //File ctfaFile=
+
+
+
+
result.getAnalyse().printResume();
handle.finish();
-
- return result.getMetier();
+ OtfaCampagneContainer container = new OtfaCampagneContainer(result.getMetier());
+
+ return container;
}
}
Added: trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/process/OtfaCampagneContainer.java
===================================================================
--- trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/process/OtfaCampagneContainer.java (rev 0)
+++ trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/process/OtfaCampagneContainer.java 2011-12-01 08:46:47 UTC (rev 6740)
@@ -0,0 +1,28 @@
+package org.fudaa.fudaa.crue.otfa.process;
+
+import org.fudaa.dodico.crue.projet.otfa.OtfaCampagne;
+import org.fudaa.dodico.crue.projet.otfa.OtfaCampagneLine;
+import org.fudaa.dodico.crue.projet.otfa.OtfaCampagneLineResult;
+
+/**
+ *
+ * @author deniger ( genesis)
+ */
+public class OtfaCampagneContainer {
+
+ private final OtfaCampagne otfaCampagne;
+
+ public OtfaCampagne getOtfaCampagne() {
+ return otfaCampagne;
+ }
+
+
+ public OtfaCampagneContainer(OtfaCampagne otfaCampagne) {
+ this.otfaCampagne = otfaCampagne;
+ }
+
+ //TODO
+ public OtfaCampagneLineResult getResultFor(OtfaCampagneLine line){
+ return null;
+ }
+}
Modified: trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/process/SaveOtfaCampagneProcess.java
===================================================================
--- trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/process/SaveOtfaCampagneProcess.java 2011-12-01 08:11:58 UTC (rev 6739)
+++ trunk/soft/fudaa-crue/ui-otfa/src/main/java/org/fudaa/fudaa/crue/otfa/process/SaveOtfaCampagneProcess.java 2011-12-01 08:46:47 UTC (rev 6740)
@@ -32,6 +32,7 @@
@Override
public Boolean run(ProgressHandle handle) {
+ //TODO il faudra effacer les Cr et résultats.
//TODO Récupérer l'utilisateur.
final String auteur = "User";
final LocalDateTime date = new LocalDateTime();
Copied: trunk/soft/fudaa-crue/ui-otfa/src/main/resources/org/fudaa/fudaa/crue/otfa/process/Bundle.properties (from rev 6738, trunk/soft/fudaa-crue/ui-otfa/src/main/resources/org/fudaa/fudaa/crue/otfa/perspective/Bundle.properties)
===================================================================
--- trunk/soft/fudaa-crue/ui-otfa/src/main/resources/org/fudaa/fudaa/crue/otfa/process/Bundle.properties (rev 0)
+++ trunk/soft/fudaa-crue/ui-otfa/src/main/resources/org/fudaa/fudaa/crue/otfa/process/Bundle.properties 2011-12-01 08:46:47 UTC (rev 6740)
@@ -0,0 +1 @@
+OpenOtfa.BilanDialog=Ouverture fichier OTFA {0}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|