Search in sources :

Example 31 with DBNDataSource

use of org.jkiss.dbeaver.model.navigator.DBNDataSource in project dbeaver by serge-rider.

the class DataSourcePropertyTester method test.

@Override
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
    try {
        // Get root datasource node (we don't want to
        while (receiver instanceof DBNDatabaseNode && !(receiver instanceof DBNDataSource)) {
            receiver = ((DBNDatabaseNode) receiver).getParentNode();
        }
        if (!(receiver instanceof DBPContextProvider)) {
            return false;
        }
        DBPContextProvider contextProvider = (DBPContextProvider) receiver;
        @Nullable DBCExecutionContext context = contextProvider.getExecutionContext();
        switch(property) {
            case PROP_CONNECTED:
                boolean isConnected;
                if (context != null) {
                    isConnected = context.getDataSource().getContainer().isConnected();
                } else if (receiver instanceof IDataSourceContainerProvider) {
                    DBPDataSourceContainer container = ((IDataSourceContainerProvider) receiver).getDataSourceContainer();
                    isConnected = container != null && container.isConnected();
                } else {
                    isConnected = false;
                }
                boolean checkConnected = Boolean.TRUE.equals(expectedValue);
                return checkConnected ? isConnected : !isConnected;
            case PROP_TRANSACTIONAL:
                {
                    if (context == null) {
                        return false;
                    }
                    if (!context.isConnected()) {
                        return Boolean.FALSE.equals(expectedValue);
                    }
                    DBCTransactionManager txnManager = DBUtils.getTransactionManager(context);
                    try {
                        return txnManager != null && Boolean.valueOf(!txnManager.isAutoCommit()).equals(expectedValue);
                    } catch (DBCException e) {
                        log.debug("Error checking auto-commit state", e);
                        return false;
                    }
                }
            case PROP_SUPPORTS_TRANSACTIONS:
                {
                    if (context == null || !context.isConnected()) {
                        return false;
                    }
                    DBCTransactionManager txnManager = DBUtils.getTransactionManager(context);
                    return txnManager != null && txnManager.isSupportsTransactions();
                }
            case PROP_TRANSACTION_ACTIVE:
                if (context != null && context.isConnected()) {
                    DBCTransactionManager txnManager = DBUtils.getTransactionManager(context);
                    return txnManager != null && !txnManager.isAutoCommit();
                // boolean active = QMUtils.isTransactionActive(context);
                // return Boolean.valueOf(active).equals(expectedValue);
                }
                return Boolean.FALSE.equals(expectedValue);
        }
        return false;
    } catch (Exception e) {
        log.debug("Error testing property " + property + ": " + e.getMessage());
        return false;
    }
}
Also used : IDataSourceContainerProvider(org.jkiss.dbeaver.model.IDataSourceContainerProvider) DBPContextProvider(org.jkiss.dbeaver.model.DBPContextProvider) DBNDataSource(org.jkiss.dbeaver.model.navigator.DBNDataSource) DBNDatabaseNode(org.jkiss.dbeaver.model.navigator.DBNDatabaseNode) DBPDataSourceContainer(org.jkiss.dbeaver.model.DBPDataSourceContainer) Nullable(org.jkiss.code.Nullable)

Example 32 with DBNDataSource

use of org.jkiss.dbeaver.model.navigator.DBNDataSource in project dbeaver by serge-rider.

