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

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


            VirtualFile[] selectedDirectories = FileChooser.chooseFiles(descriptor, project, null);
            if (selectedDirectories.length > 0) {
                final String fileName = fileNameProvider.getFileName();
                final VirtualFile parentDirectory = selectedDirectories[0];
                new WriteActionRunner() {
                    @Override
                    public void run() {
                        try {
                            VirtualFile virtualFile = parentDirectory.createChildData(this, fileName);
                            bindDDLFile(object, virtualFile);
View Full Code Here


    private DDLFileManager(Project project) {
        super(project);
    }

   public void registerExtensions() {
       new WriteActionRunner() {
           public void run() {
               if (!isDisposed()) {
                   FileTypeManager.getInstance().removeFileTypeListener(DDLFileManager.this);
                   FileTypeManager fileTypeManager = FileTypeManager.getInstance();
                   List<DDLFileType> ddlFileTypeList = getExtensionSettings().getDDLFileTypes();
View Full Code Here

    @Override
    public void applyToEditor(@NotNull final TextEditor textEditor) {
        new ConditionalLaterInvocator() {
            @Override
            public void execute() {
                new WriteActionRunner() {
                    public void run() {
                        textEditor.getEditor().getDocument().setText(content);
                        SQLConsoleEditorState.super.applyToEditor(textEditor);
                        SQLConsoleFile file = (SQLConsoleFile) DocumentUtil.getVirtualFile(textEditor.getEditor());
                        if (currentSchema != null) {
View Full Code Here

                int result = mergeRequest.getResult();
                if (result == 0) {
                    doUpdateSourceToDatabase(object, virtualFile, editor);
                    //sourceCodeEditor.afterSave();
                } else if (result == 1) {
                    new WriteActionRunner() {
                        public void run() {
                            editor.getDocument().setText(virtualFile.getContent());
                            object.getStatus().set(DBObjectStatus.SAVING, false);
                        }
                    }.start();
View Full Code Here

                    if (editor != null && sourceCodeFile != null) {
                        boolean reloaded = sourceCodeFile.reloadFromDatabase();

                        if (reloaded) {
                            new WriteActionRunner() {
                                public void run() {
                                    editor.getDocument().setText(sourceCodeFile.getContent());
                                    sourceCodeFile.setModified(false);
                                }
                            }.start();
View Full Code Here

    public void actionPerformed(final AnActionEvent e) {
        final Project project = ActionUtil.getProject(e);
        final Editor editor = getEditor(e);
        final SourceCodeFile virtualFile = getSourcecodeFile(e);

        new WriteActionRunner() {
            public void run() {
                FileDocumentManager.getInstance().saveAllDocuments();
                SourceCodeManager.getInstance(project).updateSourceToDatabase(editor, virtualFile);
            }
        }.start();
View Full Code Here

                    final SourceCodeFile sourcecodeFile = getSourcecodeFile(e);

                    if (editor != null && sourcecodeFile != null) {
                        boolean reloaded = sourcecodeFile.reloadFromDatabase();
                        if (reloaded) {
                            new WriteActionRunner() {
                                public void run() {
                                    editor.getDocument().setText(sourcecodeFile.getContent());
                                    sourcecodeFile.setModified(false);
                                }
                            }.start();
View Full Code Here

            previewPanel.add(viewer.getComponent(), BorderLayout.CENTER);

        } else {
            final String finalPreviewText = previewText;

            new WriteActionRunner() {
                public void run() {
                    previewDocument.setText(finalPreviewText);
                }
            }.start();
        }
View Full Code Here

                settings.setRightMarginShown(false);
                viewer.getComponent().setFocusable(false);
                previewPanel.add(viewer.getComponent(), BorderLayout.CENTER);

            } else {
                new WriteActionRunner() {
                    public void run() {
                        previewDocument.setText(selectStatement);
                    }
                }.start();
            }
View Full Code Here

TOP

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

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.