// update control points.
// TODO : this should be optimized.
try {
- for (INode node : rootNode.getChild()) {
- if (node instanceof PipeRun) {
- for (PipelineComponent pc : ((PipeRun) node).getChild())
- pc.sync();
- } else if (node instanceof Equipment) {
- for (PipelineComponent pc : ((Equipment) node).getChild())
- pc.sync();
- }
- }
-
- for (INode node : rootNode.getChild()) {
- if (node instanceof PipeRun) {
- for (PipelineComponent pc : ((PipeRun) node).getChild())
- pc.sync2();
- } else if (node instanceof Equipment) {
- for (PipelineComponent pc : ((Equipment) node).getChild())
- pc.sync2();
- }
- }
- for (INode node : rootNode.getChild()) {
- if (node instanceof PipeRun) {
- PipingRules.validate((PipeRun)node);
- }
- }
- PipingRules.setEnabled(true);
- for (INode node : rootNode.getChild()) {
- if (node instanceof PipeRun) {
- PipeRun run = (PipeRun)node;
- for (PipeControlPoint pcp : run.getControlPoints())
- PipingRules.positionUpdate(pcp);
-
- }
- }
+ P3DUtil.finalizeDBLoad(rootNode);
+
} catch (Exception e) {
throw new DatabaseException(e);
}
return;
}
- translateAction = new TranslateAction(panel,nodeMap);
- translateInlineAction = new TranslateInlineAction(panel, nodeMap);
- rotateAction = new RotateAction(panel,nodeMap);
- removeAction = new RemoveAction(nodeMap) {
- public void setNode(IG3DNode node) {
- super.setNode(node);
-
-
- }
- };
- routePipeAction = new RoutePipeAction(panel,rootNode);
- addComponentAction = new AddComponentAction(panel, rootNode);
+ createActions();
}
+ protected void createActions() {
+ translateAction = new TranslateAction(panel,nodeMap);
+ translateInlineAction = new TranslateInlineAction(panel, nodeMap);
+ rotateAction = new RotateAction(panel,nodeMap);
+ removeAction = new RemoveAction(nodeMap) {
+ public void setNode(IG3DNode node) {
+ super.setNode(node);
+
+
+ }
+ };
+ routePipeAction = new RoutePipeAction(panel,rootNode);
+ addComponentAction = new AddComponentAction(panel, rootNode);
+ }
+
public void populate() {
ThreadUtils.asyncExec(panel.getThreadQueue(), new Runnable() {