Archive for April, 2006

Another article in Chinese

Saturday, April 22nd, 2006

Cliff Liang has translated the Eclipse Corner Article “A Shape Diagram Editor” into Chinese. We need somebody to review the translation. If you’re interested, please add your comments to bug #138106.

RSS for articles

Saturday, April 22nd, 2006

I’ve added an RSS feed for articles to the Eclipse Corner website. You can access the feed here. It contains the title, description, and a link to articles changed in the last six months.

Add your comments to Bug#: 137751 if you’d like to change anything about it. For example… would like to have an RSS feed for a particular filter (e.g. a feed containing only articles with SWT content)?

Over the next day or two I’ll add a fancy “rss” graphic () to the home and Eclipse Corner pages.

Clean up

Friday, April 21st, 2006

Cleaning up your code gets easier with Eclipse 3.2. Select a Java element. Any element. It works on classes, packages, and projects (intuitively, the element selected determines the scope of the clean up). Select “Source > Clean Up…” from the context menu. Here’s what you’ll see.

You’re presented with a bunch of options to clean up a variety of sins. I know that I’ve been going through a period where I’ve not been consistent in my use of blocks for if and for statements. This feature can fix this inconsistency by either adding them when they’re missing or removing them when they’re unnecessary: it depends on how the options are configured.

It does lots of things. Take a look.

It occurred to me to see if the feature might be scriptable with Eclipse Monkey. I’m spending a day with Ward next week; maybe we’ll try and sort this out…

Eclipse for Swing development

Tuesday, April 18th, 2006

I’m surprised by the number of folks who don’t realize that you can use Eclipse to build Swing-based applications. There’s no rule that says that you can only use Eclipse to build Eclipse plug-ins or RCP applications. There’s no rules governing the kinds of applications you can build with Eclipse at all (heck, you don’t even need to use Java).

In fact, one of the early criticisms of the Visual Editor Project was that you couldn’t use it to build SWT applications; it was originally authored only for building AWT and Swing applications. In recent years, it’s evolved quite a lot to become quite a useable tool for building all kinds of user interfaces using AWT, Swing, and SWT. It supports round tripping, so you can take your Swing user interfaces built using some other tool and work away at them without much fuss.

But there’s more… like other Eclipse projects, it’s intended to be extended. Extend away.

A lot of work has been put into Visual Editor. Give it a try. It’s part of the Callisto release train; you can install it as part of your Callisto testing.

Java Browsing

Monday, April 17th, 2006

Earlier today, in a blog entry titled “Show Source of Selected Element Only“, author R.J. Lorimer described the “Show source of selected element only” feature. Frankly, it’s a pretty cool feature and I think that R.J. did a bang up job of describing it. However, he missed one important bit of information.

If you’re an old Smalltalker, or somebody who just can’t get VisualAge Java out of your brain, take a look at the Java Browsing perspective.

Okay… so it’s not quite what you’re used to in Smalltalk (still no blocks), but it’s at least got the same feel. Sort of.

The above image is from Eclipse 3.2RC1 with all the Callisto projects loaded. It’s pretty zippy on my laptop…

Using the Selection Service

Monday, April 17th, 2006

In this new Eclipse Corner article, “Eclipse Workbench: Using the Selection Service“, author Marc R. Hoffmann describes (oddly enough) the selection service provided by the Eclipse workbench, how it is used by Eclipse and how you can use it in your own plug-ins and RCP applications.

I used Marc’s article to aid my own understanding of the selection service and have used that understanding to build numerous plug-ins that are very tightly integrated with each other through the selection service, but are loosely coupled. In my eBay RCP example, I use the selection service to communicate between views; the “categories” view produces a selection (the selected category), and the “items” view consumes it (displaying the items in the selected category). Both views know about the auction object models, but neither view knows anything about the other. I also used the selection service in my image viewer example. This service, an example of the observer pattern, provides a lot of power.

If you’re building plug-ins for Eclipse or RCP applications, this article is a must-read.

Updating Eclipse Corner Articles…

Tuesday, April 11th, 2006

One of the big problems with maintaining any repository of information is that the information can get out of date. You can help.

All Eclipse Corner articles are in a CVS repository (dev.eclipse.org/cvsroot/org.eclipse). You can hook up to this repository to gain access to the articles (www/articles). Changes to articles can be submitted as patches through Bugzilla.

