Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is product ID in Eclipse plugin?

It is said here, that product Id should be set "as defined in your plugin manifest".

What does it mean? That product Id should coincide with plugin Id? But this can't be true, since product can contain many plugins.

How to specify product in plugin manifest?

UPDATE

When editing product file with Eclipse editor, I have 2 places to define product

enter image description here

In upper field I can apparently enter anything I want. Lower field apparently refers the "product" extension of some plugin, allowing of creating new one by button.

What is the relation between these two places?

like image 707
Dims Avatar asked Mar 19 '14 09:03

Dims


2 Answers

What does it mean? That product Id should coincide with plugin Id?

No. Product Id and Plugin Id are different. In a given product each and every plugin should have unique id. Plugin/Platform loader identifies these plugins by id's.

Refer these links

Product Overview

Product Configuration

How to specify product in plugin manifest?

Plugin Manifest may may or may not refer any products. But any plugin can read product details via org.eclipse.core.runtime.products extension point.

Refer the image enter image description here

like image 42
Chandrayya G K Avatar answered Sep 18 '22 15:09

Chandrayya G K


In your plugin you define the product using the org.eclipse.core.runtime.products extension point - something like:

<extension
     id="product"
     point="org.eclipse.core.runtime.products">
  <product
        name="%product.name"
        application="org.eclipse.e4.ui.workbench.swt.E4Application">
  .. more ...

The product id is then the plugin id plus the value of the id attribute, so something like pluginid.product. This is what you specify in the product configuration. The product configuration editor should show you this id in the list of available products.

Update: I have not seen a good explanation of what the ID field in the product file is for, possibly something to do with the p2 installation code. I have seen discussions that say it can cause errors if it matches other ids. Using a unique id works.

like image 129
greg-449 Avatar answered Sep 17 '22 15:09

greg-449