Package de.espend.idea.php.annotation.dict

Examples of de.espend.idea.php.annotation.dict.PhpDocTagAnnotation


        if(phpDocCommentAnnotation == null) {
            return lookupElement;
        }

        // search column type
        PhpDocTagAnnotation phpDocTagAnnotation = phpDocCommentAnnotation.getPhpDocBlock("Doctrine\\ORM\\Mapping\\Column");
        if(phpDocTagAnnotation != null) {
            String value = phpDocTagAnnotation.getPropertyValue("type");
            if(value != null) {
                lookupElement = lookupElement.withTypeText(value, true);
            }
        }

        // search for relations
        PhpDocTagAnnotation relation = phpDocCommentAnnotation.getFirstPhpDocBlock(DoctrineUtil.DOCTRINE_RELATION_FIELDS);
        if(relation != null) {

            String value = relation.getPropertyValue("targetEntity");
            if(value != null) {
                lookupElement = lookupElement.withTypeText(value, true);
                lookupElement = lookupElement.withBoldness(true);
            }

            lookupElement = lookupElement.withTailText(String.format("(%s)", relation.getPhpClass().getName()), true);
        }

        return lookupElement;
    }
View Full Code Here


        Map<String, PhpDocTagAnnotation> annotationRefsMap = new HashMap<String, PhpDocTagAnnotation>();
        for(PhpDocTag phpDocTag: PsiTreeUtil.findChildrenOfType(phpDocComment, PhpDocTag.class)) {
            if(!AnnotationUtil.NON_ANNOTATION_TAGS.contains(phpDocTag.getName())) {
                PhpClass annotationClass = AnnotationUtil.getAnnotationReference(phpDocTag, uses);
                if(annotationClass != null && annotationClass.getPresentableFQN() != null) {
                    annotationRefsMap.put(annotationClass.getPresentableFQN(), new PhpDocTagAnnotation(annotationClass, phpDocTag));
                }
            }

        }
View Full Code Here

        PhpClass annotationReference = getAnnotationReference(phpDocTag);
        if(annotationReference == null) {
            return null;
        }

        return new PhpDocTagAnnotation(annotationReference, phpDocTag);
    }
View Full Code Here

            if(phpDocComment != null) {
                PhpDocCommentAnnotation phpDocCommentAnnotationContainer = AnnotationUtil.getPhpDocCommentAnnotationContainer(phpDocComment);

                if(phpDocCommentAnnotationContainer != null) {

                    PhpDocTagAnnotation phpDocTagAnnotation = phpDocCommentAnnotationContainer.getFirstPhpDocBlock(
                        "\\Doctrine\\ORM\\Mapping\\ManyToOne",
                        "\\Doctrine\\ORM\\Mapping\\ManyToMany",
                        "\\Doctrine\\ORM\\Mapping\\OneToOne",
                        "\\Doctrine\\ORM\\Mapping\\OneToMany"
                    );

                    if(phpDocTagAnnotation != null) {

                        PhpPsiElement phpDocAttrList = phpDocTagAnnotation.getPhpDocTag().getFirstPsiChild();

                        // @TODO: remove nested on Annotation plugin update
                        if(phpDocAttrList != null) {
                            if(phpDocAttrList.getNode().getElementType() == PhpDocElementTypes.phpDocAttributeList) {
                                PhpPsiElement phpPsiElement = phpDocAttrList.getFirstPsiChild();
View Full Code Here

TOP

Related Classes of de.espend.idea.php.annotation.dict.PhpDocTagAnnotation

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.