Package com.dci.intellij.dbn.connection

Examples of com.dci.intellij.dbn.connection.ConnectionManager$CloseIdleConnectionTask


        for (ConnectionHandler virtualConnectionHandler : projectConnectionBundle.getVirtualConnections()) {
            SelectConnectionAction connectionAction = new SelectConnectionAction(virtualConnectionHandler);
            add(connectionAction);
        }

        ConnectionManager connectionManager = ConnectionManager.getInstance(project);
        for (ConnectionBundle connectionBundle : connectionManager.getConnectionBundles()) {
            if (connectionBundle.getConnectionHandlers().size() > 0) {
                addSeparator();
                for (ConnectionHandler connectionHandler : connectionBundle.getConnectionHandlers()) {
                    SelectConnectionAction connectionAction = new SelectConnectionAction(connectionHandler);
                    add(connectionAction);
View Full Code Here


        }
        return false;
    }

    public void invoke(@NotNull Project project, Editor editor, PsiFile psiFile) throws IncorrectOperationException {
        ConnectionManager connectionManager = ConnectionManager.getInstance(project);
        List<ConnectionBundle> connectionBundles = connectionManager.getConnectionBundles();

        DefaultActionGroup actionGroup = new DefaultActionGroup();
        DBLanguageFile dbLanguageFile = (DBLanguageFile) psiFile;

        boolean connectionsFound = false;
View Full Code Here

            // lookup connection mappings
            ConnectionHandler connectionHandler = virtualFile.getUserData(ACTIVE_CONNECTION_KEY);
            if (connectionHandler == null) {
                FileConnectionMapping mapping = lookupMapping(virtualFile);
                if (mapping != null) {
                    ConnectionManager connectionManager = ConnectionManager.getInstance(project);
                    connectionHandler = connectionManager.getConnectionHandler(mapping.getConnectionId());
                    if (connectionHandler == null) connectionHandler =
                            ProjectConnectionBundle.getInstance(project).getVirtualConnection(mapping.getConnectionId());

                    if (connectionHandler != null)
                        virtualFile.putUserData(ACTIVE_CONNECTION_KEY, connectionHandler);
View Full Code Here

    }

    @Override
    public void afterAction(ConnectionHandler connectionHandler, TransactionAction action, boolean succeeded) {
        ConnectionManager connectionManager = ConnectionManager.getInstance(getProject());
        if (!connectionManager.hasUncommittedChanges()) {
            new ConditionalLaterInvocator() {
                @Override
                public void execute() {
                    getCancelAction().putValue(Action.NAME, "Close");
                    commitAllAction.setEnabled(false);
View Full Code Here

    private void initTabs() {
        Project project = getProject();
        connectionTabs.dispose();
        connectionTabs = new TabbedPane(project);
        ConnectionManager connectionManager = ConnectionManager.getInstance(project);
        for (ConnectionBundle connectionBundle : connectionManager.getConnectionBundles()) {
            for (ConnectionHandler connectionHandler: connectionBundle.getConnectionHandlers()) {
                SimpleBrowserForm browserForm = new SimpleBrowserForm(connectionHandler);
                JComponent component = browserForm.getComponent();
                TabInfo tabInfo = new TabInfo(component);
                tabInfo.setText(connectionHandler.getName());
View Full Code Here

                ConnectionBundle connectionBundle = databaseSettings.getConnectionBundle();

                if (source == testButton || source == infoButton) {
                    temporaryConfig = new GenericConnectionDatabaseSettings(connectionBundle);
                    applyChanges(temporaryConfig);
                    ConnectionManager connectionManager = ConnectionManager.getInstance(connectionBundle.getProject());

                    if (source == testButton) connectionManager.testConfigConnection(temporaryConfig, true);
                    if (source == infoButton) connectionManager.showConnectionInfo(temporaryConfig, null);
                }
                else if (source == osAuthenticationCheckBox) {
                    userTextField.setEnabled(!osAuthenticationCheckBox.isSelected());
                    passwordField.setEnabled(!osAuthenticationCheckBox.isSelected());
                    getConfiguration().setModified(true);
View Full Code Here

    }

    public void expandConnectionManagers() {
        new SimpleLaterInvocator() {
            public void execute() {
                ConnectionManager connectionManager = ConnectionManager.getInstance(getProject());
                List<ConnectionBundle> connectionBundles = connectionManager.getConnectionBundles();
                for (ConnectionBundle connectionBundle : connectionBundles) {
                    TreePath treePath = DatabaseBrowserUtils.createTreePath(connectionBundle);
                    setExpandedState(treePath, true);
                }
            }
View Full Code Here

        EventManager.subscribe(project, TransactionListener.TOPIC, this);
    }

    private void updateListModel() {
        DefaultListModel model = new DefaultListModel();
        ConnectionManager connectionManager = ConnectionManager.getInstance(project);
        for (ConnectionBundle connectionBundle : connectionManager.getConnectionBundles()) {
            for (ConnectionHandler connectionHandler : connectionBundle.getConnectionHandlers()) {
                if (connectionHandler.hasUncommittedChanges()) {
                    connectionHandlers.add(connectionHandler);
                    model.addElement(connectionHandler);
                }
View Full Code Here

        new BackgroundTask(project, "Loading database information for " + connectionHandler.getName(), false) {
            @Override
            public void execute(@NotNull ProgressIndicator progressIndicator) {
                initProgressIndicator(progressIndicator, true);

                ConnectionManager connectionManager = ConnectionManager.getInstance(project);
                connectionManager.showConnectionInfo(connectionHandler.getSettings());
            }
        }.start();

    }
View Full Code Here

        final Project project = connectionHandler.getProject();
        new BackgroundTask(project, "Trying to connect to " + connectionHandler.getName(), false) {
            @Override
            public void execute(@NotNull ProgressIndicator progressIndicator) {
                initProgressIndicator(progressIndicator, true);
                ConnectionManager connectionManager = ConnectionManager.getInstance(project);
                connectionManager.testConnection(connectionHandler, true);
            }
        }.start();

    }
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.connection.ConnectionManager$CloseIdleConnectionTask

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.