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.
0001-Recognize-user-defined-types.patch
Description: 0001-Recognize-user-defined-types.patch
_______________________________________________ Qt-creator mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-creator
