Post any comments, suggestions, annoyances or ideas for future releases here. Please do not post bug reports or questions here.
Post Reply
Posts: 134
Joined: Wed Jul 11, 2007 3:45 pm


Post by pwdiener »

I'd like a way to define a hyperlink in a file such that I could write a macro to follow the link. Here's the scenario - in my code, I put references to bug reports, documentation files, Subversion revision numbers, or any other documents. These references are (or could be) tagged with a specific string, for instance bug:12345, SVN:876, etc. where the general scheme is <tag word>:<ref word>.

Tag words would need to be defined somehow, with the associated action when the "link" is clicked. I think the action would be either to run a command or a macro, passing the tag word and ref word to it, possibly also including other parameters specified with macro tags. Tag words might be defined either as a workspace configuration option, or as a document type option, or possibly via a macro script calling a builtin function, which would eliminate the need to do additional configuration dialog development.

The other thing that needs definition is how to show the link in the editor itself. Coloring seems like a good fit. In fact, using user-defined words looks like a great start; the addition of a command/script name to run on double-click might be all that's needed. If it has to be a script, then the script could be responsible for parsing out words and picking up macro tag values as needed.

A related function would be to recognize a URL or URI in the source text, color it, and link to it in a browser window when it's double clicked (or maybe Ctrl-click, to follow Word conventions).

Bill Diener
Post Reply