public static NodeViewer getActiveViewer() {
WorldObject wo = getActiveObject();
NodeViewer viewer = null;
if (wo instanceof UINodeViewable) {
UINodeViewable node = (UINodeViewable)wo;
if (node.isViewerWindowVisible())
viewer = node.getViewer();
}
if (viewer == null)
viewer = getParentViewer(wo);
return viewer;