[Qt-interest] Generic highlighter

Leandro T. C. Melo leandro.melo at nokia.com
Fri Nov 19 10:47:18 CET 2010


On 11/12/2010 11:07 PM, ext Diego Iastrubni wrote:
> On Fri, Nov 12, 2010 at 5:00 PM, Sean Harmer 
> <sean.harmer at maps-technology.com 
> <mailto:sean.harmer at maps-technology.com>> wrote:
>
>
>     I do not know of any stand-alone implementation of this. Having
>     said that, the
>     implementation in the qt-creator source does not appear to be
>     particularly
>     tightly coupled to QtCreator at all.
>
>     The generic syntax highlighter stuff is all in one dir, namely: 
>
>
>     qt-creator/src/plugins/texteditor/generichighlighter
>
>
> Not exactly true. The highlighter is interlaced with many other 
> internal components. It's not implssible to take this out, but ti's a 
> great del of work, and not trivial. I started doing this a few months 
> ago, but decided to stop as I noticed that Leonardo is still hacking 
> inside Nokia on the official version. Making a fork is smart only 
> after the official version is stable.
>

Hi all.

In general, the generic highlighter implementation tries to be as 
decoupled as possible from Creator internals. But naturally, as you 
noted, there are still parts relatively tied. However, if you are only 
interested on the highlighting formats and don't care about code 
folding, for example, it should not be that hard to strip it out.

The best example would be the generic highlighter auto-tests 
(tests/auto/generichighlighter), which currently are not dependent on 
Creator at all. Basically, it contains three fake header files 
(tabsettings.h, basetextdocumentlayout.h, and syntaxhighlighter.h) which 
are meant to replace the originals from Creator's text editor. A setup 
similar to this should be enough for basic highlighting.

Diego, there is indeed a Leonardo in Qt, but as far as I know he is 
involved with QML components. Perhaps, you confused the name?

Regards,
Leandro.

-- 
Leandro T. C. Melo
Software Engineer
Nokia, Qt Development Frameworks

Nokia gate5 GmbH
Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443B
Umsatzsteueridentifikationsnummer: DE 812 845 193
Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101119/bf20a970/attachment.html 


More information about the Qt-interest-old mailing list