Package com.dci.intellij.dbn.common.thread

Examples of com.dci.intellij.dbn.common.thread.SimpleLaterInvocator


                progressIndicator.setIndeterminate(true);
                ActionGroup actionGroup = new DatasetEditorTableActionGroup(datasetEditor, cell, columnInfo);
                if (!progressIndicator.isCanceled()) {
                    ActionPopupMenu actionPopupMenu = ActionManager.getInstance().createActionPopupMenu("", actionGroup);
                    final JPopupMenu popupMenu = actionPopupMenu.getComponent();
                    new SimpleLaterInvocator() {
                        public void execute() {
                            popupMenu.show((Component) event.getSource(), event.getX(), event.getY());
                        }
                    }.start();
                }
View Full Code Here


        }
        return false;
    }

    public void showErrorPopup() {
        new SimpleLaterInvocator() {
            public void execute() {
                if (!isDisposed()) {
                    DatasetEditorModel model = getRow().getModel();
                    if (!model.getEditorTable().isShowing()) {
                        DBDataset dataset = getDataset();
View Full Code Here

            }.start();
        }
    }

    private void handleLoadError(final SQLException e, final DatasetLoadInstructions instr) {
        new SimpleLaterInvocator() {
            public void execute() {
                DBDataset dataset = getDataset();
                if (!isDisposed() && dataset != null) {
                    focusEditor();
                    DatabaseMessageParserInterface messageParserInterface = getConnectionHandler().getInterfaceProvider().getMessageParserInterface();
View Full Code Here

                    try {
                        initProgressIndicator(progressIndicator, true, "Executing " + method.getQualifiedNameWithType());
                        executionInput.initExecutionResult(false);
                        executionProcessor.execute(executionInput);
                        if (!executionInput.isExecutionCancelled()) {
                            new SimpleLaterInvocator() {
                                public void execute() {
                                    ExecutionManager executionManager = ExecutionManager.getInstance(project);
                                    executionManager.showExecutionConsole(executionInput.getExecutionResult());
                                    executionInput.setExecuting(false);
                                }
                            }.start();
                        }

                        executionInput.setExecutionCancelled(false);
                    } catch (final SQLException e) {
                        executionInput.setExecuting(false);
                        if (!executionInput.isExecutionCancelled()) {
                            new SimpleLaterInvocator() {
                                public void execute() {
                                    MessageUtil.showErrorDialog("Could not execute " + method.getTypeName() + ".", e);
                                    if (promptExecutionDialog(executionInput, false)) {
                                        MethodExecutionManager.this.execute(executionInput);
                                    }
View Full Code Here

        final MethodExecutionProcessor executionProcessor = executionInterface.createDebugExecutionProcessor(method);
        try {
            executionInput.initExecutionResult(true);
            executionProcessor.execute(executionInput, connection);
            if (!executionInput.isExecutionCancelled()) {
                new SimpleLaterInvocator() {
                    public void execute() {
                        ExecutionManager executionManager = ExecutionManager.getInstance(method.getProject());
                        executionManager.showExecutionConsole(executionInput.getExecutionResult());
                    }
                }.start();
            }
            executionInput.setExecutionCancelled(false);
            return true;
        } catch (final SQLException e) {
            if (!executionInput.isExecutionCancelled()) {
                new SimpleLaterInvocator() {
                    public void execute() {
                        MessageUtil.showErrorDialog("Could not execute " + method.getTypeName() + ".", e);
                    }
                }.start();
            }
View Full Code Here

        return true;
    }

    private void showSourceDiffDialog(final String databaseContent, final SourceCodeFile virtualFile, final Editor editor) {
        new SimpleLaterInvocator() {
            public void execute() {
                DiffRequestFactory diffRequestFactory = new DiffRequestFactoryImpl();
                MergeRequest mergeRequest = diffRequestFactory.createMergeRequest(
                        databaseContent,
                        virtualFile.getContent(),
View Full Code Here

                initProgressIndicator(progressIndicator, true);
                List<DBObject> objects = getObjectList();
                if (!progressIndicator.isCanceled()) {
                    if (objects.size() > 0) {
                        final ObjectListActionGroup actionGroup = new ObjectListActionGroup(ObjectListShowAction.this, objects);
                        new SimpleLaterInvocator() {
                            public void execute() {
                                JBPopup popup = JBPopupFactory.getInstance().createActionGroupPopup(
                                        ObjectListShowAction.this.getTitle(),
                                        actionGroup,
                                        e.getDataContext(),
                                        JBPopupFactory.ActionSelectionAid.SPEEDSEARCH,
                                        true, null, 10);

                                popup.getContent().setBackground(Colors.LIGHT_BLUE);
                                showPopup(popup);
                            }
                        }.start();

                    }
                    else {
                        new SimpleLaterInvocator() {
                            public void execute() {
                                JLabel label = new JLabel(getEmptyListMessage(), Icons.EXEC_MESSAGES_INFO, SwingConstants.LEFT);
                                label.setBorder(new EmptyBorder(3, 3, 3, 3));
                                JPanel panel = new JPanel(new BorderLayout());
                                panel.add(label);
View Full Code Here

            showErrorDialog(e);
        }
    }

    private void navigateInEditor(final DatabaseEditableObjectFile databaseFile, final int line) {
        new SimpleLaterInvocator() {
            public void execute() {
                // todo review this!!!
                SourceCodeEditor sourceCodeEditor = null;
                if (databaseFile.getContentFiles().size() > 1) {
                    FileEditorManager editorManager = FileEditorManager.getInstance(databaseFile.getProject());
View Full Code Here

                            settings.setMethod(currentMethod);
                        }

                        final ObjectTreeModel objectTreeModel = new ObjectTreeModel(settings.getSchema(), settings.getVisibleObjectTypes(), settings.getMethod());

                        new SimpleLaterInvocator() {
                            public void execute() {
                                final MethodExecutionBrowserDialog browserDialog = new MethodExecutionBrowserDialog(project, settings, objectTreeModel);
                                browserDialog.show();
                                if (browserDialog.getExitCode() == DialogWrapper.OK_EXIT_CODE) {
                                    DBMethod method = browserDialog.getSelectedMethod();
View Full Code Here

    private DatabaseLoaderManager(final Project project) {
        super(project);
        EventManager.subscribe(project, ConnectionLoadListener.TOPIC, new ConnectionLoadListener() {
            @Override
            public void contentsLoaded(final ConnectionHandler connectionHandler) {
                new SimpleLaterInvocator() {
                    @Override
                    public void execute() {
                        if (!project.isDisposed()) {
                            FileEditorManager fileEditorManager = FileEditorManager.getInstance(project);
                            FileConnectionMappingManager connectionMappingManager = FileConnectionMappingManager.getInstance(project);
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.common.thread.SimpleLaterInvocator

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.