Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Dynamic Extensions in GMF ?
Dynamic Extensions in GMF ? [message #69621] Wed, 25 October 2006 21:07 Go to next message
Eclipse UserFriend
Originally posted by: rbbnjmn.yahoo.com

Hi, any assistence very much appreciated.

A snipit of my emf scheme is: EmfGenericType -hasAn- EmfGenericBean

I have an emf type "EmfGenericType " that is essentially a proxy for an
unknown
number of extensions. The extensions are populated by extending a known
plugin
extension point.

Its pretty easy to dynamically add tools to the palette for each of the
plugin extension
contributors. Each tool adds a different flavored instance of
EmfGenericType to the graph.
For now I'm binding a wrapper (ExternalProvider) to each of the palette
tools such that on
creation the EmfGenericTypeEditPart can know what its really supposed to be,
ie. it can
get the related ExternalProvider instance from the tool that created it.

At this point I have a problem. I need to be able to create an instance of
EmfGenericBean
from ExternalProvider and set the relation for it on the EmfGenericType.
But I'm inside
of the editPart!

I don't see how I can get a hold of the actual EmfGenericType instance from
within the
EmfGenericTypeEditPart. (Probably I am not supposed to do this this way.)

How can I get the EmfGenericBean bits set in the EmfGenericType ?

Thanks!

Roy
Re: Dynamic Extensions in GMF ? [message #69871 is a reply to message #69621] Thu, 26 October 2006 06:29 Go to previous message
Eclipse UserFriend
Hello rbbnjmn,

Please take a look on generated ???ItemSemanticEditPolicy - domain model
elements will be created inside a commands returned by this edit policy.
Looks like you should patch EmfGenericTypeItemSemanticEditPolicy.CreateEmfGenericBean_?? ?Command
or (if EmfGenericBean is inside a compartment) EmfGenericType<CompartmentName>ItemSemanticEditPolicy.CreateEmfGenericBean_???Command

-----------------
Alex Shatalin
Previous Topic:Extending diagram model
Next Topic:Which version supports affixed side?
Goto Forum:
  


Current Time: Fri Apr 25 01:44:23 EDT 2025

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

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

Back to the top