[Qt-interest] Generic Highlighter with multiple definitions for onefile?

NoRulez norulez at me.com
Sat Jul 9 18:29:56 CEST 2011


Ok, multiple was the wrong word.
I mean for e.g. A PHP/HTML file with embedded JS and CSS.

Am 09.07.2011 um 17:20 schrieb Scott Aron Bloom <Scott.Bloom at onshorecs.com>:

> Now Im confused… You want, in one file, to have different highlighters???
> 
>  
> 
> If you are thinking something like PHP embedded in HTML where you want a HTML highlighting outside the PHP tag, you are going to have to customize the highlighting logic.
> 
>  
> 
> Scott
> 
>  
> 
>  
> 
> From: NoRulez [mailto:norulez at me.com] 
> Sent: Saturday, July 09, 2011 7:59 AM
> To: Diego Iastrubni
> Cc: Scott Aron Bloom; NoRulez; Qt Interest MailingList
> Subject: Re: [Qt-interest] Generic Highlighter with multiple definitions for onefile?
> 
>  
> 
> Hi,
> 
>  
> 
> I use already the generic highlighter from the Qt Creator. My problem is only to highlight multiple sources per file.
> 
>  
> 
> Could you give me a little example to show how it works?
> 
>  
> 
> Best Regards
> 
> Am 09.07.2011 um 11:40 schrieb Diego Iastrubni <diegoiast at gmail.com>:
> 
> The generic highlighter available in QtCreator can handle this task. It's based on Kate. You can de-couple it from the IDE and use it in your application. It's released under LGPL.
> 
> On Sat, Jul 9, 2011 at 7:27 AM, Scott Aron Bloom <Scott.Bloom at onshorecs.com> wrote:
> 
> Use multiple  QSyntaxHighlighter, one setup for each set of rules you
> need..
> 
> When a file is loaded select the correct one, and call setDocument on
> the correct highlighter for the editor in use..
> 
> Scott
> 
> -----Original Message-----
> From: qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com
> [mailto:qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com] On
> Behalf Of NoRulez
> Sent: Friday, July 08, 2011 10:02 AM
> To: Qt Interest MailingList
> Subject: [Qt-interest] Generic Highlighter with multiple definitions for
> onefile?
> 
> 
> Hi,
> 
> if I use the generic highlighter per file (e.g. html) it works
> perfectly.
> 
> The problem I have is when a file has multiple sources such as a HTML or
> a PHP file. These files could have PHP/HTML source and JavaScript and/or
> CSS for example.
> 
> How can I combine such highlighters to highlight the PHP/HTML source and
> also the JS and CSS?
> 
> Thanks in advance
> 
> Best regards
> NoRulez
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
> 
>  
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110709/85338afd/attachment.html 


More information about the Qt-interest-old mailing list