最近給項目組做了個代碼自動生成的小插件,已經發布到了google code: http://code.google.com/p/ormapper/
不管如何,對做一個插件有了一個完整的實踐。基本上一些很重要很基礎的UI都用過
說實話,如果做插件,不能不看別人寫的插件的源代碼,那么JDT顯然是首選
我把ECLIPSE官方網上的一些資料整理出來,如果有不對的地方,希望大家指正。
如果想使用JDT的話,需要引入以下的包:
不管如何,對做一個插件有了一個完整的實踐。基本上一些很重要很基礎的UI都用過
說實話,如果做插件,不能不看別人寫的插件的源代碼,那么JDT顯然是首選
我把ECLIPSE官方網上的一些資料整理出來,如果有不對的地方,希望大家指正。
如果想使用JDT的話,需要引入以下的包:
JDT Core packages give you access to the Java model objects and headless Java IDE infrastructure. The JDT Core packages include:
- org.eclipse.jdt.core - defines the classes that describe the Java model.
- org.eclipse.jdt.core.compiler - defines an API for the compiler infrastructure.
- org.eclipse.jdt.core.dom - supports Abstract Syntax Trees (AST) that can be used for examining the structure of a compilation unit down to the statement level.
- org.eclipse.jdt.core.dom.rewrite - supports rewriting of Abstract Syntax Trees (AST) that can be used for manipulating the structure of a compilation unit down to the statement level.
- org.eclipse.jdt.core.eval - supports the evaluation of code snippets in a scrapbook or inside the debugger.
- org.eclipse.jdt.core.formatter - supports the formatting of compilation units, types, statements, expressions, etc.
- org.eclipse.jdt.core.jdom - supports a Java Document Object Model (DOM) that can be used for walking the structure of a Java compilation unit.
- org.eclipse.jdt.core.search - supports searching the workspace's Java model for Java elements that match a particular description.
- org.eclipse.jdt.core.util - provides utility classes for manipulating .class files and Java model elements.