Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Are connection labels' fonts chosen at random?
Are connection labels' fonts chosen at random? [message #157922] Wed, 31 October 2007 09:29 Go to next message
Eclipse UserFriend
I have the strange case, that certain connections (or "connection
types") in my application are labeled using a fixed spaced font with
serifs (probably courier), most other labels are using a sans-serif font
(probably arial). I haven't specified ANY font settings in my .gmf
models anywhere.

I don't really mind WHAT font is being used as long as it's the same,
because seeing different fonts suggests some meaning behind these (and
in my case there certainly isn't any). So, who/what decides on these
fonts in GMF generated code??? Where/how can one control that?

Michael
Re: Are connection labels' fonts chosen at random? [message #157927 is a reply to message #157922] Wed, 31 October 2007 10:07 Go to previous messageGo to next message
Eclipse UserFriend
Hi Michael,

AFAIU, these are controlled by styles of the parent link. You can change
the fonts one by one in the property sheet for the link or en masse by
using custom templates.

Best regards,
Boris


Michael Moser wrote:
> I have the strange case, that certain connections (or "connection
> types") in my application are labeled using a fixed spaced font with
> serifs (probably courier), most other labels are using a sans-serif font
> (probably arial). I haven't specified ANY font settings in my .gmf
> models anywhere.
>
> I don't really mind WHAT font is being used as long as it's the same,
> because seeing different fonts suggests some meaning behind these (and
> in my case there certainly isn't any). So, who/what decides on these
> fonts in GMF generated code??? Where/how can one control that?
>
> Michael
>
Re: Are connection labels' fonts chosen at random? [message #157934 is a reply to message #157927] Wed, 31 October 2007 10:24 Go to previous messageGo to next message
Eclipse UserFriend
Which styles, or parent links, resp., are you referring to?
In the .gmfgraph file all "Diagram Labels" as well as all "Connections"
are children of "Canvas".
In the .gmfmap file all "Link Mappings" are children of "Mapping".

But nowhere do I see any style or font element or any property or
anything that might indicate why would some children have different
fonts than others.

Michael


Boris Blajer wrote:
> Hi Michael,
>
> AFAIU, these are controlled by styles of the parent link. You can
> change the fonts one by one in the property sheet for the link or en
> masse by using custom templates.
>
> Best regards,
> Boris
>
>
> Michael Moser wrote:
>> I have the strange case, that certain connections (or "connection
>> types") in my application are labeled using a fixed spaced font with
>> serifs (probably courier), most other labels are using a sans-serif
>> font (probably arial). I haven't specified ANY font settings in my
>> .gmf models anywhere.
>>
>> I don't really mind WHAT font is being used as long as it's the same,
>> because seeing different fonts suggests some meaning behind these
>> (and in my case there certainly isn't any). So, who/what decides on
>> these fonts in GMF generated code??? Where/how can one control that?
>>
>> Michael
Re: Are connection labels' fonts chosen at random? [message #157946 is a reply to message #157934] Wed, 31 October 2007 11:00 Go to previous messageGo to next message
Eclipse UserFriend
Hi Michael,

The most likely reason is that the viewmaps for the link types have
fixed fonts (i.e., there is a style attribute with fixedFont=true among
the attributes associated with the viewmap of the GenLink in the gmfgen
model). Either there are *different* fixed fonts associated with them or
some viewmaps do have a fixed font while some viewmaps have an unfixed
font (in this case, the former element types would be initialized with a
font from gmfgraph, while the fonts for the latter element types would
be initialized from project preferences.)


Best regards,
Boris

Michael Moser wrote:
> Which styles, or parent links, resp., are you referring to?
> In the .gmfgraph file all "Diagram Labels" as well as all "Connections"
> are children of "Canvas".
> In the .gmfmap file all "Link Mappings" are children of "Mapping".
>
> But nowhere do I see any style or font element or any property or
> anything that might indicate why would some children have different
> fonts than others.
>
> Michael
>
>
> Boris Blajer wrote:
>> Hi Michael,
>>
>> AFAIU, these are controlled by styles of the parent link. You can
>> change the fonts one by one in the property sheet for the link or en
>> masse by using custom templates.
>>
>> Best regards,
>> Boris
>>
>>
>> Michael Moser wrote:
>>> I have the strange case, that certain connections (or "connection
>>> types") in my application are labeled using a fixed spaced font with
>>> serifs (probably courier), most other labels are using a sans-serif
>>> font (probably arial). I haven't specified ANY font settings in my
>>> .gmf models anywhere.
>>>
>>> I don't really mind WHAT font is being used as long as it's the same,
>>> because seeing different fonts suggests some meaning behind these
>>> (and in my case there certainly isn't any). So, who/what decides on
>>> these fonts in GMF generated code??? Where/how can one control that?
>>>
>>> Michael
>
Re: Are connection labels' fonts chosen at random? [message #157987 is a reply to message #157946] Thu, 01 November 2007 04:52 Go to previous messageGo to next message
Eclipse UserFriend
Hi Boris,
you were right - there was indeed a 'fixedFont="true"' attribute in that
label's specification in the .gmfgen file. But what is still puzzling
me: where does that come from or what caused this to be created, resp.?
I mean: IMHO I as a GMF "user" should NOT have to manually search and
modify the .gmfgen file to fix such "font anomalies", should I?

I searched the .gmftool/.gmfgraph/.gmfmap input files and only the
..graph file contained anything related to "font", namely all
node-figures containing an element:
...
<font xsi:type="gmfgraph:BasicFont" height="7"/>
...

So, what in the mentioned input files could cause the generator to add
that attribute, esp. for one connection type only but not for others???
I start smelling a bug here...

Michael



Boris Blajer wrote:
> Hi Michael,
>
> The most likely reason is that the viewmaps for the link types have
> fixed fonts (i.e., there is a style attribute with fixedFont=true
> among the attributes associated with the viewmap of the GenLink in
> the gmfgen model). Either there are *different* fixed fonts
> associated with them or some viewmaps do have a fixed font while some
> viewmaps have an unfixed font (in this case, the former element types
> would be initialized with a font from gmfgraph, while the fonts for
> the latter element types would be initialized from project
> preferences.)
>
> Best regards,
> Boris
>
> Michael Moser wrote:
>> Which styles, or parent links, resp., are you referring to?
>> In the .gmfgraph file all "Diagram Labels" as well as all
>> "Connections" are children of "Canvas".
>> In the .gmfmap file all "Link Mappings" are children of "Mapping".
>>
>> But nowhere do I see any style or font element or any property or
>> anything that might indicate why would some children have different
>> fonts than others.
>>
>> Michael
>>
>>
>> Boris Blajer wrote:
>>> Hi Michael,
>>>
>>> AFAIU, these are controlled by styles of the parent link. You can
>>> change the fonts one by one in the property sheet for the link or en
>>> masse by using custom templates.
>>>
>>> Best regards,
>>> Boris
>>>
>>>
>>> Michael Moser wrote:
>>>> I have the strange case, that certain connections (or "connection
>>>> types") in my application are labeled using a fixed spaced font
>>>> with serifs (probably courier), most other labels are using a
>>>> sans-serif font (probably arial). I haven't specified ANY font
>>>> settings in my .gmf models anywhere.
>>>>
>>>> I don't really mind WHAT font is being used as long as it's the
>>>> same, because seeing different fonts suggests some meaning behind
>>>> these (and in my case there certainly isn't any). So, who/what
>>>> decides on these fonts in GMF generated code??? Where/how can one
>>>> control that? Michael
Re: Are connection labels' fonts chosen at random? [message #158091 is a reply to message #157987] Thu, 01 November 2007 09:33 Go to previous message
Eclipse UserFriend
Hi Michael,

Definitely, a user is not expected to manually remove these styles,
these settings should have deterministic and adequate defaults. I just
gave you a way to quickly find the difference.

A style attribute with fixedFont="true" is added to a viewmap if (and
only if) the figure describing the viewmap in the gmfgraph specifies any
font.
So I have nothing to do but ask you to check if some of your connection
figures do declare some fonts (or try to remember if they used to do so,
since these could have been preserved by the reconciler)...

Best regards,
Boris


Michael Moser wrote:
> Hi Boris,
> you were right - there was indeed a 'fixedFont="true"' attribute in that
> label's specification in the .gmfgen file. But what is still puzzling
> me: where does that come from or what caused this to be created, resp.?
> I mean: IMHO I as a GMF "user" should NOT have to manually search and
> modify the .gmfgen file to fix such "font anomalies", should I?
>
> I searched the .gmftool/.gmfgraph/.gmfmap input files and only the
> ..graph file contained anything related to "font", namely all
> node-figures containing an element:
> ...
> <font xsi:type="gmfgraph:BasicFont" height="7"/>
> ...
>
> So, what in the mentioned input files could cause the generator to add
> that attribute, esp. for one connection type only but not for others???
> I start smelling a bug here...
>
> Michael
>
>
>
> Boris Blajer wrote:
>> Hi Michael,
>>
>> The most likely reason is that the viewmaps for the link types have
>> fixed fonts (i.e., there is a style attribute with fixedFont=true
>> among the attributes associated with the viewmap of the GenLink in
>> the gmfgen model). Either there are *different* fixed fonts
>> associated with them or some viewmaps do have a fixed font while some
>> viewmaps have an unfixed font (in this case, the former element types
>> would be initialized with a font from gmfgraph, while the fonts for
>> the latter element types would be initialized from project
>> preferences.)
>>
>> Best regards,
>> Boris
>>
>> Michael Moser wrote:
>>> Which styles, or parent links, resp., are you referring to?
>>> In the .gmfgraph file all "Diagram Labels" as well as all
>>> "Connections" are children of "Canvas".
>>> In the .gmfmap file all "Link Mappings" are children of "Mapping".
>>>
>>> But nowhere do I see any style or font element or any property or
>>> anything that might indicate why would some children have different
>>> fonts than others.
>>>
>>> Michael
>>>
>>>
>>> Boris Blajer wrote:
>>>> Hi Michael,
>>>>
>>>> AFAIU, these are controlled by styles of the parent link. You can
>>>> change the fonts one by one in the property sheet for the link or en
>>>> masse by using custom templates.
>>>>
>>>> Best regards,
>>>> Boris
>>>>
>>>>
>>>> Michael Moser wrote:
>>>>> I have the strange case, that certain connections (or "connection
>>>>> types") in my application are labeled using a fixed spaced font
>>>>> with serifs (probably courier), most other labels are using a
>>>>> sans-serif font (probably arial). I haven't specified ANY font
>>>>> settings in my .gmf models anywhere.
>>>>>
>>>>> I don't really mind WHAT font is being used as long as it's the
>>>>> same, because seeing different fonts suggests some meaning behind
>>>>> these (and in my case there certainly isn't any). So, who/what
>>>>> decides on these fonts in GMF generated code??? Where/how can one
>>>>> control that? Michael
>
Previous Topic:background picture
Next Topic:Creating a node type that is derived from another yields a runtime crash
Goto Forum:
  


Current Time: Thu May 22 19:49:11 EDT 2025

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

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

Back to the top