Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Deleting a variable from user.setup
Deleting a variable from user.setup [message #1800992] Thu, 10 January 2019 17:42 Go to next message
Mario Jauvin is currently offline Mario JauvinFriend
Messages: 66
Registered: October 2015
Member
Is it possible to delete a variable from the user.setup using a setup task? Is it possible to delete it programmatically? I checked around oomph and could not find it. Thanks.
Re: Deleting a variable from user.setup [message #1801008 is a reply to message #1800992] Fri, 11 January 2019 03:19 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30551
Registered: July 2009
Senior Member
No, there's no task to delete tasks. Yes of course it's possible programmatically, given you can do this in the editor by selecting it and hitting Delete. Programmatically, these are all modeled with EMF, so if you have the SetupTask instance, it's an EObject, and you can use org.eclipse.emf.ecore.util.EcoreUtil.delete(EObject, boolean) to remove it.

Perhaps you can explain the motivation for what you're trying to achieve. Why would you want to delete a variable instead of just not using it?
Re: Deleting a variable from user.setup [message #1801061 is a reply to message #1801008] Fri, 11 January 2019 19:07 Go to previous messageGo to next message
Mario Jauvin is currently offline Mario JauvinFriend
Messages: 66
Registered: October 2015
Member
Thanks for the valuable information. In this post you indicated that if the install.root variable is in the user.setup it will override it. I would like to delete it if it is there so that the variable defined in my setup will take precedence.
Re: Deleting a variable from user.setup [message #1801107 is a reply to message #1801061] Mon, 14 January 2019 03:28 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30551
Registered: July 2009
Senior Member
I see, though this seems like an example of not using that variable, though that might not be so practical because other variables depend on it. Though in the end, it's probably these other variables that you can override directly.

I don't think removing variables from the user.setup (or anywhere else) is a practical goal for a setup task. There must be a better way to achieve that. E.g., perhaps a property or annotation on a variable to indicate that it's value shouldn't be overridden by a variable in a scope that would normally override it...
Previous Topic:-Doomph.p2.pool argument
Next Topic:2018-12 Eclipse Installation Error
Goto Forum:
  


Current Time: Sat Oct 19 19:58:12 GMT 2019

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

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

Back to the top