|
a/tool/run/plugins/basic/nodeTools.java |
|
b/tool/run/plugins/basic/nodeTools.java |
|
... |
|
... |
47 |
/**
|
47 |
/**
|
48 |
* Add our toolbox node to the treeview.
|
48 |
* Add our toolbox node to the treeview.
|
49 |
*/
|
49 |
*/
|
50 |
public void addNode(){
|
50 |
public void addNode(){
|
51 |
JTree tree = core.studio.getTree();
|
51 |
JTree tree = core.studio.getTree();
|
|
|
52 |
// avoid empty null objects when there is nothing on the tree
|
|
|
53 |
if(tree.getModel().getRoot()==null){
|
|
|
54 |
return;
|
|
|
55 |
}
|
52 |
TreeNodeSPDX nodeRoot = (TreeNodeSPDX) tree.getModel().getRoot();
|
56 |
TreeNodeSPDX nodeRoot = (TreeNodeSPDX) tree.getModel().getRoot();
|
53 |
TreeNodeSPDX node = swingUtils.nodeCreate("Tools", NodeType.none, nodeRoot);
|
57 |
TreeNodeSPDX node = swingUtils.nodeCreate("Tools", NodeType.none, nodeRoot);
|
54 |
node.setIcon("toolbox.png");
|
58 |
node.setIcon("toolbox.png");
|
55 |
// all finished, write this data on GUI tree list
|
59 |
// all finished, write this data on GUI tree list
|
56 |
DefaultTreeModel treeModel = new DefaultTreeModel(nodeRoot);
|
60 |
DefaultTreeModel treeModel = new DefaultTreeModel(nodeRoot);
|