|
Re: How to get IPathmapManager reference? [message #165452 is a reply to message #165304] |
Fri, 14 December 2007 14:38 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Dave,
Right, the Path Variables preferences that a user can set cannot override
URI mappings contributed on GMF's extension point.
The IPathmapManager is an adapter on your editing domain's resource set, and
is installed automatically by the GMF editing domain implementation.
So, you should be able to just find the adapter in the resource set's
eAdapters() list that implements IPathmapManager.
I don't think, though, that this will work. URI mappings that you add to
the IPathmapManager will look just like those that are contributed on the
extension point, so the user won't be able to override them. You would
have to use the Eclipse workspace's IPathVariableManager to create a
workspace path variable, and then use the
PathmapManager::addPathVariableReference() utility to associate it with
GMF. However, this is currently internal (not API).
Cheers,
Christian
Dave Carlson wrote:
> How can I get a reference to the IPathmapMangager, so that I can
> programmatically create and set a variable?
>
> Unfortunately, I cannot use the GMF pathmap extension point, because it is
> not possible for a user to override the variable values set that way, as
> far
> as I know. In my application I need to provide a pathmap variable with a
> default value, and allow user to override the location, e.g. to find the
> referenced UML model library in his/her workspace. Will that be possible
> if I create a variable via IPathmapManager in a plugin startup method?
>
> Thanks,
> Dave Carlson
|
|
|
Re: How to get IPathmapManager reference? [message #165485 is a reply to message #165452] |
Fri, 14 December 2007 17:50 |
Dave Carlson Messages: 402 Registered: July 2009 |
Senior Member |
|
|
Hi Christian,
My concern, from the tooling UI point of view, is I don't want to require a
manual step by new users (to create a pathmap variable) before he/she can
start using the tool, but want to allow them at a later time to override the
default pathmap to reference a model library in their own workspace.
Sounds like that is not possible today without using internal API...
I also did not see a way using the pathmap extension point to assign a
platform:// URI (that would require the user to have the necessary project
in his/her workspace). But maybe I could do that via the IPathmapManager
API, realizing that it was still not editable?
Thanks,
Dave
"Christian W. Damus" <cdamus@ca.ibm.com> wrote in message
news:fju4hh$7ad$1@build.eclipse.org...
>
> I don't think, though, that this will work. URI mappings that you add to
> the IPathmapManager will look just like those that are contributed on the
> extension point, so the user won't be able to override them. You would
> have to use the Eclipse workspace's IPathVariableManager to create a
> workspace path variable, and then use the
> PathmapManager::addPathVariableReference() utility to associate it with
> GMF. However, this is currently internal (not API).
|
|
|
|
Powered by
FUDForum. Page generated in 0.03386 seconds