Examples of lookupObjectDeclaration()


Examples of com.dci.intellij.dbn.language.psql.PSQLFile.lookupObjectDeclaration()

    public void navigateTo(DBObject object) {
        PsiFile file = PsiUtil.getPsiFile(getObject().getProject(), getVirtualFile());
        if (file instanceof PSQLFile) {
            PSQLFile psqlFile = (PSQLFile) file;
            BasePsiElement navigable = psqlFile.lookupObjectDeclaration(object.getObjectType(), object.getName());
            if (navigable == null) navigable = psqlFile.lookupObjectSpecification(object.getObjectType(), object.getName());
            if (navigable != null) navigable.navigate(true);
        }
    }
View Full Code Here

Examples of com.dci.intellij.dbn.language.psql.PSQLFile.lookupObjectDeclaration()

    public void navigateToDeclaration(DBSchemaObject parentObject, DBObjectType objectType, String objectName) {
        DatabaseEditableObjectFile databaseFile = parentObject.getVirtualFile();
        PsiManager psiManager = PsiManager.getInstance(parentObject.getProject());
        PSQLFile file = (PSQLFile) psiManager.findFile(databaseFile.getContentFile(DBContentType.CODE_BODY));
        if (file != null) {
            BasePsiElement basePsiElement = file.lookupObjectDeclaration(objectType, objectName);
            if (basePsiElement != null) {
                BasicTextEditor textEditor = EditorUtil.getFileEditor(databaseFile, file.getVirtualFile());
                EditorUtil.selectEditor(databaseFile, textEditor);
                basePsiElement.navigate(true);
            }
View Full Code Here

Examples of com.dci.intellij.dbn.language.psql.PSQLFile.lookupObjectDeclaration()

        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) :
                    contentType == DBContentType.CODE_SPEC ? file.lookupObjectSpecification(objectType, objectName) : null;
            }
        }
        return null;
    }
View Full Code Here

Examples of com.dci.intellij.dbn.language.psql.PSQLFile.lookupObjectDeclaration()

        SourceCodeFile sourceCodeFile = (SourceCodeFile) getMainDatabaseFile().getMainContentFile();
        PSQLFile psqlFile = (PSQLFile) sourceCodeFile.getPsiFile();
        if (psqlFile != null) {
            DBMethod method = executionInput.getMethod();
            if (method != null) {
                BasePsiElement basePsiElement = psqlFile.lookupObjectDeclaration(method.getObjectType().getGenericType(), method.getName());
                if (basePsiElement != null) {
                    BasePsiElement subject = basePsiElement.lookupFirstPsiElement(ElementTypeAttribute.SUBJECT);
                    int offset = subject.getTextOffset();
                    Document document = DocumentUtil.getDocument(psqlFile);
                    int line = document.getLineNumber(offset);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.