the class NavigateBookmarkHandler method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    NavigatorViewBase activeNavigatorView = NavigatorUtils.getActiveNavigatorView(event);
    if (activeNavigatorView != null) {
        DBNNode selectedNode = NavigatorUtils.getSelectedNode(HandlerUtil.getCurrentSelection(event));
        if (selectedNode instanceof DBNBookmark) {
            BookmarkStorage storage = ((DBNBookmark) selectedNode).getStorage();
            final DBPDataSourceContainer dataSourceContainer = DBUtils.findDataSource(storage.getDataSourceId());
            if (dataSourceContainer == null) {
                // $NON-NLS-2$
                log.debug("Can't find datasource '" + storage.getDataSourceId() + "'");
                return null;
            }
            final DBNDataSource dsNode = (DBNDataSource) DBNUtils.getNodeByObject(dataSourceContainer);
            if (dsNode == null) {
                // $NON-NLS-2$
                log.error("Can't find datasource node for '" + dataSourceContainer.getName() + "'");
                return null;
            }
            if (activeNavigatorView instanceof ProjectExplorerView) {
                // Show in DB navigator is we are currently in project explorer
                final IWorkbenchPage activePage = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
                IViewPart dbNavigatorPart = activePage.findView(DatabaseNavigatorView.VIEW_ID);
                if (dbNavigatorPart instanceof NavigatorViewBase) {
                    activeNavigatorView = (NavigatorViewBase) dbNavigatorPart;
                    try {
                        activePage.showView(DatabaseNavigatorView.VIEW_ID);
                    } catch (PartInitException e) {
                        log.debug(e);
                    }
                }
            }
            NavigatorViewBase navigatorView = activeNavigatorView;
            try {
                dsNode.initializeNode(null, status -> {
                    if (status.isOK()) {
                        UIUtils.syncExec(() -> BookmarksHandlerImpl.navigateNodeByPath(navigatorView, dsNode, storage));
                    }
                });
            } catch (DBException e) {
                log.error(e);
            }
        }
    }
    return null;
}
Also used : DBException(org.jkiss.dbeaver.DBException) IViewPart(org.eclipse.ui.IViewPart) ProjectExplorerView(org.jkiss.dbeaver.ui.navigator.project.ProjectExplorerView) DBNNode(org.jkiss.dbeaver.model.navigator.DBNNode) DBNDataSource(org.jkiss.dbeaver.model.navigator.DBNDataSource) NavigatorViewBase(org.jkiss.dbeaver.ui.navigator.database.NavigatorViewBase) IWorkbenchPage(org.eclipse.ui.IWorkbenchPage) BookmarkStorage(org.jkiss.dbeaver.ui.resources.bookmarks.BookmarkStorage) PartInitException(org.eclipse.ui.PartInitException) DBNBookmark(org.jkiss.dbeaver.ui.resources.bookmarks.DBNBookmark) DBPDataSourceContainer(org.jkiss.dbeaver.model.DBPDataSourceContainer)

Example 33 with DBNDataSource

use of org.jkiss.dbeaver.model.navigator.DBNDataSource in project dbeaver by serge-rider.

the class AddBookmarkHandler method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    final Shell activeShell = HandlerUtil.getActiveShell(event);
    final ISelection selection = HandlerUtil.getCurrentSelection(event);
    if (!selection.isEmpty() && selection instanceof IStructuredSelection) {
        final DBNNode node = NavigatorUtils.getSelectedNode(selection);
        if (node instanceof DBNDataSource) {
            DBWorkbench.getPlatformUI().showError(CoreMessages.actions_navigator_bookmark_error_title, "Connection itself cannot be bookmarked. Choose some element under a connection element.");
            return null;
        }
        if (node instanceof DBNDatabaseNode) {
            try {
                AddBookmarkDialog dialog = new AddBookmarkDialog(activeShell, (DBNDatabaseNode) node);
                final String title = dialog.chooseName();
                if (title != null) {
                    BookmarksHandlerImpl.createBookmark((DBNDatabaseNode) node, title, dialog.getTargetFolder());
                }
            } catch (DBException e) {
                DBWorkbench.getPlatformUI().showError(CoreMessages.actions_navigator_bookmark_error_title, CoreMessages.actions_navigator_bookmark_error_message, e);
            }
        }
    }
    return null;
}
Also used : DBException(org.jkiss.dbeaver.DBException) Shell(org.eclipse.swt.widgets.Shell) DBNNode(org.jkiss.dbeaver.model.navigator.DBNNode) DBNDataSource(org.jkiss.dbeaver.model.navigator.DBNDataSource) DBNDatabaseNode(org.jkiss.dbeaver.model.navigator.DBNDatabaseNode)

Example 34 with DBNDataSource

use of org.jkiss.dbeaver.model.navigator.DBNDataSource in project dbeaver by serge-rider.

the class DiagramCreateWizardPage method createControl.

