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

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


        if (!(object instanceof PhpClass)) {
            return;
        }

        StringBuilder textToInsertBuilder = new StringBuilder();
        PhpClass aClass = (PhpClass)object;
        String fqn = aClass.getNamespaceName();

        if(fqn.startsWith("\\")) {
            fqn = fqn.substring(1);
        }
View Full Code Here


        parameter = PhpTypeProviderUtil.getResolvedParameter(phpIndex, parameter);
        if(parameter == null) {
            return phpNamedElementCollections;
        }

        PhpClass phpClass = EntityHelper.resolveShortcutName(project, parameter);
        if(phpClass == null) {
            return phpNamedElementCollections;
        }

        return Arrays.asList(phpClass);
View Full Code Here

        if(parameter == null) {
            return Arrays.asList(phpNamedElement);
        }

        // @TODO: parse xml or yml for repositoryClass?
        PhpClass phpClass = EntityHelper.getEntityRepositoryClass(project, parameter);

        // self add :)
        if(phpClass == null) {
            return phpNamedElementCollections;
        }
View Full Code Here

                        // @TODO: remove nested on Annotation plugin update
                        if(phpDocAttrList != null) {
                            if(phpDocAttrList.getNode().getElementType() == PhpDocElementTypes.phpDocAttributeList) {
                                PhpPsiElement phpPsiElement = phpDocAttrList.getFirstPsiChild();
                                if(phpPsiElement instanceof StringLiteralExpression) {
                                    PhpClass phpClass = de.espend.idea.php.annotation.util.PhpElementsUtil.getClassInsideAnnotation(((StringLiteralExpression) phpPsiElement));
                                    if(phpClass != null) {
                                        List<DoctrineModelField> lists = EntityHelper.getModelFields(phpClass);
                                        if(lists.size() > 0) {
                                            return new PsiReference[] {
                                                new EntityReference((StringLiteralExpression) element, lists)
View Full Code Here

    public static Set<String> getAnnotations(Project project, String className) {

        HashSet<String> map = new HashSet<String>();

        PhpClass phpClass = PhpElementsUtil.getClass(project, className);
        if(phpClass == null) {
            return map;
        }

        for(Field field: phpClass.getFields()) {
            if(!field.isConstant()) {
                map.add(field.getName());
            }
        }
View Full Code Here

        return results.toArray(new PsiElement[results.size()]);
    }

    private void getClassGoto(PsiElement psiElement, List<PsiElement> results) {
        String text = PsiElementUtils.trimQuote(psiElement.getText());
        PhpClass phpClass = PhpElementsUtil.getClassInterface(psiElement.getProject(), text);
        if(phpClass != null) {
            results.add(phpClass);
        }

    }
View Full Code Here

        YAMLKeyValue classKeyValue = PsiElementUtils.getChildrenOfType(yamlCompoundValue, PlatformPatterns.psiElement(YAMLKeyValue.class).withName("class"));
        if(classKeyValue == null) {
            return;
        }

        PhpClass phpClass = ServiceUtil.getResolvedClassDefinition(psiElement.getProject(), classKeyValue.getValueText());
        if(phpClass != null) {
            for(Method method: PhpElementsUtil.getClassPublicMethod(phpClass)) {
                if(method.getName().equals(PsiElementUtils.trimQuote(psiElement.getText()))) {
                    results.add(method);
                }
View Full Code Here

        YAMLKeyValue classKeyValue = PsiElementUtils.getChildrenOfType(psiElement, PlatformPatterns.psiElement(YAMLKeyValue.class).withName(classTag));
        if(classKeyValue == null) {
            return;
        }

        PhpClass phpClass = ServiceUtil.getResolvedClassDefinition(psiElement.getProject(), classKeyValue.getValueText());
        if(phpClass != null) {
            PhpElementsUtil.addClassPublicMethodCompletion(completionResultSet, phpClass);
        }
    }
View Full Code Here

                return;
            }

            String value = YamlHelper.getYamlKeyValueAsString(yamlCompoundValue, "class", true);
            if(value != null) {
                PhpClass phpClass = ServiceUtil.getResolvedClassDefinition(psiElement.getProject(), value);
                if(phpClass != null) {
                    FormUtil.attachFormAliasesCompletions(phpClass, completionResultSet);
                }
            }
View Full Code Here

            String className = YamlHelper.getYamlKeyValueAsString(yamlCompoundValue, "targetEntity", false);
            if(className == null) {
                return;
            }

            PhpClass phpClass = PhpElementsUtil.getClass(position.getProject(), className);
            if(phpClass == null) {
                return;
            }

            for(DoctrineModelField field: EntityHelper.getModelFields(phpClass)) {
View Full Code Here

TOP

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

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.