Search in sources :

Example 26 with DBTTask

use of org.jkiss.dbeaver.model.task.DBTTask 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

DBTTask (org.jkiss.dbeaver.model.task.DBTTask)26 DBException (org.jkiss.dbeaver.DBException)14 ISelection (org.eclipse.jface.viewers.ISelection)10 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)10 DBTTaskType (org.jkiss.dbeaver.model.task.DBTTaskType)6 InvocationTargetException (java.lang.reflect.InvocationTargetException)4 DBPImage (org.jkiss.dbeaver.model.DBPImage)4 DBPProject (org.jkiss.dbeaver.model.app.DBPProject)4 DBTTaskManager (org.jkiss.dbeaver.model.task.DBTTaskManager)4 TaskWizardExecutor (org.jkiss.dbeaver.tasks.ui.wizard.TaskWizardExecutor)4 ArrayList (java.util.ArrayList)2 Date (java.util.Date)2 LinkedHashMap (java.util.LinkedHashMap)2 Map (java.util.Map)2 Action (org.eclipse.jface.action.Action)2 IDialogConstants (org.eclipse.jface.dialogs.IDialogConstants)2 IDialogSettings (org.eclipse.jface.dialogs.IDialogSettings)2 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)2 SWT (org.eclipse.swt.SWT)2 ModifyListener (org.eclipse.swt.events.ModifyListener)2