@Override
  public <T extends JpsElement> void removeChild(@NotNull JpsElementChildRole<T> role) {
    //noinspection unchecked
    final T removed;
    synchronized (myDataLock) {
      removed = (T)myElements.remove(role);
    }
    if (removed == null) return;
    JpsElementBase.setParent(removed, null);
  }
@Override
  public <T extends JpsElement> void removeChild(@NotNull JpsElementChildRole<T> role)