|
|
Re: Resource Creation tasks not executed in new workspace [message #1751893 is a reply to message #1751887] |
Mon, 16 January 2017 15:08 |
Andrey Loskutov Messages: 89 Registered: July 2009 |
Member |
|
|
Ed Merks wrote on Mon, 16 January 2017 15:29What kind of setup?
I'm trying to setup the entire product/workspace/project chain.
Ed Merks wrote on Mon, 16 January 2017 15:29
Note that workspace.location is only known if there is a Workspace task (as in the Project catalogs in the standard index).
Yep, there is a Workspace task.
Ed Merks wrote on Mon, 16 January 2017 15:29
If you want the installation to do such a thing for all workspace's even when there is no project stream referenced by the workspace's workspace.setup, you can use ${osgi.instance.area|file} instead.
Dou you mean, instead of writing
${workspace.location|uri}/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml
I should use
${osgi.instance.area|file}/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml
What would be the difference? Wouldn't be the same location then?
If I try to use this, installer tolds me that "osgi.instance.area" variable is undefined (in the variables page), so I have to remove BOOTSTRAP from the triggers. After that Eclipse can't resolve the variable at startup either, so the files aren't created at all.
Probably what would help (but need to be implemented): it would be nice if Oomph could plug-in itself into the "Switch workspace" dialog, so that it could run the Resource Creation tasks for the new workspace before workspace is started.
What wonders me: everything works absolutely fine for the workspaces created with the installer. I guess the installer runs the "Resource Creation" tasks *before* workspace startup?
Or the difference is, that if installer creates workspace, it creates the files for the selected project/stream but while switching to the new workspace there is no stream configured yet for that workspace?
|
|
|
Re: Resource Creation tasks not executed in new workspace [message #1751908 is a reply to message #1751893] |
Mon, 16 January 2017 18:12 |
Ed Merks Messages: 33258 Registered: July 2009 |
Senior Member |
|
|
The point is that if you open a new workspace, there is no stream linked into that workspace.setp (which is demand created but empty), so it's a question of whether there is a workspace task in scope for the resource creation task you've specified. That's why I asked what kind of setup. Is the resource creation task in a project setup? If not, then in a new workspace there will be nothing to define the vale of that variable.
And yes, it's a question of when does that task perform. If it performs at bootstrap time, and a workspace task is in scope, then it will do it's thing (creating the resource) while the installer is running and so the resource will exist when the IDE runs. A resource creation task does not necessarily involve the workspace locations at all, so performing tasks during workspace switching (before the IDE actually launches with that workspace)) could affect any number of tasks and types of tasks. So yes, a new workspace has no streams so will not perform any tasks that are defined by some project setup...
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03570 seconds