Example #1
0
  public boolean isReferenced(@NotNull PsiNamedElement element) {
    List<PsiReference> array;
    synchronized (myLocalRefsMap) {
      array = myLocalRefsMap.getKeysByValue(element);
    }
    if (array != null && !array.isEmpty() && !isParameterUsedRecursively(element, array))
      return true;

    Boolean usedStatus = myDclsUsedMap.get(PsiAnchor.create(element));
    return usedStatus == Boolean.TRUE;
  }
 public JavaPsiClassReferenceElement(PsiClass psiClass) {
   super(psiClass.getName(), psiClass.getName());
   myClass =
       psiClass.getContainingFile().getVirtualFile() == null
           ? psiClass
           : PsiAnchor.create(psiClass);
   myQualifiedName = psiClass.getQualifiedName();
   JavaCompletionUtil.setShowFQN(this);
   setInsertHandler(AllClassesGetter.TRY_SHORTENING);
   setTailType(TailType.NONE);
 }
Example #3
0
 @Override
 public boolean process(PsiClass inheritor) {
   ProgressManager.checkCanceled();
   for (PsiClassType interfaceType : inheritor.getImplementsListTypes()) {
     ProgressManager.checkCanceled();
     PsiClass anInterface = interfaceType.resolveGenerics().getElement();
     if (anInterface != null && myCheckedInterfaces.add(PsiAnchor.create(anInterface))) {
       processInterface(inheritor, anInterface);
     }
   }
   return !myRemainingMethods.isEmpty();
 }
Example #4
0
 SiblingInheritorSearcher(Collection<PsiMethod> methods, PsiClass containingClass) {
   myContainingClass = containingClass;
   myRemainingMethods = new HashSet<>(methods);
   myCheckedInterfaces.add(PsiAnchor.create(containingClass));
 }
 public CreatePropertyFix(
     PsiElement element, String key, final List<PropertiesFile> propertiesFiles) {
   myElement = element == null ? null : PsiAnchor.create(element);
   myKey = key;
   myPropertiesFiles = propertiesFiles;
 }
Example #6
0
 public void registerLocallyReferenced(@NotNull PsiNamedElement result) {
   myDclsUsedMap.put(PsiAnchor.create(result), Boolean.TRUE);
 }