code: @Override
    public Object getLock() {
      ResourceSet resourceSet = this.getResourceSet();
      if ((resourceSet instanceof ISynchronizable<?>)) {
        return ((ISynchronizable<?>) resourceSet).getLock();
      }
      return this;
    }
docs: Returns the lock of the owning {@link ResourceSet}, if it exposes such a lock.
  Otherwise this resource itself is used as the lock context.