private void scrollToSelectedElement() { if (myAutoscrollFeedback) { myAutoscrollFeedback = false; return; } StructureViewFactoryImpl structureViewFactory = (StructureViewFactoryImpl) StructureViewFactoryEx.getInstance(myProject); if (!structureViewFactory.getState().AUTOSCROLL_FROM_SOURCE) { return; } myAutoscrollAlarm.cancelAllRequests(); myAutoscrollAlarm.addRequest( new Runnable() { public void run() { if (myAbstractTreeBuilder == null) { return; } try { selectViewableElement(); } catch (IndexNotReadyException ignore) { } } }, 1000); }
public boolean isActionActive(String name) { return !myProject.isDisposed() && StructureViewFactoryEx.getInstanceEx(myProject).isActionActive(name); }
public void setActionActive(String name, boolean state) { StructureViewFactoryEx.getInstanceEx(myProject).setActiveAction(name, state); rebuild(); TreeUtil.expand(getTree(), 2); }