Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » using variable in setup preference task : possible ?
using variable in setup preference task : possible ? [message #1808105] Mon, 17 June 2019 13:37 Go to next message
Vincent GIACOMINI is currently offline Vincent GIACOMINIFriend
Messages: 4
Registered: April 2019
Junior Member
Hi,

I'm trying to set up WST instance inside my setup project but i'm facing a problem:

1) I want to leave the user the opportunity to specify the location of a tomcat installation
2) And finally, i want my project installer to automaticaly set the "/instance/org.eclipse.jst.server.tomcat.core/locationorg.eclipse.jst.server.tomcat.runtime.70" preference to the location specified by the user

So in my project setup there is

<?xml version="1.0" encoding="UTF-8"?>
<setup:VariableTask
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    id="tomcat.base"
    type="FOLDER"
    name="tomcat.base"
    label="Répertoire d'installation tomcat">
  <description>Répertoire d'installation tomcat</description>
</setup:VariableTask>


then..

<?xml version="1.0" encoding="UTF-8"?>
<setup:PreferenceTask
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    key="/instance/org.eclipse.jst.server.tomcat.core/locationorg.eclipse.jst.server.tomcat.runtime.70"
    value="${tomcat.base}"/>


But it doesn't works....

The installer asks the user for a tomcat location, at the end of the installation, I got an eclipse , with a tomcat Server runtime environment, but with an empty tomcat installation directory.

It seems that preference
"/instance/org.eclipse.jst.server.tomcat.core/locationorg.eclipse.jst.server.tomcat.runtime.70" has not been set

Question :is the use of variable allowed inside preference setup task ?

Regards..
Re: using variable in setup preference task : possible ? [message #1808128 is a reply to message #1808105] Mon, 17 June 2019 21:33 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
I don't know if giving the variable task an id is a problem. It shouldn't be, but it's also pointless.

If you, in that installation, do Help -> Perform Setup Tasks and on the Confirmation page, check Show all triggered tasks. Do you see your preference task there? If you select it, you can see its properties. Do they look as you would expect, i.e., using the expanded variable's value? Are you sure this is the right key for the preference you're trying to set?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: using variable in setup preference task : possible ? [message #1808147 is a reply to message #1808128] Tue, 18 June 2019 08:27 Go to previous messageGo to next message
Vincent GIACOMINI is currently offline Vincent GIACOMINIFriend
Messages: 4
Registered: April 2019
Junior Member
I did a new try but before I took care to suppress all relative tomcat datas in my user.setup.

On installation process, installer asked me for tomcat installation location.

Once the installation over, I get a recorded tomcat installation but without installation directory:
https://reho.st/self/3097bcae75bad8a13c3e7fed47566c97f7b57514.png

the "Help -> Perform Setup Tasks" shows nothing about prerefrence setup:
https://reho.st/self/0c6c7c905f8c389255bf8e53433333b0550f00f4.png

[EDIT] : however, installation log shows that preference is well set...
https://reho.st/self/04cfdc31ca642acc55662b21da11c645b2f6e7e0.png
Weird....

[Updated on: Tue, 18 June 2019 09:11]

Report message to a moderator

Re: using variable in setup preference task : possible ? [message #1808153 is a reply to message #1808147] Tue, 18 June 2019 09:13 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
As I mentioned already, on the Confirmation page there is a check box at the bottom of the page labeled "Show all triggered tasks". You should see your preference task if you check that.

Also try removing the id from your variable task; that could cause a problem because variables are synthesized for tasks with an id and given this id has the same name as your variable's name, that might cause a problem.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: using variable in setup preference task : possible ? [message #1808165 is a reply to message #1808153] Tue, 18 June 2019 11:58 Go to previous messageGo to next message
Vincent GIACOMINI is currently offline Vincent GIACOMINIFriend
Messages: 4
Registered: April 2019
Junior Member
Sorry to forgot to check the right checkbox. Below a screenshot :
https://reho.st/preview/self/f15d8a794bd9ee467a31eaec88114526fd8f5b36.png


Removing the id from the variable task fixed the problem : Thank you for your precious help
Re: using variable in setup preference task : possible ? [message #1808171 is a reply to message #1808165] Tue, 18 June 2019 13:30 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Yes, I had a feeling that might be a problem. We really should fix that, i.e., not generate variables from variables with an id, so I opened the following:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=548388


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Character escaping issue
Next Topic:There's something wrong with my Eclipse installing
Goto Forum:
  


Current Time: Fri Apr 19 18:28:29 GMT 2024

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

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

Back to the top