Problem searching for Java methods by bean property name

I'm trying to allow my plugin to have references in Clojure code to Java methods, referring to them by their bean property name like this:

[Customer (= true VIP)]

Here Customer refers to a Java class, and VIP refers to its isVIP() method. The symbol resolution is working in the editor, but find usages from the declaration of the method doesn't find this usage. After poking around in the source code I found CustomPropertyScopeProvider and I implemented that as follows:

public class ClojureCustomPropertyScopeProvider implements CustomPropertyScopeProvider {
public SearchScope getScope(Project project) {
return GlobalSearchScope.getScopeRestrictedByFileTypes(GlobalSearchScope.allScope(project),

However the find usages still doesn't work. Is there anything else I need to do to ensure this works?



One other thing - the usages highlighting within the editor works fine, so all the basic stuff like word scanning etc is working. It seems to be a problem with scopes. I don't really understand how the low levels of the index code work, but I can only see scopes relating to Java being used at the lower levels, so I guess my contributed scope is getting intersected out somehow. My scope contributor is being called correctly.


I managed to resolve this by implementing a custom MethodReferenceSearcher.


Please sign in to leave a comment.