Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Model navigator
Model navigator [message #227245] Thu, 23 April 2009 15:33 Go to next message
José is currently offline JoséFriend
Messages: 18
Registered: July 2009
Junior Member
Hi all, I'm trying to develop a model navigator for a GMF diagram. I
would like obtain a synchronization between EMF model instantiate by GMF
diagram editor and my navigator. To obtain that, I'm using Common
Navigator Framework and I'm implementing my own content and label
providers.
The way I've thought consists in get the GMF editing domain, obtain the
resource set opened by the GMF graphical editor and finally, synchronize
with it the navigator, but I don't know how to do this operation.

Could someone help me or give the clues to perform the mentioned
operation??

Thanks to all
Re: Model navigator [message #227271 is a reply to message #227245] Thu, 23 April 2009 17:01 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Jose,

You can go through all the open editors using eclipse API, select those you
are interested in and get EditingDomain/ResourceSet from there.
The problem is: you can browse a model wich is not openned in any editors
and then user can open this model...

-----------------
Alex Shatalin
Re: Model navigator [message #227299 is a reply to message #227245] Thu, 23 April 2009 20:15 Go to previous messageGo to next message
Ali Koudri is currently offline Ali KoudriFriend
Messages: 118
Registered: July 2009
Senior Member
Hi,

I did the same thing recently (CNF + EMF + GMF) (successfully). If you
register a transactional editing domain, common to all views and
editors, then synchronization comes for free.

regards.

Jose Carlos a écrit :
> Hi all, I'm trying to develop a model navigator for a GMF diagram. I
> would like obtain a synchronization between EMF model instantiate by GMF
> diagram editor and my navigator. To obtain that, I'm using Common
> Navigator Framework and I'm implementing my own content and label
> providers.
> The way I've thought consists in get the GMF editing domain, obtain the
> resource set opened by the GMF graphical editor and finally, synchronize
> with it the navigator, but I don't know how to do this operation.
>
> Could someone help me or give the clues to perform the mentioned
> operation??
>
> Thanks to all
Re: Model navigator [message #227306 is a reply to message #227299] Fri, 24 April 2009 07:02 Go to previous messageGo to next message
José is currently offline JoséFriend
Messages: 18
Registered: July 2009
Junior Member
exquisitus escribió:
> Hi,
>
> I did the same thing recently (CNF + EMF + GMF) (successfully). If you
> register a transactional editing domain, common to all views and
> editors, then synchronization comes for free.
>
> regards.
>
> Jose Carlos a écrit :
>> Hi all, I'm trying to develop a model navigator for a GMF diagram. I
>> would like obtain a synchronization between EMF model instantiate by
>> GMF diagram editor and my navigator. To obtain that, I'm using Common
>> Navigator Framework and I'm implementing my own content and label
>> providers.
>> The way I've thought consists in get the GMF editing domain, obtain
>> the resource set opened by the GMF graphical editor and finally,
>> synchronize with it the navigator, but I don't know how to do this
>> operation.
>>
>> Could someone help me or give the clues to perform the mentioned
>> operation??
>>
>> Thanks to all
That's exactly I've done and it's work fine. Thank you very much to all
for the responses
Re: Model navigator [message #227347 is a reply to message #227306] Fri, 24 April 2009 12:32 Go to previous message
José is currently offline JoséFriend
Messages: 18
Registered: July 2009
Junior Member
Jose Carlos escribió:
> exquisitus escribió:
>> Hi,
>>
>> I did the same thing recently (CNF + EMF + GMF) (successfully). If you
>> register a transactional editing domain, common to all views and
>> editors, then synchronization comes for free.
>>
>> regards.
>>
>> Jose Carlos a écrit :
>>> Hi all, I'm trying to develop a model navigator for a GMF diagram. I
>>> would like obtain a synchronization between EMF model instantiate by
>>> GMF diagram editor and my navigator. To obtain that, I'm using
>>> Common Navigator Framework and I'm implementing my own content and
>>> label providers.
>>> The way I've thought consists in get the GMF editing domain, obtain
>>> the resource set opened by the GMF graphical editor and finally,
>>> synchronize with it the navigator, but I don't know how to do this
>>> operation.
>>>
>>> Could someone help me or give the clues to perform the mentioned
>>> operation??
>>>
>>> Thanks to all
> That's exactly I've done and it's work fine. Thank you very much to all
> for the responses
Hi,

I've got another problem. Well, I want to synchronize the project
navigator with the resourceSet given by the EditingDomain when the file
is opened and when I close the file I would like to show the model tree
as usually in default explorer, i.e., using a different resourceSet
because the editingDomain resourceSet is only available when the file in
opened. Could you tell me the way to do that?? I've tried some things
but all reported me unexpected results.

Regards
Previous Topic:Headless template expansion
Next Topic:Problem with org.eclipse.gmf.runtime.draw2d.ui v1.1.3 class TextUtilitiesEx
Goto Forum:
  


Current Time: Sat Nov 25 09:42:53 GMT 2017

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

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