Bugzilla will undergo maintenance 2024-03-29 18h00 CET. Bugzilla will be placed in read-only mode at that time.

Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 563015 - Terminal needs a hyperlink detector
Summary: Terminal needs a hyperlink detector
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: terminal (show other bugs)
Version: Next   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 10.3.0   Edit
Assignee: Fabrizio Iannetti CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 572806
  Show dependency tree
 
Reported: 2020-05-10 11:41 EDT by Jonah Graham CLA
Modified: 2021-05-19 12:52 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonah Graham CLA 2020-05-10 11:41:59 EDT
The current terminal does not have a hyperlink detector. This is a significant omission in making the terminal complete compared to other terminals (such as gnome or vs code's integrated terminal).
Comment 1 Fabrizio Iannetti CLA 2021-02-12 01:38:06 EST
Hi Jonah,

I have done something of the sort in https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/176161

still rather rough, but it shows the functionality.
Note that following the cwd of the terminal to resolve relative paths properly works on linux only.
Comment 2 Jonah Graham CLA 2021-03-04 14:21:04 EST
I think having Linux only is better than having nothing. AFAICT the Linux only is just about getting the CWD? On Windows/macOS it can be resolved to the CWD when the process was created as a workaround.

I have put this to complete in the 10.3.0 timeframe.
Comment 4 Jonah Graham CLA 2021-04-12 18:58:01 EDT
(In reply to Fabrizio Iannetti from comment #1)
> still rather rough, but it shows the functionality.
> Note that following the cwd of the terminal to resolve relative paths
> properly works on linux only.

BTW this can fix another long standing bug - that the terminal doesn't remember directory that terminal is open on restart. So we can fix this for Linux now thanks to the work you put in here. See Bug 460495.
Comment 5 Peter Palaga CLA 2021-04-13 03:16:58 EDT
Great news, thanks for your work, Fabrizio!

Will this also make the source file locations in Java stack traces clickable?
Comment 6 Jonah Graham CLA 2021-04-13 09:35:39 EDT
(In reply to Peter Palaga from comment #5)
> Will this also make the source file locations in Java stack traces clickable?

Not exactly - this patch makes any "word" (white space separated strings) clickable. So for a line of stack trace like

    at org.eclipse.cdt.dsf.concurrent.DefaultDsfExecutor.submit(DefaultDsfExecutor.java:482)

everything from org to closing ) is clickable.

But, there is no special handler that parses that into a Java reference, so it will open the "Open Resources" dialog filled pre-filled with 

"org.eclipse.cdt.dsf.concurrent.DefaultDsfExecutor.submit(DefaultDsfExecutor.java"

then if you have that file checked out (i.e not a class file) you can edit the pre-filled bit and select the file. After opening it should jump to the correct line.

So, what is needed here is some extensibility/reuse of existing places (such as Java Stack Trace Console). I have raised Bug 572806 for that.
Comment 7 Jonah Graham CLA 2021-04-13 11:21:42 EDT
(In reply to Jonah Graham from comment #6)
> I have raised Bug 572806 for that.

I wrote a proof of concept that allows Ctrl-click for Java Stack Traces - follow my progress in that bug now.
Comment 8 Jonah Graham CLA 2021-04-13 11:21:45 EDT
(In reply to Jonah Graham from comment #6)
> I have raised Bug 572806 for that.

I wrote a proof of concept that allows Ctrl-click for Java Stack Traces - follow my progress in that bug now.
Comment 9 Fabrizio Iannetti CLA 2021-04-13 13:29:52 EDT
(In reply to Eclipse Genie from comment #3)
> Gerrit change https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/176161 was
> merged to [master].
> Commit:
> http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/
> ?id=e6d5c634b9f4f50ebaa52b7b212e0095b10fe4ea

Thanks Jonah!

Should I add an entry in the New & Noteworthy?
Or would you rather wait in case of further improvements?
Comment 10 Jonah Graham CLA 2021-04-13 13:39:44 EDT
(In reply to Fabrizio Iannetti from comment #9)
> Thanks Jonah!

Thank you! It is pre-released here for M1 https://download.eclipse.org/tools/cdt/builds/10.3/cdt-10.3.0-m1/


> Should I add an entry in the New & Noteworthy?

Yes please - that is all that is left on this bug now. https://wiki.eclipse.org/CDT/User/NewIn103#Terminal
Comment 12 Fabrizio Iannetti CLA 2021-04-15 15:07:00 EDT
I have updated the New and Noteworthy:

https://wiki.eclipse.org/CDT/User/NewIn103
Comment 13 Jonah Graham CLA 2021-04-15 16:37:22 EDT
(In reply to Fabrizio Iannetti from comment #12)
> I have updated the New and Noteworthy:
> 
> https://wiki.eclipse.org/CDT/User/NewIn103

thanks.

Last thing left is Comment 11. I will get to it at some point before release, probably when I return to Bug 572806
Comment 14 Eclipse Genie CLA 2021-04-23 11:22:15 EDT
New Gerrit change created: https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/179739