Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Simplify Eclipse classpaths using classpath containers

Aaron Tarter (aarontar@us.ibm.com), Advisory Software Engineer, IBM
Aaron Tarter
Aaron Tarter is an advisory software engineer working for the WebSphere Technology Institute in Research Triangle Park, N.C. He received a master's degree in computer networking from North Carolina State University in 2005. Recently, he has been developing incubator projects in the areas of Web 2.0 technology, business activity monitoring, and common event infrastructure.

Summary:  Eclipse classpath containers are an organized, user-friendly way to manage Java™ libraries in Eclipse. Since a group of libraries can be referenced as one abstract name, they can be removed and added as a single entry easily. The view of the libraries is also simplified in the Java Perspective as a single entry that can be expanded to view the entire set. Since the set of libraries is defined by an implementation of IClasspathContainer, it can be redefined dynamically. This tutorial shows how to implement a custom IClasspathContainer with accompanying extensions of classpathContainerInitializer and classpathContainerPage.

Date:  08 May 2007
Level:  Intermediate PDF:  A4 and Letter (517 KB | 30 pages)Get Adobe® Reader®

Activity:  35655 views
Comments:  

Before you start

About this tutorial

This tutorial focuses on Eclipse classpath container functionality. It starts by explaining some Eclipse classpath concepts, then guides you through the details of implementing a classpath container. You will create a simple Eclipse plug-in that provides an implementation of IClasspathContainer, and extends the classpathContainerIntializer and classpathContainerPage extension points to make the container accessible to the user. You will also implement a Java element filter to filter files included in the classpath container from the Java Package Explorer.


Objectives

In this tutorial, you will learn:

  • The basic concepts behind the Eclipse JDT classpath
  • How to implement IClasspathContainer
  • How to extend classpathContainerInitializer
  • How to extend classpathContainerPage
  • A method for filtering contained classpath entries from the Java Package Explorer, so they are not unintentionally added as duplicates

Prerequisites

This tutorial is written for Eclipse programmers whose skills and experience are at an intermediate level. It is expected that you understand the Eclipse Platform architecture, the basics of extending the platform, as well as Eclipse Java projects and how the classpath is used in those types of projects. The code uses some features that were new to Java 5, such as Generics. The usage is small, but it will help to have an understanding of Java 5 features.

System requirements

To run the examples, you need:

Eclipse V3.2 or later
Although you may have some success with earlier versions, the code in this tutorial was tested with Eclipse V3.2.2, which was the latest official release at the time of this writing.
JDK V1.5 or later, from IBM or Sun Microsystems
Some Java features new to version 5 are used in this tutorial to a very small degree, such as Annotations and Generics.

1 of 11 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Open source, Java technology
ArticleID=216776
TutorialTitle=Simplify Eclipse classpaths using classpath containers
publish-date=05082007
author1-email=aarontar@us.ibm.com
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.