Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » updating source locations in modified CompilationUnit
updating source locations in modified CompilationUnit [message #64883] Wed, 10 May 2006 18:23
Eclipse User
Originally posted by: andrew_NOSPAM_.eisenberg.as

Hi,

This isn't really an AJDT question, but I'm trying to solve a problem that I
think you guys have already solved. So, perhaps someone here could have some
advice for me.

I am modifying a CompilationUnit that I created from an IDocument (ie-
transforming an AST). After modification, I would like to update the source
locations on the CompilationUnit without creating a new AST.

There are particular methods to do this in the ASTNode class:
getStartLocation()
getLength()
setSourceLocation(int,int)

but source locations are only set when the AST is created, and they are not
updated when the AST is modified.

Yet somehow, AJDT is able to map errors, warnings, debug locations, etc to the
correct line of code even when the class file contains generated code and the
original file contains aspect code.

How does AJDT do this? Is there some code that you could point me to? In
particular is there a specific Eclipse API for this, or is it a custom thing?

thanks,
--andrew
Previous Topic:Initialization pointcut problem
Next Topic:updating source locations in modified CompilationUnit
Goto Forum:
  


Current Time: Thu Oct 30 13:01:52 GMT 2014

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

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