[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.jdt] Re: How to extend the Java Compiler in your application
|
Jacek Pospychala a écrit :
Moutaz,
Eclipse Java compiler is in org.eclipse.java.core plugin. From what I
It is rather org.eclipse.jdt.core.
see, there is one compiler class exposed in API:
org.eclipse.jdt.core.dom.CompilationUnitResolver
This should not be used to simply compile Java code.
The core compiler stuff is in org.eclipse.jdt.internal.compiler.*, and
it's used by two tools: JavaBuilder - for compiling source code in
Eclipse environment and batch builder, that can be called from command
line. You may take a look how these tools do compiling.
You can either use the batch compiler or use the JSR199 support.
For the jsr199 support, you would need the plugin
org.eclipse.jdt.compiler.tool and org.eclipse.jdt.core.
You don't actually need the whole org.eclipse.jdt.core contents. You
might want to add the ecj.jar on the classpath of your plugin.
ecj.jar contains all the required types for the batch compiler and the
jsr199 support.
Let me know if you need more details.
--
Olivier