In aid of remembering for next time, a few notes on setting up an Eclipse project that can play with the Java model of a project follow.
The first step is figuring out which version of Eclipse to use for plugin development. It was not obvious to me that "Eclipse for RCP and RAP Developers" was what I wanted on the Eclipse download page. After some Googling I puzzled it out but a name that clearly indicated to a noob it was a bundle suitable for Eclipse extension or plugin development would have helped!
Once you have Eclipse for RCP/RAP creating a plugin project is gloriously simple. Just click through some wizard pages:
This gives you a superb little project, all setup for debug and everything! However, said project doesn't have the JDT libraries on classpath so when you try to do anything interesting using the JDT it doesn't compile. You can clearly see that the "Plug-in Dependencies" don't include any of the JDT stuff ... but how to add it?
To add the JDT bits so we can do cruel and unusual things to Java projects double-click on META-INF/MANIFEST.MF in your plugin project, choose the MANIFEST.MF tab at the bottom of the editor, and add the org.eclipse.jdt, org.eclipse.jdt.core to the Require-Bundle block. On save this will add jars to your "Plug-in Dependencies", as shown below:
All easy enough once you know; however as an Eclipse noob this was rather non-obvious. Perhaps next we'll find time to make the JSP property access checker publish to the Eclipse problems view "live".
For using the JDT the documentation is pretty good, as is the JDT_fundamentals.ppt someone put together for eclipsecon 2008 (thus perhaps dated info but still helpful).