void () { TreePath path = getTree().getSelectionPath(); if (path == null) return; myAutoScrollToSourceHandler.setShouldAutoScroll(false); TreeUtil.showRowCentered(getTree(), getTree().getRowForPath(path), false); myAutoScrollToSourceHandler.setShouldAutoScroll(true); }