code: protected String getEditorUri(CmsRequestContext context, String resourceType, String userAgent) {
  
          // step 1: check if the user specified a preferred editor for the given resource type
          CmsUserSettings settings = new CmsUserSettings(context.getCurrentUser());
          String preferredEditorSetting = settings.getPreferredEditor(resourceType);
          if (preferredEditorSetting == null) {
              // no preferred editor setting found for this resource type, look for mapped resource type preferred editor
              Iterator<CmsWorkplaceEditorConfiguration> i = m_editorConfigurations.iterator();
              while (i.hasNext()) {
                  CmsWorkplaceEditorConfiguration currentConfig = i.next();
                  String mapping = currentConfig.getMappingForResourceType(resourceType);
                  if (mapping != null) {
                      preferredEditorSetting = settings.getPreferredEditor(mapping);
                  }
                  if (preferredEditorSetting != null) {
                      break;
                  }
              }
          }
          if (preferredEditorSetting != null) {
              CmsWorkplaceEditorConfiguration preferredConf = filterPreferredEditor(preferredEditorSetting);
              if ((preferredConf != null) && preferredConf.matchesBrowser(userAgent)) {
                  // return preferred editor only if it matches the current users browser
                  return preferredConf.getEditorUri();
              }
          }
  
          // step 2: filter editors for the given resoure type
          SortedMap<Float, CmsWorkplaceEditorConfiguration> filteredEditors = filterEditorsForResourceType(resourceType);
  
          // step 3: check if one of the editors matches the current users browser
          while (filteredEditors.size() > 0) {
              // check editor configuration with highest ranking
              Float key = filteredEditors.lastKey();
              CmsWorkplaceEditorConfiguration conf = filteredEditors.get(key);
              if (conf.matchesBrowser(userAgent)) {
                  return conf.getEditorUri();
              }
              filteredEditors.remove(key);
          }
  
          // no valid editor found
          return null;
      }
docs: Returns the editor URI for the current resource type.<p>
  
  @param context the request context
  @param resourceType the current resource type
  @param userAgent the user agent String that identifies the browser
  @return a valid editor URI for the resource type or null, if no editor matches