Opened 10 years ago

Last modified 10 years ago

#815 new enhancement

Clickable filenames in Console

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


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 (1)

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

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by patspam


comment:1 Changed 10 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 10 years ago by patspam

Implemented in r10061.

Note: See TracTickets for help on using tickets.