Put product versions in separate files [message #1778037] |
Fri, 08 December 2017 12:49 |
|
Hi,
We have a custom catalog and we would like to manage several product versions.
Since each one is quite big, we would like to put them in separate files. Unfortunately, I keep on having errors. This is more an EMF problem I guess, but anyway.
Here is the content of the product catalog.
<?xml version="1.0" encoding="UTF-8"?>
<setup:ProductCatalog
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
name="my.product"
label="some label">
<!-- ... -->
<product name="myproduct" label="Custom Eclipse">
<annotation
source="http://www.eclipse.org/oomph/setup/BrandingInfo">
<detail
key="folderName">
<value>eclipse</value>
</detail>
<detail
key="folderName.macosx">
<value>Eclipse</value>
</detail>
</annotation>
<version href="neon/my.products.neon.setup#/" />
<description>...</description>
</product>
</setup:ProductCatalog>
And here is the content of the referenced setup model.
<?xml version="1.0" encoding="UTF-8"?>
<setup:ProductVersion
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
name="neon"
label="Latest Neon"
requiredJavaVersion="1.8">
<!-- ... -->
<product href="../my-other-product.setup#//@product.0" />
</setup:ProductVersion>
The second setup model has no error when I directly open it in the setup editor.
But the other one indicates that « The opposite features 'versions' of 'Custom Eclipse' and 'product' of 'Latest Neon' do not refer to each other ».
« ../my-other-product.setup#//@product.0/@versions » does not work better. Besides, this element is supposed to be a product, not a list of product versions.
If I omit the product reference in the product version, there is no error in the catalog. But there is one in the product version since the reference is mandatory. I have searched examples on the web for such cases, but I did not find any. How can I make this work correctly without any error for both files?
|
|
|
|
Re: Put product versions in separate files [message #1778048 is a reply to message #1778044] |
Fri, 08 December 2017 15:22 |
|
If I remove the "product" mark-up, everything works fine when I browse the catalog. But when reading the product version alone (in the setup editor), there is an error. This is probably not a big thing, but I will have to put something in the readme so that other developers do not panic when they see this error.
Anyway, thanks for the answer. :)
|
|
|
|
Re: Put product versions in separate files [message #1778054 is a reply to message #1778053] |
Fri, 08 December 2017 16:13 |
|
Sorry, I should have mentioned it.
The required feature 'product' of 'Custom Eclipse' must be set.
Which is normal.
When I read the catalog, the product is read before the version. But when I read the version first, it has no reference to its container.
|
|
|
|
Re: Put product versions in separate files [message #1778256 is a reply to message #1778073] |
Tue, 12 December 2017 11:34 |
|
Indeed, an annotation solved the problem.
For those who would wonder, here is what I added to my sub-model.
<!-- Force the loading of the parent when we open this file directly. -->
<annotation source="ProductReference">
<reference href="../my-other-product.setup#/" />
</annotation>
The reference is only used to force EMF to read the container model.
The source name does not matter.
Thanks Ed. :)
|
|
|
Powered by
FUDForum. Page generated in 0.04632 seconds