Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » workspace when skipping project selection
workspace when skipping project selection [message #1508517] Fri, 12 December 2014 13:35 Go to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

I want to set the problems view configuration via a resource creation task even if I skip the project selection - I will have a workspace, after all. However, the variable ${workspace.location} is not known in this case.

Is there a way to enforce a "workspace task" in the user setup? Or is there a way to prevent the resource creation task from being triggered if no project is selected (I do not want to enter workspace.location every time and I don't want to create a variable that will possibly create a conflict)?

Alex


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Re: workspace when skipping project selection [message #1508757 is a reply to message #1508517] Fri, 12 December 2014 17:46 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6693
Registered: July 2009
Senior Member
Hi Alexander,

You can access all environment and system properties of the running VM via Oomph variables, for example
${osgi.instance.area}:

<?xml version="1.0" encoding="UTF-8"?>
<setup:ResourceCreationTask
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
content="Hello World!"
targetURL="${osgi.instance.area}.metadata/.plugins/com.foo.bar/test.txt"
encoding="UTF-8"/>

Of course it's good to know the value format. In this case it's a URI and it ends with a trainling slash.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Am 12.12.2014 um 14:35 schrieb Alexander Nittka:
> Hi,
>
> I want to set the problems view configuration via a resource creation task even if I skip the project selection - I
> will have a workspace, after all. However, the variable ${workspace.location} is not known in this case.
>
> Is there a way to enforce a "workspace task" in the user setup? Or is there a way to prevent the resource creation
> task from being triggered if no project is selected (I do not want to enter workspace.location every time and I don't
> want to create a variable that will possibly create a conflict)?
>
> Alex


Re: workspace when skipping project selection [message #1510763 is a reply to message #1508757] Sun, 14 December 2014 10:27 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi Eike,

thanks for the tip with the variables. I guess this allows me to formulate the current problem even more clearly.
With "osgi.instance.area" I have the same problem as with "workspace.location". Both variables are undeclared when starting the installer, I guess because the workspace location cannot be known at that point - at least not if no project is selected. Only with the project selection, the catalog's default setup entries are picked up - the ones that determine the workspace location.

Am I correct when stating the following: The variable substitution is not lazy. All values must be known before bootstrapping. So it is not enough that osgi.instance.area would be known during the startup phase (when the new eclipse instance is actually started).

As a consequence, it is currently impossible to achieve what I am trying to do!?


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Re: workspace when skipping project selection [message #1510930 is a reply to message #1510763] Sun, 14 December 2014 13:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Alex,

I think one problem is that although there is a workspace.setup, a
synthesized one has no reference to any project.setup and hence no
project catalog is in scope, which is where the workspace task is
defined. Maybe we need something much like the "self" product version
for the empty project stream or synthesize a workspace task...

Note that in advanced properties you can set triggers so that a type of
task that could potentially run in bootstrap only runs in the IDE. So
no, all variables need not be known before bootstrapping, but the wizard
does generally prompt for variables that would otherwise need prompting
in the started IDE (so that the installation/provisioning process
doesn't block twice)...


On 14/12/2014 11:27 AM, Alexander Nittka wrote:
> Hi Eike,
>
> thanks for the tip with the variables. I guess this allows me to
> formulate the current problem even more clearly.
> With "osgi.instance.area" I have the same problem as with
> "workspace.location". Both variables are undeclared when starting the
> installer, I guess because the workspace location cannot be known at
> that point - at least not if no project is selected. Only with the
> project selection, the catalog's default setup entries are picked up -
> the ones that determine the workspace location.
>
> Am I correct when stating the following: The variable substitution is
> not lazy. All values must be known before bootstrapping. So it is not
> enough that osgi.instance.area would be known during the startup phase
> (when the new eclipse instance is actually started).
> As a consequence, it is currently impossible to achieve what I am
> trying to do!?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: workspace when skipping project selection [message #1513517 is a reply to message #1510930] Tue, 16 December 2014 16:02 Go to previous message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Thanks to both of you for your replies and the great work you are doing.

From Ed's reply I understand that the problem is even more involved than I thought. For now, I will go the easy way (which I had not thought of before): I will create an empty project and add it to the user projects and select that instead of skipping the project selection.

This will allow me to make use of *all* the nice defaults provided by the eclipse project catalog without any pitfalls.

Alex


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Previous Topic:Oomph headless
Next Topic:Project import fails on non-existent source folder
Goto Forum:
  


Current Time: Thu Dec 26 18:06:02 GMT 2024

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

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

Back to the top