Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Text Editor Question
Text Editor Question [message #291882] Mon, 26 September 2005 14:31
Eclipse UserFriend
Originally posted by: a.morgan.pilz.ie

Hello All,

I am creating a custom text editor for an industrial programming language
that we are using.

When compiled an Abstract Syntax Tree (AST) is created.
We also hold on to the source code so the line numbers and offsets are
important.

One requirement that we have is that the language of the comments should be
changed at the click of a button.

The problem here is that the number of lines spanned by the comments will
most likely change as they change language.
This will mean that most likely the line numbers of the code are now out of
sync with the AST.
So a recompile is required to get them back in sync.

What we were hoping to do was prevent this having to occur.

Is it somehow possible to use the document partitions to prevent the line
numbers of the code from changing ?
Or maybe we should have two Documents - one that contains code only and one
with comments only ?
Or maybe there's something more obvious that I am missing ?

Any help would be greatly appreciated.

Thanks.
Previous Topic:Accessing a console
Next Topic:Backported The Eclipse 3.2 Splash Screen Changes to Eclipse 3.1 ... Comments Please
Goto Forum:
  


Current Time: Sat Nov 09 03:37:33 GMT 2024

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

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

Back to the top