use of org.jkiss.dbeaver.ui.navigator.database.DatabaseNavigatorTree in project dbeaver by dbeaver.
the class NavigatorHandlerConnectionFilter method execute.
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
if (activePart instanceof DatabaseNavigatorView) {
DatabaseNavigatorTree navigatorTree = ((DatabaseNavigatorView) activePart).getNavigatorTree();
navigatorTree.setFilterShowConnected(!navigatorTree.isFilterShowConnected());
navigatorTree.getViewer().getControl().setRedraw(false);
try {
navigatorTree.getViewer().refresh();
} finally {
navigatorTree.getViewer().getControl().setRedraw(true);
}
}
ActionUtils.fireCommandRefresh(NavigatorCommands.CMD_FILTER_CONNECTIONS);
return null;
}
Aggregations