When to Extend Which Extension Point in Eclipse Plugin
Join the DZone community and get the full member experience.Join For Free
it is extensible through the means of extension points (well defined exposed places/hooks for others to provide extended functionality) and plugins ( providing extended functionality using existing extension points and optionally exposing new extension points). eclipse itself is made up of many and many of plugins built around the small core runtime engine capable of dynamic discovery, loading, and running of plug-ins.
in this post i’m not going to provide a hello-world plugin tutorial or introduction of eclipse platform (as you can find many good ones on net). i’m going to share what difficulty i faced when i started plugin development. after reading some introduction tutorials i wanted to know quickly which extension points i need to use for some particular tasks . once we know the name of extension point we can find the details in official eclipse documentation ( extension points reference ) or even better within platform itself (plugin development environment) when trying to add an extension point it gives the description and sample implementation (if available) to understand.
so i’ll focus on quick introduction (to help you get started with further links) of some common extension points and when we can use them (not how) (considered release is eclipse juno). if you need introduction for eclipse plugin development, you can read first http://www.vogella.com/articles/eclipseplugin/article.html for example or request google for other ones.
but before understanding the various extension points, we need to understand the platform structure and few terms.
the various subsystems (on top of platform runtime) as described above define many extension points to provide the additional related functionality.
below are the various components of the workbench ui.
now below describes the common functionality you want to extend/customize and which extensions points are your friends.
add menus/buttons :
declare an abstract semantic behavior of an action (command) with optional default handler: org.eclipse.ui. commands
add menus, menu items and toolbar buttons in ui: org.eclipse.ui. menus
add specific handlers to a command: org.eclipse.ui. handlers
declare key bindings (or set of them called as schemes) to commands: org.eclipse.ui. bindings
more help at: configuring and adding menu items in eclipse v3.3
define additional views for the workbench: org.eclipse.ui. views
more help at: creating an eclipse view (old)
add new editors to the workbench: org.eclipse.ui. editors
more help at: eclipse editor plugin tutorial
configure the launching of applications :
define/configure a type for launching applications : org.eclipse.debug.core. launchconfigurationtypes
associate an image with a launch configuration type: org.eclipse.debug.ui. launchconfigurationtypeimages
define group of tabs for a launch configuration dialog: org.eclipse.debug.ui. launchconfigurationtabgroups
define shortcut for launching application based on current selection/ perspective: org.eclipse.debug.ui. launchshortcuts
more help at: launching framework in eclipse
add resource markers :
add marker (additional information to tag to resources like projects, files, folders): org.eclipse.core.resources. markers
more help at: using markers to tell users about problems and tasks
add pages to the preference dialog box: org.eclipse.ui. preferencepages
more help at: eclipse preferences tutorial
add wizards :
add wizard to create a new resource: org.eclipse.ui. newwizards
add wizard to import a resource: org.eclipse.ui. importwizards
add wizard to export a resource: org.eclipse.ui. exportwizards
more help at: creating eclipse wizards tutorial
add help for an individual plugin: org.eclipse. help .toc
more help at: contributing a little help
define specialized searches:
register search pages: org.eclipse.search. searchpages
register search result pages: org.eclipse.search. searchresultviewpages
more help at: custom search page
i hope it helps someone in the similar need. let me know if it is useful or if you have any suggestions for improvement .
happy eclipse, bye
Opinions expressed by DZone contributors are their own.
Essential Architecture Framework: In the World of Overengineering, Being Essential Is the Answer
A Deep Dive Into the Differences Between Kafka and Pulsar
Revolutionizing System Testing With AI and ML
Software Development: Best Practices and Methods