[Qt-creator] [patch] C++ syntax highlighting and the (unused) 'style' format.
roberto.raggi at nokia.com
roberto.raggi at nokia.com
Thu Apr 8 11:46:48 CEST 2010
Hi,
On Apr 6, 2010, at 2:23 PM, ext tbp wrote:
Yep, we should use the Semantic Highlighter instead.
As far as i can see it's only available in trunk and not yet enabled,
but that's interesting.
We introduced the SemanticHighlighter in Creator 1.3 and it is used to highlight references to local variables. You can easily add the magic you need to mark user defined types by visiting the AST when updating the `SemanticInfo' of the current text editor (function SemanticHighlighter::semanticInfo() in cppeditor.cpp). For example, the attached patch searches for potential user defined types (e.g. typedefs, classes, forward class declarations) and then it marks all the occurrences of those names in the current buffer. OK, this is not the *real* thing (the *real thing* should visit the AST instead of scanning the token stream) but i guess it is a good starting point (*).
ciao robe
(*) it's a 10 minutes hack so don't expect too much.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20100408/6889b95e/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Recognize-user-defined-types.patch
Type: application/octet-stream
Size: 7069 bytes
Desc: 0001-Recognize-user-defined-types.patch
Url : http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20100408/6889b95e/attachment.obj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20100408/6889b95e/attachment.htm
More information about the Qt-creator-old
mailing list