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]

Best practices for developing Eclipse plugins

Using markers, annotations, and decorators

Andy Flatt (aflatt@uk.ibm.com), Software Developer, IBM
Photo of Andy Flatt
Andy Flatt is a developer at the IBM UK Software Development Laboratory in Hursley. His background includes Java, Java Performance, OSGi, and integration test. Prior to software development, Andy studied at the University of Hertfordshire where he holds a first class BSc(Hons) degree in Computer Science. He may be reached at aflatt@uk.ibm.com.
Mickael Maison (mimaison@uk.ibm.com), Software Developer, IBM
Photo of Mickael Maison
Since joining IBM in mid-2009, Mickael has been working in the Runtime Deliveries department of the IBM Java Technology Center. After working on the L3 Support team for the IBM Java SDK, he moved to a developer role. In his spare time, Mickael enjoys music and traveling.

Summary:  This tutorial highlights best practices when marking information to resources using markers, and then introduces annotations and decorators that you use to highlight markers within the workbench. By extending extension points, you can reuse and adapt the built-in functions in Eclipse and perform advanced resource marking, such as moving a text marker when editing text. We discuss methods that take advantage of the plugin model, which allows for an efficient, high performance, and integrated look and feel plugin.

Date:  16 Aug 2011
Level:  Intermediate PDF:  A4 and Letter (99 KB | 14 pages)Get Adobe® Reader®

Activity:  38321 views
Comments:  

Introduction

When developing a plugin for an IDE Eclipse environment, you have several design considerations. These considerations ensure that you:

  • Do not lock up the user interface thread.
  • Decorate the UI without impacting performance.
  • Process data in the background.

This tutorial discusses how to process and display data associated with resources stored in the workspace with these design considerations. We will examine how Eclipse provides a marker interface to store and handle information about a resource.

We provide best practices for handling data markers against a resource. First, we show how to mark data, then build knowledge to represent the marker on the user interface, and then update the marker as the resource changes. In this context, resources are Eclipse objects that implement the IResource interface, such as projects, files, folders, and Java™ objects (including packages, classes, and source).

This tutorial is intended for developers who can write a basic plugin but want to learn best practices when dealing with Eclipse resources.

Eclipse.org documents individual extension points and interfaces. This article provides assistance in choosing the best practice of using them in combination. Read more to learn how to take advantage of existing Eclipse functions to provide new features.

1 of 7 | 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=750992
TutorialTitle=Best practices for developing Eclipse plugins
publish-date=08162011
author1-email=aflatt@uk.ibm.com
author1-email-cc=
author2-email=mimaison@uk.ibm.com
author2-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.