Creating a plug in for Eclipse

Creating a a simple plug in is one of the easiest tasks. Honestly before creating a plugin I, myself also thought that, Creating eclipse is a big deal!
So, here are the steps:
1. Make your eclipse plug in development friendly.
    a. Click on Eclipse help –> Install new software –> type - http://download.eclipse.org/releases/kepler.
    b. Install Eclipse Plug-in Development Environment

image
2. Create code for a sample hello world application.
  a. Create a simple Plug in Project . New –> Plug-in Project –> <give a suitable name> –> Choose Hello world command –> Finish.
3. Run the application.
  a.Right Click on the project –> Run as Eclipse Application. –> A new eclipse window will open with the plug-in(search for the below icon in toolbar)
image
  b. Click on the plug-in & a window will appear with a message “Hello, Eclipse World”.
image
How to use the plugin.
  a.Right click on the project –> export –> Deployable plug-ins & fragments –> choose a location to export –> finish.
  b. Place the plugin in dropins folders in Eclipse.
  c. Restart the Eclipse.

Note:
a. I have used eclipse default templates for plug-in. If you are not planning to use this, keep in mind that you will have create plugin.xml file.
b. You can modify the plug-in (whether you want to show it in menu bar or you want to show it in toolbar)

Feel free to share !!

"Knowledge without justice ought to be called cunning rather than wisdom." - Plato

No comments :

Post a Comment