Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Building a CDT based editor(Repairing damaged area)
Building a CDT based editor [message #896775] Thu, 19 July 2012 17:00 Go to next message
Prajeet Missing name is currently offline Prajeet Missing name
Messages: 14
Registered: November 2010
Location: B'Lore
Junior Member
Hey guys i am building a CDT based editor.

I understand CDT's document partitioning scheme. I am currently working on the syntax highlighting part of my editor. I have used the default C partitions defined in ICPartions interface. I have written my own scanners for syntax highlighting (DefaultDamagerRepairer is configured with these scanners for the respective partitions). The scanners and the rules are all fine. They seem to color everything just as i wanted.

But i am noticing this strange behavior - Lets suppose i have a multi-line comment
/*
* Hello
*
*/

This is nicely colored green. But when i modify it - insert "world" after "hello" the color for that line is all messed up. What is going on? I thought the DefaultDamagerRepairer is suppose to find the damage and repair it (by running the scanner)? The 2 lines that follow Hello World are properly colored. I believe the problem is somewhere with new region not being repaired...

Can someone explain why this is happening? Do i need a reconciler ?


In order to gain something, something of equal value must be sacrificed.

[Updated on: Thu, 19 July 2012 17:09]

Report message to a moderator

Re: Building a CDT based editor [message #896836 is a reply to message #896775] Fri, 20 July 2012 04:51 Go to previous message
Prajeet Missing name is currently offline Prajeet Missing name
Messages: 14
Registered: November 2010
Location: B'Lore
Junior Member
Ok i fixed the problem Smile I wrote a custom damager that damages the entire partition

/thread


In order to gain something, something of equal value must be sacrificed.
Previous Topic:Eclipse reports warnings
Next Topic:eclipse code style on comments
Goto Forum:
  


Current Time: Thu Oct 23 13:21:37 GMT 2014

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

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