Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Link property with 4 field...i don't set all [URGENT]
icon9.gif  Link property with 4 field...i don't set all [URGENT] [message #490171] Wed, 07 October 2009 16:20 Go to next message
marco  is currently offline marco Friend
Messages: 82
Registered: September 2009
Member
@namespace(uri="http://dually/a0", prefix="A0")

@gmf(foo="bar")
package A0;

@gmf.link(source="from",target="to")
abstract class Link extends Element{
ref InteractionPoint[1] from;
ref InteractionPoint[1] to;
ref Component fromContext;
ref Component toContext;
}

@gmf.node(figure="rectangle",label="name")
abstract class Component extends Element{
@gmf.affixed(foo="bar")
val InteractionPoint[*] points;
}


@gmf.node(figure="rectangle", size="20,20", label="name",
label.placement="external", label.icon="false")
class InteractionPoint extends Element{
}

class SAcomponent extends Component {
}

@gmf.node(figure="rounded",label="name")
class SAconnector extends Component {
}

@gmf.link(target.decoration="rhomb",source.decoration="rhomb ")
class SABinding extends Link {
}

class Element {
attr String name;
attr String description;
}

@gmf.diagram (foo="bar")
class A0Spec extends Element {
val Element[*] elements;
}

this is my metamodel.

I have the following problem.
I can not set the fromContext and toContext when I create a link.

I have a component to a InteractionPoint B (posted on the board).
I have another component C with a InteractionPoint D (posted on the board).

Once you create the link from B to D I have the following properties.
from = B
fromContext = A
to = D
toContext = C

told me to use feuture sequence initializer but I can not understand what to do.
I think the problem there is because the link is between two InteractionPoint and I need to go back to the component that has on board (poster) the InteractionPoint


please can someone help me?
I realize the editor for my thesis and I was a bit late.

thank
marco
Re: Link property with 4 field...i don't set all [URGENT] [message #490655 is a reply to message #490171] Fri, 09 October 2009 15:09 Go to previous messageGo to next message
Alex Shatalin is currently offline Alex ShatalinFriend
Messages: 141
Registered: July 2009
Senior Member
Hello marco,

I suggest you making following references derived:

> ref Component fromContext;
> ref Component toContext;


and implementing corresponding getters in EMF-generated java code.
As a result you'll always have proper value returned from getFromContext()
java method. Even then you reroute link from one InteractionPoint to another
one visually...

-----------------
Alex Shatalin
Re: Link property with 4 field...i don't set all [URGENT] [message #490775 is a reply to message #490655] Sat, 10 October 2009 15:02 Go to previous messageGo to next message
marco  is currently offline marco Friend
Messages: 82
Registered: September 2009
Member
hi alex

please can you send me your email?
i don't undestand your suggestions

Can you explain better what I should do.

this is my email
az2004@hotmail.it

regards
marco
Re: Link property with 4 field...i don't set all [URGENT] [message #490782 is a reply to message #490775] Sat, 10 October 2009 16:01 Go to previous message
Alex Shatalin is currently offline Alex ShatalinFriend
Messages: 141
Registered: July 2009
Senior Member
Hello marco,

Well, I suggest you reading EMF documentation in order get basic understanding
of "derived" references from there..
If you need some commercial support for your GMF-based project (or even would
like to outsource this project) - i do know a company doing this kind of
business, so drop me a message to shatalin at gmail dot com and I'll send
you contact of the appropriate person.

-----------------
Alex Shatalin
Previous Topic:adding pins to a figure
Next Topic:SVG Format.
Goto Forum:
  


Current Time: Fri Apr 19 23:36:55 GMT 2024

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

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

Back to the top