[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [gmf-dev] goal: one GMF editor for two models

It is a model that represents mappings from tabular data to XML element/attributes.  One top-level model is a specific mapping of data, a crosswalk. It shows the data columns on one side and let's the user drop widgets that represent XML on the canvas and then link them with data, configure default values, etc.. The other model is dictionary, which is a set of mappings, except in the dictionary there is no data. Instead the XML widgets in each mapping are connected to "ports". Users will reuse such mapping later, linking these input ports to their data.  (In effect the dictionary is a set of encapsulated mappings.)

I've been doing some tweaks to the figures, making ports responsive to their connections, overriding certain pop-up behaviors and handling the impact of nested XML child references on request/command edit policy. To be clear, the model does not deal in the specifics of any XML schema, but it does get set up with an EClass that is the output type.

For the moment I'm exploring the option (2) below. I can live without the pop-up menus. I was thinking that I could have some custom save behavior that would strip out the canvas node. I haven't delved into custom templates yet, but it may be time for me to pick up some of that.

A diagram is attached.

thanks for your help,
Greg

On 04/30/2012 07:47 AM, Michael Golubev wrote:
Hello, 

Sorry, I am not sure I understand your use case, may be the emfatic-like sketch of both ecore's would help here. I am trying to understand how much commons do your crosswalk and dictionary elements share. 

Without looking at the details, I may only say that the intended way of using GMF-T would be to extract the customizations into the custom templates and then generate the customized pieces into the both diagrams. 

What kind of customizations we are talking about? 

Regards, 
-- 

Michael "Borlander" Golubev
Eclipse Committer (GMF, UML2Tools)
at Montages Think Tank, 
Prague, Czech Republic
1165/1 Dvorecka, 14700, Prague-4 Podoli

tek: +420 602 483 463



On Thu, Apr 26, 2012 at 5:57 PM, Gregory Jansen <count0@xxxxxxxxxxxxx> wrote:
Hi there,

I am building some visual metadata tools for librarians and digital
curation. I have a model for mapping tabular data to XML (crosswalk
model). I also have a model in the same package for defining data
dictionaries, i.e. common mappings (dictionary model). The GMF code
for the crosswalk editor is generated and tweaked with various helpers
and advice. Instead of pursuing a parallel track and generating a
whole separate editor for the dictionary model and duplicating all
those customizations, which are largely identical, I'd really like to
use the same editor for both..

A couple strategies come to mind:

1) Tried to map the canvas to a super-type.  This doesn't work b/c the
top-level nodes have to be features in the canvas domain model or it's
super-types.

2) Make a type to contain 1 of either dictionary and crosswalk. Then create a figure that grabs the whole canvas for the single top-level node. I'm pretty sure this will mess up the pop-up balloons.

3) Same as (2), but don't grab the whole canvas. Instead place single top-level node somewhere on the canvas, maybe as a label. Then find a way to use the canvas as a content pane or place children outside the parent. Any way to do this?

Is there a better way?
many thanks,
Greg

_______________________________________________
gmf-dev mailing list
gmf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/gmf-dev






_______________________________________________
gmf-dev mailing list
gmf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/gmf-dev

Attachment: crosswalk.png
Description: PNG image