Package com.dci.intellij.dbn.vfs

Examples of com.dci.intellij.dbn.vfs.SQLConsoleFile


        return getSettings().getFilterSettings().getObjectTypeFilterSettings().getElementFilter();
    }

    public SQLConsoleFile getSQLConsoleFile() {
        if (sqlConsoleFile == null) {
            sqlConsoleFile = new SQLConsoleFile(this);
        }
        return sqlConsoleFile;
    }
View Full Code Here


                return true;
            }
        }

        if (virtualFile instanceof SQLConsoleFile) {
            SQLConsoleFile sqlConsoleFile = (SQLConsoleFile) virtualFile;
            sqlConsoleFile.setCurrentSchema(schema);
            return true;
        }
        return false;
    }
View Full Code Here

                DatabaseEditableObjectFile databaseFile = (DatabaseEditableObjectFile) virtualFile;
                return databaseFile.getActiveConnection();
            }

            if (virtualFile instanceof SQLConsoleFile) {
                SQLConsoleFile sqlConsoleFile = (SQLConsoleFile) virtualFile;
                return sqlConsoleFile.getConnectionHandler();
            }
        }

        if (VirtualFileUtil.isLocalFileSystem(virtualFile)) {
            // if the file is a bound ddl file, then resolve the object which it is
View Full Code Here

                DatabaseContentFile contentFile = (DatabaseContentFile) virtualFile;
                return contentFile.getCurrentSchema();
            }

            if (virtualFile instanceof SQLConsoleFile) {
                SQLConsoleFile sqlConsoleFile = (SQLConsoleFile) virtualFile;
                return sqlConsoleFile.getCurrentSchema();
            }
        }

        if (VirtualFileUtil.isLocalFileSystem(virtualFile) || VirtualFileUtil.isVirtualFileSystem(virtualFile)) {
            // if the file is a bound ddl file, then resolve the object which it is
View Full Code Here

        if (file instanceof DatabaseObjectFile) {
            DatabaseObjectFile databaseObjectFile = (DatabaseObjectFile) file;
            icon = databaseObjectFile.getIcon();
        }
        if (file instanceof SQLConsoleFile) {
            SQLConsoleFile sqlConsoleFile = (SQLConsoleFile) file;
            icon = sqlConsoleFile.getIcon();
        }

        String url = file.getUrl();

        UncommittedChange change = getUncommittedChange(file);
View Full Code Here

        return null;
    }
   
    public static ConnectionHandler getConnectionHandler(VirtualFile file, Project project) {
        if (file instanceof SQLConsoleFile) {
            SQLConsoleFile consoleFile = (SQLConsoleFile) file;
            return consoleFile.getConnectionHandler();

        }
       
        if (file instanceof DatabaseObjectFile) {
            DatabaseObjectFile objectFile = (DatabaseObjectFile) file;
View Full Code Here

    @Override
    public void loadFromEditor(@NotNull FileEditorStateLevel level, @NotNull TextEditor textEditor) {
        super.loadFromEditor(level, textEditor);
        content = textEditor.getEditor().getDocument().getText();
        SQLConsoleFile file = (SQLConsoleFile) DocumentUtil.getVirtualFile(textEditor.getEditor());
        DBSchema schema = file.getCurrentSchema();
        currentSchema = schema == null ? "" : schema.getName();
    }
View Full Code Here

            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) {
                            DBSchema schema = file.getConnectionHandler().getObjectBundle().getSchema(currentSchema);
                            if (schema != null) file.setCurrentSchema(schema);
                        }
                    }
                }.start();
            }
        }.start();
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.vfs.SQLConsoleFile

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.