Examples of DBObjectType


Examples of com.dci.intellij.dbn.object.common.DBObjectType

                            BasePsiElement basePsiElement = (BasePsiElement) element.getValue();
                            if (!basePsiElement.getElementType().is(ElementTypeAttribute.ROOT)) {
                                BasePsiElement subjectPsiElement = basePsiElement.lookupFirstPsiElement(ElementTypeAttribute.SUBJECT);
                                if (subjectPsiElement instanceof IdentifierPsiElement) {
                                    IdentifierPsiElement identifierPsiElement = (IdentifierPsiElement) subjectPsiElement;
                                    DBObjectType objectType = identifierPsiElement.getObjectType();

                                    if (groups == null) groups = new THashMap<DBObjectType, Group>();
                                    PSQLStructureViewModelGroup group = (PSQLStructureViewModelGroup) groups.get(objectType);
                                    if (group == null) {
                                        group = new PSQLStructureViewModelGroup(objectType);
View Full Code Here

Examples of com.dci.intellij.dbn.object.common.DBObjectType

    private void annotateSpecDeclarationNavigable(BasePsiElement basePsiElement, AnnotationHolder holder) {
        BasePsiElement subjectPsiElement = basePsiElement.lookupFirstPsiElement(ElementTypeAttribute.SUBJECT);
        if (subjectPsiElement instanceof IdentifierPsiElement) {
            IdentifierPsiElement identifierPsiElement = (IdentifierPsiElement) subjectPsiElement;
            DBObjectType objectType = identifierPsiElement.getObjectType();
            ElementType elementType = basePsiElement.getElementType();

            if (identifierPsiElement.isObject() && objectType.getGenericType() == DBObjectType.METHOD) {

                DBContentType targetContentType =
                        elementType.is(ElementTypeAttribute.OBJECT_DECLARATION) ? DBContentType.CODE_SPEC :
                        elementType.is(ElementTypeAttribute.OBJECT_SPECIFICATION) ? DBContentType.CODE_BODY : null;
View Full Code Here

Examples of com.dci.intellij.dbn.object.common.DBObjectType

        if (lookupItemFactory instanceof AliasLookupItemFactory) {
            return -1;
        }
        if (lookupItemFactory instanceof DBObjectLookupItemFactory) {
            DBObjectLookupItemFactory objectLookupItemFactory = (DBObjectLookupItemFactory) lookupItemFactory;
            DBObjectType objectType = objectLookupItemFactory.getObject().getObjectType();
            return getSortingIndexFor(objectType);
        }

        if (lookupItemFactory instanceof TokenLookupItemFactory) {
            TokenLookupItemFactory tokenLookupItemFactory = (TokenLookupItemFactory) lookupItemFactory;
View Full Code Here

Examples of com.dci.intellij.dbn.object.common.DBObjectType

        return result;
    }


    public static DBObjectType resolveObjectType(String name) throws ElementTypeDefinitionException {
        DBObjectType objectType = DBObjectType.getObjectType(name);
        if (objectType == null)
            throw new ElementTypeDefinitionException("Invalid object type '" + name + "'");
        return objectType;
    }
View Full Code Here

Examples of com.dci.intellij.dbn.object.common.DBObjectType

        return null;
    }

    @Nullable
    public Icon getIcon(boolean open) {
        DBObjectType type = getObjectType();
        return type.getIcon();
    }
View Full Code Here

Examples of com.dci.intellij.dbn.object.common.DBObjectType

        for (QualifiedIdentifierVariant parseVariant : qualifiedIdentifier.getParseVariants()) {
            LeafElementType parseVariantElementType = parseVariant.getLeaf(index);

            if (parseVariantElementType instanceof IdentifierElementType) {
                IdentifierElementType substitutionCandidate = (IdentifierElementType) parseVariantElementType;
                DBObjectType objectType = substitutionCandidate.getObjectType();

                if (parentObject == null) {  // index == 0
                    if (substitutionCandidate.isObject()) {
                        resolveWithScopeParentLookup(objectType, substitutionCandidate);
                    } else if (substitutionCandidate.isAlias()) {
View Full Code Here

Examples of com.dci.intellij.dbn.object.common.DBObjectType

                }
            }
            else if (nextPossibleLeaf instanceof IdentifierElementType) {
                IdentifierElementType identifierElementType = (IdentifierElementType) nextPossibleLeaf;
                if (identifierElementType.isReference()) {
                    DBObjectType objectType = identifierElementType.getObjectType();
                    if (identifierElementType.isObject()) {
                        PsiLookupAdapter lookupAdapter = new ObjectDefinitionLookupAdapter(null, objectType,  null);
                        Set<BasePsiElement> objectDefinitions = lookupAdapter.collectInParentScopeOf(element);
                        if (objectDefinitions != null) {
                            for (BasePsiElement psiElement : objectDefinitions) {
View Full Code Here

Examples of com.dci.intellij.dbn.object.common.DBObjectType

            LookupConsumer consumer,
            IdentifierElementType identifierElementType,
            ObjectTypeFilter filter,
            BasePsiElement sourceScope,
            CodeCompletionContext context) throws ConsumerStoppedException {
        DBObjectType objectType = identifierElementType.getObjectType();
        PsiElement sourceElement = context.getElementAtCaret();
        ConnectionHandler connectionHandler = context.getConnectionHandler();

        if (connectionHandler != null ) {
            DBObjectBundle objectBundle = connectionHandler.getObjectBundle();
View Full Code Here

Examples of com.dci.intellij.dbn.object.common.DBObjectType

    public abstract void collectSubjectPsiElements(Set<BasePsiElement> bucket);


    public void collectVirtualObjectPsiElements(Set<BasePsiElement> bucket, DBObjectType objectType) {
        if (getElementType().isVirtualObject()) {
            DBObjectType virtualObjectType = getElementType().getVirtualObjectType();
            if (objectType == virtualObjectType) {
                bucket.add(this);
            }
        }
    }
View Full Code Here

Examples of com.dci.intellij.dbn.object.common.DBObjectType

    public abstract boolean matches(BasePsiElement basePsiElement);

    public synchronized DBObject resolveUnderlyingObject() {
        if (isVirtualObject() && (underlyingObject == null || !underlyingObject.isValid()) ) {
            DBObjectType virtualObjectType = getElementType().getVirtualObjectType();
            underlyingObject = new DBVirtualObject(virtualObjectType, this);
        }
        return underlyingObject;
    }
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.