09/28/05
How to create a plug-in with Eclipse 3.1? -
Categories: Eclipse Platform, Eclipse plug-ins, Tutorials -
Serge Baccou
@ 02:32:59 pm
![]() |
Until now, I was only a user of the Eclipse Platform. Today, I want to know how to create a new simple plug-in with Eclipse 3.1 using the Plug-in Development Environment (PDE). The first goal is really simple: use the PDE to create a kind of Hello World plug-in. What a nice surprise when I have discovered that the Eclipse guys have the idea to create a wizard to do that! This wizard really simplify the creation of a Hello World Eclipse plug-in... |
Here a the steps to create a new Hello World plug-in with Eclipse 3.1:
- In Eclipse, choose the following menu: File | New | Project... | Plug-in Project and click on Next
- Enter "Hello World" in the Project name field. Let the other default values and click on Next
- Let the default values for the Plug-in ID, the Plug-in Version, The Plug-In Name and put a Plug-in Provider. For me, it will be "Baccou Bonneville". Click on Next.
- Choose the "Hello, World" template and click on Next. This template will add a new menu in Eclipse and a new icon.
- Put what you want in the "Message Box Text" and click on Finish.
The wizard will create your Hello World plug-in. You are automatically switched to the Plug-in Developement Environement perspective and you will see the following screen:

Then, click on "Launch an Eclipse application". This will launch a new Eclipse window with your new menu (Sample Menu | Sample Action) and icon. Choose this menu or click on the icon: you will see your "Hello, World" message.
Easy, isn't it?
Click on "Export Wizard" to export your Hello World Plug-in into a distributable zip file that will contains the Plug-in Java Archive (JAR) file. You can copy the JAR file into c:\eclipse\plugins and then restart your Eclipse to see your brand new plug-in in action. Using the Eclipse menu Help | About Eclipse SDK and the button "Plug-in details", you will see that your plug-in is registered in your Eclipse.
I will continue my learning about Eclipse plug-in creation and I will certainly write some others blog notes on that topic...
Comments:
Thank you..
Leave a comment:
Pingbacks:
No Pingbacks for this post yet...
