Search in sources :

Example 1 with QueryLogViewer

use of org.jkiss.dbeaver.ui.controls.querylog.QueryLogViewer in project dbeaver by serge-rider.

the class QueryManagerView method createPartControl.

@Override
public void createPartControl(Composite parent) {
    Composite group = UIUtils.createPlaceholder(parent, 1);
    queryLogViewer = new QueryLogViewer(group, getSite(), null, true);
    UIUtils.setHelp(group, IHelpContextIds.CTX_QUERY_MANAGER);
}
Also used : Composite(org.eclipse.swt.widgets.Composite) QueryLogViewer(org.jkiss.dbeaver.ui.controls.querylog.QueryLogViewer)

Example 2 with QueryLogViewer

use of org.jkiss.dbeaver.ui.controls.querylog.QueryLogViewer in project dbeaver by serge-rider.

the class TransactionInfoDialog method createTransactionLogPanel.

protected void createTransactionLogPanel(Composite composite) {
    DBCExecutionContext context = getCurrentContext();
    QMEventFilter filter = context == null ? VOID_FILTER : createContextFilter(context);
    logViewer = new QueryLogViewer(composite, activeEditor.getSite(), filter, false);
    logViewer.setUseDefaultFilter(false);
    final Object gd = logViewer.getControl().getLayoutData();
    if (gd instanceof GridData) {
        ((GridData) gd).heightHint = logViewer.getControl().getHeaderHeight() + logViewer.getControl().getItemHeight() * 5;
    }
    showAllCheck = UIUtils.createCheckbox(composite, "Show all queries", "Show all transaction queries. Otherwise shows only modifying queries.", false, 1);
    showAllCheck.addSelectionListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(SelectionEvent e) {
            updateTransactionFilter();
        }
    });
    showPreviousCheck = UIUtils.createCheckbox(composite, "Show previous transactions", "Show previous transactions. Otherwise shows only active one.", false, 1);
    showPreviousCheck.addSelectionListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(SelectionEvent e) {
            updateTransactionFilter();
        }
    });
}
Also used : DBCExecutionContext(org.jkiss.dbeaver.model.exec.DBCExecutionContext) QMEventFilter(org.jkiss.dbeaver.model.qm.QMEventFilter) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) GridData(org.eclipse.swt.layout.GridData) SelectionEvent(org.eclipse.swt.events.SelectionEvent) QMMObject(org.jkiss.dbeaver.model.qm.meta.QMMObject) QueryLogViewer(org.jkiss.dbeaver.ui.controls.querylog.QueryLogViewer)

Aggregations

QueryLogViewer (org.jkiss.dbeaver.ui.controls.querylog.QueryLogViewer)2 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)1 SelectionEvent (org.eclipse.swt.events.SelectionEvent)1 GridData (org.eclipse.swt.layout.GridData)1 Composite (org.eclipse.swt.widgets.Composite)1 DBCExecutionContext (org.jkiss.dbeaver.model.exec.DBCExecutionContext)1 QMEventFilter (org.jkiss.dbeaver.model.qm.QMEventFilter)1 QMMObject (org.jkiss.dbeaver.model.qm.meta.QMMObject)1