Showing posts with label How to Run a Eclipse Plug-in project. Show all posts
Showing posts with label How to Run a Eclipse Plug-in project. Show all posts

Saturday, June 29, 2013

Eclipse Plug-in Development


To develop Eclipse you need the Eclipse plug in development tools.There are two ways to get these tools.

1)You can download the Eclipse Classic which has the necessary tools.
         
      Download the suitable  Eclipse classic for your OS  from this link.
      And extract it.

2)You can update your existing Eclipse JAVA IDE.
  
      Go to Help=>Install New Software and select the site.In this case it is
      Helios - http://download.eclipse.org/releases/helios
      Then select General Purpose Tools. Under this category you will
      Eclipse plug-in Development Environment. Install it.

    




How to import an exiting Eclipse plug-in project.

Here I am going to import a plug-in  called  PDE template for creating a remote service.Which can be located here. I am entering the data which is suitable for this project.

Go to File=>Import=>General=>Exiting Project.Then Select the directory of the project.Click finish.








After this project is imported it showed some errors.These errors were occured due to some missing packages you can fix them by adding those packages.





You can easily add those packages by moving you mouse to the underlined area and selecting the option "add" from the drop down menu.


After adding those packages all the errors except one.



To fix this we need to edit the MANIFEST.MF file.
http://en.wikipedia.org/wiki/Manifest_file
Problem here is that the required version mentioned in the MANIFEST.MF file can not be found.There for I removed the specific bundle version line.So the plug-in will work with the default bundle version available.



     before editing
 
   after editing 

After editing you have to save the MANIFEST.MF file by pressing ctrl+s.
After this you can see that all the errors have gone.



How to Run a Eclipse Plug-in project

To test a Eclipse plug-in you have to run it as Eclipse Application.To that go to 
Run=>Run Configuration and select Eclipse Application.





To create a new configuration click the icon for creating a new configuration.
Then go the plug-in tab of the new configuration window and and select the plug-in you need to run in this case I am running "remote service" plug-in.






After that click run and you will see that new eclipse will launch will with the plug-in you developed.