Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Edit Preset Variable
Edit Preset Variable [message #1745912] Wed, 19 October 2016 09:36 Go to next message
Udo Walker is currently offline Udo WalkerFriend
Messages: 71
Registered: July 2009
Member
How can I add a variable which the user can edit and is predefined by an environment variable?

Lets say I have the environment variable myvar with the value "sample value".

At the beginning of the installation I want to show a text field with the value of the environment variable i.e. "sample value". The user should be able to edit the value.

I tried so far to use the environment variable as value attribute of a setup:VariableTask but then oomph just does not ask the user anymore.
Re: Edit Preset Variable [message #1745916 is a reply to message #1745912] Wed, 19 October 2016 09:55 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6498
Registered: July 2009
Senior Member
Refer to your environment variable in the Variable Task's default value property:

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0">
  <setup:VariableTask
      name="author.name"
      defaultValue="${user.name}"
      label="Author name"/>
  <setup:EclipseIniTask
      option="-Dcom.foo.author.name"
      value="=${author.name}"
      vm="true"/>
</xmi:XMI>


Re: Edit Preset Variable [message #1745925 is a reply to message #1745916] Wed, 19 October 2016 11:48 Go to previous message
Udo Walker is currently offline Udo WalkerFriend
Messages: 71
Registered: July 2009
Member
Your solution works like expected.

Thanks.
Previous Topic:Reference external setup tasks through href
Next Topic:control some initial view settings
Goto Forum:
  


Current Time: Mon Jun 01 06:04:41 GMT 2020

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

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

Back to the top