Home » Eclipse Projects » Oomph » Understanding variable in a setup + installation
Understanding variable in a setup + installation [message #1836715] |
Tue, 12 January 2021 18:13 |
NoDataFound - Messages: 10 Registered: October 2017 |
Junior Member |
|
|
Hello,
I have made a configuration (setup:Configuration) which performs an installation, loading additionals plugins and configuring preferences.
While it works, I am also setting several variables, I am wondering how variable resolution work (I have read https://wiki.eclipse.org/Eclipse_Oomph_Authoring#Understanding_Setup_Tasks_and_Scopes but I have trouble understanding some part).
If I put this in the user.setup, the variable is not defined to the value Fira Code, unless I remove the declaration in the installation.setup:
<!-- user.setup -->
<setupTask xsi:type="setup:VariableTask" id="font" name="font" value="Fira Code" label="Default font"/>
It is defined like this in install.setup:
<!-- install.setup -->
<setupTask xsi:type="setup:VariableTask" id="font" name="font" defaultValue="Consolas" label="Default font"/>
I would assume that Oomph would look for variable font, in all scope (user, install, workspace), and resolve the value to the one defined in user.setup, but it won't.
What is the difference between value and defaultValue in this case?
Now, I also setup some variables to customize:
- Some plugins for SpotBugs
- The user dictionary
<!-- install.setup -->
<setupTask xsi:type="setup:VariableTask"
id="spotbugs.root" name="spotbugs.root"
value="${install.root/spotbugs}" defaultValue="${install.root/spotbugs}"
label="Spotbug Contribution Root" />
<setupTask xsi:type="setup:VariableTask"
id="spotbugs.findsecbugs.location" name="spotbugs.findsecbugs.location"
type="FILE"
value="${spotbugs.root}/findsecbugs-plugin-${spotbugs.findsecbugs.version}.jar"
defaultValue="${spotbugs.root}/findsecbugs-plugin-${spotbugs.findsecbugs.version}.jar"
storageURI="scope://Installation" label="Location of findsecbugs jar" />
<setupTask xsi:type="setup:VariableTask"
id="userDictionary.location" name="userDictionary.location"
type="FILE" value="${workspace.root/user-dictionnary.txt|canonical}" defaultValue="${workspace.root/user-dictionnary.txt|canonical}"
label="User dictionary" />
I notice in the UI, when displaying all variables, that:
- userDictionary.location is set to the actual value of ${workspace.root}, eg: D:\eclipse\workspace\user-dictionnary.txt (workspace.root is defined in user.setup)
- spotbugs.findsecbugs.location is set to the expression I used in the value/defaultValue
Why variables defined in user.setup are resolved, while other are not?
What the storageURI attribute purpose? And what scope://Installation does if set?
How, as an user, can I see the default value or its resolution ?
Finally, in the setup I also provide JRE I want to use:
<!-- install.setup -->
<setupTask xsi:type="jdt:JRETask" version="JavaSE-1.8" location="${jre.location-1.8}"/>
<setupTask xsi:type="jdt:JRETask" version="JavaSE-11" location="${jre.location-11}"/>
Is there a way for me to disable the field?
The rational is that Oomph is a little bit sensitive when I check/uncheck the "All variables", and when I scroll down, from time to time, I enter by mistake in the JRE 1.8 field and select a JRE 15 - which is not what I want :)
Regards,
NoDataFound
|
|
| | |
Goto Forum:
Current Time: Mon Jun 10 09:57:26 GMT 2024
Powered by FUDForum. Page generated in 0.03738 seconds
|