[Qt-creator] Plugin: open bugtracker links from comments
Thorbjørn Lindeijer
thorbjorn.lindeijer at nokia.com
Wed Feb 3 17:38:26 CET 2010
On 02/03/2010 03:48 PM, ext Liebe Markus (RtP2/TEF72) wrote:
> So I think I would have to somehow do in my plugin the following:
> - create a new syntaxhighlighter for our Bugtracker comments (or somehow extend the cppeditor syntaxhighlighter from within my plugin)
> - extend the navigation functions of the cppeditor plugin somehow from within my plugin. I am thinking of the functions CPPEditor::findLinkAt(...) and CPPEditor::openLink(...)
> - If I use the above functions I need to have a CPPEditor::Link that is able to store a URL and not only a filename.
>
> Do you think this is possible? Or would it be better to add the desired functionality directly to the CPPEditor?
Note that the Link class was moved from CPPEditor to BaseTextEditor.
However, this doesn't really help you with adding different link types
from another plugin. Some refactoring/extensibility would need to be
done to achieve that.
You probably don't want to be extending the C++ syntax highlighter. The
BaseTextEditor supports extra selections which you can use to highlight
certain parts of the text. This is used for the highlighting of unused
variables, the links and marking of warnings/errors.
Regards,
Bjørn
--
Thorbjørn Lindeijer
Software Engineer
Nokia, Qt Development Frameworks
More information about the Qt-creator-old
mailing list