use of org.jkiss.dbeaver.model.admin.sessions.DBAServerSessionManager in project dbeaver by serge-rider.
the class PostgreSessionEditor method createSessionViewer.
@Override
protected SessionManagerViewer createSessionViewer(DBCExecutionContext executionContext, Composite parent) {
return new SessionManagerViewer<PostgreSession>(this, parent, new PostgreSessionManager((PostgreDataSource) executionContext.getDataSource())) {
@Override
protected void contributeToToolbar(DBAServerSessionManager sessionManager, IContributionManager contributionManager) {
contributionManager.add(terminateQueryAction);
contributionManager.add(new Separator());
}
@Override
protected void onSessionSelect(DBAServerSession session) {
super.onSessionSelect(session);
terminateQueryAction.setEnabled(session != null);
}
};
}
Aggregations