Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » How to conditionally enforce workspace name input
How to conditionally enforce workspace name input [message #1752086] Wed, 18 January 2017 16:49 Go to next message
Andrey Loskutov is currently offline Andrey LoskutovFriend
Messages: 89
Registered: July 2009
Member
I would like the installer to show "workspace.location" variable choice on the variables page if user starts installer with -DpromptForWorkspace=true option.

I've played with "Workspace" element and filters (the idea was to have two compound setup tasks with (workspaceName.filter=false) or (workspaceName.filter=true)) but Oomph complains that I can't have two elements with same "Workspace" id:
<?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"
    type="BOOLEAN"
    name="workspaceName.filter"
    value="${promptForWorkspace}"
    label="">
  <description></description>
</setup:VariableTask>

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI 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">
  <setup:CompoundTask
      filter="(workspaceName.filter=true)"
      name="promptForWorkspace=true">
    <setupTask
        xsi:type="setup:WorkspaceTask"
        id="workspace"
        location="${undefinedValue}"/>
    <description></description>
  </setup:CompoundTask>
  <setup:CompoundTask
      filter="(workspaceName.filter=false)"
      name="promptForWorkspace=true">
    <setupTask
        xsi:type="setup:WorkspaceTask"
        id="workspace"/>
    <description></description>
  </setup:CompoundTask>
</xmi:XMI>


Do you have any tricks how I could conditionally enforce that workspace.location is "undefined" and prompted for?
Re: How to conditionally enforce workspace name input [message #1752121 is a reply to message #1752086] Thu, 19 January 2017 03:53 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
You'll notice in the user.setup the rule variable defaults like this:

<?xml version="1.0" encoding="UTF-8"?>
<setup:AttributeRule
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
attributeURI="http://www.eclipse.org/oomph/setup/1.0#//WorkspaceTask/location"
value="${installation.location/ws}"/>

But there are other rule choices, just not way to force a particular one yet...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to conditionally enforce workspace name input [message #1752123 is a reply to message #1752121] Thu, 19 January 2017 04:16 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Note that you could also set the value of the workspace.location variable, and it could be set in terms of a variable that's prompted... I think that would work, but haven't tried. I'm traveling...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to conditionally enforce workspace name input [message #1752254 is a reply to message #1752123] Fri, 20 January 2017 10:42 Go to previous message
Andrey Loskutov is currently offline Andrey LoskutovFriend
Messages: 89
Registered: July 2009
Member
Hi Ed, thanks, may be a silly question: user.setup is written by the wizard, but I want to configure the wizard itself.
Previous Topic:Creating WST runtimes
Next Topic:Ordering of tasks is not working
Goto Forum:
  


Current Time: Wed Apr 24 19:40:32 GMT 2024

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

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

Back to the top