Search in sources :

Example 1 with JavaUsageTypeProvider

use of com.intellij.usages.impl.rules.JavaUsageTypeProvider in project intellij-community by JetBrains.

the class JavaUsageTypeProviderTest method assertUsageType.

private void assertUsageType(UsageType expected, PsiClass target) {
    UsageTarget[] targets = { new PsiElement2UsageTargetAdapter(target) };
    PsiElement element = myFixture.getReferenceAtCaretPositionWithAssertion().getElement();
    UsageType usageType = new JavaUsageTypeProvider().getUsageType(element, targets);
    assertEquals(expected, usageType);
}
Also used : JavaUsageTypeProvider(com.intellij.usages.impl.rules.JavaUsageTypeProvider) PsiElement2UsageTargetAdapter(com.intellij.find.findUsages.PsiElement2UsageTargetAdapter) UsageType(com.intellij.usages.impl.rules.UsageType) PsiElement(com.intellij.psi.PsiElement) UsageTarget(com.intellij.usages.UsageTarget)

Aggregations

PsiElement2UsageTargetAdapter (com.intellij.find.findUsages.PsiElement2UsageTargetAdapter)1 PsiElement (com.intellij.psi.PsiElement)1 UsageTarget (com.intellij.usages.UsageTarget)1 JavaUsageTypeProvider (com.intellij.usages.impl.rules.JavaUsageTypeProvider)1 UsageType (com.intellij.usages.impl.rules.UsageType)1