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

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


    public void fireExecution(final StatementExecutionProcessor executionProcessor) {
        boolean continueExecution = selectConnection(executionProcessor.getFile());
        if (continueExecution) {
            continueExecution = executionProcessor.promptVariablesDialog();
            if (continueExecution) {
                new BackgroundTask(getProject(), "Executing statement", false, true) {
                    public void execute(@NotNull ProgressIndicator progressIndicator) {
                        initProgressIndicator(progressIndicator, true);
                        executionProcessor.execute(progressIndicator);
                    }
                }.start();
View Full Code Here


                for (StatementExecutionProcessor executionProcessor : executionProcessors) {
                    continueExecution = executionProcessor.promptVariablesDialog();
                    if (!continueExecution) break;
                }
                if (continueExecution) {
                    new BackgroundTask(getProject(), "Executing statement", false, true) {
                        public void execute(@NotNull ProgressIndicator progressIndicator) {
                            boolean showIndeterminateProgress = executionProcessors.size() < 5;
                            initProgressIndicator(progressIndicator, showIndeterminateProgress);

                            for (int i = 0; i < executionProcessors.size(); i++) {
View Full Code Here

        } else {
            final Project project = method.getProject();
            DatabaseExecutionInterface executionInterface = method.getConnectionHandler().getInterfaceProvider().getDatabaseExecutionInterface();
            final MethodExecutionProcessor executionProcessor = executionInterface.createExecutionProcessor(method);

            new BackgroundTask(project, "Executing method", false) {
                public void execute(@NotNull ProgressIndicator progressIndicator) {
                    try {
                        initProgressIndicator(progressIndicator, true, "Executing " + method.getQualifiedNameWithType());
                        executionInput.initExecutionResult(false);
                        executionProcessor.execute(executionInput);
View Full Code Here

            final Project project = virtualFile.getProject();
            final DBContentType contentType = virtualFile.getContentType();
            object.getStatus().set(DBObjectStatus.SAVING, true);

            new BackgroundTask(project, "Checking for third party changes on " + object.getQualifiedNameWithType(), true) {
                public void execute(@NotNull ProgressIndicator progressIndicator) {
                    try {
                        String content = editor.getDocument().getText();
                        if (isValidObjectTypeAndName(content, object, contentType)) {
                            Timestamp lastUpdated = object.loadChangeTimestamp(contentType);
View Full Code Here

        }.start();
    }


    private void doUpdateSourceToDatabase(final DBSchemaObject object, final SourceCodeFile virtualFile, final Editor editor) {
        new BackgroundTask(object.getProject(), "Saving " + object.getQualifiedNameWithType() + " to database", true) {

            @Override
            public void execute(@NotNull ProgressIndicator indicator) {
                try {
                    String content = editor.getDocument().getText();
View Full Code Here

    public abstract String getTitle();
    public abstract String getEmptyListMessage();
    public abstract String getListName();

    public final void actionPerformed(final AnActionEvent e) {
        new BackgroundTask(sourceObject.getProject(), "Loading " + getListName(), false, true) {

            @Override
            public void execute(@NotNull ProgressIndicator progressIndicator) {
                initProgressIndicator(progressIndicator, true);
                List<DBObject> objects = getObjectList();
View Full Code Here

    public List<? extends BrowserTreeNode> getTreeChildren() {
        if (visibleTreeChildren == null) {
            visibleTreeChildren = new ArrayList<BrowserTreeNode>();
            visibleTreeChildren.add(new LoadInProgressTreeNode(this));
            new BackgroundTask(getProject(), "Loading data dictionary", true) {
                public void execute(@NotNull ProgressIndicator progressIndicator) {
                    buildTreeChildren();
                }
            }.start();
View Full Code Here

        }
    }

    public void refreshObjectsStatus() {
        if (DatabaseCompatibilityInterface.getInstance(getConnectionHandler()).supportsFeature(DatabaseFeature.OBJECT_INVALIDATION)) {
            new BackgroundTask(getProject(), "Updating objects status", true) {
                public void execute(@NotNull ProgressIndicator progressIndicator) {
                    List<DBSchema> schemas = getSchemas();
                    for (int i=0; i<schemas.size(); i++) {
                        DBSchema schema = schemas.get(i);
                        progressIndicator.setText("Updating object status in schema " + schema.getName() + "... ");
View Full Code Here

    }

    @Override
    public void sessionInitialized() {
        final Project project = getSession().getProject();
        new BackgroundTask(project, "Initialize debug environment", true) {
            @Override
            public void execute(@NotNull ProgressIndicator progressIndicator) {
                try {
                    targetConnection = connectionHandler.getPoolConnection(executionInput.getExecutionSchema());
                    targetConnection.setAutoCommit(false);
View Full Code Here

        }.start();
    }

    private void synchronizeSession() {
        final Project project = getSession().getProject();
        new BackgroundTask(project, "Initialize debug environment", true) {

            public void execute(@NotNull ProgressIndicator progressIndicator) {
                DatabaseDebuggerInterface debuggerInterface = getDebuggerInterface();
                if (getStatus().PROCESS_IS_TERMINATING) getSession().stop();
                try {
View Full Code Here

TOP

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

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.