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

Bug 426045

Summary: We should not use require.toUrl function in orion code.
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: ClientAssignee: libing wang <libingw>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 5.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 430385    
Bug Blocks:    

Description libing wang CLA 2014-01-18 11:03:27 EST
After I built a readonly file browsing widget for Bug 424866, I got exception when I load the built js file to consume it in my demo page.

The exception happens in pageLinks.js at function getOrionHome.
The reason is that the widget has a chain dependency:
The widget -> navigatorRenderer -> extensionCommands -> PageLinks.

The "require" object in almond build does not have "toUrl" function so the loading fails. 

Not limited to pageLinks.js, we have other places where require.toUrl is used.
I am wondering if this will cause future issues if we build other widgets.
Comment 1 libing wang CLA 2014-01-18 13:06:10 EST
fixed the pageLinks.js issue btu I will keep this bug open for other places where require.toUrl is used.
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=db633c20c3c8a4cd53fbb9b60edde5bc1ae3b6f9
Comment 2 John Arthorne CLA 2015-05-05 14:40:10 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:

https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html