public Object execute(final ExecutionEvent event) throws ExecutionException { // assumes there is only one application node final IApplicationNode applicationNode = ApplicationNodeManager.getApplicationNode(); final List<ISubApplicationNode> children = applicationNode.getChildren(); final INavigationNode<?>[] nodes = children.toArray(new ISubApplicationNode[children.size()]); final INavigationNode<?> nextNode = toNext ? findNextNode(nodes) : findPreviousNode(nodes, true); if (nextNode != null) { nextNode.activate(); } return null; }
public IProgressVisualizer getProgressVisualizer(final Object context) { final IProgressVisualizer aVisualizer = new ProgressVisualizer(); if (context != null && INavigationNode.class.isAssignableFrom(context.getClass())) { final INavigationNode<?> node = INavigationNode.class.cast(context); final IStatuslineUIProcessRidget statuslineUIProcessRidget = getStatuslineUIProcessRidget(); if (statuslineUIProcessRidget != null) { aVisualizer.addObserver(statuslineUIProcessRidget); } ISubApplicationNode subApp = node.getParentOfType(ISubApplicationNode.class); if (subApp == null && context instanceof ISubApplicationNode) { subApp = (ISubApplicationNode) context; } if (subApp != null) { aVisualizer.addObserver(getUIProcessRidget(subApp)); aVisualizer.addObserver(createObserver(node)); } } return aVisualizer; }
/** Returns true if this node is selected. */ @Override protected boolean isSelected(final INavigationNode<?> node) { return node.isSelected(); }