code: public static String getDirectEditPath(CmsObject cms, CmsUserSettings userSettings) {
  
          if (userSettings.getStartView().equals(CmsWorkplace.VIEW_DIRECT_EDIT)
              | userSettings.getStartView().equals(CmsPageEditorConfiguration.APP_ID)) {
  
              try {
                  CmsObject cloneCms = OpenCms.initCmsObject(cms);
                  String startSite = CmsWorkplace.getStartSiteRoot(cloneCms, userSettings);
                  cloneCms.getRequestContext().setSiteRoot(startSite);
                  String projectName = userSettings.getStartProject();
                  if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(projectName)) {
                      cloneCms.getRequestContext().setCurrentProject(cloneCms.readProject(projectName));
                  }
                  String folder = userSettings.getStartFolder();
                  CmsResource targetRes = cloneCms.readDefaultFile(folder);
                  if (targetRes != null) {
                      return cloneCms.getSitePath(targetRes);
                  }
              } catch (Exception e) {
                  LOG.debug(e);
              }
          }
          return null;
      }
docs: Returns the direct edit path from the user settings, or <code>null</code> if not set.<p>
  
  @param cms the CMS context to use
  @param userSettings the user settings
  
  @return the direct edit path