Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » 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 #490174] Wed, 07 October 2009 16:23 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 #490188 is a reply to message #490174] Wed, 07 October 2009 17:42 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
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 #490732 is a reply to message #490188] Fri, 09 October 2009 21:22 Go to previous messageGo to next message
marco  is currently offline marco Friend
Messages: 82
Registered: September 2009
Member
hi

because in the metamodel whole may have some SAcomponent inside of other elements and then I need to know what they are.


I tried to use feature sequence initializer but I failed.This was an attempt.

feature sequence initializer<SAbinding(fromContext,toContext)>
reference new element spec <fromContenxt:= new Compoennt[1]>
feature sequence initializer<new SAcomponent(name)>
reference new element spec <name:= new EString[0]>

reference new element spec <toContenxt:= new Compoennt[1]>
feature sequence initializer<new SAcomponent(name)>
reference new element spec <name:= new EString[0]>

I got this:
fromContext: SAcomponent
toContext: SAcomponent

you know tell me how can I initialize it to give me the name of the component that contains the interaction point?
how to draw the Econtainer?

thanks marco

Re: Link property with 4 field...i don't set all [URGENT] [message #490744 is a reply to message #490732] Sat, 10 October 2009 01:23 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Marco,

You don't need to draw the eContainer() - this is a method of EObject
that returns the container of the given object. I suggest you leave this
out for now and worry about it later if/when you need to process your
models.

Cheers,
Dimitris

marco wrote:
> hi
>
> because in the metamodel whole may have some SAcomponent inside of other
> elements and then I need to know what they are.
>
>
> I tried to use feature sequence initializer but I failed.This was an
> attempt.
>
> feature sequence initializer<SAbinding(fromContext,toContext)>
> reference new element spec <fromContenxt:= new Compoennt[1]>
> feature sequence initializer<new SAcomponent(name)>
> reference new element spec <name:= new EString[0]>
>
> reference new element spec <toContenxt:= new Compoennt[1]>
> feature sequence initializer<new SAcomponent(name)>
> reference new element spec <name:= new EString[0]>
>
> I got this:
> fromContext: SAcomponent
> toContext: SAcomponent
>
> you know tell me how can I initialize it to give me the name of the
> component that contains the interaction point?
> how to draw the Econtainer?
>
> thanks 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 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
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 #581821 is a reply to message #490188] Fri, 09 October 2009 21:22 Go to previous message
marco  is currently offline marco Friend
Messages: 82
Registered: September 2009
Member
hi

because in the metamodel whole may have some SAcomponent inside of other elements and then I need to know what they are.


I tried to use feature sequence initializer but I failed.This was an attempt.

feature sequence initializer<SAbinding(fromContext,toContext)>
reference new element spec <fromContenxt:= new Compoennt[1]>
feature sequence initializer<new SAcomponent(name)>
reference new element spec <name:= new EString[0]>

reference new element spec <toContenxt:= new Compoennt[1]>
feature sequence initializer<new SAcomponent(name)>
reference new element spec <name:= new EString[0]>

I got this:
fromContext: SAcomponent
toContext: SAcomponent

you know tell me how can I initialize it to give me the name of the component that contains the interaction point?
how to draw the Econtainer?

thanks marco
Re: Link property with 4 field...i don't set all [URGENT] [message #581870 is a reply to message #581821] Sat, 10 October 2009 01:23 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Marco,

You don't need to draw the eContainer() - this is a method of EObject
that returns the container of the given object. I suggest you leave this
out for now and worry about it later if/when you need to process your
models.

Cheers,
Dimitris

marco wrote:
> hi
>
> because in the metamodel whole may have some SAcomponent inside of other
> elements and then I need to know what they are.
>
>
> I tried to use feature sequence initializer but I failed.This was an
> attempt.
>
> feature sequence initializer<SAbinding(fromContext,toContext)>
> reference new element spec <fromContenxt:= new Compoennt[1]>
> feature sequence initializer<new SAcomponent(name)>
> reference new element spec <name:= new EString[0]>
>
> reference new element spec <toContenxt:= new Compoennt[1]>
> feature sequence initializer<new SAcomponent(name)>
> reference new element spec <name:= new EString[0]>
>
> I got this:
> fromContext: SAcomponent
> toContext: SAcomponent
>
> you know tell me how can I initialize it to give me the name of the
> component that contains the interaction point?
> how to draw the Econtainer?
>
> thanks marco
>
>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Previous Topic:Visibility of link when i click group element in the diagram
Next Topic:Latest SVN Source?
Goto Forum:
  


Current Time: Fri Mar 29 14:48:57 GMT 2024

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

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

Back to the top