Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » I want to highlight javascript code in my CDATA Section..
I want to highlight javascript code in my CDATA Section.. [message #213777] Wed, 14 May 2008 06:38 Go to next message
Eclipse UserFriend
Originally posted by: lji98.naver.com

Hi.

I'm developing own XML Editor from SSE Project.

In my editor , CDATA Text Section should be filled with javascript code.

for example,

1 <root>
2 <A> sample </A>
3 <script ev:event="xforms-submit" type="javascript"><![CDATA[
4
5 function a() {
6 alert(1);
7 alert(2);
8 }
9
10 ]]></script>
11</root>

can you see that javascript code from line 5 to line 8 ??

The problem is that i cannot implement colorizing of javascript code in
CDATA Section.

I was looking the concept of partition and regions, but i cannot find
clear solution.

I thought i have to define another region of each token. and i should
modify the parsing logic. right??

but i thinkn that is too tough job..

Please let me know the solution..

Thank you
Re: I want to highlight javascript code in my CDATA Section.. [message #213878 is a reply to message #213777] Wed, 14 May 2008 17:26 Go to previous message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

Take a look at the code for the HTML editor, it includes the specifics
of what you are trying to do.

Dave


JunginLee wrote:
> Hi.
> I'm developing own XML Editor from SSE Project.
>
> In my editor , CDATA Text Section should be filled with javascript code.
>
> for example,
>
> 1 <root>
> 2 <A> sample </A>
> 3 <script ev:event="xforms-submit" type="javascript"><![CDATA[ 4
> 5 function a() {
> 6 alert(1);
> 7 alert(2);
> 8 }
> 9
> 10 ]]></script>
> 11</root>
>
> can you see that javascript code from line 5 to line 8 ??
>
> The problem is that i cannot implement colorizing of javascript code in
> CDATA Section.
>
> I was looking the concept of partition and regions, but i cannot find
> clear solution.
>
> I thought i have to define another region of each token. and i should
> modify the parsing logic. right??
>
> but i thinkn that is too tough job..
> Please let me know the solution..
>
> Thank you
>
>
>
>
Previous Topic:Eclipse + JBoss Debug Mode issue
Next Topic:Refactoring support for XML files
Goto Forum:
  


Current Time: Thu Dec 18 14:32:32 GMT 2014

Powered by FUDForum. Page generated in 0.14324 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software