code: public static void addEntityChangeListener(I_CmsEntityChangeListener changeListener, String changeScope) {
  
          CmsDebugLog.getInstance().printLine("trying to ad change listener for scope: " + changeScope);
          if ((INSTANCE == null) || (INSTANCE.m_entityObserver == null)) {
              CmsDebugLog.getInstance().printLine("handling external registration");
              if (isObserverExported()) {
                  CmsDebugLog.getInstance().printLine("registration is available");
                  try {
                      addNativeListener(changeListener, changeScope);
                  } catch (Exception e) {
  
                      CmsDebugLog.getInstance().printLine(
                          "Exception occured during listener registration" + e.getMessage());
                  }
              } else {
                  throw new RuntimeException("Editor is not initialized yet.");
              }
          } else {
              INSTANCE.m_entityObserver.addEntityChangeListener(changeListener, changeScope);
          }
      }
docs: Adds an entity change listener.<p>
  
  @param changeListener the change listener
  @param changeScope the change scope