Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » using boolean variables in filter
using boolean variables in filter [message #1740329] Thu, 11 August 2016 16:14 Go to next message
Steffen Holzer is currently offline Steffen HolzerFriend
Messages: 59
Registered: January 2016
Member

Hello Guys,

I want to include or respectively exclute tasks from beeing triggered if a certain boolean flag is set.

is declared the flag via

<setupTask
        xsi:type="setup:VariableTask"
        id="bitness.is64"
        type="BOOLEAN"
        name="bitness.is64"
        defaultValue="true"
        storageURI="scope://Installation"
        label="64-Bit Software">
      <description></description>
    </setupTask>


and try to use it in that way:
filter="(bitness.is64=true)"

but this doesn't seem to work. Using just 'bitness.is64' yields an error by eclipse.

Can you help me here?

Greetings and Thanks in advance
Steffen


"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live" - John Woods
Re: using boolean variables in filter [message #1742042 is a reply to message #1740329] Thu, 11 August 2016 17:02 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 29479
Registered: July 2009
Senior Member
Steffen,

You can only use environment and system properties in a filter, not the
value of a variable. One trick (if the task doesn't need to perform at
bootstrap time) is an Eclipse Ini task to set a -D system property into
the installation's eclipse.ini.

But for this case, you should use the osgi.arch value and look at
org.eclipse.core.runtime.Platform.ARCH_* for the values that are for 64
bit architectures. You use (!(...)(...)) for each of those values in
the filter.

On 11.08.2016 18:14, Steffen Holzer wrote:
> Hello Guys,
> I want to include or respectively exclute tasks from beeing triggered
> if a certain boolean flag is set.
> is declared the flag via
>
> <setupTask
> xsi:type="setup:VariableTask"
> id="bitness.is64"
> type="BOOLEAN"
> name="bitness.is64"
> defaultValue="true"
> storageURI="scope://Installation"
> label="64-Bit Software">
> <description></description>
> </setupTask>
>
> and try to use it in that way:
> filter="(bitness.is64=true)"
> but this doesn't seem to work. Using just 'bitness.is64' yields an
> error by eclipse.
> Can you help me here?
>
> Greetings and Thanks in advance
> Steffen
Previous Topic:Howto prepare preconfigured Eclipse Installer
Next Topic:Access user selected arch value
Goto Forum:
  


Current Time: Thu Aug 16 04:46:37 GMT 2018

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

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

Back to the top