Eclipse plug-in products are released as a web Update site
Publish your plug-in products to the public online through the update site project projects, download and apply them to customers or other testers so that their plugins are exposed to the public in the form of a site, and anyone can download it and try it out.
1. Create a Plug-inproject project
First we develop a plugin according to Eclipse's wizard.
then select a HelloWorld template to generated plug-in project code structure:
The contents of Plugin.xml are as follows:
<?xml version= "1.0" encoding= "UTF-8"?> <?eclipse version= "3.4"?> <plugin> <extension point= "Org.eclipse.ui.actionSets" > <actionset label= "Sample Action Set" visible= "true" id= "Helloeclipseplugin.actionset" > <menu label= "Sample & Menu " id= "Samplemenu" > <separator name= "Samplegroup" > </separator> </menu> <action label= "& Sample Action " icon= "Icons/sample.gif" class= "Helloeclipseplugin.actions.SampleAction" tooltip= "Hello, Eclipse World" menubarpath= "Samplemenu/samplegroup" toolbarpath= "Samplegroup" id= "Helloeclipseplugin.actions.SampleAction" > </action> </actionSet> </extension> </plugin> |
such a simple plug-in project has been completed. A separate feature item (FEATUREPROJECT) should be developed separately for this plug-in project.
2. Create a Featureproject project
such as wizards:
Select next to select the plugin you just created, such as:
This creates a plugin-related description item, helloeclipsepluginfeature. The code structure is as follows
3. Create an update siteproject
After opening feature.xml updatesite project, click on the link below to create the site project automatically.
Write the name of the site item and tick the option to generate a list of web pages
Open the Site.xml file for the site project , first create a category named Helloeclipseplugin_1, and then set up a feature under this category, The feature is pointing to the newly established feature.
Such as:
after clicking the build All button, the project structure after build all is as follows:
It is the plug-in, plug-in features combined together.
4. Deployment
download Tomcat, copy the Project Helloeclipsepluginsite project to Tomcat's WebApps, and start.
now open Eclipse 's find new plugin interface, enter the address
The relevant plug-in features can be found and the next installation can be:
Well, once the installation is successful, restart Eclipse and you'll see the plug-in effect.
The premise of this is to tick the Generate a Web page listing all available features within the site.
The plugin can also be downloaded and then integrated into the current RCP in other ways .
using Internet Explorer, enter http://192.168.3.86:8080/HelloEclipsePluginSite/index.html
Opening the link with Chrome will make an error, as follows: