Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Adding custom shapes without an Inner Class
Adding custom shapes without an Inner Class [message #159633] Mon, 12 November 2007 12:27 Go to next message
Eclipse UserFriend
Originally posted by: mlooise.planet.nl

Hello,



I'm experimenting with the GMF framework to build a requirements-editor, as
a part of my master-project. At the moment, I'm figuring out how to change
the default rectangular shapes in the editor.



I've taken a close look at the taipan example, and how they implement their
ship-shapes. And I've actually been able to create such a custom shape for
my own editor. My problem is however that the diagram-generator still
generates an inner class which extends my own shape-class. This is caused by
the fact that the .gmfgen file contains a "Inner-Class viewmap" instead of a
"figure viewmap" (like in the taipan-example). This Inner-class viewmap is
however generated from the gmfmap, in which I declared a custom figure,
referring to my customshape class. In this way, the gmfgen result is that it
directly contains the code of that customshape class. I would like it just
to refer to my own customshape class, and not embed any Inner-classes in the
edit.part files.



I was wondering if there is a way to instruct in the gmfmap, to create a
figure viewmap instead of a inner-class viewmap? I havn't been able to find
it yet, and I would appreciate any help to find it. Until now, I've been
adjusting my gmfgen model, but this just feels wrong, and not in the spirit
of true MDA .



Thanks in advance,



Regards



Martin Looise
Re: Adding custom shapes without an Inner Class [message #159651 is a reply to message #159633] Mon, 12 November 2007 12:48 Go to previous messageGo to next message
Richard Gronback is currently offline Richard GronbackFriend
Messages: 605
Registered: July 2009
Senior Member
You can right-click your .gmfgraph model and select 'Generate Figures
Plugin...'

This will create a new plug-in with your figures generated, along with a
mirrored.gmfgraph model you can reference in your mapping model. This will
separate your figures and edit parts, as it seems you're interested in
doing.

- Rich


On 11/12/07 7:27 AM, in article fh9grm$d2n$1@build.eclipse.org, "Martin
Looise" <mlooise@planet.nl> wrote:

> Hello,
>
>
>
> I'm experimenting with the GMF framework to build a requirements-editor, as
> a part of my master-project. At the moment, I'm figuring out how to change
> the default rectangular shapes in the editor.
>
>
>
> I've taken a close look at the taipan example, and how they implement their
> ship-shapes. And I've actually been able to create such a custom shape for
> my own editor. My problem is however that the diagram-generator still
> generates an inner class which extends my own shape-class. This is caused by
> the fact that the .gmfgen file contains a "Inner-Class viewmap" instead of a
> "figure viewmap" (like in the taipan-example). This Inner-class viewmap is
> however generated from the gmfmap, in which I declared a custom figure,
> referring to my customshape class. In this way, the gmfgen result is that it
> directly contains the code of that customshape class. I would like it just
> to refer to my own customshape class, and not embed any Inner-classes in the
> edit.part files.
>
>
>
> I was wondering if there is a way to instruct in the gmfmap, to create a
> figure viewmap instead of a inner-class viewmap? I havn't been able to find
> it yet, and I would appreciate any help to find it. Until now, I've been
> adjusting my gmfgen model, but this just feels wrong, and not in the spirit
> of true MDA .
>
>
>
> Thanks in advance,
>
>
>
> Regards
>
>
>
> Martin Looise
>
>
>
>
Re: Adding custom shapes without an Inner Class [message #160175 is a reply to message #159651] Wed, 14 November 2007 09:49 Go to previous message
Eclipse UserFriend
Originally posted by: mlooise.planet.nl

Hi Richard,

Thanks for the input. I didn't know this option yet, and tried it. It's not
my goal to create custom shapes for every element, but at least it gives me
some insight in how figures in external classes are configured in the
gmfgrafh (through the mirrored.gmfgraph). It seems that if you use a
figure-accessor, instead of a label, inside a custom figure, it treat it as
a Figure-viewmap instead of a inner class, in the gmfgen ... and that's
where I was searching for ...

So thank you for improving my knowledge :D

Regards,

Martin

"Richard Gronback" <richard.gronback@borland.com> schreef in bericht
news:C35DB5DB.1F566%richard.gronback@borland.com...
> You can right-click your .gmfgraph model and select 'Generate Figures
> Plugin...'
>
> This will create a new plug-in with your figures generated, along with a
> mirrored.gmfgraph model you can reference in your mapping model. This
> will
> separate your figures and edit parts, as it seems you're interested in
> doing.
>
> - Rich
>
>
> On 11/12/07 7:27 AM, in article fh9grm$d2n$1@build.eclipse.org, "Martin
> Looise" <mlooise@planet.nl> wrote:
>
>> Hello,
>>
>>
>>
>> I'm experimenting with the GMF framework to build a requirements-editor,
>> as
>> a part of my master-project. At the moment, I'm figuring out how to
>> change
>> the default rectangular shapes in the editor.
>>
>>
>>
>> I've taken a close look at the taipan example, and how they implement
>> their
>> ship-shapes. And I've actually been able to create such a custom shape
>> for
>> my own editor. My problem is however that the diagram-generator still
>> generates an inner class which extends my own shape-class. This is caused
>> by
>> the fact that the .gmfgen file contains a "Inner-Class viewmap" instead
>> of a
>> "figure viewmap" (like in the taipan-example). This Inner-class viewmap
>> is
>> however generated from the gmfmap, in which I declared a custom figure,
>> referring to my customshape class. In this way, the gmfgen result is that
>> it
>> directly contains the code of that customshape class. I would like it
>> just
>> to refer to my own customshape class, and not embed any Inner-classes in
>> the
>> edit.part files.
>>
>>
>>
>> I was wondering if there is a way to instruct in the gmfmap, to create a
>> figure viewmap instead of a inner-class viewmap? I havn't been able to
>> find
>> it yet, and I would appreciate any help to find it. Until now, I've been
>> adjusting my gmfgen model, but this just feels wrong, and not in the
>> spirit
>> of true MDA .
>>
>>
>>
>> Thanks in advance,
>>
>>
>>
>> Regards
>>
>>
>>
>> Martin Looise
>>
>>
>>
>>
>
Previous Topic:Relationship between Resourceset and EditingDomain
Next Topic:Problem with viewing of an element
Goto Forum:
  


Current Time: Thu Mar 28 11:05:29 GMT 2024

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

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

Back to the top