Aim:
Here we are going to create hello world plugin for eclipse.
Steps:
- Open Eclipse
- Go to Window-> Open Perspective-> Other.
A dialog Box Will Appear. Choose Plugin development Click OK.
Plugin Development Environment is added to our Eclipse.
Now We can create our Hello World Plugin by File-New-plugin Project.
Enter the name of the project and check source folder is “src” & destination folder is “bin”
Enter Vendor name and Click Next.
Choose Template for our plugin, for example hello world command.
Provide Class name, Package Name and Display Message.
Click Finish to complete the Creation of the plugin project.
Now our Project is created that will be look like as follows.
Right Click on Project- Run As- Eclipse Application.
New Ide will be started with our Plugin.
Click Sample Command a Message box will be displayed as Follows.
We can add our plugin manually by Creating our Plugin as jar file and copy it to Eclipse Plugin folder or Dropins Folder.
Choose Deployable plugins and fragments.
Available plugins will be displayed in a dialog box, Choose our plugin.
Click Install into Host to install plugin in our eclipse and Click Finish.
When we Click Finish Eclipse will be asked to restart because our new plugin is installed.
Once We clicked yes Eclipse Will be restarted and will be opened with our new Plugin.
Now Open Eclipse Folder –Plugins Where we can find our plugin.
We can also create update site for our plugin. To publish our plugin in any website we need to create a featured project for our plugin. Go to File-New-Other
Choose Plugin Development-Next
Choose Feature Project-Next
Provide Feature Name, Feature ID, Feature Name, Feature Version, and Feature Vendor in the window-Next
Next window will display the available Plugins, Choose our plugin From the window and Click Finish
Now Our Project is created to publish in a website.
Choose Category Definition-Next.
Choose our Project to create category and Click Finish. Then Now our Category xml file is created.
Enter Category ID and Category Name.
Now Our Feature Project is ready to upload it in a server. Export our project by Clicking File -Export
Choose Deployable Feature-Next
Choose our plugin, Export path.
Choose Option tab and select category.xml path.
Click Finish.
Click Add.
Choose Local and select where we export our plugin.
Then The Window will list all plugins. Select Required Plugin
Select our Plugin and Install by accepting terms and conditions.
Select our Plugin and Install by accepting terms and conditions.
Now The plugin is installed and Eclipse asked to restart to apply changes.
Comments
Post a Comment