Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » AST: inserting comments and blank lines
AST: inserting comments and blank lines [message #242876] Fri, 13 April 2007 20:20
Eclipse UserFriend
Originally posted by: myawn.ebay.com

I've been reading through some earlier posts and bugzilla discussions
regarding comment handling, and just wanted to see if there was anything
new I might have missed. Because what I've read so far doesn't give me
much hope that I can do this via AST (and the whole point of using AST
is I don't really want to start manipulating my source file as just a
big character stream).

Is there a way to:
- Insert comments into the AST tree. This would most likely be a line
comment style, inserted just before insertion of a block of
FieldDeclarations or VariableStatementDeclarations.
- Insert blank lines into the AST tree, to visually separate the blocks
of declarations

So what I'm trying to accomplish is to be able to emit:

// notes about the following declarations go here
MyType fielda = . . .
MyType fieldb = . . .
MyOtherType fieldc = . . .

// Now another comment about more fields
YourType fieldd = . . .

code continues . . .


It seems the answer is "it doesn't work that way", but I've been wrong
before, and I'm hoping this is another one of those times :-)


Mike
Previous Topic:Debugger gets disconnected
Next Topic:apt ant task error output
Goto Forum:
  


Current Time: Thu Nov 14 08:49:29 GMT 2024

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

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

Back to the top