Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Model navigator
Model navigator [message #227245] Thu, 23 April 2009 11:33 Go to next message
Eclipse UserFriend
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 13:01 Go to previous messageGo to next message
Eclipse UserFriend
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 16:15 Go to previous messageGo to next message
Eclipse UserFriend
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 03:02 Go to previous messageGo to next message
Eclipse UserFriend
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 08:32 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 04:59:09 EDT 2025

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

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

Back to the top