if (subProcessNets.length > 1)
warnings
.add("- SKIP SUBPROCESS NET: Only one sub-process net may be defined per sub-process.");
NetType subProcessNet = subProcessNets[0];
ModelElementContainer container = ((SubProcessModel) element)
.getSimpleTransContainer();
importNet(subProcessNet, container);
// Now see whether we have any
// tool-specific information
// attached to the sub-net
// This might contain layout information
// for the sub-process editor
for (int j = 0; j < subProcessNet
.getToolspecificArray().length; ++j)
if (subProcessNet
.getToolspecificArray(j)
.getTool().equals("WoPeD")) {
if (subProcessNet
.getToolspecificArray(j)
.isSetBounds()) {
Dimension dim = new Dimension(
subProcessNet
.getToolspecificArray(
j)
.getBounds()
.getDimension()
.getX()
.intValue(),
subProcessNet
.getToolspecificArray(
j)
.getBounds()
.getDimension()
.getY()
.intValue());
Point location = new Point(
subProcessNet
.getToolspecificArray(
j)
.getBounds()
.getPosition()
.getX()
.intValue(),
subProcessNet
.getToolspecificArray(
j)
.getBounds()
.getPosition()
.getY()
.intValue());
EditorLayoutInfo layout = new EditorLayoutInfo();
layout.setSavedSize(dim);
layout
.setSavedLocation(location);
// Only if also the
// remaining information is
// available,
// try to import the width
// of the tree view
if (subProcessNet.getToolspecificArray(j).isSetTreeWidth()){
layout.setTreeViewWidthRight(subProcessNet.getToolspecificArray(j).getBounds()
.getDimension().getX().intValue() - subProcessNet.getToolspecificArray(j).getTreeWidth());
}
if (subProcessNet.getToolspecificArray(j).isSetTreeWidthRight()){
layout.setTreeViewWidthRight(subProcessNet.getToolspecificArray(j).getTreeWidthRight());
}
if(subProcessNet.getToolspecificArray(j).isSetOverviewPanelVisible()){
layout.setOverviewPanelVisible(subProcessNet.getToolspecificArray(j).getOverviewPanelVisible());
}else{
layout.setOverviewPanelVisible(true);
}
if(subProcessNet.getToolspecificArray(j).isSetTreeHeightOverview()){
layout.setTreeHeightOverview(subProcessNet.getToolspecificArray(j).getTreeHeightOverview());
}
if(subProcessNet.getToolspecificArray(j).isSetTreePanelVisible()){
layout.setTreePanelVisible(subProcessNet.getToolspecificArray(j).getTreePanelVisible());
}else{
layout.setTreePanelVisible(true);
}
container.setEditorLayoutInfo(layout);
}
}
}
}
}