Search in sources :

Example 1 with JavaFxPropertyElement

use of org.jetbrains.plugins.javaFX.refactoring.JavaFxPropertyElement in project intellij-community by JetBrains.

the class JavaFxMethodSearcher method execute.

@Override
public boolean execute(@NotNull final ReferencesSearch.SearchParameters queryParameters, @NotNull final Processor<PsiReference> consumer) {
    final PsiElement elementToSearch = queryParameters.getElementToSearch();
    if (elementToSearch instanceof PsiMethod) {
        searchMethod((PsiMethod) elementToSearch, queryParameters, consumer);
    }
    if (elementToSearch instanceof JavaFxPropertyElement) {
        final JavaFxPropertyElement propertyElement = (JavaFxPropertyElement) elementToSearch;
        final JavaFxPropertyReference propertyReference = propertyElement.getPropertyReference();
        final PsiMethod staticSetter = propertyReference.getStaticSetter();
        if (staticSetter != null) {
            searchMethod(staticSetter, queryParameters, consumer);
        }
    }
    return true;
}
Also used : JavaFxPropertyElement(org.jetbrains.plugins.javaFX.refactoring.JavaFxPropertyElement)

Aggregations

JavaFxPropertyElement (org.jetbrains.plugins.javaFX.refactoring.JavaFxPropertyElement)1