Package com.dci.intellij.dbn.vfs

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


    @Nullable
    public ConnectionHandler getActiveConnection(VirtualFile virtualFile) {
        // if the file is a database content file then get the connection from the underlying database object
        if (VirtualFileUtil.isDatabaseFileSystem(virtualFile)) {
            if (virtualFile instanceof DatabaseContentFile) {
                DatabaseContentFile contentFile = (DatabaseContentFile) virtualFile;
                return contentFile.getActiveConnection();
            }
            if (virtualFile instanceof DatabaseEditableObjectFile) {
                DatabaseEditableObjectFile databaseFile = (DatabaseEditableObjectFile) virtualFile;
                return databaseFile.getActiveConnection();
            }
View Full Code Here


    public DBSchema getCurrentSchema(VirtualFile virtualFile) {
        // if the file is a database content file then get the schema from the underlying schema object
        if (VirtualFileUtil.isDatabaseFileSystem(virtualFile)) {
            if (virtualFile instanceof DatabaseContentFile) {
                DatabaseContentFile contentFile = (DatabaseContentFile) virtualFile;
                return contentFile.getCurrentSchema();
            }

            if (virtualFile instanceof SQLConsoleFile) {
                SQLConsoleFile sqlConsoleFile = (SQLConsoleFile) virtualFile;
                return sqlConsoleFile.getCurrentSchema();
View Full Code Here

    @NonNls
    @Nullable
    public DBLanguageDialect getLanguageDialect() {
        VirtualFile virtualFile = getVirtualFile();
        if (virtualFile instanceof DatabaseContentFile) {
            DatabaseContentFile contentFile = (DatabaseContentFile) virtualFile;
            return contentFile.getLanguageDialect();
        }
       
        Language language = getLanguage();
        if (language instanceof DBLanguage) {
            DBLanguage dbLanguage = (DBLanguage) language;
View Full Code Here

    }

    public BasePsiElement getObjectNavigationElement(DBSchemaObject parentObject, DBContentType contentType, DBObjectType objectType, CharSequence objectName) {
        DatabaseEditableObjectFile databaseFile = parentObject.getVirtualFile();
        PsiManager psiManager = PsiManager.getInstance(parentObject.getProject());
        DatabaseContentFile contentFile = databaseFile.getContentFile(contentType);
        if (contentFile != null) {
            PSQLFile file = (PSQLFile) psiManager.findFile(contentFile);
            if (file != null) {
                return
                    contentType == DBContentType.CODE_BODY ? file.lookupObjectDeclaration(objectType, objectName) :
View Full Code Here

TOP

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

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.