void (DefaultActionGroup actionGroup) { AutoScrollToSourceHandler autoScrollToSourceHandler = new AutoScrollToSourceHandler() { @Override protected boolean isAutoScrollMode() { return myStateBean.myAutoScrollToSource; } @Override protected void setAutoScrollMode(boolean state) { myStateBean.myAutoScrollToSource = state; } }; autoScrollToSourceHandler.install(myTable.getTree()); actionGroup.add(autoScrollToSourceHandler.createToggleAction()); }