Friday, November 14, 2008

New photos for 2008

Here are the latest pictures of Julian and friends & family from this past summer.
You can see more albums from this year in our gallery:

Tuesday, October 21, 2008

Relative paths in Eclipse .link files

When setting up an Eclipse installation (or a target platform if you're doing Eclipse plug-in or RCP development), it is often recommended to use .link files to keep things organized. While this is excellent advice, all of the examples I could find use absolute paths in the .link files (for example, D:/eclipse/eclipse-plugins/MyFavoritePlugin), which is, in my opinion, less than ideal.
It turns out that the .link paths can be relative, and that is especially helpful if you want to check in your target platform into source control (CVS) or otherwise share it with others who may not install into the same absolute path (or even on the same OS).
The trick is getting the format of the path correct so that Equinox can resolve correctly. For example, here is the outline of the target platform we use for developing Skyway Builder:


In that structure, the ext/ directory contains a couple of "non-standard" features that we depend on, the RichText editor component from the EPF project, and the Maven integration plug-ins. Now here's the meat of this post, what do the .link files look like to use relative paths. The and files each contain one line:

Note that the paths are relative to the directory containing both the base Eclipse installation and the ext/ directory. Also note that when selecting the target platform in the Eclipse preferences, you must select /TargetPlatform/eclipse-3.3.2/ (not /TargetPlatform/).

With this structure and the .link files using these relative paths, anyone can easily check out our target platform from CVS (and store it anywhere on their local file system they want), point their development Eclipse at it, and be ready to build our source code.

If you have a target platform set up this way with relative link files, and it is a full-blown runnable Eclipse (a target platform does not need to be a full runnable Eclipse, but in my experience it usually is), you have to be careful to not ever run that target (don't launch the eclipse.exe or eclipsec.exe). Once you do, something happens that prevents it from working; for some reason the relative .link files stop working and thus it will not be a good target anymore. In our target that is checked in to CVS, we simple removed the .exe files so that nobody can accidentally run the target platform.

One final note: this should also work across platforms (the link files are not Windows or Linux or Mac specific), although I have not actually tested that. If you can try it on Linux or Mac, please let me know how it turns out.

Tuesday, August 5, 2008

Customizing Builds for Your Eclipse Projects

I was answering a question on the Eclipse newsgroups today, a question that I must have answered at least 20 times in the past couple of years. The question was, basically, "How can I add additional steps to a project's build?" In my continuing (seemingly futile) efforts to make more use of blogging, I decided to put my explanation here.

The Java Project build really only does two things: it compiles source .java files into .class files into your project's Build Output location, and it copies any files it finds in your Source Locations to the corresponding place in your Build Output location (Source Locations and Build Output Locations are configured in the Java Build Path section of the project properties). If you want or need to do more during the builds, you can augment it with your own Ant script.
Open the Properties dialog for your project and select the Builders section. There you can add your own builder to run after the Java Builder.

You can specify your builder as Ant or any arbitrary program. For many typical tasks (such as copying/moving files, creating a JAR, signing it, etc.) I usually recommend Ant because it makes such tasks very easy to implement. There are more details available in the Ant Tutorial section of the Eclipse Help.

Be aware that all custom Builders will be executed for every build, which by default happens every time you save a source file (or something that the project depends on gets built). So having a Builder that takes more than a few seconds to start up and execute can be a real drag your the coding flow. If you find that you don't really want it to run on every build, I recommend opening the Ant View (I like to make it a Fast View to tuck it out of the way but still easily accessible) and adding your Ant script there. That way it is only a couple of clicks away at all times, easy to manually invoke at the times when you need it.

Tuesday, June 24, 2008

Imminent Cosmic Collision: You and Eclipse Ganymede

The arrival of Eclipse's latest release (named, like other Eclipse multi-project simultaneous releases, after a moon of Jupiter: Ganymede) is upon us. It represents version 3.4 of the platform what I'd call the "core" set of tools on top of it, and I applaud Eclipse for not succumbing to the version numbering frenzy that most vendors seem to follow, where new releases with only minor or cosmetic changes are given entirely new major version numbers. I've been using the milestone and release candidate builds for a couple of months now, and here are some of the items that I've noticed (the good with the bad).
  • p2, the replacement for the much-maligned Update Manager (among other things), is a big step in the right direction. Up until the RC builds it had some pretty serious UI and error-handling problems, but it is now a pretty good front-end to the complex problem of managing an open-ended platform of plugins and update sites. I think there is still a lot of room for improvement and enhancement in the UI, but what will ship with 3.4 is certainly good enough and a LOT better than the old update mechanism (in terms of both underlying architecture and user experience). I still think it is too complicated and subtle for inclusion in the average RCP, but for developers (the primary audience of Eclipse applications, including the Java IDE), it will be welcomed with open arms.

  • Plug-in Spy is a very handy tool for those of us who develop Eclipse-based applications (or for anyone who is trying to learn how Eclipse is put together and/or how to mimic what you see in the "standard" plugins). Just hit Alt+Shift+F1 and a convenient view will appear giving lots of details about current state of active Part (View or editor), such as the class that implements it, he plugin that contributes it, and lots of other details.

  • Mark Occurrences has been enhanced to use different colors for write occurences and read occurences. This is a small thing that makes a big difference.

  • The Error Log view has been vastly improved. Not only is it now packaged as a separate plugin/feature that is more easily included in RCP apps, but it now has the ability to group messages by various criteria, provides a "quick search" box for filtering the logs, and allows you to easily view the logs of workspaces that have been used when launching an Eclipse app to test/debug plugins and RCPs. Very nice!

  • "Rich" hovers/tooltips. This is a broad improvement to many of the hover/tooltip lightweight windows that Eclipse pops up to give you information about elements under the cursor.
    • The Javadoc hover is really nice now - links work seamlessly, it is easily resizable, and it has a great little toolbar with actions like navigation (back and forward), transferring to the Javadoc View, and opening the source code for the thing whose doc is being viewed.
    • The debug hover is also much improved, letting you explore the contents of rich objects without using a separate View.
    • My favorite hover enhancement has to be the hover for errors and warnings. It now presents hyperlinks to Quick Fix options, right there in the hover window. Before, you had to manually invoke Quick Fix, but now my hands don't have to find the awkward keyboard combo of Ctrl+F1; I just hover over a problem marker and click the link for the fix I want. Very nice!

  • Performance. The UI is as snappy as ever, I don't notice and decrease or improvement there. There is reportedly a lot of internal improvement made to the JDT compiler to take advantage of multi-core and multi-CPU hardware, especially when running on a Java 6 JVM. I did seem to notice some improvment in Java build times. Startup time seems to be slightly better than 3.3, but that is hard to really judge because of all the variables that OSGi, p2, and the list of 3rd-party plugins that might be installed, can introduce.

  • Collapse-all button for the Projects view. OK, so this one is only on my list because I contributed the idea and code for it :-) Still, it is something that I have longed for for quite a while: in the Projects view (usually used in the Java Browsing perspective), there is a new button to collapse the entire tree (Collapse-All), similar to what you find in other tree-bsaed views like Navigator, Package Explorer, etc. Here's the bug report for the curious.
Overall, I am very pleased with this release and applaud the various project teams for their accomplishments over the past year. I even can brag that a piece of my own code has finally found its way into an official Eclipse release, so that makes it especially cool. :-)
The next challenge will be getting Skyway Visual Perspectives working with 3.4 and, eventually, taking advantage of the new features and API that are available.

