|
Re: What is the PathVariableTask supposed to do? [message #1721785 is a reply to message #1721774] |
Sat, 30 January 2016 11:35 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Duane,
Good question. I had to look at the code to see what that's implemented
that to do. It's intended to set path variables the same as you'd do in
Window -> Preferences -> General -> Workspace -> Linked Resources.
In the UI you see it only allows files and folders, but the underlying
API, org.eclipse.core.resources.IPathVariableManager.setValue(String,
IPath), is deprecated in favor of
org.eclipse.core.resources.IPathVariableManager.setURIValue(String, URI).
But it's not so clear (not documented) what forms of URIs are all
permitted here. It's probably best to assume that only "file:" URIs are
permitted.
So a path variable task is generally useful if your workspace uses
linked resources and those links are defined using path variables.
On 30.01.2016 05:51, Duane Nielsen wrote:
> Looking at the PathVariable task, it looks like it's supposed to help
> you resolve path URI's to a variable, which if is the case, would be
> very useful.
>
> Unfortunately, I was unable to find any documentation on it.
> I tried using platform:/ uri's.. as below..
> <setupTask
> xsi:type="projects:PathVariableTask"
> id="apmdev"
> name="maven_settings"
> uri="platform:/meta/org.eclipse.m2e.core/maven_settings.xml">
> <description></description>
> </setupTask>
>
>
> but the variable was undefined, and I just got a prompt to define it
> in the setup wizard.
>
> I ended up just using a
> ${osgi.instance.area|file}.metadata/.plugins/org.eclipse.m2e.core/maven_settings.xml"
> variable instead. Which seems like a bit of a hack compared to the
> platform:uri approach (which worked great in my ResourceCreationTasks
>
> Anyway, if I ever write another oomph setup, it would be good to know
> how PathVariable was intended to be used.
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: What is the PathVariableTask supposed to do? [message #1721807 is a reply to message #1721800] |
Sun, 31 January 2016 07:50 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Duane,
They must run in the IDE, so they will perform in startup and manual
trigger.
On 31.01.2016 06:10, Duane Nielsen wrote:
> Cheers, bro, thanks for checking for me. Seems like it would be
> useful. Which scope would those variables become "active". ie;
> when would they become substitable. I'm assuming not in BOOSTRAP,
> and perhaps not in oomph setup at all. Only when the workspace was
> actually materialized, right?
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03367 seconds