Package com.jetbrains.php.lang.psi.elements

Examples of com.jetbrains.php.lang.psi.elements.Field


            PsiElement docIdentifier = docStatic.getPrevSibling();
            if(docIdentifier != null && docIdentifier.getNode().getElementType() == PhpDocTokenTypes.DOC_IDENTIFIER) {
                String className = docIdentifier.getText();
                PhpClass phpClass = PhpElementsUtil.getClassByContext(psiElement, className);
                if(phpClass != null) {
                    Field field = phpClass.findFieldByName(constName, true);
                    if(field != null) {
                        targets.add(field);
                    }
                }
            }
View Full Code Here


        if(propertyName.equals("name") && PhpLangUtil.equalsClassNames(annotationPropertyParameter.getPhpClass().getPresentableFQN(), "Doctrine\\ORM\\Mapping\\Column")) {
            PhpDocComment phpDocComment = PsiTreeUtil.getParentOfType(annotationPropertyParameter.getElement(), PhpDocComment.class);
            if(phpDocComment != null) {
                PhpPsiElement classField = phpDocComment.getNextPsiSibling();
                if(classField != null && classField.getNode().getElementType() == PhpElementTypes.CLASS_FIELDS) {
                    Field field = PsiTreeUtil.getChildOfType(classField, Field.class);
                    if(field != null) {
                        String name = field.getName();
                        if(StringUtils.isNotBlank(name)) {
                            completionParameter.getResult().addElement(LookupElementBuilder.create(underscore(name)));
                        }
                    }
                }
View Full Code Here

        PhpClass phpClass = PhpElementsUtil.getClassInterface(psiElement.getProject(), parts[0]);
        if(phpClass == null) {
            return targetPsiElements;
        }

        Field field = phpClass.findFieldByName(parts[1], true);
        if(field != null) {
            targetPsiElements.add(field);
        }

        return targetPsiElements;
View Full Code Here

TOP

Related Classes of com.jetbrains.php.lang.psi.elements.Field

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.