docs: void internalOpenDialog(
          final CmsContainerPageElementPanel element,
          String editContentId,
          final boolean inline,
          boolean wasNew) {
  
          if (!m_editorOpened) {
              m_editorOpened = true;
              m_handler.disableToolbarButtons();
              m_handler.deactivateCurrentButton();
              m_currentElementId = editContentId;
              final String serverId = CmsContainerpageController.getServerId(m_currentElementId);
              final Runnable classicEdit = new Runnable() {
  
                  public void run() {
  
                      CmsEditableData editableData = new CmsEditableData();
                      editableData.setElementLanguage(CmsCoreProvider.get().getLocale());
                      editableData.setStructureId(new CmsUUID(serverId));
                      editableData.setSitePath(element.getSitePath());
                      editableData.setMainLanguage(m_handler.m_controller.getData().getMainLocale());
                      CmsContentEditorDialog.get().openEditDialog(
                          editableData,
                          false,
                          null,
                          new DialogOptions(),
                          CmsContentEditorHandler.this);
                  }
              };
  
              if (m_handler.m_controller.getData().isUseClassicEditor() || element.isNewEditorDisabled()) {
                  classicEdit.run();
              } else {
                  String editorLocale = CmsCoreProvider.get().getLocale();
                  final String mainLocale;
                  if (m_handler.m_controller.getData().getMainLocale() == null) {
                      Element htmlEl = CmsDomUtil.querySelector(
                          "[" + CmsGwtConstants.ATTR_DATA_ID + "*='" + serverId + "']",
                          element.getElement());
                      if (htmlEl != null) {
                          String entityId = htmlEl.getAttribute(CmsGwtConstants.ATTR_DATA_ID);
                          mainLocale = CmsContentDefinition.getLocaleFromId(entityId);
                      } else {
                          mainLocale = null;
                      }
                  } else {
                      mainLocale = m_handler.m_controller.getData().getMainLocale();
                  }
                  I_CmsSimpleCallback<Boolean> onClose = new I_CmsSimpleCallback<Boolean>() {
  
                      public void execute(Boolean hasChangedSettings) {
  
                          addClosedEditorHistoryItem();
                          onClose(element.getSitePath(), new CmsUUID(serverId), false, hasChangedSettings.booleanValue());
                      }
                  };
                  if (inline && CmsContentEditor.hasEditable(element.getElement())) {
                      addEditingHistoryItem(true);
                      CmsEditorContext context = getEditorContext();
                      context.setHtmlContextInfo(getContextInfo(element));
                      // remove expired style before initializing the editor
                      element.setReleasedAndNotExpired(true);
                      // in case of new elements, ignore load time
                      CmsDebugLog.consoleLog("Opening inline editor for element. Was new: " + wasNew);
                      long loadTime = wasNew ? Long.MAX_VALUE : m_handler.m_controller.getLoadTime();
                      CmsContentEditor.getInstance().openInlineEditor(
                          context,
                          new CmsUUID(serverId),
                          editorLocale,
                          element,
                          mainLocale,
                          loadTime,
                          onClose);
                  } else {
                      addEditingHistoryItem(false);
                      Map<String, String> settingPresets = new HashMap<String, String>();
                      CmsEditorContext context = getEditorContext();
                      I_CmsDropContainer dropContainer = element.getParentTarget();
                      if (dropContainer instanceof CmsContainerPageContainer) {
                          CmsContainerPageContainer container = (CmsContainerPageContainer)dropContainer;
                          settingPresets.putAll(container.getSettingPresets());
                      }
                      context.setSettingPresets(settingPresets);
  
                      boolean allowSettings = m_handler.m_controller.getData().allowSettingsInEditor()
                          && !m_handler.m_controller.isEditingDisabled()
                          && !serverId.equals(String.valueOf(m_handler.m_controller.getData().getDetailId()));
                      I_CmsSimpleCallback<Boolean> openEditor = new I_CmsSimpleCallback<Boolean>() {
  
                          public void execute(Boolean lockedPage) {
  
                              CmsContentEditor.getInstance().openFormEditor(
                                  context,
                                  editorLocale,
                                  serverId,
                                  lockedPage.booleanValue() ? getCurrentElementId() : null,
                                  null,
                                  null,
                                  null,
                                  null,
                                  mainLocale,
                                  null,
                                  onClose);
                          }
                      };
                      if (allowSettings) {
                          if (m_handler.m_controller.getData().getDetailContainerPage() != null) {
                              CmsCoreProvider.get().lock(
                                  m_handler.m_controller.getData().getDetailContainerPage(),
                                  m_handler.m_controller.getLoadTime(),
                                  openEditor);
                          } else {
                              CmsCoreProvider.get().lock(
                                  CmsCoreProvider.get().getStructureId(),
                                  m_handler.m_controller.getLoadTime(),
                                  openEditor);
                          }
                      } else {
                          openEditor.execute(Boolean.FALSE);
                      }
  
                  }
              }
          } else {
              CmsDebugLog.getInstance().printLine("Editor is already being opened.");
          }
      }