private void cleanupRemovedClass(final Mappings delta, final @NotNull ClassFileRepr cr, File sourceFile, final Set<? extends UsageRepr.Usage> usages, final IntIntMultiMaplet dependenciesTrashBin) {
    final int className = cr.name;

    // it is safe to cleanup class information if it is mapped to non-existing files only
    final Iterable<File> currentlyMapped = classToSourceFileGet(className);
    if (currentlyMapped != null) {
      for (File file : currentlyMapped) {
        if (!FileUtil.filesEqual(sourceFile, file) && file.exists()) {
          // if classname is already mapped to a different source, the class with such FQ name exists elsewhere, so we cannot destroy all these links
          // additionally ensure association with particular sourceFile is removed
          myClassToRelativeSourceFilePath.removeFrom(className, toRelative(sourceFile));
          return;
        }
      }
    }

    if (cr instanceof ClassRepr) {
      for (final TypeRepr.ClassType superSomething : ((ClassRepr)cr).getSuperTypes()) {
        delta.registerRemovedSuperClass(className, superSomething.className);
      }
    }

    cleanupBackDependency(className, usages, dependenciesTrashBin);

    myClassToClassDependency.remove(className);
    myClassToSubclasses.remove(className);
    myClassToRelativeSourceFilePath.remove(className);
    if (cr instanceof ClassRepr) {
      final ClassRepr _cr = (ClassRepr)cr;
      if (!_cr.isLocal() && !_cr.isAnonymous()) {
        myShortClassNameIndex.removeFrom(myContext.get(_cr.getShortName()), className);
      }
    }
  }
private void cleanupRemovedClass(final Mappings delta, final @NotNull ClassFileRepr cr, File sourceFile, final Set<? extends UsageRepr.Usage> usages, final IntIntMultiMaplet dependenciesTrashBin)