Document directory
- 6.5 use update Manager
- 6.5.1 add and delete installation locations
- 6.5.2 disable and enable functional components
- 6.5.3 install functional components from the Update site
- 6.5.4 apply services to functional components
- 6.5.5 related exercises
Use of eclipse update Manager
6.5 use update Manager
By using the update Manager user interface and API commands, we can add new installation locations, manage feature components, and interact with the update site. As for whether to use the update Manager user interface or the update manager API command, this may depend more on WHO (the user or installer) makes these changes. The update Manager user interface provides the same functions as the update manager API commands. However, the information feedback and functional part search functions provided by the user interface are better than the corresponding API commands.
The installation location is the basic building block in the configuration. The configuration must contain the basic installation location information or the root directory installation location information. Other related information can be added to or deleted from the configuration as needed. You can create a installation location to organize the installed functional components. Each software provider can also create an installation location when adding the developed plug-in to the eclipse Installation File. The installation location is a separate location in the file system. However, the same installation location can be included in multiple configurations of multiple installed eclipse (or eclipse-based products.
The smallest unit for running update manager is a feature. You can add new plug-ins for those functional components added to the existing configuration, and/or add existing plug-ins to these functional components.
6.5.1 add and delete installation locations
You can use the product configuration dialog box or the update manager API command to add the installation location. The installation path is a directory named eclipse. This directory contains a Tag file named. eclipseproduct, and the features subdirectory and plugins subdirectory.
To use the product configuration dialog box to add the installation location, select help | software updates | manage configuration… on the menu bar... Option to open the product configuration dialog box. After selecting the eclipse configuration root directory or an existing installation location in the product configuration dialog box, you will see the add an extension location option in the right pane of the dialog box. When this option is used, the file system location to be searched must contain a valid eclipse installation location.
You can also use the update manager API command to add or delete the installation location. Try the following command to add an installation location and then delete it.
Java.exe-CP startup. Jar org. ec1ipse. Core. launcher. Main
-Data tempwork
-Application org. Eclipse. Update. Core. standaloneupdate
-Command addsite-from E:/eclipse-3.0/install-extras/tools
Java.exe-CP startup. Jar org. Eclipse. Core. launcher. Main
-Data tempwork
-Application org. Eclipse. Update. Core. standaloneupdate
-Command removesite-to E:/eclipse-3.0/install-extras/tools
You can use this method to add a set of plug-ins to the installed eclipse.
6.5.2 disable and enable functional components
In the product configuration dialog box, you can select the feature you want to operate on. Depending on the current status of the selected feature, you can send a request to disable or enable the feature. To enable the disabled feature, select the show disabled features Filter button on the toolbar of the product configuration dialog box. In this way, you can view all installed functional components (including those currently disabled ).
You can modify the status of a feature by using the update manager API command. In the following example, we use the update manager API command to disable and enable a feature in the specified installation location.
Java.exe-CP startup. Jar org. Eclipse. Core. launcher. Main
-Data tempwork
-Application org. Eclipse. Update. Core. standaloneupdate
-Command disable-featureid com. IBM. jdg2e. Tools-version 3.0.0
-To E:/eclipse-3.0/configtest/fromupdatesite
Java.exe-CP startup. Jar org. ec1ipse. core.1auncher. Main
-Data tempwork
-Application org. Eclipse. Update. Core. standaloneupdate
-Command enable-featureid com. IBM. jdg2e. Tools-version 3.0.0
-To E: // Ec1ipse-3.0/install-extras/too1s
6.5.3 install functional components from the Update site
You can use the update Manager Installation Wizard to find and install new features. To open this wizard, select help | software updates | find and install… in the menu bar of Eclipse... . To search for the functional components you want to install, run help | software updates | find and install... Select search for new features to install in the displayed dialog box. In this way, you will get an update site list. You can search for functional components on the sites listed.
At the beginning, the list of update sites listed may be empty. In this case, you can manually add and update sites based on the given http: URL or file: URL. If you have previously added an Update site (or installed feature), the added update sites are displayed in the Update site list. You can also define the discovery site in the feature to indicate the locations where you can find the new feature.
You can browse the Update site to find available functional parts, select a group of functional parts, and then request update manager to download and install the selected functional parts to the local installation location.
In addition to using the update Manager user interface to install functional components from the Update site, we can also use the update manager API command to install functional components from the Update site. The following command installs a specific functional component from the installation site to the specified installation location.
Java.exe-CP startup. Jar org. Eclipse. Core. launcher. Main
-Data tempwork
-Application org. ec1ipse. Update. Core. standaloneupdate
-Command install-featureid com. IBM. jdg2e. Tools-version 3.0.0
-From http://jumpstart.raleigh.ibm.com/UpdateSite
-To E: // Ec1ipse-3.0/configtest/fromupdatesite
If no target installation location is specified at this time, the feature will be added to the benchmark location of Eclipse. If a functional part exists in the current configuration of Eclipse, you can identify other functional parts in the definition of the functional part to require these functional parts to be installed in the same location as yourself. The Positional link between such functional components is defined when the functional components are installed from an Update site containing the collocation-affinity attribute.
6.5.4 apply services to functional components
You can define a feature so that it knows where to perform a service search. Service Discovery and applications can be achieved through the update Manager installation wizard or the update manager API command.
When you use the update Manager Installation Wizard to discover and apply services, you only need to select the search for updates to currently installed features option in the installation wizard dialog box. In this way, update Manager checks the update sites that are known to the configured functional components to find the installed version suitable for the current configuration.
When using the update manager API command to discover and apply services, define an update request for all functional components (or a specific functional component) as follows.
Java.exe-CP startup. Jar org. ec1ipse. core.1auncher. Main
-Data tempwork
-App1 ication org. Eclipse. Update. Core. standaloneupdate
-Command disable-featureid com. IBM. jdg2e. Tools-version 3.0.0
-To E: // Ec1ipse-3.0/configtest/fromupdatesite
Java.exe-CP startup. Jar org. ec1ipse. core.1auncher. Main
-Data tempwork
-Application org. Eclipse. Update. Core. standaloneupdate
-Command enable-featureid com. IBM. jdg2e. Tools-version 3.0.0
-To E: // Ec1ipse-3.0/install-extras/too1s
6.5.5 related exercises
If you want to improve the configuration management skills using update manager, you can use the content provided on the CD-Rom attached to this book. The content organization method allows you to copy a directory structure in the CD to your machine, and then add code to the copy for extension. You can also use the content of the CD as an installation location. You can "Download" the required functional components from the CD, the downloaded feature is configured as part of your eclipse or eclipse-based product. If you are an active plug-in developer, read chapter 13th "define feature components and Products" to learn more. In exercise 9, "Deploying products using functional components", you can even assume the role of a functional component developer. This exercise describes how to use update manager to add extensions and install feature components from the Update site.