Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How to remove blank lines of javadoc using AST?
How to remove blank lines of javadoc using AST? [message #507606] Wed, 13 January 2010 22:40
Eclipse UserFriend
I'm writing a tool to remove redundant blank lines of javadoc, using AST.

For example:

/**
 * aaaaaaaaaaaaaaaaaaaaaaa
 *
 *
 * cccccccccccccccccccccccccc
 */
public void somemethod() {
}


There are two blank lines between "aaaaaaaaaaaaaaaaaaaa" and "ccccccccccccccccccc". I want to remove one of them.

I used AST to parse the source, but it seems the blank lines are ignored. The retrieving nodes of this javadoc only have two elements:

1. TextElement: [aaaaaaaaaaaaaaaaaaaaaa]
2. TextElement: [cccccccccccccccccccccccccc]

Although both of them have correct startPositition and length, but I don't kown how to remove the blank lines between them. I need your help~

[Updated on: Wed, 13 January 2010 22:40] by Moderator

Previous Topic:LOG4j properties files placement
Next Topic:jar file problem
Goto Forum:
  


Current Time: Mon Mar 17 02:06:31 EDT 2025

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

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

Back to the top