Before you go about making wholesale changes, it’s probably a good idea to make a bugzilla entry describing what you want to do (be sure to include a link to the article you want to change with your entry) so that the community can contribute their thoughts to your plan. Ultimately, an Eclipse Corner committer has to roll in your changes.

What do you get for your efforts? Well, you get credit for your updates. Also, significant changes to an existing article (or contribution of a new one) gets you a super cool Eclipse shirt.

Mmmmm….. Eclipse shirt…..

What are the cool things in Callisto?

Monday, April 10th, 2006

Callisto itself is pretty cool. Coordinating the release of ten separate Eclipse projects is no small undertaking and the project teams are doing a great job of it. But what’s cool about Callisto for you?

I have my own ideas. Many, many ideas. Too many in fact.

I’m curious to learn what you think is cool in Callisto. Granularity doesn’t matter. Is there some cool new feature in the JDT that’s going to make writing code easier for you? Something in the platform that you’re planning to add to your own plug-ins? Or is BIRT on track to shave hours of development out of your busy day? Is there something useful to you in EMF, GEF, or GMF? Do you figure that TPTP is going to make moving applications into production easier? What features of data tools or web tools are going to make it easier to come into work each morning? Is there something new in CDT or VE that will change how you work?

Let me know by adding your comments to this entry. Or you can email me if you can guess my email address (my name is “wayne” and I work at “eclipse.org”)!

Targetting a different version of RCP

Monday, April 10th, 2006

It is possible (and recommended, in fact) that you develop your RCP application from a target that’s separate from your development environment. By default, when you build plug-ins using Eclipse, you develop against the set of plug-ins that are installed in your development environment. However, using the PDE preferences page, you can setup a completely separate directory containing an Eclipse target with only the plug-ins your application really needs.

The benefits of this are (at least) three fold:

First, you can build against a different version of RCP. That is, you can use one version of Eclipse to develop applications that run in a different version. As it sits today, you can use Eclipse 3.2 to develop Eclipse 3.0 and 3.1 applications. This means that you don’t necessarily have to upgrade your applications just because you’ve upgraded your development environment.

Second, by creating a totally separate target, you can very carefully control the set of plug-ins that your code has access to. If it’s not in the target, you can’t use it. This introduces a challenge however: you have to move the set of plug-ins (beyond what is provided in the RCP SDK) you need into the target. If you need to use, for example, the forms API, you’ll have to identify the plug-in that contains it (org.eclipse.ui.forms) and copy that plug-in to your target directory.

Third, when you install the RCP delta pack, you can install it on your target rather than cluttering up your development configuration (the RCP delta pack lets you package applications for platforms other than your development platform).

How you set up a target is described in the RCP FAQ. Thanks to Nick Edgar for providing a link to this information.

Day three in the Linux World expo: better than a kick to the head

Thursday, April 6th, 2006

And I should know. I’ve been kicked in the head. A few times.

The best part about day three at Linux World was meeting Bill Hilliard from Intel. Bill has a lot of experience with the CDT and was able to educate me as he answered questions about it to our booth visitors. Conveniently, we had a lot of people come by the booth today with questions or comments about CDT. It seems that there is a pretty big group of folks in the Linux community who swear by it.

There was a lot of buzz around Eclipse at the conference. I understand that Addison-Wesley managed to sell a handful of Eclipse books (Eric Clayberg, who joined me on Wednesday signed one copy of his book). There were a few member companies showing off their software, including Business Objects who where demonstrating the next generation of their report generation tools based on Eclipse. Very cool stuff.

There were a few people who came by our booth and shouted stuff like “we love you”, and “you’re great”. Of course, they may have been talking to the guy in the next booth who looked a little like Tom Jones. More seriously, we did have a lot of self-proclaimed “huge fans” come by to slap us on the shoulder and say “good work” (in retrospect, maybe they just wanted to slap me…) I, of course, took full credit for everything that is good in Eclipse.

My one regret about the conference is that I didn’t get a red hat from RedHat. I believe that this is the most prized swag from the conference. They didn’t just give them away, you had to actually sit through their demo to get one. Since I don’t have the kind of patience that requires, I had to settle for a picture of the hat… I managed to pick up a few SuSE hats and a couple of shirts for Denis and Matt (I couldn’t find anything that I thought Nate would like except maybe a Slashdot kazoo).

You are currently browsing the Eclipse hints, tips, and random musings weblog archives for April, 2006.

  • Pages

  • Archives

  • Categories