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

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


        PhpDocComment docBlock = field.getDocComment();
        if(docBlock == null) {
            return lookupElement;
        }

        PhpDocCommentAnnotation phpDocCommentAnnotation = AnnotationUtil.getPhpDocCommentAnnotationContainer(docBlock);
        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);
View Full Code Here


                }
            }

        }

        return new PhpDocCommentAnnotation(annotationRefsMap, phpDocComment);
    }
View Full Code Here

        // @Foo(targetEntity="Foo\Class")
        if(annotationPropertyParameter.getType() == AnnotationPropertyParameter.Type.PROPERTY_VALUE && "referencedColumnName".equals(annotationPropertyParameter.getPropertyName())) {

            PhpDocComment phpDocComment = PsiTreeUtil.getParentOfType(element, PhpDocComment.class);
            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"
                    );
View Full Code Here

TOP

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

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.