Search in sources :

Example 1 with EditTaskConfigurationDialog

use of org.jkiss.dbeaver.tasks.ui.wizard.EditTaskConfigurationDialog in project dbeaver by serge-rider.

the class TaskHandlerProperties method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    final ISelection selection = HandlerUtil.getCurrentSelection(event);
    if (selection instanceof IStructuredSelection) {
        IStructuredSelection structSelection = (IStructuredSelection) selection;
        Object element = structSelection.getFirstElement();
        if (element instanceof DBTTask) {
            EditTaskConfigurationDialog dialog = new EditTaskConfigurationDialog(HandlerUtil.getActiveShell(event), (DBTTask) element);
            dialog.open();
        }
    }
    return null;
}
Also used : EditTaskConfigurationDialog(org.jkiss.dbeaver.tasks.ui.wizard.EditTaskConfigurationDialog) DBTTask(org.jkiss.dbeaver.model.task.DBTTask) ISelection(org.eclipse.jface.viewers.ISelection) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection)

Example 2 with EditTaskConfigurationDialog

use of org.jkiss.dbeaver.tasks.ui.wizard.EditTaskConfigurationDialog in project dbeaver by dbeaver.

the class TaskHandlerProperties method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    final ISelection selection = HandlerUtil.getCurrentSelection(event);
    if (selection instanceof IStructuredSelection) {
        IStructuredSelection structSelection = (IStructuredSelection) selection;
        Object element = structSelection.getFirstElement();
        if (element instanceof DBTTask) {
            EditTaskConfigurationDialog dialog = new EditTaskConfigurationDialog(HandlerUtil.getActiveShell(event), (DBTTask) element);
            dialog.open();
        }
    }
    return null;
}
Also used : EditTaskConfigurationDialog(org.jkiss.dbeaver.tasks.ui.wizard.EditTaskConfigurationDialog) DBTTask(org.jkiss.dbeaver.model.task.DBTTask) ISelection(org.eclipse.jface.viewers.ISelection) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection)

Aggregations

ISelection (org.eclipse.jface.viewers.ISelection)2 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)2 DBTTask (org.jkiss.dbeaver.model.task.DBTTask)2 EditTaskConfigurationDialog (org.jkiss.dbeaver.tasks.ui.wizard.EditTaskConfigurationDialog)2