Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Note-like labels for connections
Note-like labels for connections [message #124964] Wed, 09 May 2007 09:20 Go to next message
Eclipse UserFriend
Originally posted by: nospam74.gmx.net

Hallo all!

In my metamodel each entity has several attributes. For those
represented as connection I would like to display the attribute value
in a labeled box connected with the connection by a line (just like "Add
Note" from the context menu). But I have no clue, how can I create
several graphical objects at one time.

How can I do that?
Should I add elements, that I need for graphical representation, in my
ECore model?

Greets
Andrej
Re: Note-like labels for connections [message #125081 is a reply to message #124964] Thu, 10 May 2007 04:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

Could you please clarify your setup? Link could be based on EClass or
EReference - not attribute; for EReference based link you can't add
attribute-based labels since EReference has no EAttributes.

Andrej S wrote:
> Hallo all!
>
> In my metamodel each entity has several attributes. For those
> represented as connection I would like to display the attribute value
> in a labeled box connected with the connection by a line (just like "Add
> Note" from the context menu). But I have no clue, how can I create
> several graphical objects at one time.
>
> How can I do that?
> Should I add elements, that I need for graphical representation, in my
> ECore model?
>
> Greets
> Andrej
Re: Note-like labels for connections [message #125235 is a reply to message #125081] Thu, 10 May 2007 05:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nospam74.gmx.net

Hi, Dmitry!

My attribute is a EClass.

ecore snip:
....
<eClassifiers xsi:type="ecore:EClass" name="AttrValue">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="Value"
lowerBound="1" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="parent"
lowerBound="1" eType="#//model/Edge"
eOpposite="#//model/Edge/containsAttrValues"/>
</eClassifiers>
....

I want to attach AttrValue to an Edge (defined as a EClass), so that it
looks like

edge1
-------+-------
!
!
+---+---+
! attr1 !
+-------+

Regards
Andrej

Dmitry Stadnik wrote:
> Could you please clarify your setup? Link could be based on EClass or
> EReference - not attribute; for EReference based link you can't add
> attribute-based labels since EReference has no EAttributes.
>
> Andrej S wrote:
>> Hallo all!
>>
>> In my metamodel each entity has several attributes. For those
>> represented as connection I would like to display the attribute value
>> in a labeled box connected with the connection by a line (just like "Add
>> Note" from the context menu). But I have no clue, how can I create
>> several graphical objects at one time.
>>
>> How can I do that?
>> Should I add elements, that I need for graphical representation, in my
>> ECore model?
>>
>> Greets
>> Andrej
Re: Note-like labels for connections [message #125361 is a reply to message #125235] Thu, 10 May 2007 07:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

Have you managed to get this:

edge1
---------------


+-------+
! attr1 !
+-------+


Andrej S wrote:
> Hi, Dmitry!
>
> My attribute is a EClass.
>
> ecore snip:
> ....
> <eClassifiers xsi:type="ecore:EClass" name="AttrValue">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="Value"
> lowerBound="1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> <eStructuralFeatures xsi:type="ecore:EReference" name="parent"
> lowerBound="1" eType="#//model/Edge"
> eOpposite="#//model/Edge/containsAttrValues"/>
> </eClassifiers>
> ....
>
> I want to attach AttrValue to an Edge (defined as a EClass), so that it
> looks like
>
> edge1
> -------+-------
> !
> !
> +---+---+
> ! attr1 !
> +-------+
>
> Regards
> Andrej
>
> Dmitry Stadnik wrote:
>> Could you please clarify your setup? Link could be based on EClass or
>> EReference - not attribute; for EReference based link you can't add
>> attribute-based labels since EReference has no EAttributes.
>>
>> Andrej S wrote:
>>> Hallo all!
>>>
>>> In my metamodel each entity has several attributes. For those
>>> represented as connection I would like to display the attribute value
>>> in a labeled box connected with the connection by a line (just like "Add
>>> Note" from the context menu). But I have no clue, how can I create
>>> several graphical objects at one time.
>>>
>>> How can I do that?
>>> Should I add elements, that I need for graphical representation, in my
>>> ECore model?
>>>
>>> Greets
>>> Andrej
Re: Note-like labels for connections [message #125434 is a reply to message #125361] Thu, 10 May 2007 08:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nospam74.gmx.net

No. I have no idea how I can map a attribute figure (composed of
rectangle and a label) to an edge.

Dmitry Stadnik wrote:
> Have you managed to get this:
>
> edge1
> ---------------
>
>
> +-------+
> ! attr1 !
> +-------+
>
>
> Andrej S wrote:
>> Hi, Dmitry!
>>
>> My attribute is a EClass.
>>
>> ecore snip:
>> ....
>> <eClassifiers xsi:type="ecore:EClass" name="AttrValue">
>> <eStructuralFeatures xsi:type="ecore:EAttribute" name="Value"
>> lowerBound="1" eType="ecore:EDataType
>> http://www.eclipse.org/emf/2002/Ecore#//EString"/>
>> <eStructuralFeatures xsi:type="ecore:EReference" name="parent"
>> lowerBound="1" eType="#//model/Edge"
>> eOpposite="#//model/Edge/containsAttrValues"/>
>> </eClassifiers>
>> ....
>>
>> I want to attach AttrValue to an Edge (defined as a EClass), so that it
>> looks like
>>
>> edge1
>> -------+-------
>> !
>> !
>> +---+---+
>> ! attr1 !
>> +-------+
>>
>> Regards
>> Andrej
>>
>> Dmitry Stadnik wrote:
>>> Could you please clarify your setup? Link could be based on EClass or
>>> EReference - not attribute; for EReference based link you can't add
>>> attribute-based labels since EReference has no EAttributes.
>>>
>>> Andrej S wrote:
>>>> Hallo all!
>>>>
>>>> In my metamodel each entity has several attributes. For those
>>>> represented as connection I would like to display the attribute value
>>>> in a labeled box connected with the connection by a line (just like
>>>> "Add
>>>> Note" from the context menu). But I have no clue, how can I create
>>>> several graphical objects at one time.
>>>>
>>>> How can I do that?
>>>> Should I add elements, that I need for graphical representation, in my
>>>> ECore model?
>>>>
>>>> Greets
>>>> Andrej
Re: Note-like labels for connections [message #125458 is a reply to message #125434] Thu, 10 May 2007 08:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

Have a look at TaiPan sample, Route class. Route is mapped to reliable
and unreliable links each with two labels.

Andrej S wrote:
> No. I have no idea how I can map a attribute figure (composed of
> rectangle and a label) to an edge.
>
> Dmitry Stadnik wrote:
>> Have you managed to get this:
>>
>> edge1
>> ---------------
>>
>>
>> +-------+
>> ! attr1 !
>> +-------+
>>
>>
>> Andrej S wrote:
>>> Hi, Dmitry!
>>>
>>> My attribute is a EClass.
>>>
>>> ecore snip:
>>> ....
>>> <eClassifiers xsi:type="ecore:EClass" name="AttrValue">
>>> <eStructuralFeatures xsi:type="ecore:EAttribute" name="Value"
>>> lowerBound="1" eType="ecore:EDataType
>>> http://www.eclipse.org/emf/2002/Ecore#//EString"/>
>>> <eStructuralFeatures xsi:type="ecore:EReference" name="parent"
>>> lowerBound="1" eType="#//model/Edge"
>>> eOpposite="#//model/Edge/containsAttrValues"/>
>>> </eClassifiers>
>>> ....
>>>
>>> I want to attach AttrValue to an Edge (defined as a EClass), so that it
>>> looks like
>>>
>>> edge1
>>> -------+-------
>>> !
>>> !
>>> +---+---+
>>> ! attr1 !
>>> +-------+
>>>
>>> Regards
>>> Andrej
>>>
>>> Dmitry Stadnik wrote:
>>>> Could you please clarify your setup? Link could be based on EClass or
>>>> EReference - not attribute; for EReference based link you can't add
>>>> attribute-based labels since EReference has no EAttributes.
>>>>
>>>> Andrej S wrote:
>>>>> Hallo all!
>>>>>
>>>>> In my metamodel each entity has several attributes. For those
>>>>> represented as connection I would like to display the attribute value
>>>>> in a labeled box connected with the connection by a line (just like
>>>>> "Add
>>>>> Note" from the context menu). But I have no clue, how can I create
>>>>> several graphical objects at one time.
>>>>>
>>>>> How can I do that?
>>>>> Should I add elements, that I need for graphical representation, in my
>>>>> ECore model?
>>>>>
>>>>> Greets
>>>>> Andrej
Re: Note-like labels for connections [message #126726 is a reply to message #125458] Wed, 16 May 2007 08:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nospam74.gmx.net

Hallo, Dmitry!

If I try to get a look on taipen.gmfmap I get a lot of errors, such

[...]
Feature 'viewMethod' not found.
(platform:/resource/org.eclipse.gmf.examples.taipan/models/t aipan.gmfmap,
17, 31)
Feature 'editMethod' not found.
(platform:/resource/org.eclipse.gmf.examples.taipan/models/t aipan.gmfmap,
17, 31)
[...]

I am using eclipse 3.3M6 and GMF 2.0M6

Regards
Andrej

Dmitry Stadnik wrote:
> Have a look at TaiPan sample, Route class. Route is mapped to reliable
> and unreliable links each with two labels.
>
> Andrej S wrote:
>> No. I have no idea how I can map a attribute figure (composed of
>> rectangle and a label) to an edge.
>>
>> Dmitry Stadnik wrote:
>>> Have you managed to get this:
>>>
>>> edge1
>>> ---------------
>>>
>>>
>>> +-------+
>>> ! attr1 !
>>> +-------+
>>>
>>>
>>> Andrej S wrote:
>>>> Hi, Dmitry!
>>>>
>>>> My attribute is a EClass.
>>>>
>>>> ecore snip:
>>>> ....
>>>> <eClassifiers xsi:type="ecore:EClass" name="AttrValue">
>>>> <eStructuralFeatures xsi:type="ecore:EAttribute" name="Value"
>>>> lowerBound="1" eType="ecore:EDataType
>>>> http://www.eclipse.org/emf/2002/Ecore#//EString"/>
>>>> <eStructuralFeatures xsi:type="ecore:EReference" name="parent"
>>>> lowerBound="1" eType="#//model/Edge"
>>>> eOpposite="#//model/Edge/containsAttrValues"/>
>>>> </eClassifiers>
>>>> ....
>>>>
>>>> I want to attach AttrValue to an Edge (defined as a EClass), so that it
>>>> looks like
>>>>
>>>> edge1
>>>> -------+-------
>>>> !
>>>> !
>>>> +---+---+
>>>> ! attr1 !
>>>> +-------+
>>>>
>>>> Regards
>>>> Andrej
Re: Note-like labels for connections [message #126738 is a reply to message #126726] Wed, 16 May 2007 08:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

So you should work with TaiPan sources when GMF M6 was built - not the HEAD.

Andrej S wrote:
> Hallo, Dmitry!
>
> If I try to get a look on taipen.gmfmap I get a lot of errors, such
>
> [...]
> Feature 'viewMethod' not found.
> (platform:/resource/org.eclipse.gmf.examples.taipan/models/t aipan.gmfmap,
> 17, 31)
> Feature 'editMethod' not found.
> (platform:/resource/org.eclipse.gmf.examples.taipan/models/t aipan.gmfmap,
> 17, 31)
> [...]
>
> I am using eclipse 3.3M6 and GMF 2.0M6
>
> Regards
> Andrej
>
> Dmitry Stadnik wrote:
>> Have a look at TaiPan sample, Route class. Route is mapped to reliable
>> and unreliable links each with two labels.
>>
>> Andrej S wrote:
>>> No. I have no idea how I can map a attribute figure (composed of
>>> rectangle and a label) to an edge.
>>>
>>> Dmitry Stadnik wrote:
>>>> Have you managed to get this:
>>>>
>>>> edge1
>>>> ---------------
>>>>
>>>>
>>>> +-------+
>>>> ! attr1 !
>>>> +-------+
>>>>
>>>>
>>>> Andrej S wrote:
>>>>> Hi, Dmitry!
>>>>>
>>>>> My attribute is a EClass.
>>>>>
>>>>> ecore snip:
>>>>> ....
>>>>> <eClassifiers xsi:type="ecore:EClass" name="AttrValue">
>>>>> <eStructuralFeatures xsi:type="ecore:EAttribute" name="Value"
>>>>> lowerBound="1" eType="ecore:EDataType
>>>>> http://www.eclipse.org/emf/2002/Ecore#//EString"/>
>>>>> <eStructuralFeatures xsi:type="ecore:EReference" name="parent"
>>>>> lowerBound="1" eType="#//model/Edge"
>>>>> eOpposite="#//model/Edge/containsAttrValues"/>
>>>>> </eClassifiers>
>>>>> ....
>>>>>
>>>>> I want to attach AttrValue to an Edge (defined as a EClass), so that it
>>>>> looks like
>>>>>
>>>>> edge1
>>>>> -------+-------
>>>>> !
>>>>> !
>>>>> +---+---+
>>>>> ! attr1 !
>>>>> +-------+
>>>>>
>>>>> Regards
>>>>> Andrej
>
Re: Note-like labels for connections [message #132957 is a reply to message #126738] Wed, 06 June 2007 04:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nospam74.gmx.net

Thanks for the hint!
But I have some problems:
1. It (I mean to put labels to an edge) works very well in example, but
I can not reply it in my application. Is there things to change
excepting mapping?

2. Labels in the example are statical mapped to the edge, but in my
model arbitrary number of elements (attribute figures) can belong to an
edge.

regards
Andrej

Dmitry Stadnik wrote:
> So you should work with TaiPan sources when GMF M6 was built - not the
> HEAD.
>
> Andrej S wrote:
>> Hallo, Dmitry!
>>
>> If I try to get a look on taipen.gmfmap I get a lot of errors, such
>>
>> [...]
>> Feature 'viewMethod' not found.
>> (platform:/resource/org.eclipse.gmf.examples.taipan/models/t aipan.gmfmap,
>> 17, 31)
>> Feature 'editMethod' not found.
>> (platform:/resource/org.eclipse.gmf.examples.taipan/models/t aipan.gmfmap,
>> 17, 31)
>> [...]
>>
>> I am using eclipse 3.3M6 and GMF 2.0M6
>>
>> Regards
>> Andrej
>>
>> Dmitry Stadnik wrote:
>>> Have a look at TaiPan sample, Route class. Route is mapped to reliable
>>> and unreliable links each with two labels.
>>>
>>> Andrej S wrote:
>>>> No. I have no idea how I can map a attribute figure (composed of
>>>> rectangle and a label) to an edge.
>>>>
>>>> Dmitry Stadnik wrote:
>>>>> Have you managed to get this:
>>>>>
>>>>> edge1
>>>>> ---------------
>>>>>
>>>>>
>>>>> +-------+
>>>>> ! attr1 !
>>>>> +-------+
>>>>>
>>>>>
>>>>> Andrej S wrote:
>>>>>> Hi, Dmitry!
>>>>>>
>>>>>> My attribute is a EClass.
>>>>>>
>>>>>> ecore snip:
>>>>>> ....
>>>>>> <eClassifiers xsi:type="ecore:EClass" name="AttrValue">
>>>>>> <eStructuralFeatures xsi:type="ecore:EAttribute" name="Value"
>>>>>> lowerBound="1" eType="ecore:EDataType
>>>>>> http://www.eclipse.org/emf/2002/Ecore#//EString"/>
>>>>>> <eStructuralFeatures xsi:type="ecore:EReference" name="parent"
>>>>>> lowerBound="1" eType="#//model/Edge"
>>>>>> eOpposite="#//model/Edge/containsAttrValues"/>
>>>>>> </eClassifiers>
>>>>>> ....
>>>>>>
>>>>>> I want to attach AttrValue to an Edge (defined as a EClass), so
>>>>>> that it
>>>>>> looks like
>>>>>>
>>>>>> edge1
>>>>>> -------+-------
>>>>>> !
>>>>>> !
>>>>>> +---+---+
>>>>>> ! attr1 !
>>>>>> +-------+
>>>>>>
>>>>>> Regards
>>>>>> Andrej
>>
Re: Note-like labels for connections [message #133019 is a reply to message #132957] Wed, 06 June 2007 05:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

1. There should be nothing special; just add the label mapping to the
link mapping.

2. In GMF models you can describe only a fixed number of labels that
will always be available. There are no means to create them or delete -
that's the reason to define them this way. For nodes you may define
child nodes with single label that will be presented as labels; see
'small items' in TaiPan sample.

Andrej S wrote:
> Thanks for the hint!
> But I have some problems:
> 1. It (I mean to put labels to an edge) works very well in example, but
> I can not reply it in my application. Is there things to change
> excepting mapping?
>
> 2. Labels in the example are statical mapped to the edge, but in my
> model arbitrary number of elements (attribute figures) can belong to an
> edge.
>
> regards
> Andrej
>
> Dmitry Stadnik wrote:
>> So you should work with TaiPan sources when GMF M6 was built - not the
>> HEAD.
>>
>> Andrej S wrote:
>>> Hallo, Dmitry!
>>>
>>> If I try to get a look on taipen.gmfmap I get a lot of errors, such
>>>
>>> [...]
>>> Feature 'viewMethod' not found.
>>> (platform:/resource/org.eclipse.gmf.examples.taipan/models/t aipan.gmfmap,
>>> 17, 31)
>>> Feature 'editMethod' not found.
>>> (platform:/resource/org.eclipse.gmf.examples.taipan/models/t aipan.gmfmap,
>>> 17, 31)
>>> [...]
>>>
>>> I am using eclipse 3.3M6 and GMF 2.0M6
>>>
>>> Regards
>>> Andrej
>>>
>>> Dmitry Stadnik wrote:
>>>> Have a look at TaiPan sample, Route class. Route is mapped to reliable
>>>> and unreliable links each with two labels.
>>>>
>>>> Andrej S wrote:
>>>>> No. I have no idea how I can map a attribute figure (composed of
>>>>> rectangle and a label) to an edge.
>>>>>
>>>>> Dmitry Stadnik wrote:
>>>>>> Have you managed to get this:
>>>>>>
>>>>>> edge1
>>>>>> ---------------
>>>>>>
>>>>>>
>>>>>> +-------+
>>>>>> ! attr1 !
>>>>>> +-------+
>>>>>>
>>>>>>
>>>>>> Andrej S wrote:
>>>>>>> Hi, Dmitry!
>>>>>>>
>>>>>>> My attribute is a EClass.
>>>>>>>
>>>>>>> ecore snip:
>>>>>>> ....
>>>>>>> <eClassifiers xsi:type="ecore:EClass" name="AttrValue">
>>>>>>> <eStructuralFeatures xsi:type="ecore:EAttribute" name="Value"
>>>>>>> lowerBound="1" eType="ecore:EDataType
>>>>>>> http://www.eclipse.org/emf/2002/Ecore#//EString"/>
>>>>>>> <eStructuralFeatures xsi:type="ecore:EReference" name="parent"
>>>>>>> lowerBound="1" eType="#//model/Edge"
>>>>>>> eOpposite="#//model/Edge/containsAttrValues"/>
>>>>>>> </eClassifiers>
>>>>>>> ....
>>>>>>>
>>>>>>> I want to attach AttrValue to an Edge (defined as a EClass), so
>>>>>>> that it
>>>>>>> looks like
>>>>>>>
>>>>>>> edge1
>>>>>>> -------+-------
>>>>>>> !
>>>>>>> !
>>>>>>> +---+---+
>>>>>>> ! attr1 !
>>>>>>> +-------+
>>>>>>>
>>>>>>> Regards
>>>>>>> Andrej
Re: Note-like labels for connections [message #133045 is a reply to message #133019] Wed, 06 June 2007 06:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nospam74.gmx.net

Dmitry Stadnik wrote:
> ...
> 2. In GMF models you can describe only a fixed number of labels that
> will always be available. There are no means to create them or delete -
> that's the reason to define them this way. For nodes you may define
> child nodes with single label that will be presented as labels; see
> 'small items' in TaiPan sample.

Is there no way to create several figures (not only labels) that belongs
through a reference or a containment relation to an edge, and connect
figures to the edge with a link?
Re: Note-like labels for connections [message #133083 is a reply to message #133045] Wed, 06 June 2007 08:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

I could recommend two strategies:

1. Define node instead of link; add two reference-based links to connect
the node with source and target.

2. Define additional node and link that connects the node with the
original link.

Andrej S wrote:
> Dmitry Stadnik wrote:
>> ...
>> 2. In GMF models you can describe only a fixed number of labels that
>> will always be available. There are no means to create them or delete -
>> that's the reason to define them this way. For nodes you may define
>> child nodes with single label that will be presented as labels; see
>> 'small items' in TaiPan sample.
>
> Is there no way to create several figures (not only labels) that belongs
> through a reference or a containment relation to an edge, and connect
> figures to the edge with a link?
Re: Note-like labels for connections [message #135556 is a reply to message #133083] Wed, 13 June 2007 06:59 Go to previous message
Eclipse UserFriend
Originally posted by: nospam74.gmx.net

I tried and failed with the second alternative, before I post in the
news group. I defined a node with a reference to a edge, but didn't
wangle mapping. How can a link be created, based on a reference?

Dmitry Stadnik wrote:
> I could recommend two strategies:
>
> 1. Define node instead of link; add two reference-based links to connect
> the node with source and target.
>
> 2. Define additional node and link that connects the node with the
> original link.
>
> Andrej S wrote:
>> Dmitry Stadnik wrote:
>>> ...
>>> 2. In GMF models you can describe only a fixed number of labels that
>>> will always be available. There are no means to create them or delete -
>>> that's the reason to define them this way. For nodes you may define
>>> child nodes with single label that will be presented as labels; see
>>> 'small items' in TaiPan sample.
>>
>> Is there no way to create several figures (not only labels) that belongs
>> through a reference or a containment relation to an edge, and connect
>> figures to the edge with a link?
Previous Topic:compartment problem (bis)
Next Topic:Default int value doesn't appear
Goto Forum:
  


Current Time: Wed Jul 23 04:05:09 EDT 2025

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

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

Back to the top