@Override
public void createControl(Composite parent) {
    Composite placeholder = UIUtils.createPlaceholder(parent, 1);
    Composite configGroup = UIUtils.createControlGroup(placeholder, ERDUIMessages.wizard_page_diagram_create_group_settings, 2, GridData.FILL_BOTH, 0);
    // $NON-NLS-1$
    final Text projectNameText = UIUtils.createLabelText(configGroup, "Name", null);
    projectNameText.addModifyListener(new ModifyListener() {

        @Override
        public void modifyText(ModifyEvent e) {
            diagram.setName(projectNameText.getText());
            updateState();
        }
    });
    Label contentLabel = UIUtils.createControlLabel(configGroup, ERDUIMessages.wizard_page_diagram_create_label_init_content);
    GridData gd = new GridData(GridData.BEGINNING);
    gd.horizontalSpan = 2;
    contentLabel.setLayoutData(gd);
    final DBNProject rootNode = DBWorkbench.getPlatform().getNavigatorModel().getRoot().getProjectNode(DBWorkbench.getPlatform().getWorkspace().getActiveProject());
    if (rootNode == null) {
        setControl(placeholder);
        return;
    }
    contentTree = new DatabaseNavigatorTree(configGroup, rootNode.getDatabases(), SWT.SINGLE | SWT.CHECK);
    gd = new GridData(GridData.FILL_BOTH);
    gd.horizontalSpan = 2;
    gd.heightHint = 400;
    contentTree.setLayoutData(gd);
    CheckboxTreeViewer viewer = (CheckboxTreeViewer) contentTree.getViewer();
    viewer.setCheckStateProvider(new ICheckStateProvider() {

        @Override
        public boolean isChecked(Object element) {
            return false;
        }

        @Override
        public boolean isGrayed(Object element) {
            if (element instanceof DBNDatabaseNode && !(element instanceof DBNDataSource)) {
                DBSObject object = ((DBNDatabaseNode) element).getObject();
                if (object instanceof DBSTable) {
                    return false;
                }
            }
            return true;
        }
    });
    if (entitySelection != null) {
        viewer.setSelection(entitySelection, true);
        viewer.setCheckedElements(entitySelection.toArray());
    }
    setControl(placeholder);
}
Also used : DBNProject(org.jkiss.dbeaver.model.navigator.DBNProject) DBSTable(org.jkiss.dbeaver.model.struct.rdb.DBSTable) Composite(org.eclipse.swt.widgets.Composite) ModifyListener(org.eclipse.swt.events.ModifyListener) ICheckStateProvider(org.eclipse.jface.viewers.ICheckStateProvider) DBNDataSource(org.jkiss.dbeaver.model.navigator.DBNDataSource) Label(org.eclipse.swt.widgets.Label) Text(org.eclipse.swt.widgets.Text) DatabaseNavigatorTree(org.jkiss.dbeaver.ui.navigator.database.DatabaseNavigatorTree) CheckboxTreeViewer(org.eclipse.jface.viewers.CheckboxTreeViewer) DBSObject(org.jkiss.dbeaver.model.struct.DBSObject) ModifyEvent(org.eclipse.swt.events.ModifyEvent) GridData(org.eclipse.swt.layout.GridData) DBSObject(org.jkiss.dbeaver.model.struct.DBSObject) DBNDatabaseNode(org.jkiss.dbeaver.model.navigator.DBNDatabaseNode)

Example 35 with DBNDataSource

use of org.jkiss.dbeaver.model.navigator.DBNDataSource in project dbeaver by serge-rider.

the class SQLScriptTaskPageSettings method createControl.

