@Override
 public void add(@NotNull RefEntity child) {
   if (child instanceof RefParameter) {
     return;
   }
   super.add(child);
 }
Example #2
0
 public void addTypeReference(RefJavaElement from) {
   if (from != null) {
     if (myInTypeReferences == null) {
       myInTypeReferences = new THashSet<RefElement>(1);
     }
     myInTypeReferences.add(from);
     ((RefJavaElementImpl) from).addOutTypeRefernce(this);
     getRefManager().fireNodeMarkedReferenced(this, from, false, false, false);
   }
 }
Example #3
0
  public void referenceRemoved() {
    super.referenceRemoved();

    for (RefClass subClass : getSubClasses()) {
      ((RefClassImpl) subClass).removeBase(this);
    }

    for (RefClass superClass : getBaseClasses()) {
      superClass.getSubClasses().remove(this);
    }
  }
Example #4
0
 public void accept(final RefVisitor visitor) {
   if (visitor instanceof RefJavaVisitor) {
     ApplicationManager.getApplication()
         .runReadAction(
             new Runnable() {
               public void run() {
                 ((RefJavaVisitor) visitor).visitClass(RefClassImpl.this);
               }
             });
   } else {
     super.accept(visitor);
   }
 }
 @Override
 public void accept(@NotNull final RefVisitor visitor) {
   if (visitor instanceof RefJavaVisitor) {
     ApplicationManager.getApplication()
         .runReadAction(
             new Runnable() {
               @Override
               public void run() {
                 ((RefJavaVisitor) visitor).visitMethod(RefMethodImpl.this);
               }
             });
   } else {
     super.accept(visitor);
   }
 }
  @Override
  public void referenceRemoved() {
    if (getOwnerClass() != null) {
      ((RefClassImpl) getOwnerClass()).methodRemoved(this);
    }

    super.referenceRemoved();

    for (RefMethod superMethod : getSuperMethods()) {
      superMethod.getDerivedMethods().remove(this);
    }

    for (RefMethod subMethod : getDerivedMethods()) {
      subMethod.getSuperMethods().remove(this);
    }

    ArrayList<RefElement> deletedRefs = new ArrayList<RefElement>();
    for (RefParameter parameter : getParameters()) {
      getRefManager().removeRefElement(parameter, deletedRefs);
    }
  }
 @Override
 public void setIsFinal(RefJavaElement refElement, boolean isFinal) {
   ((RefJavaElementImpl) refElement).setIsFinal(isFinal);
 }
 @Override
 public void setIsStatic(RefJavaElement refElement, boolean isStatic) {
   ((RefJavaElementImpl) refElement).setIsStatic(isStatic);
 }
 @Override
 public void setAccessModifier(RefJavaElement refElement, String newAccess) {
   ((RefJavaElementImpl) refElement).setAccessModifier(newAccess);
 }