Skip to main content



      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 07: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 07:54 Go to previous messageGo to next message
Eclipse UserFriend
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 11: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: Sun Jul 27 22:55:11 EDT 2025

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

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

Back to the top