I took a quick look and see that you are using this Java parser: http://code.google.com/p/javaparser/
This project seems fairly new. I wonder how stable the project is? <http://code.google.com/p/javaparser/>Jeff Butler 2009/6/23 Jeff Butler <jeffgbut...@gmail.com> > This looks very cool! > Are you saying that WebExplore does support Java merging? If so then I'd > be interested in seeing the code. > > Also, I would like to know about any bugs you've fixed in Ibator so we can > include them in the base distribution. And if there's anything else you > would like to see changed in Ibator to make tools like yours easier to > write. > > Jeff Butler > > > On Mon, Jun 22, 2009 at 10:33 PM, 刘孝林 <mailfor...@gmail.com> wrote: > >> Hi, jeff, I would like contribute some code to Ibator project. I developed >> a tool which provide friendly GUI to make a configuration for Ibator >> conveniently. It is named with "WebExplore" and exists as a plugin of >> CoolSQL(http://coolsql.sourceforge.net/). As you said in mail, "java file >> merging" is not supported outside of Eclipse, but supported by WebExplore. >> In addition, Ibator is rebuilded with some bug fix and extended functions >> including merging java file, plugin classloading, exporting Ibator >> configuration to XML file with escaping XML keyword. The detailed >> information about WebExplore: >> http://coolsql.sourceforge.net/webexplore.html. >> >> >> >> 2009/6/22 Jeff Butler <jeffgbut...@gmail.com> >> >> Several topics: >>> 1. Java file merging >>> >>> The code for merging Java files is only in the Eclipse plugin. It uses >>> the Eclipse AST parser and AST rewriter and cannot run outside of Eclipse. >>> If you want to merge Java code, you must run in Eclipse. >>> >>> In the far future, I hope to enable Java merging outside of Eclipse. The >>> problem is that it's just so easy in Eclipse, and so difficult elsewhere! I >>> think the long term solution is to write a specialized Java parser for >>> Ibator using ANTLR or the like. Parsing Java source code is a non-trivial >>> task and I have no interest in reinventing the wheel - so probably something >>> like ANTLR is the right answer ultimately. If anyone is interested in >>> making an important contribution to Ibator this would be a good area to look >>> into :) >>> >>> 2. Plugin Classloading >>> >>> You must add your plugin classes to Ibator's runtime classpath. This >>> cannot be done with <classPathEntry> elements in the configuration. Outside >>> eclipse, you can do this by using the -cp argument, or by adding to the Ant >>> classpath in the normal ways. Inside Eclipse, you must use the eclipse >>> integrated Ant task and add to the classpath with the Eclipse launch >>> configuration. The Ibator menu option in Eclipse does not allow >>> modifications to the runtime classpath. >>> >>> From these two answers, you should deduce that the only way to use a >>> plugin AND use Java merging is to use the Eclipse plugin provided Ant task >>> (NOT the Ant task in the base Ibator distribution). If you want to automate >>> this, you will have to run Ant inside Eclipse with headless Eclipse. >>> >>> 3. Maven >>> >>> I'm looking at maven for the Ibator build. If it works out, then I'll >>> also provide a maven plugin to run Ibator. But, this plugin will not merge >>> Java files (see #1 above). >>> >>> 4. The future >>> >>> My current focus is updates to Ibator for iBATIS3. I have some code >>> *sort of* working now, but iBATIS3 is in Alpha stage only - so Clinton and I >>> are working through some bugs in iBATIS3. I have done some refactoring of >>> the Ibator code base to allow for iBATIS3 - but this is mostly internal and >>> should not affect anyone (hopefully). Feel free to checkout the latest >>> Ibator code from SVN and try it out. I don't think you'll see much >>> difference. Note that the iBATIS3 support for Ibator is not in SVN yet - >>> just the base Ibator refactorings. >>> >>> Hope that helps! >>> Jeff Butler >>> >>> >>> >>> On Sun, Jun 21, 2009 at 10:20 PM, Chad McHenry <mchen...@gmail.com>wrote: >>> >>>> I was having trouble using my ibator plugin from eclipse, getting the >>>> error "Cannot instantiate object of type >>>> com.example.ibatis.ibator.plugins.ClassAnnotator" and found an old thread >>>> [1] which references the same error. It appears it is still relevant (I >>>> could only run my plugin via eclipse by putting my plugin classes into >>>> $eclipse/plugins/org.apache.ibatis.ibator.core_1.2.1/ibator.jar). >>>> >>>> For using plugins, is the ant-task still the preferred way to use >>>> Ibator? I use maven, and can use maven-antrun-plugin, but is it still true >>>> that any changes made to generated files will be lost when using the ant >>>> version since it does not merge java files? >>>> >>>> Are there plans, or a roadmap for Ibator? I'm spending a lot of time >>>> getting this plugin working (and actually believe it will be worth it over >>>> the course of multiple projects). I'm wondering if I can contribute back to >>>> the ibator-core, but would hesitate if there is going to be a drastic >>>> redesign for ibatis-3.0. >>>> >>>> ...Chad >>>> >>>> [1] >>>> http://www.nabble.com/Re:-ibator-question-about--element-p19222727.html >>>> >>>> >>> >> >