Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Using relative path inside a ProductCatalog ?
Using relative path inside a ProductCatalog ? [message #1802373] Thu, 07 February 2019 13:25 Go to next message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
Registered: July 2009
Senior Member
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 14:05]

Report message to a moderator

Re: Using relative path inside a ProductCatalog ? [message #1802378 is a reply to message #1802373] Thu, 07 February 2019 15:14 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30457
Registered: July 2009
Senior Member
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.
Re: Using relative path inside a ProductCatalog ? [message #1802430 is a reply to message #1802378] Fri, 08 February 2019 17:43 Go to previous messageGo to next message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
Registered: July 2009
Senior Member
Hey Ed,
With your explanation I was able to understand better that wiki instruction. it worked, thanks !

But there are one more instruction that I'm not sure if I fully understand yet:

Quote:
Your catalog setup file must contain an Eclipse Ini task creating the same redirection(s)! Otherwise your catalog (or the referenced projects) will not be visible in the Eclipse created by the installer and hence the projects selected from it cannot be provisioned.

It is something like this that I must add:
  <setupTask
      xsi:type="setup:EclipseIniTask"
      option="-Doomph.redirection.c8tech_products"
      value="index:/redirectable.projects.setup->file:/home/cvgaviao/Development/oomph-setups/c8tech.products.catalog.setup/"
      vm="true">
  </setupTask>
  <setupTask
      xsi:type="setup:EclipseIniTask"
      option="-Doomph.redirection.c8tech_products_dir"
      value="index:/products/->file:/home/cvgaviao/Development/oomph-setups/products/"
      vm="true">
  </setupTask>      

[Updated on: Fri, 08 February 2019 17:45]

Report message to a moderator

Re: Using relative path inside a ProductCatalog ? [message #1802443 is a reply to message #1802430] Fri, 08 February 2019 23:01 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30457
Registered: July 2009
Senior Member
Yes, though in value="index:/redirectable.projects.setup->file:/home/cvgaviao/Development/oomph-setups/c8tech.products.catalog.setup/" the trailing "/" looks bogus. I.e., files should redirect to files, and folders (with a trailing /) should redirect to folders...
Re: Using relative path inside a ProductCatalog ? [message #1802544 is a reply to message #1802443] Mon, 11 February 2019 17:48 Go to previous message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
Registered: July 2009
Senior Member
It worked Ed, many thanks !
Previous Topic:Eclipse installer opens firefox with a page "can´t open file"
Next Topic:Save Product setup variable into user.setup without prompting
Goto Forum:
  


Current Time: Sat Sep 21 00:43:47 GMT 2019

Powered by FUDForum. Page generated in 0.01864 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top