コード例 #1
0
 @Override
 public String getCanonicalText() {
   if (myCanonicalText == null) {
     assert mySubstitutor.isValid();
     StringBuilder buffer = new StringBuilder();
     buildText(myClass, mySubstitutor, buffer, true, false);
     myCanonicalText = buffer.toString();
   }
   return myCanonicalText;
 }
コード例 #2
0
 public PsiImmediateClassType(
     @NotNull PsiClass aClass,
     @NotNull PsiSubstitutor substitutor,
     @Nullable LanguageLevel level,
     @NotNull PsiAnnotation... annotations) {
   super(level, annotations);
   myClass = aClass;
   myManager = aClass.getManager();
   mySubstitutor = substitutor;
   assert substitutor.isValid();
 }
コード例 #3
0
  @Override
  public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
    if (!myTargetMethod.isValid() || myTargetMethod.getContainingClass() == null) return false;
    for (PsiExpression expression : myExpressions) {
      if (!expression.isValid()) return false;
    }
    if (!mySubstitutor.isValid()) return false;

    myNewParametersInfo = getNewParametersInfo(myExpressions, myTargetMethod, mySubstitutor);
    if (myNewParametersInfo == null || formatTypesList(myNewParametersInfo, myContext) == null)
      return false;
    return !isMethodSignatureExists();
  }
コード例 #4
0
 @Override
 public boolean isValid() {
   return myClass.isValid() && mySubstitutor.isValid();
 }