Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Obtain EditPart from View model od domain model element
Obtain EditPart from View model od domain model element [message #480482] Mon, 17 August 2009 11:12 Go to next message
Eclipse UserFriend
Originally posted by: ymanko.yahoo.com

Hello,

I couldn't find answer nowhere in documentation, so I must post this
(probably trivial) question here:

Can I and how can I obtain EditPart if I have just instance element of my
domain model or its View? If this is possible, it is probably done using
some methods that uses reflection, but couldn't find them.

Thanks for your time and help,

Yegor Manko
Re: Obtain EditPart from View model od domain model element [message #480492 is a reply to message #480482] Mon, 17 August 2009 11:54 Go to previous messageGo to next message
Mariot Chauvin is currently offline Mariot ChauvinFriend
Messages: 174
Registered: July 2009
Senior Member
Hi Yegor,

As there is neither direct reference from domain model to view nor from view to edit part you should use a cross referencer.
Have a look at http://my.safaribooksonline.com/9780321331885/ch16lev1sec3 and
http://help.eclipse.org/ganymede/topic/org.eclipse.gmf.doc/r eference/api/runtime/org/eclipse/gmf/runtime/emf/core/util/C rossReferenceAdapter.html.

Regards,

Mariot


Yegor Manko a écrit :
> Hello,
>
> I couldn't find answer nowhere in documentation, so I must post this
> (probably trivial) question here:
>
> Can I and how can I obtain EditPart if I have just instance element of
> my domain model or its View? If this is possible, it is probably done
> using some methods that uses reflection, but couldn't find them.
>
> Thanks for your time and help,
>
> Yegor Manko
>
Re: Obtain EditPart from View model od domain model element [message #480546 is a reply to message #480492] Mon, 17 August 2009 15:18 Go to previous message
Eclipse UserFriend
Originally posted by: ymanko.yahoo.com

Thank you for your response.

Just small follow-up:

Do I need to subclass this class CrossReferenceAdapter, reimplement some
of its methods to react to changes and attach it to each view? Like:

view.eAdapters().add(new XXXCrossReferenceAdapter())

Or you thought of some other way of utilizing this class?

Thank you,
Yegor Manko
Previous Topic:Child references
Next Topic:How to display new feature label in existing diagrams?
Goto Forum:
  


Current Time: Thu Apr 25 07:08:55 GMT 2024

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

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

Back to the top