de.espend.idea.php.annotation.extension.PhpAnnotationReferenceProvider Java Examples

The following examples show how to use de.espend.idea.php.annotation.extension.PhpAnnotationReferenceProvider. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AnnotationPropertyValueReferenceContributor.java    From idea-php-annotation-plugin with MIT License 5 votes vote down vote up
private PsiReference[] addPsiReferences(PsiElement psiElement, ProcessingContext processingContext, AnnotationPropertyParameter annotationPropertyParameter) {
    ArrayList<PsiReference> psiReferences = new ArrayList<>();

    PhpAnnotationReferenceProviderParameter referencesByElementParameter = new PhpAnnotationReferenceProviderParameter(psiElement, processingContext);

    for(PhpAnnotationReferenceProvider phpAnnotationExtension : AnnotationUtil.EXTENSION_POINT_REFERENCES.getExtensions()) {
        PsiReference[] references = phpAnnotationExtension.getPropertyReferences(annotationPropertyParameter, referencesByElementParameter);
        if(references != null && references.length > 0) {
            psiReferences.addAll(Arrays.asList(references));
        }
    }

    return psiReferences.toArray(new PsiReference[psiReferences.size()]);
}