Monday, March 31, 2008

Podcast with Wayne Beaton

When we were at EclipseCon, I did a podcast with Eclipse's official Evangelist, Wayne Beaton (yes, that's his actual job title - pretty cool job title if you ask me!). The topic was finding and giving help on the Eclipse newsgroups. Wayne just published it here.

Saturday, March 22, 2008

EclipseCon 2008

I just returned from EclipseCon and, although I thoroughly enjoyed the conference/vacation, I have to admit that its nice to be home. I guess I should just get it out of the way and point out that I was only able to attend EclipseCon because I was the winner of one of the annual Eclipse Community Awards (specifically, "Most Prolific Newcomer Evangelist") and the foundation was very generous in their help. Specifically, I have to thank Wayne Beaton, Ian Skerrett, and Lynn Gayowski for their encouragement and help - thankyouthankyouthankyou!
As for the award, not only did I get a spiffy personalized acrylic trophy thingy, but a totally tricked out "cell phone," an E90 donated by Nokia - its really more of a mini-computer than a phone, very similar in function to an iPhone. Now I just have to read the 90-page User Guide and figure out what US carrier it works with. In any case, I was totally surprised and blown away by the quality of the prize.

As for the conference itself, I have to say that the highlight was just meeting, face-to-face, so many people with whom I've corresponded, cooperated, and collaborated over the past 5 years. It is great to finally put faces to names like Wayne, Ian, Ed Merks, Tom Schindl, Walter Harely, Denis Roy (thank goodness he introduced himself 'cause I would certainly planted my foot well into my mouth if I had called him "Dennis") and so many more that I can't recall. For me the people aspect was definitely the most interesting part of the whole week.
As for technical content, I was impressed by the long talk on Mylyn, a project that I had been aware of and moderately curious about before; but after seeing it live and presented by its charismatic and passionate creator Mik Kersten, I'm determined to give it some dedicated time and share it with my teammates at Skyway Software.
Speaking of Skyway, I spent considerable time hanging out at the booth and I think our product launch was well-received. Most people seemed impressed with the modeling GUI (I heard words like "slick," "easy-to-use," and "wow") which, admittedly, I am glad to hear because that has been the focus of my work there. But I think we also heard some good feedback about potential directions to take the runtime portion; hopefully the community thing will take off and we'll soon see some contributions in those areas.
The p2 effort is making good progress and looks well on its way to solving the problems with the old Update Manager (and much more).
I was also educated about the profiling tools that are part of the TPTP project. The presenters were clearly not 100% comfortable speaking English in front of a large audience, but the tools look quite robust and complete, certainly capable of competing with their commercial competitors. I will be profiling the Afriterra catalog (and probably Skyway Perspectives, too) in the near future.
Replay Solutions's product also looks very interesting, but as of now it is only for JEE applications so my current (paying) work can't really find much use for it.

