Anybody use Eclipse User Libraries with SWT?

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Anybody use Eclipse User Libraries with SWT?

Postby Slot Head » Fri Jan 26, 2007 11:02 am

If yes, let's talk.

In the past my team has made user libraries with Eclipse 3.x up thru 3.1.1.

Now we are trying to transition to 3.2.1 and are having some trouble.

(Note: See rationale and explanation for using user libraries below)

Our question is:
where did the javadoc go???

we used to find it here:


Ever notice in Eclipse that you can click on a class name that Sun provides, for example, String, and then hit F1 and you get a Help window with some really useful on line help (Javadoc)? You can also, while debugging, step into String methods.

A frustrating thing (Eric Clayberg, please read) is that this feature is not immediately available with the SWT and JFace libraries. Even if you bought and installed SWT Designer, you don't get that convenient Javadoc and source attachment without a lot of painstaking work. Coming from the Microsoft world, we sort of expected on line API help to be naturally available (but we don't miss MSDN one bit, good riddance!!!)

No on line help for SWT when working in Eclipse seems to be a sad case of "the cobbler's children having no shoes."

To remedy this over the past couple of years using Eclipse and SWT Designer, we have used Eclipse's User Library feature.

User Libraries are XML files in which you specify a library (i.e. a jar file) as well as the Javadoc and the lib's source code.

In Eclipse, from Window, Preferences, Java Build Path, you import the user library. Then, in your project's build path, you select Add Library to add the user library to it while removing whatever SWT-Designer gave you before.

One thing we did in our user libraries that we recommend to all is to use drive mappings. Our user libraries are always on the J: drive. That way, you can deploy a common user library for your entire team to use. J: can can be a network share, or it can be the c:\Java folder on your laptop or home PC. We achieved perfect uniformity of library configuration across a team spread out over multiple cities, and we made it easy for projects to quickly have full Javadoc and API source code attached.

When Eclipse 3.1.1 came out, we found that some lib names transitioned from 3.1.0 to 3.1.1 while some stayed at 3.1.0. So all we had to do to maintain our user libraries was to carefully a dozen or so names and paths. It wasn't too difficult. We also build user libraries for JDOM, Hibernate. Log4j and few other 3rd party libs.

But now with Eclipse 3.2.1, some changes, likely well intentioned and for some good configuration control reasons, make recreating our user libs a bit challenging.

With 3.2.1, not only have the path and file names grown really long, but thing seem to be rearranged too.

If anyone is still using 3.1.1 and would like the benefits of using user libraries, we will be happy to share them. And, if/when we get the 3.2.1 user libraries figured out, we will post them here, if that's OK - they aren't too long.

Eric C., et al, I think this overcomes a shortcoming in your product. Please tell me otherwise, or, join in this effort, or best, integrate into your product. Given that you reference libs automatically when user selects New SWT/JFace Project, how difficult could it be for you to fill in the Source and Javadoc references at the same time?

Best regards,
Slot Head
Posts: 36
Joined: Sun Jul 10, 2005 9:50 am

Re: Anybody use Eclipse User Libraries with SWT?

Postby Eric Clayberg » Fri Jan 26, 2007 7:09 pm

Give the new v6.1.0 release a try. ;-)
Eric Clayberg
Software Engineering Manager

Author: "Eclipse Plug-ins"
Eric Clayberg
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 2 guests