Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

question about : adding a method to a valid java source file  RSS feed

 
Arnold Reuser
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Currently I'm working on a new open source project that needs the following feature : add a property, method or class to a given valid java source file in a neat way.

This should be done before and there should be dozens of projects that use this feature. But each and every project, like elide and qdox, have some problems with preserving comments. Therefore I got some doubts about how easy this is to solve.

Therefore I'm posting this question before spending a week or so trying to solve this problem. Does anyone like to share some knowledge with me about this topic. Is there a well known project that has got this feature and could you give me some example code? Is it straightforward to solve this problem with projects like jjtree, javacc, antlr, ... Could you give me some example code or references.

The result sould be something like :



Thnx in advance!!
[ September 29, 2004: Message edited by: Arnold Reuser ]
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might consider writing your project on the open-source Eclipse platform. Eclipse's "JDT" Java development environment is built on exactly the sort of framework you need.
 
Arnold Reuser
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Currently I've implemented the solution with JDT 3.0 in a succesful way.
Not all features of JDT are implemented and a redesign can make it even more powerful, but it suits its purpose.
[ October 07, 2004: Message edited by: Arnold Reuser ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!