Ticket #815 (new enhancement)

Opened 4 years ago

Last modified 4 years ago

Clickable filenames in Console

Reported by: patspam Owned by:
Priority: major Milestone:
Component: editor Version: 0.53
Keywords: Cc:

Description

Padre should have an option to scan for valid filenames in console output and make them clickable links. Clicking the link should open the file, and if possible, the appropriate line number.

I got this working for Perl error messages experimentally (locally) as follows:

  • changed Padre::Wx::Output to subclass Wx::RichText? instead of Wx::TextCtrl?
  • added regexp to scan for " at <file> line <line>."
  • Wx::Event::EVT_TEXT_URL handles link onclick event

Ideally I think it would be nicer if it detected all valid file paths (and optionally detected the line number).

I think it should be an option like "Coloured Text in Output Window (ANSI)" since it will obviously slow down console output to scan for paths.

Diff attached.

Attachments

diff.txt (2.8 KB) - added by patspam 4 years ago.
Diff

Change History

Changed 4 years ago by patspam

Diff

comment:1 Changed 4 years ago by patspam

(the reason I'm calling it "experimental" is because changing Padre::Wx::Output to inherit from RichText? is likely to break stuff)

comment:2 Changed 4 years ago by patspam

Implemented in r10061.

Note: See TracTickets for help on using tickets.