[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.webtools] I want to highlight javascript code in my CDATA Section..

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