code: public I_CmsPreEditorActionDefinition getPreEditorConditionDefinition(I_CmsResourceType resourceType) {
  
          Iterator<I_CmsPreEditorActionDefinition> i = m_preEditorConditionDefinitions.iterator();
          I_CmsPreEditorActionDefinition result = null;
          int matchResult = -1;
          while (i.hasNext()) {
              I_CmsPreEditorActionDefinition currentDefinition = i.next();
              if (resourceType.getClass().isInstance(currentDefinition.getResourceType())) {
                  // now determine the match count...
                  int matchDistance = 0;
                  Class<?> superClass = resourceType.getClass();
                  while (true) {
                      // check if a super class is present
                      if (superClass == null) {
                          break;
                      }
                      if (superClass.getName().equals(currentDefinition.getResourceType().getClass().getName())) {
                          break;
                      }
                      matchDistance += 1;
                      superClass = superClass.getSuperclass();
                  }
                  if (matchResult != -1) {
                      if (matchDistance < matchResult) {
                          matchResult = matchDistance;
                          result = currentDefinition;
                      }
                  } else {
                      matchResult = matchDistance;
                      result = currentDefinition;
                  }
              }
          }
          return result;
      }
docs: Returns the condition definition for the given resource type that is triggered before opening the editor.<p>
  
  @param resourceType the resource type
  
  @return the condition definition for the given resource type class name or null if none is found