How can I control what marketplaces are shown in the Eclipse Marketplace in my RCP application

风格不统一 提交于 2019-12-13 00:35:29

问题


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.

  1. Add a command ( ABC Marketplace command)
  2. Add a handler ( ABC Marketplace handler)
  3. attach handler to the command and add this command to main Help menu.
  4. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!