I'll close with something that won't surprise those who have spent any amount of time talking to me or reading this blog, a critical statement about the future direction that The Powers That Be apparently have set for one of my chosen technologies. I attended the Eclipse 4 (e4) talk and am confused and somewhat dismayed by the overwhelming focus on bringing the Eclipse platform (specifically, its UI) to the web. Because the details are vague (intentionally, because as with everything else at Eclipse, the real story will be determined by "the community"), I'm having a hard time verbalizing my thoughts; suffice it to say, just in the area of SWT and Platform UI, I'd rather see the growing mound of bugs and feature requests be more addressed instead of spending scarce resources on a completely new "platform." I understand and appreciate the need for architecture cleanup and evolution, but I can't help but wonder how much say "the community" will really have in this, seeing as nearly 100% of the committers are employed by the big member companies. Jesper asks some good questions and raises some good points in this blog post. I'm keeping my mind open, but with a healthy does of skepticism - after all, the last thing that Eclipse needs is a bunch of yes-men all nodding along with the ideas of a very small number of vocal, powerful committers and member companies.

All in all, the week was very enjoyable. Jazmine and Little-j traveled with me and we had some wonderful family tourist days before and after the conference. I'll post photos later this week when my body recovers from the time-zone-difference whiplash...

Tuesday, January 29, 2008

Ugress direct-to-consumer store goes live

Score another victory for the direct-to-consumer music distribution revolution!
One of my favorite musical artists of the past few years, Ugress, has just released his latest album and made it available via direct sales from the independent label web site. The prices are very reasonable (£0.49 per song or about £5.39 for the entire album). The best part is, he has also made available all of his past albums, B-sides, and EPs, too. Not that I need to buy much of it - Ugress has been offering much of the music for free download for years.

I can't tell you how glad I am to see an rise in artists offering a direct channel to their customers; and the fact that this is one of my favorites is just icing on the cake.

Ugress is a bit difficult to categorize and describe. Superficially, the music can be described as electronica, but that doesn't really do it justice. I've seen him dubbed "mad scientist musical mastermind" but probably a more useful description is this:
  • "Ugress dives into a groovy, spooky and cinematic landscape of weird samples, loops and sounds. Strong rythms carries soundscapes and melodies forth. The sources of sampling include easy listening records of the 60ies, unknown and well known classic funktracks of the 70ies, computer games, television commercials and the oldest aswell as latest sci-fi b-movie. The compelling groove of a breakbeat (or two, or three) is, of course, always present."