问题
I'm using the Eclipse Marketplace client in my RCP application. I'm also running a marketplace server to provide my users with the ability to select from multiple installable units that my company is providing.
When the user browses the Eclipse Marketplace in my RCP application, he/she sees many other marketplace servers in addition to my custom one such as the Eclipse Marketplace, Yoxos Marketplace, Obeo Marketplace, and a Testing Solutions Marketplace by BREDEX GmbH.
Is there a way for me to prevent the Eclipse Marketplace client from showing these other marketplace servers?
回答1:
You can overwrite the default URL for retreiving the available catalogs by the adding a vm argument:
-Dorg.eclipse.epp.internal.mpc.core.service.DefaultCatalogService.url=http://mydomain.tld
see also http://wiki.eclipse.org/Marketplace/REST
回答2:
By default, Eclipse Market place command is handled by MarketplaceWizardCommand
handler . This handler loads remote catalogs by invoking this API http://marketplace.eclipse.org/catalogs/api/p if you do not specify any of your catalogs.
I can think of following solution.
- Add a command ( ABC Marketplace command)
- Add a handler ( ABC Marketplace handler)
- attach handler to the command and add this command to main Help menu.
- Invoke Market place client in the handler code
MarketplaceClient.openMarketplaceWizard(List<CatalogDescriptor> catalogDescriptors)
来源:https://stackoverflow.com/questions/12710543/how-can-i-control-what-marketplaces-are-shown-in-the-eclipse-marketplace-in-my-r