protected void invokeImpl(PsiClass myClass) {
    PsiClass classToExtendFrom = myClassToExtendFromPointer != null ? myClassToExtendFromPointer.getElement() : null;

    PsiReferenceList extendsList = !(myClass instanceof PsiTypeParameter) && classToExtendFrom != null &&
                                   myClass.isInterface() != classToExtendFrom.isInterface() ?
                                   myClass.getImplementsList() : myClass.getExtendsList();
    PsiReferenceList otherList = extendsList == myClass.getImplementsList() ?
                                 myClass.getExtendsList() : myClass.getImplementsList();
    try {
      if (extendsList != null) {
        modifyList(extendsList, myToAdd, -1, myTypeToExtendFrom);
      }
      if (otherList != null) {
        modifyList(otherList, false, -1, myTypeToExtendFrom);
      }
    }
    catch (IncorrectOperationException e) {
      LOG.error(e);
    }
  }
protected void invokeImpl(PsiClass myClass)