use of org.jkiss.dbeaver.ext.exasol.model.ExasolDataSource in project dbeaver by serge-rider.
the class ExasolServerSessionEditor method createSessionViewer.
@Override
protected SessionManagerViewer createSessionViewer(DBCExecutionContext executionContext, Composite parent) {
return new SessionManagerViewer(this, parent, new ExasolServerSessionManager((ExasolDataSource) executionContext.getDataSource())) {
@Override
@SuppressWarnings("rawtypes")
protected void contributeToToolbar(DBAServerSessionManager sessionManager, IContributionManager contributionManager) {
contributionManager.add(killSessionAction);
contributionManager.add(terminateQueryAction);
contributionManager.add(new Separator());
}
@Override
protected void onSessionSelect(DBAServerSession session) {
super.onSessionSelect(session);
killSessionAction.setEnabled(session != null);
terminateQueryAction.setEnabled(session != null && !CommonUtils.isEmpty(session.getActiveQuery()));
}
};
}
Aggregations