|
From: <de...@us...> - 2012-07-13 06:52:05
|
Revision: 7491
http://fudaa.svn.sourceforge.net/fudaa/?rev=7491&view=rev
Author: deniger
Date: 2012-07-13 06:51:55 +0000 (Fri, 13 Jul 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/edition/EditionBrancheCreator.java
trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/edition/EditionPrevalidateModifyRelationSection.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/AbstractModellingOpenTopNodeAction.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListBranchesAddNodeAction.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListBranchesNodeAction.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListCasiersAddNodeAction.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListCasiersNodeAction.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListCondInitNodeAction.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListNoeudsAddNodeAction.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListNoeudsNodeAction.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListSectionAddNodeAction.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListSectionsNodeAction.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingModeleOPTGNodeAction.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingModeleOPTINodeAction.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingModeleOPTRNodeAction.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingModelePNUMNodeAction.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingScenarioORESNodeAction.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingScenarioPCALNodeAction.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/ModellingOpenEMHNodeAction.java
Modified: trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/edition/EditionBrancheCreator.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/edition/EditionBrancheCreator.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/edition/EditionBrancheCreator.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -238,7 +238,7 @@
dcsp.addElemSeuilAvecPdc(new ElemSeuilAvecPdc(ccm));
dcsp.setFormulePdc(EnumFormulePdc.BORDA);
branche.addInfosEMH(dcsp);
- addDefaultsSectionSansGeometrie(ccm, name, sousModele, branche, 0);//distance forcee a 0
+ addDefaultsSectionProfils(ccm, name, sousModele, branche, 0);//distance forcee a 0
return branche;
}
Modified: trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/edition/EditionPrevalidateModifyRelationSection.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/edition/EditionPrevalidateModifyRelationSection.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/edition/EditionPrevalidateModifyRelationSection.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -225,7 +225,7 @@
if (branche == null) {
msgs.add(log.addSevereError("ChangeEMH.BrancheUnknown", nom, brancheNom));
} else if (sectionType != null && !authorizedSection.get(branche.getBrancheType()).contains(sectionType)) {
- msgs.add(log.addSevereError("AddEMH.BrancheSaintVenantNotSupportThisSection", nom, brancheNom, sectionType.geti18n()));
+ msgs.add(log.addSevereError("ChangeEMH.BrancheNotSupportThisSection", nom, brancheNom, sectionType.geti18n()));
}
double abscisseHydraulique = content.getAbscisseHydraulique();
Pair<String, Object[]> valueError = xpProperty.getValidator().getValidateErrorParamForValue(abscisseHydraulique);
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/AbstractModellingOpenTopNodeAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/AbstractModellingOpenTopNodeAction.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/AbstractModellingOpenTopNodeAction.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -40,7 +40,6 @@
public void openNewTopComponent(Node[] activatedNodes) {
TopComponent openNew = openNew(activatedNodes[0]);
- topComponentClass = openNew.getClass();
activeInMode(openNew, getMode(openNew));
}
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListBranchesAddNodeAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListBranchesAddNodeAction.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListBranchesAddNodeAction.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -3,6 +3,7 @@
import org.fudaa.fudaa.crue.modelling.list.AbstractModellingListTopComponent;
import org.fudaa.fudaa.crue.modelling.list.ModellingListBrancheAddTopComponent;
import org.fudaa.fudaa.crue.modelling.list.ModellingListNoeudAddTopComponent;
+import org.openide.nodes.Node;
import org.openide.util.NbBundle;
import org.openide.windows.TopComponent;
@@ -34,6 +35,11 @@
return new ModellingListBrancheAddTopComponent();
}
+ @Override
+ protected Class getExpectedTopComponentClass(Node selectedNode) {
+ return ModellingListBrancheAddTopComponent.class;
+ }
+
private static TopComponent create(final Long uiId) {
final ModellingListBrancheAddTopComponent topComponent = new ModellingListBrancheAddTopComponent();
topComponent.setSousModeleUid(uiId);
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListBranchesNodeAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListBranchesNodeAction.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListBranchesNodeAction.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -1,7 +1,9 @@
package org.fudaa.fudaa.crue.modelling.action;
import org.fudaa.fudaa.crue.modelling.list.AbstractModellingListTopComponent;
+import org.fudaa.fudaa.crue.modelling.list.ModellingListBrancheAddTopComponent;
import org.fudaa.fudaa.crue.modelling.list.ModellingListBrancheTopComponent;
+import org.openide.nodes.Node;
import org.openide.util.NbBundle;
/**
@@ -20,6 +22,11 @@
return new ModellingListBrancheTopComponent();
}
+ @Override
+ protected Class getExpectedTopComponentClass(Node selectedNode) {
+ return ModellingListBrancheTopComponent.class;
+ }
+
public static class Reopen extends ModellingListBranchesNodeAction {
public Reopen() {
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListCasiersAddNodeAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListCasiersAddNodeAction.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListCasiersAddNodeAction.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -2,6 +2,7 @@
import org.fudaa.fudaa.crue.modelling.list.AbstractModellingListTopComponent;
import org.fudaa.fudaa.crue.modelling.list.ModellingListCasierAddTopComponent;
+import org.openide.nodes.Node;
import org.openide.util.NbBundle;
import org.openide.windows.TopComponent;
@@ -29,6 +30,11 @@
}
@Override
+ protected Class getExpectedTopComponentClass(Node selectedNode) {
+ return ModellingListCasierAddTopComponent.class;
+ }
+
+ @Override
protected AbstractModellingListTopComponent create() {
return new ModellingListCasierAddTopComponent();
}
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListCasiersNodeAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListCasiersNodeAction.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListCasiersNodeAction.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -2,6 +2,7 @@
import org.fudaa.fudaa.crue.modelling.list.AbstractModellingListTopComponent;
import org.fudaa.fudaa.crue.modelling.list.ModellingListCasierTopComponent;
+import org.openide.nodes.Node;
import org.openide.util.NbBundle;
/**
@@ -20,6 +21,11 @@
return new ModellingListCasierTopComponent();
}
+ @Override
+ protected Class getExpectedTopComponentClass(Node selectedNode) {
+ return ModellingListCasierTopComponent.class;
+ }
+
public static class Reopen extends ModellingListCasiersNodeAction {
public Reopen() {
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListCondInitNodeAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListCondInitNodeAction.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListCondInitNodeAction.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -1,8 +1,8 @@
package org.fudaa.fudaa.crue.modelling.action;
import org.fudaa.fudaa.crue.modelling.calcul.AbstractModeleTopComponent;
-import org.fudaa.fudaa.crue.modelling.list.AbstractModellingListTopComponent;
import org.fudaa.fudaa.crue.modelling.calcul.ModellingListCiniTopComponent;
+import org.openide.nodes.Node;
import org.openide.util.NbBundle;
/**
@@ -21,6 +21,11 @@
return new ModellingListCiniTopComponent();
}
+ @Override
+ protected Class getExpectedTopComponentClass(Node selectedNode) {
+ return ModellingListCiniTopComponent.class;
+ }
+
public static class Reopen extends ModellingListCondInitNodeAction {
public Reopen() {
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListNoeudsAddNodeAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListNoeudsAddNodeAction.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListNoeudsAddNodeAction.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -2,6 +2,7 @@
import org.fudaa.fudaa.crue.modelling.list.AbstractModellingListTopComponent;
import org.fudaa.fudaa.crue.modelling.list.ModellingListNoeudAddTopComponent;
+import org.openide.nodes.Node;
import org.openide.util.NbBundle;
import org.openide.windows.TopComponent;
@@ -33,6 +34,11 @@
return new ModellingListNoeudAddTopComponent();
}
+ @Override
+ protected Class getExpectedTopComponentClass(Node selectedNode) {
+ return ModellingListNoeudAddTopComponent.class;
+ }
+
private static TopComponent create(final Long uiId) {
final ModellingListNoeudAddTopComponent modellingListNoeudTopComponent = new ModellingListNoeudAddTopComponent();
modellingListNoeudTopComponent.setSousModeleUid(uiId);
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListNoeudsNodeAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListNoeudsNodeAction.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListNoeudsNodeAction.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -2,6 +2,7 @@
import org.fudaa.fudaa.crue.modelling.list.AbstractModellingListTopComponent;
import org.fudaa.fudaa.crue.modelling.list.ModellingListNoeudTopComponent;
+import org.openide.nodes.Node;
import org.openide.util.NbBundle;
/**
@@ -19,6 +20,11 @@
return new ModellingListNoeudTopComponent();
}
+ @Override
+ protected Class getExpectedTopComponentClass(Node selectedNode) {
+ return ModellingListNoeudTopComponent.class;
+ }
+
public static class Reopen extends ModellingListNoeudsNodeAction {
public Reopen() {
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListSectionAddNodeAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListSectionAddNodeAction.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListSectionAddNodeAction.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -2,6 +2,7 @@
import org.fudaa.fudaa.crue.modelling.list.AbstractModellingListTopComponent;
import org.fudaa.fudaa.crue.modelling.list.ModellingListSectionAddTopComponent;
+import org.openide.nodes.Node;
import org.openide.util.NbBundle;
import org.openide.windows.TopComponent;
@@ -33,6 +34,11 @@
return new ModellingListSectionAddTopComponent();
}
+ @Override
+ protected Class getExpectedTopComponentClass(Node selectedNode) {
+ return ModellingListSectionAddTopComponent.class;
+ }
+
private static TopComponent create(final Long uiId) {
final ModellingListSectionAddTopComponent top = new ModellingListSectionAddTopComponent();
top.setSousModeleUid(uiId);
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListSectionsNodeAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListSectionsNodeAction.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingListSectionsNodeAction.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -2,6 +2,7 @@
import org.fudaa.fudaa.crue.modelling.list.AbstractModellingListTopComponent;
import org.fudaa.fudaa.crue.modelling.list.ModellingListSectionTopComponent;
+import org.openide.nodes.Node;
import org.openide.util.NbBundle;
/**
@@ -20,6 +21,11 @@
return new ModellingListSectionTopComponent();
}
+ @Override
+ protected Class getExpectedTopComponentClass(Node selectedNode) {
+ return ModellingListSectionTopComponent.class;
+ }
+
public static class Reopen extends ModellingListSectionsNodeAction {
public Reopen() {
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingModeleOPTGNodeAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingModeleOPTGNodeAction.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingModeleOPTGNodeAction.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -2,6 +2,7 @@
import org.fudaa.fudaa.crue.modelling.calcul.AbstractModeleTopComponent;
import org.fudaa.fudaa.crue.modelling.calcul.ModellingModeleOPTGTopComponent;
+import org.openide.nodes.Node;
import org.openide.util.NbBundle;
/**
@@ -20,6 +21,11 @@
return new ModellingModeleOPTGTopComponent();
}
+ @Override
+ protected Class getExpectedTopComponentClass(Node selectedNode) {
+ return ModellingModeleOPTGTopComponent.class;
+ }
+
public static class Reopen extends ModellingModeleOPTGNodeAction {
public Reopen() {
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingModeleOPTINodeAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingModeleOPTINodeAction.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingModeleOPTINodeAction.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -2,6 +2,7 @@
import org.fudaa.fudaa.crue.modelling.calcul.AbstractModeleTopComponent;
import org.fudaa.fudaa.crue.modelling.calcul.ModellingModeleOPTITopComponent;
+import org.openide.nodes.Node;
import org.openide.util.NbBundle;
/**
@@ -20,6 +21,11 @@
return new ModellingModeleOPTITopComponent();
}
+ @Override
+ protected Class getExpectedTopComponentClass(Node selectedNode) {
+ return ModellingModeleOPTITopComponent.class;
+ }
+
public static class Reopen extends ModellingModeleOPTINodeAction {
public Reopen() {
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingModeleOPTRNodeAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingModeleOPTRNodeAction.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingModeleOPTRNodeAction.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -2,6 +2,7 @@
import org.fudaa.fudaa.crue.modelling.calcul.AbstractModeleTopComponent;
import org.fudaa.fudaa.crue.modelling.calcul.ModellingModeleOPTRTopComponent;
+import org.openide.nodes.Node;
import org.openide.util.NbBundle;
/**
@@ -20,6 +21,11 @@
return new ModellingModeleOPTRTopComponent();
}
+ @Override
+ protected Class getExpectedTopComponentClass(Node selectedNode) {
+ return ModellingModeleOPTRTopComponent.class;
+ }
+
public static class Reopen extends ModellingModeleOPTRNodeAction {
public Reopen() {
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingModelePNUMNodeAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingModelePNUMNodeAction.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingModelePNUMNodeAction.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -2,6 +2,7 @@
import org.fudaa.fudaa.crue.modelling.calcul.AbstractModeleTopComponent;
import org.fudaa.fudaa.crue.modelling.calcul.ModellingModelePNUMTopComponent;
+import org.openide.nodes.Node;
import org.openide.util.NbBundle;
/**
@@ -20,6 +21,11 @@
return new ModellingModelePNUMTopComponent();
}
+ @Override
+ protected Class getExpectedTopComponentClass(Node selectedNode) {
+ return ModellingModelePNUMTopComponent.class;
+ }
+
public static class Reopen extends ModellingModelePNUMNodeAction {
public Reopen() {
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingScenarioORESNodeAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingScenarioORESNodeAction.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingScenarioORESNodeAction.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -1,6 +1,7 @@
package org.fudaa.fudaa.crue.modelling.action;
import org.fudaa.fudaa.crue.modelling.calcul.ModellingScenarioORESTopComponent;
+import org.openide.nodes.Node;
import org.openide.util.NbBundle;
/**
@@ -19,6 +20,11 @@
return new ModellingScenarioORESTopComponent();
}
+ @Override
+ protected Class getExpectedTopComponentClass(Node selectedNode) {
+ return ModellingScenarioORESTopComponent.class;
+ }
+
public static class Reopen extends ModellingScenarioORESNodeAction {
public Reopen() {
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingScenarioPCALNodeAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingScenarioPCALNodeAction.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/action/ModellingScenarioPCALNodeAction.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -1,6 +1,7 @@
package org.fudaa.fudaa.crue.modelling.action;
import org.fudaa.fudaa.crue.modelling.calcul.ModellingScenarioPCALTopComponent;
+import org.openide.nodes.Node;
import org.openide.util.NbBundle;
/**
@@ -19,6 +20,11 @@
return new ModellingScenarioPCALTopComponent();
}
+ @Override
+ protected Class getExpectedTopComponentClass(Node selectedNode) {
+ return ModellingScenarioPCALTopComponent.class;
+ }
+
public static class Reopen extends ModellingScenarioPCALNodeAction {
public Reopen() {
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/ModellingOpenEMHNodeAction.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/ModellingOpenEMHNodeAction.java 2012-07-12 21:56:07 UTC (rev 7490)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/ModellingOpenEMHNodeAction.java 2012-07-13 06:51:55 UTC (rev 7491)
@@ -43,6 +43,12 @@
return top;
}
+ @Override
+ protected Class getExpectedTopComponentClass(Node selectedNode) {
+ EMH emh = selectedNode.getLookup().lookup(EMH.class);
+ return getClass(emh);
+ }
+
public static void open(EMH emh, boolean reopen) {
if (emh == null) {
return;
@@ -59,6 +65,7 @@
}
private AbstractModellingEMHTopComponent create(EMH emh) {
+ //TODO voir si on peut partir de la class et creer par introspection
EnumCatEMH catType = emh.getCatType();
switch (catType) {
case NOEUD:
@@ -74,6 +81,22 @@
throw new UnsupportedOperationException("Not supported yet.");
}
+ private Class getClass(EMH emh) {
+ EnumCatEMH catType = emh.getCatType();
+ switch (catType) {
+ case NOEUD:
+ return ModellingEMHNoeudTopComponent.class;
+ case SECTION:
+ return ModellingEMHSectionTopComponent.class;
+ case CASIER:
+ return ModellingEMHCasierTopComponent.class;
+ case BRANCHE:
+ //TODO a continuer pour les types de branches:
+ return ModellingEMHBrancheTopComponent.class;
+ }
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
@Override
protected String getMode(TopComponent top) {
Class<? extends TopComponent> aClass = top.getClass();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|