Archive for the ‘Uncategorized’ Category
I’ll continue my instructions regarding how to set up JSDT development infrastructure.
- I set up the build target
- I checked out the code
- I updated to the latest debug plugins to resolve compilation issues.
- I launched the unit tests
Now run the product
When I work on Eclipse products, we typically provide a default launch config per product. Although the nightly build is the ultimate authority of what encompasses the product, these version-controlled launch files provide a good point of comparison developer to developer.
I could not find a public JSDT .launch file under CVS control.
So I looked at the installed JSDT product to create my own. It’s here if you would like to download it.
Just drop it into an active project in your Eclipse workspace, refresh the project, open ‘Run Configurations” and you should see a “jsdt” run config.
You may want to tweak it a bit and verify that the set of selected plugins is correct.
Then hit Run to see the JSDT.
Disclaimer: I’m not on the JSDT team, so this may not be exactly how they do it. But it’s what I’ve done to get it working.
I’m not on the JSDT team, so this may not be exactly how they do it. But it works for me.
My code no longer compiles!
This morning, I updated all the code I previously checked out. And now my rhino.ui project has a compilation error in RhinoTabGroup:
After a little investigation, I determined that RhinoTabGroup is using a new 3.7 method in AbstractLaunchConfigurationTab. It has just been introduced. I’m building against Eclipse 3.6, so don’t have this method.
So if I want to keep my JSDT source code in sync with the latest, I’ll have to also keep up with any dependencies.
One idea to resolve this would be to download the latest milestone builds and put them in my build target. However, this change is very recent and is not in a milestone build yet.
Another idea is to check out the latest o.e.debug.ui project and any dependency projects (hopefully not too many).
Check out more projects
To add the eclipse CVS repo, copy this into the CVS Repositories View:
And check out org.eclipse.debug.ui and org.eclipse.debug.core projects
And the compilation issue is resolved.
Going forward, my build target and workspace projects will change often. I’ll need to actively modify these to keep things rolling along. I’ll be doing a combination of:
- Including other Eclipse projects in my workspace, on an as-needed basis. I’ll start getting a good sense of what these projects are as things break.
- Change my build target to move up to Milestone builds.
I always seem to spend too much time dinking around with UI layouts. In fact, today I’ve been fighting an odd problem where I had a bunch of extra space in a dialog between two other elements. I had spent excessive time trying things, over and over again, with no success. That’s usually a sign to take a step back from the keyboard.
I vaguely remembered there was a tool that painted each composite in the UI a different color. I Googled and found Simon Archer and Chris Aniszczyk’s Picasso tool. Picasso is found in the PDE incubator source code (unfortunately it doesn’t get full billing on the PDE incubator page).
I ran my app with Picasso enabled, and clearly saw that something was amiss between my text and my table. I hovered over the lime green box and was able to get a large screen of useful information (not shown): what the element is, its parentage, layout, etc. I was able to quickly fix my mistake.
How to use:
- Import the project into your workspace from the PDE incubator repository.
- In your run config:
- Plug-ins: add org.eclipse.pde.picasso.
- Tracing: enable tracing and turn on org.eclipse.pde.picasso.
- Start your app.
I wanted to mention another Essential Eclipse Plug-in: the Eclipse Platform Team’s ‘Core Tools’. I consider it essential to my work based on its inclusion of a single tool: “Find Unreferenced Members”.
Armed with this tool and some unit tests, you can really clean up some code.
Plug-in developers are the primary audience for ‘Core Tools’. It contributes tools for validating plug-ins/class loading and Eclipse metadata browsing. You can find more info on its capabilities here: http://www.eclipse.org/eclipse/platform-core/downloads/tools/readme.html.
The essential tool to any Java developer is “Find Unreferenced Members”.
- Right click on a project, package, or file.
- Select “Find Unreferenced Members”.
- A Search view appears with member candidates for removal.
- Note the matches are only a good set of candidates. The tool analyzes the Java code in your workspace to determine unused members. There may be false candidates. For example, a no-arg constructor might be unreferenced, but as any plug-in developer knows, it’s required if the class is instantiated via plug-in.
The update site is here: http://www.eclipse.org/eclipse/platform-core/downloads.php#updates.
Update: It’s now here: http://eclipse.org/eclipse/platform-core/updates.