/** Called under Children.MUTEX to refresh the currently selected nodes. */ public void run () { if (readAccessPaths == null) { return; } TreePath[] paths = readAccessPaths; // non null value caused leak in // ComponentInspector // When the last Form was closed then the ComponentInspector was // closed as well. Since this variable was not null - // last selected Node (RADComponentNode) was held ---> FormManager2 was held, etc. readAccessPaths = null; java.util.List ll = new java.util.ArrayList(paths.length); for (int i = 0; i < paths.length; i++) { Node n = Visualizer.findNode (paths[i].getLastPathComponent ()); if (n == manager.getRootContext() || n.getParentNode() != null) { ll.add (n); } } callSelectionChanged ((Node[])ll.toArray (new Node[ll.size ()])); }
/** Called under Children.MUTEX to refresh the currently selected nodes. */ public void run () { if (readAccessPaths == null) { return; } TreePath[] paths = readAccessPaths; // non null value caused leak in // ComponentInspector // When the last Form was closed then the ComponentInspector was // closed as well. Since this variable was not null - // last selected Node (RADComponentNode) was held ---> FormManager2 was held, etc. readAccessPaths = null; java.util.List ll = new java.util.ArrayList(paths.length); for (int i = 0; i < paths.length; i++) { Node n = Visualizer.findNode (paths[i].getLastPathComponent ()); if (n == manager.getRootContext() || n.getParentNode() != null) { ll.add (n); } } callSelectionChanged ((Node[])ll.toArray (new Node[ll.size ()])); }
/** Called under Children.MUTEX to refresh the currently selected nodes. */ @Override public void run() { if (readAccessPaths == null) { return; } TreePath[] paths = readAccessPaths; // non null value caused leak in // ComponentInspector // When the last Form was closed then the ComponentInspector was // closed as well. Since this variable was not null - // last selected Node (RADComponentNode) was held ---> FormManager2 was held, etc. readAccessPaths = null; java.util.List<Node> ll = new java.util.ArrayList<Node>(paths.length); for (int i = 0; i < paths.length; i++) { Node n = Visualizer.findNode(paths[i].getLastPathComponent()); n = getOriginalNode (n); if( isUnderRoot( manager.getRootContext(), n ) ) { ll.add(n); } } callSelectionChanged(ll.toArray(new Node[ll.size()])); }
public void valueChanged(TreeSelectionEvent ev) { TreePath[] paths = tree.getSelectionPaths (); storeSelectedPaths = Arrays.asList (paths == null ? new TreePath[0] : paths); if (paths == null) { // part of bugfix #37279, if DnD is active then is useless select a nearby node if (ExplorerDnDManager.getDefault().isDnDActive()) { return ; } callSelectionChanged (new Node[0]); } else { // we need to force no changes to nodes hierarchy => // we are requesting read request, but it is not necessary // to execute the next action immediatelly, so postReadRequest // should be enough readAccessPaths = paths; Children.MUTEX.postReadRequest(this); } }
public void valueChanged(TreeSelectionEvent ev) { TreePath[] paths = tree.getSelectionPaths (); storeSelectedPaths = Arrays.asList (paths == null ? new TreePath[0] : paths); if (paths == null) { // part of bugfix #37279, if DnD is active then is useless select a nearby node if (ExplorerDnDManager.getDefault().isDnDActive()) { return ; } callSelectionChanged (new Node[0]); } else { // we need to force no changes to nodes hierarchy => // we are requesting read request, but it is not necessary // to execute the next action immediatelly, so postReadRequest // should be enough readAccessPaths = paths; Children.MUTEX.postReadRequest(this); } }
@Override public void valueChanged(TreeSelectionEvent ev) { TreePath[] paths = tree.getSelectionPaths(); if (paths == null) { // part of bugfix #37279, if DnD is active then is useless select a nearby node if (ExplorerDnDManager.getDefault().isDnDActive()) { return; } callSelectionChanged(new Node[0]); } else { // we need to force no changes to nodes hierarchy => // we are requesting read request, but it is not necessary // to execute the next action immediatelly, so postReadRequest // should be enough readAccessPaths = paths; Children.MUTEX.postReadRequest(this); } }