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

Bug 398905

Summary: Shouldn't have to copy&paste the Debug URL
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: NodeAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: grant_gayed, libingw
Version: 2.0   
Target Milestone: 2.0 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 400026    
Bug Blocks:    

Description Mark Macdonald CLA 2013-01-23 11:51:31 EST
1. Launch orionode
2. Go to the shell
3. use `node debug whatever.js]`

It prints out a debug URL that you have to copy & paste into your browser. This is not optiomal -- need to investigate a better approach.
Comment 1 Mark Macdonald CLA 2013-01-23 11:57:06 EST
Ideally we could have Bug 396657 fixed but if that can't be done in the short term, we could try opening up a new window to the debug URL (need to check and see if our plugin has permission to do that).
Comment 2 Mark Macdonald CLA 2013-01-23 13:26:55 EST
(In reply to comment #1)
> Ideally we could have Bug 396657 fixed but if that can't be done in the
> short term, we could try opening up a new window to the debug URL (need to
> check and see if our plugin has permission to do that).

Nope, we definitely can't do that.
Comment 3 Mark Macdonald CLA 2013-01-23 16:23:57 EST
I talked with Simon, and he suggested that we could do this:

 - search for recognize URLs in command output (using a Regexp or whatever)
 - parse them with URL-shim
 - if the resulting URL object has a "safe" scheme (as determined by PageUtil.validateURLScheme()), then  automatically linkify it into an <A>.

This approach is attractive because only the shell side of the equation would need to change, and any contributed command gets links for free.
Comment 4 libing wang CLA 2013-02-05 17:55:33 EST
pushed a fix to consume the detecting valid URL API(fixed in bug 400026) in resultWriter.js.
So now if you use "node list", the debug URL is rendered as links.

Still trying to consume the detecting valid URL API when type "node debug", in the  command output.
Comment 5 libing wang CLA 2013-02-06 16:32:00 EST
The "node debug" command returns the debug URL in the promise.progress in shell page. That is why it is handled by GCLI by default.
Grant and I sat down together and change it a little bit so that the promise.progress part can get use of the existing progress.resolve code.

Fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=6fbf40501fb2be7a2efc499ef2b842e123ce0126.

Thanks, Grant.