@Override
 public void add(@NotNull RefEntity child) {
   if (child instanceof RefParameter) {
     return;
   }
   super.add(child);
 }
 @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);
    }
  }