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 profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

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:  55291 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



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=