Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EPP/MPC/Developer Guide"
Line 12: | Line 12: | ||
; Catalog : A catalog is a description of a marketplace, including branding and an URL. | ; Catalog : A catalog is a description of a marketplace, including branding and an URL. | ||
− | + | == Dependencies == | |
− | = Dependencies = | + | |
In order to use the MPC API your bundle will need to declare a dependency on the following bundles: | In order to use the MPC API your bundle will need to declare a dependency on the following bundles: | ||
* <tt>org.eclipse.epp.mpc.ui</tt> | * <tt>org.eclipse.epp.mpc.ui</tt> | ||
+ | |||
+ | == Binaries == | ||
+ | |||
+ | MPC bundles may be installed from the Helios update site <tt>http://download.eclipse.org/releases/helios</tt> | ||
+ | |||
+ | Pre-release MPC bundles can be installed from the Helios staging update site <tt>http://download.eclipse.org/releases/staging</tt> or can be downloaded directly from the CI build server at <tt>https://build.eclipse.org/hudson/job/epp-mpc-nightly/</tt> | ||
+ | |||
+ | == Sources == | ||
+ | |||
+ | Please refer to [[EPP/MPC/Contributor_Guide#Obtaining_Sources|Obtaining Sources]] for information on obtaining MPC source code. | ||
= Registering Marketplace Catalogs = | = Registering Marketplace Catalogs = | ||
Line 41: | Line 50: | ||
Catalogs may be registered using the Java API as follows: | Catalogs may be registered using the Java API as follows: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
CatalogDescriptor catalogDescriptor = new CatalogDescriptor(url,label); | CatalogDescriptor catalogDescriptor = new CatalogDescriptor(url,label); |
Revision as of 10:18, 7 April 2010
Contents
Overview
This guide provides information for developers that wish to use the Eclipse Marketplace Client (MPC) API. The MPC API enables Eclipse applications to launch the MPC wizard, optionally specifying catalogs. The API also provides a mechanism for registering new catalogs.
Concepts and Terminology
The Eclipse Marketplace Client defines the following concepts:
- MPC
- Marketplace Client
- Marketplace
- A service that provides access to solutions, including name, description, branding and installation metadata. The marketplace reference implementation can be found at [1]. A marketplace must implement a REST API, which is must conform to Marketplace/REST.
- Catalog
- A catalog is a description of a marketplace, including branding and an URL.
Dependencies
In order to use the MPC API your bundle will need to declare a dependency on the following bundles:
- org.eclipse.epp.mpc.ui
Binaries
MPC bundles may be installed from the Helios update site http://download.eclipse.org/releases/helios
Pre-release MPC bundles can be installed from the Helios staging update site http://download.eclipse.org/releases/staging or can be downloaded directly from the CI build server at https://build.eclipse.org/hudson/job/epp-mpc-nightly/
Sources
Please refer to Obtaining Sources for information on obtaining MPC source code.
Registering Marketplace Catalogs
MPC catalogs may be registered via an extension point or at runtime via a Java API.
Catalog Registration via Extension Point
Catalogs may be registered via an extension point by adding the appropriate declaration to the plugin.xml of your plug-in (bundle):
<extension point="org.eclipse.epp.mpc.ui.catalog"> <catalog description="%catalog.description" icon="icons/marketplace32.png" label="%catalog.label" url="http://marketplace.eclipse.org"> </catalog> </extension>
Catalog Registration via Java API
Catalogs may be registered using the Java API as follows:
CatalogDescriptor catalogDescriptor = new CatalogDescriptor(url,label); catalogDescriptor.setIcon(icon); catalogDescriptor.setDescription(description); MarketplaceClient.addCatalogDescriptor(catalogDescriptor);
Please refer to the javadoc for further details.
Launching the Marketplace Client UI
Normally the marketplace client UI is launched by a user either via the Help menu or from the Welcome page. In some cases it may be desirable to launch the marketplace client UI programatically.
Open the MPC UI using the default registered catalogs as follows:
MarketplaceClient.openMarketplaceWizard(null);
The MPC UI can also be launched using a specified list of catalogs as follows:
List<CatalogDescriptor> catalogDescriptors = ... MarketplaceClient.openMarketplaceWizard(catalogDescriptors);