code: public static void register(ContentViewer handler) {
          if (handler.isEditor()) {
              String[] types = handler.getTypes();
              for (String element : types) {
                  s_editors.put(element, handler);
              }
          }
          String[] types = handler.getTypes();
          for (String element : types) {
              s_viewers.put(element, handler);
          }
      }
docs: Registers a viewer or editor with the factory. Before the factory is
  used, all needed editors and viewers should be registered (in that
  order). Order is important here because all editors are considered
  viewers by default. If a separate viewer is registered after an editor
  that handles the same type, that viewer will be the one provided via
  getViewer. In general, the last viewers/editors passed in will have the
  most precendence.