Link property with 4 field...i don't set all [URGENT] [message #490174] |
Wed, 07 October 2009 16:23 |
marco 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 #490188 is a reply to message #490174] |
Wed, 07 October 2009 17:42 |
Dimitrios Kolovos Messages: 1776 Registered: July 2009 |
Senior Member |
|
|
Hi Marco,
Why do you need to capture both the "from" InteractionPoint and the
"fromContext" Component? As far as I can see, this is redundant as
"fromContext" can be actually calculated (is the eContainer() or "from")
- and similarly for "to" and "toContext".
Cheers,
Dimitris
marco wrote:
> @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
--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
|
|
|
|
|
Re: Link property with 4 field...i don't set all [URGENT] [message #581580 is a reply to message #490174] |
Wed, 07 October 2009 17:42 |
Dimitrios Kolovos Messages: 1776 Registered: July 2009 |
Senior Member |
|
|
Hi Marco,
Why do you need to capture both the "from" InteractionPoint and the
"fromContext" Component? As far as I can see, this is redundant as
"fromContext" can be actually calculated (is the eContainer() or "from")
- and similarly for "to" and "toContext".
Cheers,
Dimitris
marco wrote:
> @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
--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04991 seconds