title: How to tell eclipse preferred content type for a file
body: <p>I'm working on a plugin that will handle files of a given type, say, <code>.xyz</code> when in Eclipse I try to open an <code>xyz</code> file. I'm trying to use </p>
  
  <pre><code>org.eclipse.core.runtime.content.IContentType type = 
    org.eclipse.core.runtime.Platform.getContentTypeManager().findContentTypeFor(
        fileURI.getPath());
  </code></pre>
  
  <p>I've got code to look up the needed factory once I have the <code>IContentType</code>.
  I need to find out how to "register" my file type with Eclipse So when I select a file of my type to open, the Eclipse application knows to use my code to handle it. I've already gone to the Extensions tab of my <code>Manifest.MF</code> and added my Extension Element Details such as base-type, file-extensions, id (package where my code is) and name. But type still ends up as null.</p>