Ejemplo n.º 1
0
 // todo: will work bad e.g. if operating with project data from modules pool
 public MPSTreeNode findNextTreeNode(SModel modelDescriptor) {
   SModelTreeNode sModelNode = findMostSuitableModelTreeNode(modelDescriptor);
   if (sModelNode == null) return null;
   DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode) sModelNode.getParent();
   TreeNode result = parentNode.getChildAfter(sModelNode);
   if (result == null) result = parentNode.getChildBefore(sModelNode);
   if (result == null) result = parentNode;
   return (MPSTreeNode) result;
 }
Ejemplo n.º 2
0
 // todo: will work bad e.g. if operating with project data from modules pool
 public MPSTreeNode findNextTreeNode(SNode node) {
   MPSTreeNode foundNode = findMostSuitableSNodeTreeNode(node);
   if (foundNode == null) return null;
   DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode) foundNode.getParent();
   TreeNode result = parentNode.getChildAfter(foundNode);
   if (result == null) result = parentNode.getChildBefore(foundNode);
   if (result == null) result = parentNode;
   return (MPSTreeNode) result;
 }