private static ContentProvider createContentProviderFromElement(IConfigurationElement element) {
    ContentProvider contentProvider = null;
    String contextHelpID = null;
    Object inputClazz = null;
    Object opClazz = null;
    Object cellValidator = null;

    try {
      inputClazz = element.createExecutableExtension(PROVIDER_EDITOR_INPUT_ID);

      opClazz = element.createExecutableExtension(PROVIDER_OPERATION_PROV_ID);
      cellValidator = element.createExecutableExtension(PROVIDER_CELL_VALIDATOR_ID);
      contextHelpID = element.getAttribute(PROVIDER_EDITOR_CONTEXT_HELP_ID);

    } catch (CoreException e) {
      BasePlugin.logWarning(
          "No operation provider found for "
              + element.getDeclaringExtension().getUniqueIdentifier()
              + ". Using a default operation provider.");
    }
    IStringEditorInput input = null;
    IOperationProvider provider = null;
    ICellValidator validator = null;

    if (inputClazz instanceof IStringEditorInput) {
      input = (IStringEditorInput) inputClazz;
    }
    if (opClazz instanceof IOperationProvider) {
      provider = (IOperationProvider) opClazz;
    } else {
      provider = new DefaultOperationProvider();
    }
    if (cellValidator instanceof ICellValidator) {
      validator = (ICellValidator) cellValidator;
    }
    if (input != null) {
      contentProvider =
          new ContentProvider(
              input, provider, validator, contextHelpID.length() > 0 ? contextHelpID : null);
    }
    return contentProvider;
  }