Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » What is the PathVariableTask supposed to do?
What is the PathVariableTask supposed to do? [message #1721774] Sat, 30 January 2016 04:51 Go to next message
Duane Nielsen is currently offline Duane NielsenFriend
Messages: 4
Registered: January 2016
Junior Member
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.

Re: What is the PathVariableTask supposed to do? [message #1721785 is a reply to message #1721774] Sat, 30 January 2016 11:35 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31038
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.
>
>
Re: What is the PathVariableTask supposed to do? [message #1721800 is a reply to message #1721785] Sun, 31 January 2016 05:10 Go to previous messageGo to next message
Duane Nielsen is currently offline Duane NielsenFriend
Messages: 4
Registered: January 2016
Junior Member
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?
Re: What is the PathVariableTask supposed to do? [message #1721807 is a reply to message #1721800] Sun, 31 January 2016 07:50 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31038
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?
Previous Topic:NPE while using the installer
Next Topic:Default value for unsigned content?
Goto Forum:
  


Current Time: Tue Apr 07 21:34:30 GMT 2020

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

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

Back to the top