Package com.dci.intellij.dbn.connection

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


        }
    }

    public void writeExternal(Element element) throws WriteExternalException {
        for (String connectionId : filters.keySet()){
            ConnectionManager connectionManager = ConnectionManager.getInstance(getProject());
            if (connectionManager.getConnectionHandler(connectionId) != null) {
                Map<String, DatasetFilterGroup> filterLists = filters.get(connectionId);
                for (String datasetName : filterLists.keySet()) {
                    DatasetFilterGroup filterGroup = filterLists.get(datasetName);
                    Element filterListElement = new Element("filter-list");
                    filterGroup.writeConfiguration(filterListElement);
View Full Code Here


        for (ConnectionHandler virtualConnectionHandler : projectConnectionManager.getVirtualConnections()) {
            SelectConnectionAction connectionAction = new SelectConnectionAction(browserComponent, virtualConnectionHandler);
            actionGroup.add(connectionAction);
        }

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

        return datasetName;
    }

    @Nullable
    public DBDataset lookupDataset() {
        ConnectionManager connectionManager = ConnectionManager.getInstance(project);
        ConnectionHandler connectionHandler = connectionManager.getConnectionHandler(getConnectionId());
        if (connectionHandler != null) {
            int index = getDatasetName().lastIndexOf('.');
            String schemaName = getDatasetName().substring(0, index);
            DBSchema schema = connectionHandler.getObjectBundle().getSchema(schemaName);
            if (schema != null) {
View Full Code Here

        return collector.getBucket() == null ? EMPTY_ARRAY : collector.getBucket().toArray();
    }

    private void scanObjectLists(DBObjectListVisitor visitor) {
        if (selectedConnection == null || selectedConnection instanceof VirtualConnectionHandler) {
            ConnectionManager connectionManager = ConnectionManager.getInstance(project);
            Set<ConnectionHandler> connectionHandlers = connectionManager.getConnectionHandlers();
            for (ConnectionHandler connectionHandler : connectionHandlers) {
                if (breakLoad()) break;
                DBObjectListContainer objectListContainer = connectionHandler.getObjectBundle().getObjectListContainer();
                objectListContainer.visitLists(visitor, false);
            }
View Full Code Here

            ObjectsLookupSettings objectsLookupSettings = GlobalProjectSettings.getInstance(project).getNavigationSettings().getObjectsLookupSettings();
            if (objectsLookupSettings.getPromptConnectionSelection().value()) {
                ConnectionHandler singleConnectionHandler = null;
                DefaultActionGroup actionGroup = new DefaultActionGroup();

                ConnectionManager connectionManager = ConnectionManager.getInstance(project);
                List<ConnectionBundle> connectionBundles = connectionManager.getConnectionBundles();
                for (ConnectionBundle connectionBundle : connectionBundles) {
                    if (connectionBundle.getConnectionHandlers().size() > 0) {
                        if ((actionGroup.getChildrenCount() > 1)) {
                            actionGroup.addSeparator();
                        }

                        for (ConnectionHandler connectionHandler : connectionBundle.getConnectionHandlers()) {
                            SelectConnectionAction connectionAction = new SelectConnectionAction(connectionHandler);
                            actionGroup.add(connectionAction);
                            singleConnectionHandler = connectionHandler;
                        }
                    }
                }

                if (actionGroup.getChildrenCount() > 1) {
                    removeActionLock();
                    ListPopup popupBuilder = JBPopupFactory.getInstance().createActionGroupPopup(
                            "Select connection for lookup",
                            actionGroup,
                            event.getDataContext(),
                            //JBPopupFactory.ActionSelectionAid.SPEEDSEARCH,
                            true,
                            true,
                            true,
                            null,
                            actionGroup.getChildrenCount(),
                            new Condition<AnAction>() {
                                public boolean value(AnAction action) {
                                    SelectConnectionAction selectConnectionAction = (SelectConnectionAction) action;
                                    return latestSelection == selectConnectionAction.connectionHandler;
                                }
                            });

                    popupBuilder.showCenteredInCurrentWindow(project);
                } else {
                    showLookupPopup(event, project, singleConnectionHandler, null);
                }
            } else {
                ConnectionManager connectionManager = ConnectionManager.getInstance(project);
                ConnectionHandler connectionHandler = connectionManager.getActiveConnection(project);
                showLookupPopup(event, project, connectionHandler, null);
            }
        }
    }
View Full Code Here

    @Override
    public void actionPerformed(AnActionEvent e) {
        //FeatureUsageTracker.getInstance().triggerFeatureUsed("navigation.popup.file");
        Project project = ActionUtil.getProject(e);
        if (project != null) {
            ConnectionManager connectionManager = ConnectionManager.getInstance(project);
            List<ConnectionBundle> connectionBundles = connectionManager.getConnectionBundles();


            ConnectionHandler singleConnectionHandler = null;
            DefaultActionGroup actionGroup = new DefaultActionGroup();
            for (ConnectionBundle connectionBundle : connectionBundles) {
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.