[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gmf-dev] goal: one GMF editor for two models
- From: Gregory Jansen <count0@xxxxxxxxxxxxx>
- Date: Thu, 26 Apr 2012 11:57:16 -0400
- Delivered-to: firstname.lastname@example.org
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1
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
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?