|
Re: Workspace.location variable [message #1715295 is a reply to message #1715261] |
Sat, 21 November 2015 07:44 |
Ed Merks Messages: 33258 Registered: July 2009 |
Senior Member |
|
|
Jeremie,
Comments below.
On 20/11/2015 4:57 PM, Jeremie Bresson wrote:
> I have started to depend from ${workspace.location} in my user.setup
> file.
> (as an example, see my current use case here:
> https://www.eclipse.org/forums/index.php?t=msg&th=1072229&goto=1714892&#msg_1714892)
>
> For all workspaces setup by Oomph, there is no problem at all.
>
> I have still some eclipse installations (for example EPP) installed
> and used the traditional way. Because they contain Oomph (I think this
> is the case for every EPP in Mars), I am asked for this "undeclared"
> variable "workspace.location" when I open workspace with it.
Yes, the variable comes from the workspace task which is only in the
project catalog.
>
> I understand why this comes (because I never told Oomph where is the
> workspace I have opened), but I think that this variable should be
> provided by the workspace itself, without that I have to set it manually.
This issue has come up before. Look at the thread titled "Executing
ResourceCreationTask after workspace switch" started "29/09/2015" .
The conclusion from that is that
${osgi.instance.area|trimTrailingSlashes} gives you a URI that is the
workspace location in any running IDE, so you can rely on that in any
task; not however that the task should not perform at bootstrap time,
because there it specifies the workspace of the installer itself, which
has no workspace.
>
> If I try to set the value directly in the dialog, the value is not
> saved anywhere and Oomph keeps asking the question.
>
> My current solution:
> Open the workspace.setup file.
> Create a new variable:
> * Name: workspace.location
> * Value: <the path of my workspace>
>
> I have looked in workspaces setup by Oomph. There variable value is
> not stored in the workspace.setup file (my guess was wrong). How does
> it work for those cases?
>
> When called from a Workspace, could not the workspace.location value
> set by Oomph?
> This could be useful in the "Import: Oomph > Projects into workspace"
> scenario.
Any task specified in a project setup can rely on this. The issue is
that you want tasks in the user.setup, and that can apply everywhere
and even want to to apply to some new workspace that's opened that
hasn't been setup by Oomph. So best to use the advanced properties on
your task so that it doesn't perform at bootstrap time.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03193 seconds