@Override
public void createControl(Composite parent) {
    initializeDialogUnits(parent);
    Composite composite = UIUtils.createComposite(parent, 1);
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    SQLScriptExecuteSettings dtSettings = getWizard().getSettings();
    SashForm mainGroup = new SashForm(composite, SWT.NONE);
    mainGroup.setSashWidth(5);
    mainGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
    DBNProject projectNode = DBWorkbench.getPlatform().getNavigatorModel().getRoot().getProjectNode(sqlWizard.getProject());
    {
        Composite filesGroup = UIUtils.createControlGroup(mainGroup, DTMessages.sql_script_task_page_settings_group_files, 2, GridData.FILL_BOTH, 0);
        scriptsViewer = new TableViewer(filesGroup, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
        scriptsViewer.setContentProvider(new ListContentProvider());
        scriptsViewer.getTable().setHeaderVisible(true);
        scriptsViewer.setLabelProvider(new ColumnLabelProvider() {

            @Override
            public String getText(Object element) {
                return ((DBNResource) element).getResource().getProjectRelativePath().toString();
            }

            @Override
            public Image getImage(Object element) {
                return DBeaverIcons.getImage(((DBNResource) element).getNodeIconDefault());
            }
        });
        scriptsViewer.addDoubleClickListener(event -> {
            StructuredSelection selection = (StructuredSelection) event.getSelection();
            IResource resource = ((DBNResource) selection.getFirstElement()).getResource();
            if (resource != null) {
                DBPResourceHandler handler = DBWorkbench.getPlatform().getWorkspace().getResourceHandler(resource);
                if (handler != null) {
                    try {
                        handler.openResource(resource);
                    } catch (Exception e) {
                        log.error("Failed to open resource " + resource, e);
                    }
                }
            }
        });
        // GridData gd = new GridData(GridData.FILL_BOTH);
        // gd.heightHint = 300;
        // gd.widthHint = 400;
        // scriptsViewer.getTable().setLayoutData(gd);
        SQLScriptTaskScriptSelectorDialog.createScriptColumns(scriptsViewer);
        final Table scriptTable = scriptsViewer.getTable();
        scriptTable.setLayoutData(new GridData(GridData.FILL_BOTH));
        ToolBar buttonsToolbar = new ToolBar(filesGroup, SWT.VERTICAL);
        buttonsToolbar.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
        UIUtils.createToolItem(buttonsToolbar, DTUIMessages.sql_script_task_page_settings_tool_item_text_add_script, UIIcon.ROW_ADD, new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                SQLScriptTaskScriptSelectorDialog dialog = new SQLScriptTaskScriptSelectorDialog(getShell(), projectNode);
                if (dialog.open() == IDialogConstants.OK_ID) {
                    for (DBNResource script : dialog.getSelectedScripts()) {
                        if (!selectedScripts.contains(script)) {
                            selectedScripts.add(script);
                        }
                    }
                    refreshScripts();
                }
            }
        });
        ToolItem deleteItem = UIUtils.createToolItem(buttonsToolbar, DTUIMessages.sql_script_task_page_settings_tool_item_text_remove_script, UIIcon.ROW_DELETE, new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                ISelection selection = scriptsViewer.getSelection();
                if (!selection.isEmpty() && selection instanceof IStructuredSelection) {
                    for (Object element : ((IStructuredSelection) selection).toArray()) {
                        if (element instanceof DBNResource) {
                            selectedScripts.remove(element);
                        }
                    }
                    refreshScripts();
                }
            }
        });
        UIUtils.createToolBarSeparator(buttonsToolbar, SWT.HORIZONTAL);
        ToolItem moveUpItem = UIUtils.createToolItem(buttonsToolbar, DTUIMessages.sql_script_task_page_settings_tool_item_text_move_script_up, UIIcon.ARROW_UP, new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                int selectionIndex = scriptTable.getSelectionIndex();
                if (selectionIndex > 0) {
                    DBNResource prevScript = selectedScripts.get(selectionIndex - 1);
                    selectedScripts.set(selectionIndex - 1, selectedScripts.get(selectionIndex));
                    selectedScripts.set(selectionIndex, prevScript);
                    refreshScripts();
                }
            }
        });
        ToolItem moveDownItem = UIUtils.createToolItem(buttonsToolbar, DTUIMessages.sql_script_task_page_settings_tool_item_text_move_script_down, UIIcon.ARROW_DOWN, new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                int selectionIndex = scriptTable.getSelectionIndex();
                if (selectionIndex < scriptTable.getItemCount() - 1) {
                    DBNResource nextScript = selectedScripts.get(selectionIndex + 1);
                    selectedScripts.set(selectionIndex + 1, selectedScripts.get(selectionIndex));
                    selectedScripts.set(selectionIndex, nextScript);
                    refreshScripts();
                }
            }
        });
        scriptsViewer.addSelectionChangedListener(event -> {
            int selectionIndex = scriptTable.getSelectionIndex();
            deleteItem.setEnabled(selectionIndex >= 0);
            moveUpItem.setEnabled(selectionIndex > 0);
            moveDownItem.setEnabled(selectionIndex < scriptTable.getItemCount() - 1);
        });
        deleteItem.setEnabled(false);
    }
    {
        Composite connectionsGroup = UIUtils.createControlGroup(mainGroup, DTMessages.sql_script_task_page_settings_group_connections, 2, GridData.FILL_BOTH, 0);
        dataSourceViewer = new TableViewer(connectionsGroup, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
        dataSourceViewer.setContentProvider(new ListContentProvider());
        // dataSourceViewer.getTable().setHeaderVisible(true);
        dataSourceViewer.setLabelProvider(new ColumnLabelProvider() {

            @Override
            public String getText(Object element) {
                return ((DBNDataSource) element).getNodeName();
            }

            @Override
            public Image getImage(Object element) {
                return DBeaverIcons.getImage(((DBNDataSource) element).getNodeIcon());
            }
        });
        GridData gd = new GridData(GridData.FILL_BOTH);
        gd.heightHint = 300;
        gd.widthHint = 400;
        dataSourceViewer.getTable().setLayoutData(gd);
        final Table dsTable = dataSourceViewer.getTable();
        dsTable.setLayoutData(new GridData(GridData.FILL_BOTH));
        ToolBar buttonsToolbar = new ToolBar(connectionsGroup, SWT.VERTICAL);
        buttonsToolbar.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
        UIUtils.createToolItem(buttonsToolbar, DTUIMessages.sql_script_task_page_settings_tool_item_text_add_data_source, UIIcon.ROW_ADD, new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                SQLScriptTaskDataSourceSelectorDialog dialog = new SQLScriptTaskDataSourceSelectorDialog(getShell(), projectNode);
                if (dialog.open() == IDialogConstants.OK_ID) {
                    for (DBNDataSource ds : dialog.getSelectedDataSources()) {
                        if (!selectedDataSources.contains(ds)) {
                            selectedDataSources.add(ds);
                        }
                    }
                    refreshDataSources();
                    updatePageCompletion();
                }
            }
        });
        ToolItem deleteItem = UIUtils.createToolItem(buttonsToolbar, DTUIMessages.sql_script_task_page_settings_tool_item_text_remove_data_source, UIIcon.ROW_DELETE, new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                ISelection selection = dataSourceViewer.getSelection();
                if (!selection.isEmpty() && selection instanceof IStructuredSelection) {
                    for (Object element : ((IStructuredSelection) selection).toArray()) {
                        if (element instanceof DBNDataSource) {
                            selectedDataSources.remove(element);
                        }
                    }
                    refreshDataSources();
                    updatePageCompletion();
                }
            }
        });
        UIUtils.createToolBarSeparator(buttonsToolbar, SWT.HORIZONTAL);
        ToolItem moveUpItem = UIUtils.createToolItem(buttonsToolbar, DTUIMessages.sql_script_task_page_settings_tool_item_text_move_data_source_up, UIIcon.ARROW_UP, new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                int selectionIndex = dsTable.getSelectionIndex();
                if (selectionIndex > 0) {
                    DBNDataSource prevScript = selectedDataSources.get(selectionIndex - 1);
                    selectedDataSources.set(selectionIndex - 1, selectedDataSources.get(selectionIndex));
                    selectedDataSources.set(selectionIndex, prevScript);
                    refreshDataSources();
                }
            }
        });
        ToolItem moveDownItem = UIUtils.createToolItem(buttonsToolbar, DTUIMessages.sql_script_task_page_settings_tool_item_text_move_data_source_down, UIIcon.ARROW_DOWN, new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                int selectionIndex = dsTable.getSelectionIndex();
                if (selectionIndex < dsTable.getItemCount() - 1) {
                    DBNDataSource nextScript = selectedDataSources.get(selectionIndex + 1);
                    selectedDataSources.set(selectionIndex + 1, selectedDataSources.get(selectionIndex));
                    selectedDataSources.set(selectionIndex, nextScript);
                    refreshScripts();
                }
            }
        });
        dataSourceViewer.addSelectionChangedListener(event -> {
            int selectionIndex = dsTable.getSelectionIndex();
            deleteItem.setEnabled(selectionIndex >= 0);
            moveUpItem.setEnabled(selectionIndex > 0);
            moveDownItem.setEnabled(selectionIndex < dsTable.getItemCount() - 1);
        });
        deleteItem.setEnabled(false);
    }
    {
        Composite settingsGroup = UIUtils.createControlGroup(composite, DTMessages.sql_script_task_page_settings_group_script, 3, GridData.HORIZONTAL_ALIGN_BEGINNING, 0);
        ignoreErrorsCheck = UIUtils.createCheckbox(settingsGroup, DTMessages.sql_script_task_page_settings_option_ignore_errors, "", dtSettings.isIgnoreErrors(), 1);
        dumpQueryCheck = UIUtils.createCheckbox(settingsGroup, DTMessages.sql_script_task_page_settings_option_dump_results, "", dtSettings.isDumpQueryResultsToLog(), 1);
        dumpQueryCheck.setEnabled(false);
        autoCommitCheck = UIUtils.createCheckbox(settingsGroup, DTMessages.sql_script_task_page_settings_option_auto_commit, "", dtSettings.isAutoCommit(), 1);
    }
    getWizard().createTaskSaveButtons(composite, true, 1);
    loadSettings();
    setControl(composite);
}
Also used : DBWorkbench(org.jkiss.dbeaver.runtime.DBWorkbench) ActiveWizardPage(org.jkiss.dbeaver.ui.dialogs.ActiveWizardPage) ListContentProvider(org.jkiss.dbeaver.ui.controls.ListContentProvider) java.util(java.util) SashForm(org.eclipse.swt.custom.SashForm) Image(org.eclipse.swt.graphics.Image) IDialogConstants(org.eclipse.jface.dialogs.IDialogConstants) DBNDataSource(org.jkiss.dbeaver.model.navigator.DBNDataSource) DBNResource(org.jkiss.dbeaver.model.navigator.DBNResource) DBeaverIcons(org.jkiss.dbeaver.ui.DBeaverIcons) SQLScriptExecuteSettings(org.jkiss.dbeaver.tools.sql.SQLScriptExecuteSettings) UIUtils(org.jkiss.dbeaver.ui.UIUtils) Log(org.jkiss.dbeaver.Log) DBNProject(org.jkiss.dbeaver.model.navigator.DBNProject) IFile(org.eclipse.core.resources.IFile) UIIcon(org.jkiss.dbeaver.ui.UIIcon) GridData(org.eclipse.swt.layout.GridData) DBPProject(org.jkiss.dbeaver.model.app.DBPProject) DTMessages(org.jkiss.dbeaver.tools.transfer.internal.DTMessages) DTUIMessages(org.jkiss.dbeaver.tools.transfer.ui.internal.DTUIMessages) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) CommonUtils(org.jkiss.utils.CommonUtils) org.eclipse.swt.widgets(org.eclipse.swt.widgets) org.eclipse.jface.viewers(org.eclipse.jface.viewers) DBPDataSourceContainer(org.jkiss.dbeaver.model.DBPDataSourceContainer) List(java.util.List) IResource(org.eclipse.core.resources.IResource) SWT(org.eclipse.swt.SWT) SelectionEvent(org.eclipse.swt.events.SelectionEvent) DBPResourceHandler(org.jkiss.dbeaver.model.app.DBPResourceHandler) SQLScriptExecuteSettings(org.jkiss.dbeaver.tools.sql.SQLScriptExecuteSettings) ListContentProvider(org.jkiss.dbeaver.ui.controls.ListContentProvider) SelectionEvent(org.eclipse.swt.events.SelectionEvent) DBNProject(org.jkiss.dbeaver.model.navigator.DBNProject) DBNDataSource(org.jkiss.dbeaver.model.navigator.DBNDataSource) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) DBNResource(org.jkiss.dbeaver.model.navigator.DBNResource) SashForm(org.eclipse.swt.custom.SashForm) GridData(org.eclipse.swt.layout.GridData) DBPResourceHandler(org.jkiss.dbeaver.model.app.DBPResourceHandler) IResource(org.eclipse.core.resources.IResource)

