Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Issue with evaluation of a variable within a variable
Issue with evaluation of a variable within a variable [message #1752430] Mon, 23 January 2017 17:16 Go to next message
Catalin Samarghitan is currently offline Catalin SamarghitanFriend
Messages: 9
Registered: December 2015
Junior Member
Hello,

I have a strange problem with the evaluation of a variable. The issue is that the "Installation folder name" does not get autocomplete to "scope.product.name" (since Eclipse Installer 1.5.0), value that exists in the setup file.

So, I manage to track it down in the setup file, and is actually related to the "install.root" variable value. This one is defined in the product setup file and has the value of "${company.install.root/tools/eclipse}" and the "company.install.root" variable is defined in the root setup file with the value "${user.home/company}".
I presume that the evaluation of the variables has an issue on "install.root" because of the variable within variable, that breaks the evaluation of "scope.product.name".

Could you please give me some suggestion of some break point that I can use to see what is actually happening in the code?

Thank you,
Samarghitan Catalin
Re: Issue with evaluation of a variable within a variable [message #1752457 is a reply to message #1752430] Tue, 24 January 2017 05:10 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
There is special handling in org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.filter(String, String) and yes this indirection through other variables is likely the issue.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Issue with evaluation of a variable within a variable [message #1752683 is a reply to message #1752457] Thu, 26 January 2017 07:46 Go to previous messageGo to next message
Catalin Samarghitan is currently offline Catalin SamarghitanFriend
Messages: 9
Registered: December 2015
Junior Member
You were right, in the filter method the install.root is still in the unresolvedVariables because of the variable within variable, so the filter is not able to determine the uniqueInstallationID.

Should I open bug or this behavior is not supported?

Thanks,
Catalin

PS: I've uploaded some sample files to reproduce the problem.
Re: Issue with evaluation of a variable within a variable [message #1752890 is a reply to message #1752683] Mon, 30 January 2017 11:21 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
You could open an enhancement request, but as you can see, this is special case logic for a tricky case, so it's not clear to what extent this could be generalized...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Issue with evaluation of a variable within a variable [message #1754814 is a reply to message #1752890] Wed, 22 February 2017 16:22 Go to previous messageGo to next message
Catalin Samarghitan is currently offline Catalin SamarghitanFriend
Messages: 9
Registered: December 2015
Junior Member
Hi Ed,

After some debugging I was able to find a solution to my problem by changing the code in SetupTaskPerformer for the method:
private void expandVariableTaskValue(Set<String> keys, EObject eObject)


In short, when a newValue is found I add it to the SetupTaskPerformer and remove it from unresolvedSettings.

I've attached the new version of the file. If you prefer I can try to do a pull request on git.

Thanks,
Catalin
Re: Issue with evaluation of a variable within a variable [message #1754818 is a reply to message #1754814] Wed, 22 February 2017 17:31 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
The preferred method of contributing changes is to use Gerrit. Alternatively, a patch would be good too. Or I can figure out the diff from the full version of your file, but in any case, please open a Bugzilla, for the Gerrit commit, the patch, or for the new version of the file with your changes.

Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Update Maven Project
Next Topic:Eclipse crashes occasionally with "Eclipse stopped working"
Goto Forum:
  


Current Time: Fri Dec 27 02:43:01 GMT 2024

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

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

Back to the top