Java 类com.intellij.psi.impl.light.LightTypeElement 实例源码

项目:intellij-ce-playground    文件:GenerateMembersUtil.java   
private static void substituteReturnType(@NotNull PsiManager manager,
                                         @NotNull PsiMethod method,
                                         @Nullable PsiType returnType,
                                         @NotNull PsiSubstitutor substitutor) {
  final PsiTypeElement returnTypeElement = method.getReturnTypeElement();
  if (returnTypeElement == null || returnType == null) {
    return;
  }
  final PsiType substitutedReturnType = substituteType(substitutor, returnType, method);

  returnTypeElement.replace(new LightTypeElement(manager, substitutedReturnType instanceof PsiWildcardType ? TypeConversionUtil.erasure(substitutedReturnType) : substitutedReturnType));
}
项目:tools-idea    文件:GenerateMembersUtil.java   
private static void substituteReturnType(@NotNull PsiManager manager,
                                         @NotNull PsiMethod method,
                                         @Nullable PsiType returnType,
                                         @NotNull PsiSubstitutor substitutor) {
  final PsiTypeElement returnTypeElement = method.getReturnTypeElement();
  if (returnTypeElement == null || returnType == null) {
    return;
  }
  final PsiType substitutedReturnType = substituteType(substitutor, returnType, method);

  returnTypeElement.replace(new LightTypeElement(manager, substitutedReturnType instanceof PsiWildcardType ? TypeConversionUtil.erasure(substitutedReturnType) : substitutedReturnType));
}
项目:consulo-java    文件:PsiElementFactoryImpl.java   
@NotNull
@Override
public PsiTypeElement createTypeElement(@NotNull final PsiType psiType)
{
    final LightTypeElement element = new LightTypeElement(myManager, psiType);
    CodeEditUtil.setNodeGenerated(element.getNode(), true);
    return element;
}
项目:consulo-java    文件:GenerateMembersUtil.java   
private static void substituteReturnType(@NotNull PsiManager manager, @NotNull PsiMethod method, @Nullable PsiType returnType, @NotNull PsiSubstitutor substitutor)
{
    final PsiTypeElement returnTypeElement = method.getReturnTypeElement();
    if(returnTypeElement == null || returnType == null)
    {
        return;
    }
    final PsiType substitutedReturnType = substituteType(substitutor, returnType, method);

    returnTypeElement.replace(new LightTypeElement(manager, substitutedReturnType instanceof PsiWildcardType ? TypeConversionUtil.erasure(substitutedReturnType) : substitutedReturnType));
}