code: public static CmsEntity getEntity() {
  
          if ((INSTANCE == null) || (INSTANCE.m_entityObserver == null)) {
              CmsDebugLog.getInstance().printLine("handling external registration");
              if (isObserverExported()) {
                  return CmsEntityBackend.createFromNativeWrapper(nativeGetEntity());
              } else {
                  throw new RuntimeException("Editor is not initialized yet.");
              }
          } else {
              return INSTANCE.getCurrentEntity();
          }
      }
docs: Returns the currently edited entity.<p>
  
  @return the currently edited entity