Java 类com.intellij.psi.impl.source.PsiParameterImpl 实例源码

项目:Intellij-Plugin    文件:ImplUsageProviderTest.java   
@Test
public void TestIsImplicitUsageForMethodParameter() throws Exception {
    ModuleHelper helper = mock(ModuleHelper.class);
    SpecStep element = mock(SpecStepImpl.class);
    PsiParameter parameter = mock(PsiParameterImpl.class);
    when(parameter.getDeclarationScope()).thenReturn(element);
    when(helper.isGaugeModule(parameter)).thenReturn(true);

    boolean isUsed = new ImplUsageProvider(null, helper).isImplicitUsage(parameter);

    assertTrue(isUsed);
}
项目:intellij-ce-playground    文件:JavaParameterElementType.java   
@Override
public PsiParameter createPsi(@NotNull ASTNode node) {
  return new PsiParameterImpl(node);
}
项目:Intellij-Plugin    文件:ImplUsageProvider.java   
public boolean isImplicitUsage(PsiElement element) {
    if (element == null || !moduleHelper.isGaugeModule(element)) return false;
    if (element instanceof PsiClassImpl) return isClassUsed((PsiClassImpl) element);
    if (element instanceof PsiParameterImpl) return isParameterUsed((PsiParameterImpl) element);
    return isElementUsed(element);
}
项目:Intellij-Plugin    文件:ImplUsageProvider.java   
private boolean isParameterUsed(PsiParameterImpl element) {
    return GaugeUtil.isGaugeElement(element.getDeclarationScope());
}
项目:tools-idea    文件:JavaParameterElementType.java   
@Override
public PsiParameter createPsi(@NotNull ASTNode node) {
  boolean receiver = node.getElementType() == JavaElementType.RECEIVER_PARAMETER;
  return receiver ? new PsiReceiverParameterImpl(node) : new PsiParameterImpl(node);
}
项目:consulo-java    文件:JavaParameterElementType.java   
@Override
public PsiParameter createPsi(@NotNull ASTNode node)
{
    return new PsiParameterImpl(node);
}