转载自
http://blog.csdn.net/flying881114/article/details/6187061,有少许改动。
---入门文档
1. Eclipse Corner Article: Abstract Syntax Tree
http://www.eclipse.org/articles/Article-JavaCodeManipulation_AST/index.html
(英文,AST的概述,细节代码不多)
这张图不错的,描述了使用ast的流程,一共6步。
2. 探索Eclipse的ASTParser
http://www.ibm.com/developerworks/cn/opensource/os-ast/index.html
(中文,相对详细的讲解和代码)
个人认为上面2篇都是不错的入门文章,值得反复回头细细咀嚼。
---AST使用
1. Eclipse JDT--AST and JavaModel Tutorial
http://www.vogella.de/articles/EclipseJDT/article.html
(英文,代码很多,但需要有更多的背景知识)
2. Eclipse AST 使用指南
http://wenku.baidu.com/view/a0b8e07931b765ce050814ac.html
(pdf文档,更加详细地说明了AST 相关类与方法,可以与eclipse documentation结合使用)
3. Eclipse documentation
http://help.eclipse.org/helios/index.jsp
其实,最靠谱的还是直接看eclipse文档。在这里你可以了解你想知道的一切。
4. Yet another AST tutorial
http://sahits.ch/blog/?p=228
英文,有大量代码,从易到难讲解
---使用AST相关
1. 使用AST出现问题?不知道使用什么jar包?看看这里吧:
http://lym6520.javaeye.com/blog/747840
由于上文用的jar包比较老,是基于jdt core3.6版的,这里给出一个比较新的基于maven的dependency,jdt core是3.9版的。
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<version>3.9.0.v20130604-1421</version>
</dependency>
<dependency>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.common</artifactId>
<version>3.6.0.v20100503</version>
</dependency>
<dependency>
<groupId>org.eclipse.core</groupId>
<artifactId>org.eclipse.core.resources</artifactId>
<version>3.6.0.v20100526-0737</version>
</dependency>
<dependency>
<groupId>org.eclipse.core</groupId>
<artifactId>org.eclipse.core.runtime</artifactId>
<version>3.6.0.v20100505</version>
</dependency>
<dependency>
<groupId>org.jibx.config.3rdparty.org.eclipse</groupId>
<artifactId>org.eclipse.text</artifactId>
<version>3.5.100.v20110505-0800</version>
</dependency>
2. 想亲眼看看你源文件的AST是什么样的?为你的Eclipse装一个ASTview插件吧!
http://www.eclipse.org/jdt/ui/astview/index.php
或者下载附件里的java代码,直接运行图形化工具AstExplorer也可以。
分享到:
相关推荐
eclipse-JDT-3.2.2 免费下载 完全版eclipse-JDT-3.2.2 免费下载 完全版eclipse-JDT-3.2.2 免费下载 完全版eclipse-JDT-3.2.2 免费下载 完全版eclipse-JDT-3.2.2 免费下载 完全版eclipse-JDT-3.2.2 免费下载 完全版...
java开发常用 jdt-compiler-3.1.1.jar
eclipse-jdt-3.6.1-6.13.el6.i686.rpm
tomcat 源码 ant 下载时用到的eclipse-JDT-3.3.1.zip
eclipse3.0.1 and NLpack-eclipse-JDT-SDK-3.0.x
包括以下包:jdt-3.2.1-r321_v20060823.jar、 jdt-3.3.0-v20070607-1300.jar、jdt-3.4.2_r894.jar、jdt-compiler.jar、org.eclipse.datatools.enablement.jdt.classpath_1.0.1.v201107221501.jar、org.eclipse.jdt....
安装vim开发环境所需要的包。由于是国外下载,所以非常慢。
jasper-compiler-jdt-5.5.15.jar 有效解決打印出現的異常org/eclipse/jdt/internal/compiler/ICompilerRequestor
Itext中文显示,基于iTextAsian.jar ,另外在ireport中也需要用到这个jar包。以及ireport编译以及字体的相关设置均需用到这些jar包。希望能帮到你。
在原JDT-6型仪器系统基础上,对陀螺测斜定向系统进行改进,包括地面仪数据采集板、绞车控制器等,使数据通讯仅用RS232或USB即可实现,与之配套的软件GyroSProcess可运行于Windows XP等平台。新系统可提高测斜作业效率,并...
Class not found: org.eclipse.jdt.core.JDTCompilerAdapter。 解决方法: 拷贝下面这些jar包到ant_home/lib org.eclipse.jdt.compiler.tool_1.0.100.v_972_R35x.jar org.eclipse.jdt.core_3.5.2.v_981_R35x.jar org...
Eclipse JDT AST使用方法,word格式的。Eclipse JDT是eclipse中开发Java程序的一套工具,包括editor,语法高亮等等功能,而其中的AST更是十分优秀的解析Java源代码的工具
Take Your Code to the...JDT Developers PHP Development Tools General Fixed support for ASP tags Editor Formatter Debugger Platform Windows MacOS GTK3 Editors Dark Theme Other Open Source Projects Notices
eclipse.jdt.core, jdt/核心项目库( eclipse jdt core ) JDT内核这是 Eclipse 开发工具的Java的核心部分。 它包含对编译和使用Java代码的非用户界面支持,包括:可以独立运行或者作为 Eclipse IDE的一部分的增量或者...
资源来自pypi官网。 资源全名:jdt-0.0.2.linux-x86_64.tar.gz
该存储库已存档,将不再更新。
eclipse JDT的使用,非常使用的学习资源!!!
基于Eclipse-JDT生成Java源代码的AST并可视化