Using relative path inside a ProductCatalog ? [message #1802373] |
Thu, 07 February 2019 08:25  |
Eclipse User |
|
|
|
Hi,
I've created a ProductCatalog model and successfully set it in my local eclipse-inst.ini:
-Doomph.redirection.c8tech_products=index:/redirectable.products.setup->file:/home/cvgaviao/Development/oomph-setups/c8tech.products.catalog.setup
Have created two Product model based on those provided in "org.eclipse.products". All files are in the same local git folder.
Restarting the Installer I can see the product items, but when selecting any of them I can't see any details.
I discovered that the issue is related to the use of relative paths, but that is not an issue while working on the setup editor.
Then I changed one item to use absolute path and it worked.
<product href="file:/home/cvgaviao/Development/oomph-setups/eclipse.java.ide.oomph.setup#/"/>
<product href="eclipse.cpp.ide.oomph.setup#/"/>
Since those files are in the same directory and I'm going to push them to a git repository soon, I would like to not use an absolute path. So, is there any way to use relative paths in this case?
thanks, Cristiano
[Updated on: Thu, 07 February 2019 09:05] by Moderator
|
|
|
Re: Using relative path inside a ProductCatalog ? [message #1802378 is a reply to message #1802373] |
Thu, 07 February 2019 10:14   |
Eclipse User |
|
|
|
Resolving of relative references is something handled by the underlying EMF infrastructure. If a relative reference is not working for you in a case such as this, the fundamental question is, what URI was used to load the catalog itself, i.e., what is the URI of the resource containing these hrefs? You would think it would be be file:/home/cvgaviao/Development/oomph-setups/c8tech.products.catalog.setup according to what you said, and then href="eclipse.cpp.ide.oomph.setup#/" should resolve to file:/home/cvgaviao/Development/oomph-setups/eclipse.cpp.ide.oomph.setup. But the issue is that the URI used to load it is index:/redirectable.products.setup (the original logical URI), so relative references resolve to look in index:/ and they are not located there!
You missed this part of the instructions in the authoring guide:
Quote:If the projects in that catalog are referenced by relative downward references with a unique folder, also add a folder redirection system property, e.g.,-Doomph.redirection.myProjectCatalog=index:/<my-projects-folder>/->.../, to redirect the locations of the referenced projects to the folder where they are physically hosted.
You can't simply redirect index:/ because then you redirect everything. So to make this work, you must put your products in a subfolder of the folder of the catalog so that your references look like, for example, <product href="products/eclipse.cpp.ide.oomph.setup#/"/>, and then when this is resolved to index:/products/eclipse.cpp.ide.oomph.setup you can redirect index:/products/ to file:/home/cvgaviao/Development/oomph-setups/products/ as well so that all your setups are resolved from their logical location in index:/ to their actual location in your file system.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.29847 seconds