Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358783 - Need an alternative to loading Plugins to generate URLs and hard-coding
Summary: Need an alternative to loading Plugins to generate URLs and hard-coding
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.4 M2   Edit
Assignee: Simon Kaegi CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-23 18:00 EDT by Simon Kaegi CLA
Modified: 2012-06-08 15:57 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Kaegi CLA 2011-09-23 18:00:55 EDT
Doing a performance run for M2 I noticed that we are always loading the git plugin and unit-testing plugin so that we can generate appropriate urls to the tool pages. Likewise we've hard-coded the path to our edit tool directly in the navigator page. This ultimately will not scale, because we eventually will have to load a zillion plugins to generate urls and if another js editor tool comes along we will have to write special logic to over-ride which tool to use.

Instead I think a plugin's service should provide a declarative mechanism to help create the URLs lazily. Off the top of my head URI Templates -- http://tools.ietf.org/html/draft-gregorio-uritemplate-06 -- look promising. So what this would mean is that a "navigate.command" service would register something like a "URITemplate" property along with a filter property that could be used to generate links where appropriate. The URITemplate could use variables we define like "resource" to get to the appropriate page so for example:

http://myserver/edit/edit.html{#resource} or  ../edit/edit.html{#resource}
Comment 1 Simon Kaegi CLA 2012-06-08 15:57:41 EDT
Fixed in 0.4m2