Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » label showing as <...>
label showing as <...> [message #74228] Fri, 03 November 2006 21:55 Go to next message
drp3pp3p is currently offline drp3pp3pFriend
Messages: 4
Registered: July 2009
Junior Member
I am creating a small GMF editor. I have a EClass named Goal and I would
like
each goal on the diagram to be annotated with a user-editable label
showing
the name of the node. (Name is an EAttribute of Goal.)

But when I try to do this, I end up with goals that are annotated with
<...>.
I can change the name of a goal in the property pane, but it still looks
like <...> in the diagram.

And yes I am a GMF newbie, and this is no doubt a newbie problem. But it
is
one that is very difficult to solve as it is impossible to find anyone else
who has had this problem. Google does not support a search for "<...>",
and in fact none of the search engines do. Special characters like '<' and
'.' seem to be search engine dark matter.

Dave
Re: label showing as <...> [message #74247 is a reply to message #74228] Fri, 03 November 2006 22:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vcciubot.uwaterloo.ca

You need to create a Label Mapping under your Node Mapping in your gmf map
file.

vlad

On Fri, 03 Nov 2006 21:55:46 +0000, Dave Bridgeland wrote:

> I am creating a small GMF editor. I have a EClass named Goal and I would
> like
> each goal on the diagram to be annotated with a user-editable label
> showing
> the name of the node. (Name is an EAttribute of Goal.)
>
> But when I try to do this, I end up with goals that are annotated with
> <...>.
> I can change the name of a goal in the property pane, but it still looks
> like <...> in the diagram.
>
> And yes I am a GMF newbie, and this is no doubt a newbie problem. But it
> is
> one that is very difficult to solve as it is impossible to find anyone else
> who has had this problem. Google does not support a search for "<...>",
> and in fact none of the search engines do. Special characters like '<' and
> '.' seem to be search engine dark matter.
>
> Dave
Re: label showing as <...> [message #74265 is a reply to message #74247] Fri, 03 November 2006 22:34 Go to previous messageGo to next message
drp3pp3p is currently offline drp3pp3pFriend
Messages: 4
Registered: July 2009
Junior Member
Vlad,

I did create a label mapping under the node mapping, although perhaps I
did it incorrectly. Below is my gmfmap file. What did I do wrong?

Dave

-------------------------bmm.gmfmap---------------------

<gmfmap:Mapping xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:gmfmap="http://www.eclipse.org/gmf/2005/mappings"
xmlns:gmftool="http://www.eclipse.org/gmf/2005/ToolDefinition">
<nodes>
<containmentFeature
href="bmm.ecore#//Motivation/rootGoals"/>
<ownedChild>
<domainMetaElement
href="bmm.ecore#//Goal"/>
<labelMappings>
<diagramLabel
href="bmm.gmfgraph#GoalName"/>
<features
href="bmm.ecore#//Goal/name"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="bmm.gmftool#//@palette/@tools.0/@tools.0"/>
<diagramNode
href="bmm.gmfgraph#Goal"/>
</ownedChild>
</nodes>
<links>
<tool
xsi:type="gmftool:CreationTool"
href="bmm.gmftool#//@palette/@tools.0/@tools.1"/>
<diagramLink
href="bmm.gmfgraph#GoalComposedOf"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="bmm.ecore#//Goal/composedOf"/>
</links>
<diagram>
<diagramCanvas
href="bmm.gmfgraph#bmm"/>
<domainModel
href="bmm.ecore#/"/>
<domainMetaElement
href="bmm.ecore#//Motivation"/>
<palette
href="bmm.gmftool#//@palette"/>
</diagram>
</gmfmap:Mapping>
Re: label showing as <...> [message #76826 is a reply to message #74265] Fri, 10 November 2006 18:45 Go to previous messageGo to next message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
Hi Dave,

Without loading your model, your label mapping looks correct and is mapped
to name attribute on your goal in the ecore model.

You label will be <...> until you change the String value of the name in the
model. Sounds like what you want to do is a default value for name in your
ecore model.

If the name is blank in your model, by default the generated code will
display <...>

Cheers...
Anthony

"Dave Bridgeland" <bridgeland@yahoo.com> wrote in message
news:01eb865ab272e5a9cd119e4749db2fce$1@www.eclipse.org...
> Vlad,
>
> I did create a label mapping under the node mapping, although perhaps I
> did it incorrectly. Below is my gmfmap file. What did I do wrong?
>
> Dave
>
> -------------------------bmm.gmfmap---------------------
>
> <gmfmap:Mapping xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:gmfmap="http://www.eclipse.org/gmf/2005/mappings"
> xmlns:gmftool="http://www.eclipse.org/gmf/2005/ToolDefinition">
> <nodes>
> <containmentFeature
> href="bmm.ecore#//Motivation/rootGoals"/>
> <ownedChild>
> <domainMetaElement
> href="bmm.ecore#//Goal"/>
> <labelMappings>
> <diagramLabel
> href="bmm.gmfgraph#GoalName"/>
> <features
> href="bmm.ecore#//Goal/name"/>
> </labelMappings>
> <tool
> xsi:type="gmftool:CreationTool"
> href="bmm.gmftool#//@palette/@tools.0/@tools.0"/>
> <diagramNode
> href="bmm.gmfgraph#Goal"/>
> </ownedChild>
> </nodes>
> <links>
> <tool
> xsi:type="gmftool:CreationTool"
> href="bmm.gmftool#//@palette/@tools.0/@tools.1"/>
> <diagramLink
> href="bmm.gmfgraph#GoalComposedOf"/>
> <linkMetaFeature
> xsi:type="ecore:EReference"
> href="bmm.ecore#//Goal/composedOf"/>
> </links>
> <diagram>
> <diagramCanvas
> href="bmm.gmfgraph#bmm"/>
> <domainModel
> href="bmm.ecore#/"/>
> <domainMetaElement
> href="bmm.ecore#//Motivation"/>
> <palette
> href="bmm.gmftool#//@palette"/>
> </diagram>
> </gmfmap:Mapping>
>
>
Re: label showing as <...> [message #77798 is a reply to message #76826] Wed, 15 November 2006 14:33 Go to previous message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

Default label text may be changed in gmfgraph model; find label figure
and modify 'text' property.

Anthony Hunter wrote:
> Hi Dave,
>
> Without loading your model, your label mapping looks correct and is mapped
> to name attribute on your goal in the ecore model.
>
> You label will be <...> until you change the String value of the name in the
> model. Sounds like what you want to do is a default value for name in your
> ecore model.
>
> If the name is blank in your model, by default the generated code will
> display <...>
>
> Cheers...
> Anthony
>
> "Dave Bridgeland" <bridgeland@yahoo.com> wrote in message
> news:01eb865ab272e5a9cd119e4749db2fce$1@www.eclipse.org...
>> Vlad,
>>
>> I did create a label mapping under the node mapping, although perhaps I
>> did it incorrectly. Below is my gmfmap file. What did I do wrong?
>>
>> Dave
>>
>> -------------------------bmm.gmfmap---------------------
>>
>> <gmfmap:Mapping xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
>> xmlns:gmfmap="http://www.eclipse.org/gmf/2005/mappings"
>> xmlns:gmftool="http://www.eclipse.org/gmf/2005/ToolDefinition">
>> <nodes>
>> <containmentFeature
>> href="bmm.ecore#//Motivation/rootGoals"/>
>> <ownedChild>
>> <domainMetaElement
>> href="bmm.ecore#//Goal"/>
>> <labelMappings>
>> <diagramLabel
>> href="bmm.gmfgraph#GoalName"/>
>> <features
>> href="bmm.ecore#//Goal/name"/>
>> </labelMappings>
>> <tool
>> xsi:type="gmftool:CreationTool"
>> href="bmm.gmftool#//@palette/@tools.0/@tools.0"/>
>> <diagramNode
>> href="bmm.gmfgraph#Goal"/>
>> </ownedChild>
>> </nodes>
>> <links>
>> <tool
>> xsi:type="gmftool:CreationTool"
>> href="bmm.gmftool#//@palette/@tools.0/@tools.1"/>
>> <diagramLink
>> href="bmm.gmfgraph#GoalComposedOf"/>
>> <linkMetaFeature
>> xsi:type="ecore:EReference"
>> href="bmm.ecore#//Goal/composedOf"/>
>> </links>
>> <diagram>
>> <diagramCanvas
>> href="bmm.gmfgraph#bmm"/>
>> <domainModel
>> href="bmm.ecore#/"/>
>> <domainMetaElement
>> href="bmm.ecore#//Motivation"/>
>> <palette
>> href="bmm.gmftool#//@palette"/>
>> </diagram>
>> </gmfmap:Mapping>
>>
>>
>
>
Previous Topic:Changing visual attributes based on model attribute values?
Next Topic:enforce fixed node size on node creation
Goto Forum:
  


Current Time: Sat Jul 13 00:29:34 GMT 2024

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

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

Back to the top