@Test public void canFindUsages_classes() { testHelper.getPsiClass( psiClasses -> { assertNotNull(psiClasses); PsiClass layoutSpec = psiClasses.get(0); PsiClass otherSpec = psiClasses.get(1); PsiClass notSpec = psiClasses.get(2); LithoFindUsagesHandlerFactory factory = new LithoFindUsagesHandlerFactory(); assertTrue(factory.canFindUsages(layoutSpec)); assertTrue(factory.canFindUsages(otherSpec)); assertFalse(factory.canFindUsages(notSpec)); return true; }, "LayoutSpec.java", "MountSpec.java", "NotSpec.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);  }