public void performActionAt(int index) { NewType[] nt = newTypes (); // bugfix #41587, AIOBE if array is empty if (nt.length <= index) { return; } Node[] arr; if (lookup != null) { arr = (Node[])lookup.lookup (new Lookup.Template (Node.class)).allInstances ().toArray (new Node[0]); } else { arr = WindowManager.getDefault().getRegistry ().getCurrentNodes (); } performAction (arr, nt[index]); }
public void performActionAt(int index) { NewType[] nt = newTypes (); // bugfix #41587, AIOBE if array is empty if (nt.length <= index) { return; } Node[] arr; if (lookup != null) { arr = (Node[])lookup.lookup (new Lookup.Template (Node.class)).allInstances ().toArray (new Node[0]); } else { arr = WindowManager.getDefault().getRegistry ().getCurrentNodes (); } performAction (arr, nt[index]); }
private static Node[] getSelectedNodes() { return TopComponent.getRegistry().getCurrentNodes(); }
private Node[] nodes() { return WindowManager.getDefault().getRegistry().getCurrentNodes(); }
/** Getter for array of activated new types. */ private static NewType[] getNewTypes () { return getNewTypes ( WindowManager.getDefault().getRegistry ().getCurrentNodes () ); }
/** Getter for array of activated new types. */ private static NewType[] getNewTypes () { return getNewTypes ( WindowManager.getDefault().getRegistry ().getCurrentNodes () ); }