Aggregations

DBNDataSource (org.jkiss.dbeaver.model.navigator.DBNDataSource)59 DBPDataSourceContainer (org.jkiss.dbeaver.model.DBPDataSourceContainer)26 DBNNode (org.jkiss.dbeaver.model.navigator.DBNNode)23 DBNDatabaseNode (org.jkiss.dbeaver.model.navigator.DBNDatabaseNode)17 DBException (org.jkiss.dbeaver.DBException)15 DBSObject (org.jkiss.dbeaver.model.struct.DBSObject)13 DBNResource (org.jkiss.dbeaver.model.navigator.DBNResource)12 DBNProject (org.jkiss.dbeaver.model.navigator.DBNProject)10 ArrayList (java.util.ArrayList)8 ISelection (org.eclipse.jface.viewers.ISelection)8 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)8 DBNLocalFolder (org.jkiss.dbeaver.model.navigator.DBNLocalFolder)8 IFile (org.eclipse.core.resources.IFile)6 IWorkbenchPart (org.eclipse.ui.IWorkbenchPart)6 SQLScriptExecuteSettings (org.jkiss.dbeaver.tools.sql.SQLScriptExecuteSettings)6 GridData (org.eclipse.swt.layout.GridData)5 IResource (org.eclipse.core.resources.IResource)4 CheckboxTreeViewer (org.eclipse.jface.viewers.CheckboxTreeViewer)4 ICheckStateProvider (org.eclipse.jface.viewers.ICheckStateProvider)4 ModifyEvent (org.eclipse.swt.events.ModifyEvent)4