Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Restrictions on links
Restrictions on links [message #157068] Wed, 24 October 2007 21:08 Go to next message
Eclipse UserFriend
Originally posted by: renee.steiner.intervoice.com

Hi, All!

I have a node which has 3 possible link instances outgoing. These link
instances are all subclasses of a specific link type.

For example, I have a generic "transition" link and the 3 subclassed links
are "yes", "no", and "maybe". The generic transition link is defined as
0..* and the schema requires that all transitions be of the name
"transition" and have an attribute "type" that describes the subclass. I
want to be able to only allow one of each of the subclassed links to come
out of the node.

How can I guarantee that I only allow one "yes", one "no", and one
"maybe"? To elaborate, I would like to "grey out" yes (in the hanger pop
up menu) if the yes transition type has already been placed on the canvas.

Thanks in advance!
Re: Restrictions on links [message #157076 is a reply to message #157068] Wed, 24 October 2007 22:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jan.herriger.gmx.de

Hi Renee,

defining link constraints (source end, language=java) in the mapping
model would be one starting point. After generation, edit generated
JavaConstraints methods in xxxBaseItemSemanticEditPolicy to implement
your constraints.

CrossReferenceAdapter would be of help to resolve transitions connected
to your node, if the relations between transitions and nodes are
unidirectional.

Renee Steiner's schrieb:
> Hi, All!
>
> I have a node which has 3 possible link instances outgoing. These link
> instances are all subclasses of a specific link type.
> For example, I have a generic "transition" link and the 3 subclassed
> links are "yes", "no", and "maybe". The generic transition link is
> defined as 0..* and the schema requires that all transitions be of the
> name "transition" and have an attribute "type" that describes the
> subclass. I want to be able to only allow one of each of the subclassed
> links to come out of the node.
>
> How can I guarantee that I only allow one "yes", one "no", and one
> "maybe"? To elaborate, I would like to "grey out" yes (in the hanger
> pop up menu) if the yes transition type has already been placed on the
> canvas.
>
> Thanks in advance!
>
Re: Restrictions on links [message #157167 is a reply to message #157076] Thu, 25 October 2007 21:30 Go to previous message
Eclipse UserFriend
Originally posted by: renee.steiner.intervoice.com

Thanks so much, Jan! ;)
Previous Topic:Diagram Label as a source/target of a link?
Next Topic:cascade delete in emf/gmf
Goto Forum:
  


Current Time: Mon Jul 22 05:25:52 GMT 2024

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

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

Back to the top