Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Rendering a shortcut element that cannot be contained in the root element
Rendering a shortcut element that cannot be contained in the root element [message #206680] Wed, 24 September 2008 04:43 Go to next message
Jevon  is currently offline Jevon Friend
Messages: 164
Registered: July 2009
Senior Member
Hi,

Is there any way in GMF/etc to render a shortcut element that cannot
currently be contained in the diagram editor?

e.g. a model like so:
- Root
- contains 0..* pages
- each page has a relationship to a User, rendered with a link

Now I would like the Root diagram editor to display the Page nodes with
a link to the User, which is rendered as a shortcut. But as far as I
understand, you can only render shortcuts in a Root diagram editor if
the element can actually be contained in the Root itself.

Is there an easy way to achieve this functionality or is it expected?

I think another solution is to add the containment of users to the Ecore
model but not actually add the tooling support to create new User
elements, so they can only be dragged on as User shortcuts.

Cheers,

Jevon
Re: Rendering a shortcut element that cannot be contained in the rootelement [message #206705 is a reply to message #206680] Wed, 24 September 2008 09:04 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Jevon,

> Is there an easy way to achieve this functionality or is it expected?
You can try creating NodeMapping for User without any containment referencec
to it + ignore all warnings. Not sure about hte result - just a point to
start from.
Well, we definitely should modify shortcuts handling functionality to support
this use case.

> I think another solution is to add the containment of users to the
> Ecore model but not actually add the tooling support to create new
> User elements, so they can only be dragged on as User shortcuts.
Yes.

-----------------
Alex Shatalin
Re: Rendering a shortcut element that cannot be contained in the rootelement [message #206939 is a reply to message #206705] Wed, 24 September 2008 22:32 Go to previous messageGo to next message
Jevon  is currently offline Jevon Friend
Messages: 164
Registered: July 2009
Senior Member
Hi Alex,

Alex Shatalin wrote:
>> Is there an easy way to achieve this functionality or is it expected?
> You can try creating NodeMapping for User without any containment
> referencec to it + ignore all warnings. Not sure about hte result - just
> a point to start from.

I had a go at adding a fake Top Level Node with a NodeMapping to the
..gmfmap, but I couldn't set the containment feature (obviously) or add
the diagram node or tool properties. The .gmfgen generation threw some
validation errors which I ignored, but wouldn't let me continue the
wizard through to generating a .gmfgen, giving a "Errors while creating
generator model" message with no stack trace or error log.

> Well, we definitely should modify shortcuts handling functionality to
> support this use case.

Should this be added as a bug?

Cheers
Jevon
Re: Rendering a shortcut element that cannot be contained in therootelement [message #206985 is a reply to message #206939] Thu, 25 September 2008 09:06 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Jevon,

> .gmfmap, but I couldn't set the containment feature (obviously) or add
> the diagram node or tool properties. The .gmfgen generation threw some
I think you need diagram node. This element describesz is how corresponding
diagram node will be visualized.. You can add some simple viewmap this time
to just prove it will work.

> wizard through to generating a .gmfgen, giving a "Errors while
> creating generator model" message with no stack trace or error log.
So, no messages even in .metadata/.log file?

>> Well, we definitely should modify shortcuts handling functionality to
>> support this use case.
> Should this be added as a bug?
Well, I can not find any requests describing this situation, so yes please
file one.

-----------------
Alex Shatalin
Previous Topic:Diagram opens in a dirty state
Next Topic:Re: Modification on the diagram
Goto Forum:
  


Current Time: Thu Jan 28 16:38:44 GMT 2021

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

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

Back to the top