@Test public void canFindUsages_methods() { testHelper.getPsiClass( psiClasses -> { final PsiMethod[] methods = psiClasses.get(0).getMethods(); final PsiMethod staticMethod = methods[0]; final PsiMethod nonStaticMethod = methods[1]; LithoFindUsagesHandlerFactory factory = new LithoFindUsagesHandlerFactory(); assertTrue(factory.canFindUsages(staticMethod)); assertFalse(factory.canFindUsages(nonStaticMethod)); return true; }, "WithMethods.java"); }
@Override public boolean canFindUsages(PsiElement element) { return GeneratedClassFindUsagesHandler.canFindUsages(element) || SpecMethodFindUsagesHandler.canFindUsages(element); }
LithoFindUsagesHandlerFactory extends FindUsagesHandlerFactory { @Override public boolean canFindUsages(PsiElement element) { return GeneratedClassFindUsagesHandler.canFindUsages(element) || SpecMethodFindUsagesHandler.canFindUsages(element); } }
LithoFindUsagesHandlerFactory extends FindUsagesHandlerFactory { @Override public boolean canFindUsages(PsiElement element) { return GeneratedClassFindUsagesHandler.canFindUsages(element) || SpecMethodFindUsagesHandler.canFindUsages(element); } LithoFindUsagesHandlerFactory(); }
LithoFindUsagesHandlerFactory extends FindUsagesHandlerFactory { @Override public boolean canFindUsages(PsiElement element) { return GeneratedClassFindUsagesHandler.canFindUsages(element) || SpecMethodFindUsagesHandler.canFindUsages(element); } LithoFindUsagesHandlerFactory(); @Override boolean canFindUsages(PsiElement element); @Nullable @Override FindUsagesHandler createFindUsagesHandler(PsiElement element, boolean forHighlightUsages); }
LithoFindUsagesHandlerFactory extends FindUsagesHandlerFactory { @Override public boolean canFindUsages(PsiElement element) { return GeneratedClassFindUsagesHandler.canFindUsages(element) || SpecMethodFindUsagesHandler.canFindUsages(element); } LithoFindUsagesHandlerFactory(); @Override boolean canFindUsages(PsiElement element); @Nullable @Override FindUsagesHandler createFindUsagesHandler(PsiElement element, boolean forHighlightUsages);  }