orion.navigate.openWith

The orion.navigate.openWith service is used to contribute the location of an editor for a particular file type. This service is purely declarative, with no implementation methods required.

Service methods

None

Service attributes

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

name
The name of the editor that opens with this service
href
The location of the editor to be opened. The variable ${Location} is substituted with the URL of the file being edited.
validationProperties
An object specifying what file types this service is applicable to. Currently the only supported attribute is Name, specifying a regular expression to match on the file name.

Example

Here is a sample plug-in that contributes a link to a Google search for the selected file's name:

 var serviceImpl = {};
 var serviceProperties = {
   name: "Orion web editor",
   href: "/edit/edit.html#${Location}",
   validationProperties: {Name: "*.(css|js|htm|html|txt|xml|java)"}
 };
 provider.registerServiceProvider("orion.navigate.openWith", serviceImpl, serviceProperties);

When this plug-in is installed, the user will see Orion web editor as an available target in the Open With Navigator menu as follows: