label showing as <...> [message #74228] |
Fri, 03 November 2006 16:55  |
Eclipse User |
|
|
|
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 #77798 is a reply to message #76826] |
Wed, 15 November 2006 09:33  |
Eclipse User |
|
|
|
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>
>>
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.08235 seconds