Tim O’Reilly, Cloud Computing Keynote
This isn’t necessarily an Eclipse-specific post. I’m trying to expand my desktop/IDE-centric worldview a bit, and thought other tools developers might find this interesting.
Also, I enjoy listening to Tim O’Reilly. His talk encompasses Cloud Computing, Open Source Software, Open Data, and tools for using/sharing Open Data. As a tools developer, I found it thought-provoking.
Essential Plugin: Platform ‘Core Tools’
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.
Deadlock Debugging in Eclipse
My Eclipse-based product dead-locked this morning.
If I had launched from my Eclipse dev environment, I could use the debugger to show me the threads and locks that are giving me trouble. Darin Swanson has the best explanation of this.
If I had started the product with “-debug -consoleLog‘ or with java.exe instead of javaw.exe, I could have hit ctrl-Break (Windows) to get a thread dump.
But I had started the product from the install bundle, so didn’t have these options. I also didn’t think the deadlock would necessarily reproduce if I re-ran the product. A little research showed I had more tools at my disposal than I originally realized.
jconsole/jstack
If I had started the product with the Java 6 (or with Java 1.5 using the -Dcom.sun.management.jmxremote VM option), I could use jconsole to attach to my process. Besides the stack trace, this allows all kinds of interesting monitoring.
To use the tool, you’ll need the process ID. You can use the task manager on Windows or the JDK tool jps to get the list of Java process IDs.
The JDK tool jstack works great to just get a quick stack dump from the command-line. Again, you’ll need the process ID.
I need to spend some time exploring the JMX tools. Some cool and useful stuff in here.
SendSignal.exe
Another option is Send Signal, a nice program that send the Ctrl-Break signal to your Java process.
More
Much of the information new to me came from these 2 excellent resources. Both pages have other ways to get stack traces, including on *nix, and other useful debugging tips.
Sequence Diagram Tool for Eclipse (part 2)
Many people sent me recommendations for an Eclipse-based UML Sequence Diagram tool. Thank you all.
I’m going to take a look at some of these in more detail to see if one of them solves the problem I identfied in the previous post. I will report back what I find.
So far, the best ‘quick and dirty’ tool for creating sequence diagrams is not Eclipse based. It’s web based.
It’s called WebSequenceDiagrams. Its input is a simple and clear language:
And it generates a usable sequence diagram. Perfect for explaining how some key interactions in the system work.
This is obviously a very simple example, but I’ve quickly ‘drawn’ diagrams with 12+ objects and 50+ sequences. Moving back and forth between the JDT/CDT, a text editor and a browser is a bit of a pain. But its still quicker than anything else I have tried before.
Recommendations for UML tool for Eclipse?
I’ve been searching the web this morning looking for an easy to use UML tool that I can use inside Eclipse.
There are quite a few on Eclipse Marketplace. Before I narrow down my list, I thought I would ask the community for recommendations.
The use case is that I am reading through a very large code base (millions of LOC) and need to document some key interactions with sequence diagrams.
- Sequence diagrams are top priority
- Class diagrams are second priority.
- I want to create a conceptual diagrams. For example, I want to quickly pick and choose which object interactions to show in the sequence diagram. Or which attributes and methods to show in the class diagrams.
- I definitely don’t want to have to populate a full UML2 model.
- It needs to be easy and quick to create a sequence diagram. I stopped using Visio years ago because it took forever to populate and lay everything out.
- It needs to output some format that I can post to a webpage such as png.
- It needs to be $0-$100.
What tools do you like and why?
Update: Thanks for the suggestions. I’m going to look into them and share what I find. I’ve written about the tool I decided to use here.
Tiniest Useful Plug-in: Enable “Save All” Button
I like having the Save-All toolbar button in Eclipse. I feel lost without it. I almost never hit Save and Ctrl-Shift-S just doesn’t work for me.
Awhile ago I wrote this little plug-in that does only one thing: adds the Save-All button. Seems like others might want to use it too. The plugin can be found here: http://sites.google.com/site/kellicker/home/plugins.
Adding and Updating Copyrights from Eclipse
Today I needed to add and update the copyrights in a large codebase. I realized that there must be some tool to do this inside Eclipse. Sure enough, the Release Engineering folks have such a script.
To download it:
- Select Help / Software Updates / Available Software, choose Eclipse Project Updates / Eclipse SDK I2008* / Eclipse Releng Tools.
- (I’m using Eclipse 3.4.2, so 3.5 users may find it elsewhere.)
- Install this tool and restart.

To use the tool:
- Configure your copyright settings under Window / Preferences / Copyright Tool.
- Change to Resource Perspective
- Select the projects you wish to modify, and select the “Advanced Fix Copyrights” context menu.
Note: There is also a “Fix Copyrights…” menu option but this never worked and I’m not sure what it is for.
EclipseCon: Tele-conferencing
I could not attend EclipseCon this year. I was fortunate to attend the past 4 years. It’s a great conference and I’ve been following the blogs to capture the news.
I’m enjoying the thoroughness of Mark Cappel’s session-by-session blog. Thanks Mark.
If you can’t attend, most of the tutorial and session slides are available online. In fact, they are there for all the previous years as well.
Essential Eclipse Plugins: Grep Console
This week I’ve been debugging a rather hairy problem, and one of the few tools at my disposal was to add debug logging to the code.
That’s where Grep Console–a tiny but mighty Eclipse plug-in– came to my rescue. Grep console allows several regular expressions to be defined in the Eclipse console, highlighting the matching lines for easy reading.
I defined an initial regular expression to narrow in on some specific logging output related to the problem. After running the offending program, I could quickly scroll to potential problems in the thousands of lines of logging. From this logging I created an additional regexp of a different color containing the pointer value of interest. This reduced the time to parse huge amounts of logging in search of a specific pointer value.
The one feature I was wishing for was the ability to jump to the next selected regular expression. Even without it, this plug-in does one thing and does it well.
Leave a Comment




