Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 358783

Summary: Need an alternative to loading Plugins to generate URLs and hard-coding
Product: [ECD] Orion Reporter: Simon Kaegi <simon_kaegi>
Component: ClientAssignee: Simon Kaegi <simon_kaegi>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mamacdon
Version: 0.2   
Target Milestone: 0.4 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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