Orion/Documentation/Developer Guide/Plugging into Orion pages

From Eclipsepedia

< Orion‎ | Documentation‎ | Developer Guide
Revision as of 10:07, 22 February 2012 by John arthorne.ca.ibm.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview of plugging into Orion pages

The following services allow plugins to contribute links and other forms of connectivity between an Orion page and other web pages.

orion.page.link

The link service provides a mechanism for plugins to add links that should appear in the main header of Orion pages. Clients supply the link name and URL. The header code will look for implementors of this service when generating page headers for Orion. For example, the following snippet defines the main links that are shown in a default Orion installation.

  provider.registerServiceProvider("orion.page.link", serviceImpl, {
     name: "Navigator",
     id: "orion.navigator",
     href: "/navigate/table.html#"
  });
  provider.registerServiceProvider("orion.page.link", serviceImpl, {
     name: "Sites",
     id: "orion.sites",
     href: "/sites/sites.html"
  });
  provider.registerServiceProvider("orion.page.link", serviceImpl, {
     name: "Plugins",
     id: "orion.plugins",
     href: "/plugin/list.html"
  });
  provider.registerServiceProvider("orion.page.link", serviceImpl, {
     name: "Repositories",
     id: "orion.repositories",
     href: "/git/git-clone.html"
  });

orion.page.link.related

The related link service provides a mechanism for plugins to contribute links to the "Related pages" menu in the Orion page header. Currently, a related link must first be defined as a command in "orion.navigate.command." Then, the command id should be referenced in the service definition for the "orion.page.link.related" extension. When any page is loaded in Orion, it will evaluate its resource against the validationProperties for the command. If the page's resource is valid for the command, then the command will appear in "Related pages."