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

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


    public final void actionPerformed(AnActionEvent event) {
        final Project project = ActionUtil.getProject(event);

        if (project != null) {
            new BackgroundTask(project, "Extracting select statement", false, true) {
                protected void execute(@NotNull ProgressIndicator progressIndicator) {
                    initProgressIndicator(progressIndicator, true);
                    StatementGeneratorResult result = generateStatement(project);
                    if (result.getMessages().hasErrors()) {
                        MessageUtil.showErrorDialog(result.getMessages(), "Error generating statement");
View Full Code Here


    @Override
    public final void loadInBackground(final boolean force) {
        synchronized (BACKGROUND_LOAD_LOCK) {
            if (!isLoadingInBackground && shouldLoad(force)) {
                isLoadingInBackground = true;
                new BackgroundTask(getProject(), "Loading data dictionary", true) {
                    public void execute(@NotNull ProgressIndicator progressIndicator) {
                        try {
                            DatabaseLoadMonitor.startBackgroundLoad();
                            load(force);
                        } finally {
View Full Code Here

        this.connectionSettings = connectionSettings;
        if (refresh) {
            connectionPool.closeConnectionsSilently();

            final Project project = getProject();
            new BackgroundTask(getProject(), "Trying to connect to " + getName(), false) {
                @Override
                public void execute(@NotNull ProgressIndicator progressIndicator) {
                    initProgressIndicator(progressIndicator, true);
                    ConnectionManager connectionManager = ConnectionManager.getInstance(project);
                    connectionManager.testConnection(ConnectionHandlerImpl.this, false);
View Full Code Here

            table.scrollRectToVisible(cellRectangle);
        }
    }

    public void updateResult(final DataFindModel findModel) {
        new BackgroundTask(searchableComponent.getTable().getProject(), "Updating search results", true) {
            @Override
            public synchronized void execute(@NotNull ProgressIndicator progressIndicator) throws InterruptedException {
                DataModel dataModel = searchableComponent.getTable().getModel();
                final DataSearchResult searchResult = dataModel.getSearchResult();
               
View Full Code Here

                    event.consume();
                } else if (properties.is(DBObjectProperty.NAVIGABLE)) {
                    DatabaseFileSystem.getInstance().openEditor(object);
                    event.consume();
                } else if (deliberate) {
                    new BackgroundTask(getProject(), "Loading Object Reference", false, false) {
                        protected void execute(@NotNull ProgressIndicator progressIndicator) throws InterruptedException {
                            final DBObject navigationObject = object.getDefaultNavigationObject();
                            if (navigationObject != null) {
                                new SimpleLaterInvocator(){
                                    public void execute() {
View Full Code Here

        //getTemplatePresentation().setEnabled(connectionHandler.getConnectionStatus().isConnected());
    }

    public void actionPerformed(AnActionEvent anActionEvent) {
        final Project project = connectionHandler.getProject();
        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);
View Full Code Here

        getTemplatePresentation().setEnabled(!connectionHandler.getConnectionStatus().isConnected());
    }

    public void actionPerformed(AnActionEvent anActionEvent) {
        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);
View Full Code Here

    }

    @Override
    public void actionPerformed(AnActionEvent e) {
        Project project = ActionUtil.getProject(e);
        new BackgroundTask(project, "Loading data dictionary", true) {
            @Override
            protected void execute(@NotNull ProgressIndicator progressIndicator) throws InterruptedException {
                try {
                    DatabaseLoadMonitor.startBackgroundLoad();
                    connectionHandler.getObjectBundle().getObjectListContainer().visitLists(DBObjectRecursiveLoaderVisitor.INSTANCE, false);
View Full Code Here

        Project project = object.getProject();
        boolean allowed = DatabaseDebuggerManager.getInstance(project).checkForbiddenOperation(object.getConnectionHandler());
        if (allowed) {
            final CompileType selectedCompileType = getCompileTypeSelection(compileType, object);
            if (selectedCompileType != null) {
                new BackgroundTask(object.getProject(), "Compiling " + object.getQualifiedNameWithType(), true) {
                    public void execute(@NotNull ProgressIndicator progressIndicator) {
                        doCompileObject(object, contentType, selectedCompileType, silently);
                        if (DatabaseFileSystem.getInstance().isFileOpened(object)) {
                            DatabaseEditableObjectFile databaseFile = object.getVirtualFile();
                            SourceCodeFile sourceCodeFile = (SourceCodeFile) databaseFile.getContentFile(contentType);
View Full Code Here

        final ConnectionHandler connectionHandler = schema.getConnectionHandler();
        boolean allowed = DatabaseDebuggerManager.getInstance(project).checkForbiddenOperation(connectionHandler);
        if (allowed) {
            final CompileType selectedCompileType = getCompileTypeSelection(compileType, null);
            if (selectedCompileType != null) {
                new BackgroundTask(project, "Compiling invalid objects", false, true) {
                    public void execute(@NotNull ProgressIndicator progressIndicator) {
                        doCompileInvalidObjects(schema.getPackages(), "packages", progressIndicator, selectedCompileType);
                        doCompileInvalidObjects(schema.getFunctions(), "functions", progressIndicator, selectedCompileType);
                        doCompileInvalidObjects(schema.getProcedures(), "procedures", progressIndicator, selectedCompileType);
                        doCompileInvalidObjects(schema.getTriggers(), "triggers", progressIndicator, selectedCompileType);
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.