# orion.navigate.openWith

The `orion.navigate.openWith` service is used to associate a registered editor (see orion.edit.editor) with a registered content type (see orion.file.contenttype). Once this association has been made, the editor will be presented as a choice in the "Open With" menu beside files of that content type.

By default, the Orion client UI provides an editor with ID `orion.editor`, to be used for editing source code. You can refer to this editor ID when you want to associate a new content type with the Orion Editor.

## Service methods

None. This service is purely declarative.

## Service attributes

Implementations of `orion.navigate.openWith` must define the following attributes:

editor
  `String` The ID of the editor we want to associate. This must match exactly the editor's ID as given in orion.edit.editor.
contentType
  `String[]` An array of one or more content type IDs that will be associated with the editor.

## Example

Here is a sample plug-in that associates the Orion Editor with the `"text.markdown"` content type. This example assumes that the `"text.markdown"` type has been previously registered with the orion.file.contenttype service.

     var provider = new eclipse.PluginProvider();
     provider.registerServiceProvider("orion.navigate.openWith", {},
       {  id: "orion.editor",
          contentType: ["text.markdown"]
       });
     provider.connect();

When this plug-in is installed, the user will see the Orion Editor as an available target in the Open With Navigator menu beside files of the Markdown content type: