Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to get IPathmapManager reference?
How to get IPathmapManager reference? [message #165304] Thu, 13 December 2007 20:12 Go to next message
Dave Carlson is currently offline Dave CarlsonFriend
Messages: 402
Registered: July 2009
Senior Member
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 #165452 is a reply to message #165304] Fri, 14 December 2007 14:38 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Dave Carlson is currently offline Dave CarlsonFriend
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).
Re: How to get IPathmapManager reference? [message #165521 is a reply to message #165452] Fri, 14 December 2007 20:56 Go to previous message
Dave Carlson is currently offline Dave CarlsonFriend
Messages: 402
Registered: July 2009
Senior Member
Christian,
I submitted an enhancement request to expose this method in the interface
https://bugs.eclipse.org/bugs/show_bug.cgi?id=213064

> 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).
>
Previous Topic:Multiple nodes of the same domain element type
Next Topic:Change Click Resolution Sequence
Goto Forum:
  


Current Time: Thu Apr 25 07:20:59 GMT 2024

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

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

Back to the top