[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmf] Parameterized creation tool?
|
- From: Andreas Mayer <an.ma@xxxxxx>
- Date: Fri, 12 Dec 2008 19:18:19 +0100
- Newsgroups: eclipse.modeling.gmf
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.18 (Windows/20081105)
Hello,
I have a model element (let's say Rectangle), which can be parameterized
via an enum feature (let's say color : enum { RED, GREEN, YELLOW }). I
can already create new rectangles via the palette and change the color
feature in the properties tab. However, I would like to have additional
creation tools in the palette, which directly create a red or green
rectangle.
I've already searched the newsgroup for a solution and found [1]. As far
as I can see, for each of the colors I would have to define an
additional top level node in my gmfmodel, which includes a type model
facet with an appropriate feature initializer. That's a lot of
unnecessary duplication in the specification and the generated code.
Is there a more elegant way to achieve this?
[1] How to add a parameterized tool entry?
news://news.eclipse.org:119/f9pknq$mb7$1@xxxxxxxxxxxxxxxxx
--
Andreas