Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Variable Filters(Possible bug and/or feature request)
Variable Filters [message #1816169] Wed, 23 October 2019 07:30 Go to next message
Peter Kirschner is currently offline Peter KirschnerFriend
Messages: 21
Registered: July 2009
Junior Member

I want to use a variable on windows for a path reference.
User is browsing and referencing directory C:\TEMP\X
So the variable DIR=C:\TEMP\X
This variable should now be stored inside eclipse.ini task as
-DDIR=C:/TEMP/X

I tried to achieve this by using an intermediate file URI and path afterwards.
variable: DIR
variable: fileURI_DIR=${DIR|uri}
Eclipse Ini: -DDIR=${fileURI_DIR|path} resulting in -DDIR=file:/C:/TEMP/X
So this looks for me like the path filter is not working on file URIs. I would expect to get -DDIR=C:/TEMP/X

Is there another way to achieve this?

Feature request:
How about enabling String.replaceAll(String regex, String replacement) variable filter.
${<variable>|replaceAll(regex,replacement)}
e.g. ${DIR|replaceAll("\\","/")} would do the trick then.

[Updated on: Wed, 23 October 2019 07:33]

Report message to a moderator

Re: Variable Filters [message #1816176 is a reply to message #1816169] Wed, 23 October 2019 08:26 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30916
Registered: July 2009
Senior Member
I think you just want to use ${DIR|path} because that does exactly your replaceAll...:

https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/tree/plugins/org.eclipse.oomph.setup.core/src/org/eclipse/oomph/setup/internal/core/StringFilterRegistry.java#n483
Re: Variable Filters [message #1816196 is a reply to message #1816176] Wed, 23 October 2019 13:08 Go to previous message
Peter Kirschner is currently offline Peter KirschnerFriend
Messages: 21
Registered: July 2009
Junior Member

Perfect. Thx Ed,. I was thinking to complex.
Easy and safe solution :-)
Previous Topic:I keep getting an error.
Next Topic:Fail
Goto Forum:
  


Current Time: Sat Feb 29 04:59:00 GMT 2020

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

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

Back to the top