Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Linewrap and more
Linewrap and more [message #48280] Thu, 14 September 2006 18:24 Go to next message
Eclipse UserFriend
Originally posted by: tobk.gmx.de

Hello,

I have some questions and it would be great if you could help me with some
of them:

1.: I enabled Textwrap for some of my labels (just set
fig_0.setTextWrap(true);) and it works fine, but I have two problems:

1.a) the direct edit feature seems to be aborted right after the first
character, so entering text per direct edit is nearly impossible, while it
works fine using the properties view. Any ideas?

1.b) the font size for editing and displaying the text seems to be different
(not only with textwrap activated). Maybe this is a Linux/KDE problem only.
when I enter text, it fills the label perfectly, while the font is a little
bit smaller. When I quit the edit mode, the font gets bigger, but the
label'ssize remains the same, so the text doesn't fit.


2.: I want to use one tool for some similar diagram elements, so i assigned
the same tool to them. when I click on the canvas (or whereever to create
them) I can select the element, but the only way to discriminate them is
their order and the icon (if set), but the text description is the same. I
took a look in the code, but didn't figure out how to set a different
description for each element... could you help me, please?

3.: I want to create some elements with an external label, so i created a
PlainLabelFigure and a PlainDiagramLabel, which are mapped to all the
features needed. but while it works well for top level nodes and all kind
of links, there is a problem when the node the label is assocated to is not
a top level node but held in some container: the label seems not to be
properly "attached" to the node. the thin dotted line that appears when you
move the label is showing somewhere to the upper left of the label. the
curious thing: when I move the diagram element the label stays in place
relativ to the element it is attached to (as it should do), but when I move
the container the diagram element is held in, the label stays in place
abslutely (as it should not do). is there any way to fix this?

Ok, that will do for now.
Thanks a lot,
tobias
Re: Linewrap and more [message #48799 is a reply to message #48280] Fri, 15 September 2006 06:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

1.a, 1.b, 3 are bugs; could you submit requests for them?

2. is not clear; what means 'similar'? If they have different figures
you could make them to look distinct.

tobias wrote:
> Hello,
>
> I have some questions and it would be great if you could help me with some
> of them:
>
> 1.: I enabled Textwrap for some of my labels (just set
> fig_0.setTextWrap(true);) and it works fine, but I have two problems:
>
> 1.a) the direct edit feature seems to be aborted right after the first
> character, so entering text per direct edit is nearly impossible, while it
> works fine using the properties view. Any ideas?
>
> 1.b) the font size for editing and displaying the text seems to be different
> (not only with textwrap activated). Maybe this is a Linux/KDE problem only.
> when I enter text, it fills the label perfectly, while the font is a little
> bit smaller. When I quit the edit mode, the font gets bigger, but the
> label'ssize remains the same, so the text doesn't fit.
>
>
> 2.: I want to use one tool for some similar diagram elements, so i assigned
> the same tool to them. when I click on the canvas (or whereever to create
> them) I can select the element, but the only way to discriminate them is
> their order and the icon (if set), but the text description is the same. I
> took a look in the code, but didn't figure out how to set a different
> description for each element... could you help me, please?
>
> 3.: I want to create some elements with an external label, so i created a
> PlainLabelFigure and a PlainDiagramLabel, which are mapped to all the
> features needed. but while it works well for top level nodes and all kind
> of links, there is a problem when the node the label is assocated to is not
> a top level node but held in some container: the label seems not to be
> properly "attached" to the node. the thin dotted line that appears when you
> move the label is showing somewhere to the upper left of the label. the
> curious thing: when I move the diagram element the label stays in place
> relativ to the element it is attached to (as it should do), but when I move
> the container the diagram element is held in, the label stays in place
> abslutely (as it should not do). is there any way to fix this?
>
> Ok, that will do for now.
> Thanks a lot,
> tobias
Re: Linewrap and more [message #48919 is a reply to message #48799] Fri, 15 September 2006 07:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tobk.gmx.de

Dmitry Stadnik wrote:

> 1.a, 1.b, 3 are bugs; could you submit requests for them?

OK, but where shall I do this? Can you give me a link? Sorry, new to GMF.
*g*

> 2. is not clear; what means 'similar'? If they have different figures
> you could make them to look distinct.

They do look different in the Diagram, but not in the little Selection Box
(well, the icon, but not the text).

To give you the scenario: Different kinds of Events in Business Process
Diagrams. I have Start, End and Intermediate Events, which share the
Creation Tool "Event" with Description "Create a new Event".

When I click the tool and then click the canvas a little Box pops up which
looks like this:

+----------------------------+
| [ICON1] Create a new Event |
| [ICON2] Create a new Event |
| [ICON3] Create a new Event |
+----------------------------+

so the only way to discriminate the several events is by their icons and by
the order by which they are listed. It would be nice if I could give
different descriptions for the different types of events.


tobias
Re: Linewrap and more [message #49074 is a reply to message #48919] Fri, 15 September 2006 13:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vcciubot.uwaterloo.ca

Text wrapping works for me if I put the label in a container that has
stack layout. No need to touch the label figure itself.

On Fri, 15 Sep 2006 13:58:59 +0200, tobias wrote:

> Dmitry Stadnik wrote:
>
>> 1.a, 1.b, 3 are bugs; could you submit requests for them?
>
> OK, but where shall I do this? Can you give me a link? Sorry, new to GMF.
> *g*
>
>> 2. is not clear; what means 'similar'? If they have different figures
>> you could make them to look distinct.
>
> They do look different in the Diagram, but not in the little Selection Box
> (well, the icon, but not the text).
>
> To give you the scenario: Different kinds of Events in Business Process
> Diagrams. I have Start, End and Intermediate Events, which share the
> Creation Tool "Event" with Description "Create a new Event".
>
> When I click the tool and then click the canvas a little Box pops up which
> looks like this:
>
> +----------------------------+
> | [ICON1] Create a new Event |
> | [ICON2] Create a new Event |
> | [ICON3] Create a new Event |
> +----------------------------+
>
> so the only way to discriminate the several events is by their icons and by
> the order by which they are listed. It would be nice if I could give
> different descriptions for the different types of events.
>
>
> tobias
Re: Linewrap and more [message #49103 is a reply to message #48919] Fri, 15 September 2006 14:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

tobias wrote:
> Dmitry Stadnik wrote:
>
>> 1.a, 1.b, 3 are bugs; could you submit requests for them?
>
> OK, but where shall I do this? Can you give me a link? Sorry, new to GMF.
> *g*
>

https://bugs.eclipse.org/bugs

>> 2. is not clear; what means 'similar'? If they have different figures
>> you could make them to look distinct.
>
> They do look different in the Diagram, but not in the little Selection Box
> (well, the icon, but not the text).
>
> To give you the scenario: Different kinds of Events in Business Process
> Diagrams. I have Start, End and Intermediate Events, which share the
> Creation Tool "Event" with Description "Create a new Event".
>
> When I click the tool and then click the canvas a little Box pops up which
> looks like this:
>
> +----------------------------+
> | [ICON1] Create a new Event |
> | [ICON2] Create a new Event |
> | [ICON3] Create a new Event |
> +----------------------------+
>
> so the only way to discriminate the several events is by their icons and by
> the order by which they are listed. It would be nice if I could give
> different descriptions for the different types of events.
>

I see )))

Set 'display name' property of the element types in gmfgen model to
'Start', 'End' and 'Intermediate' instead of 'Event' (most likely it's
Gen Top Level Node -> Metamodel Type -> Display Name).

I've added https://bugs.eclipse.org/bugs/show_bug.cgi?id=157512 to
clarify the issue.

>
> tobias
Re: Linewrap and more [message #49225 is a reply to message #49074] Sat, 16 September 2006 07:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tobk.gmx.de

Vlad Ciubotariu wrote:

> Text wrapping works for me if I put the label in a container that has
> stack layout. No need to touch the label figure itself.

Yes, this works. Thanks.

But there is a problem when the figure is a container (textwrap can be
necessary even for a container when it is collapsed).

When my gmfgraph definition of the container's figure looks like this

rectangle
+-stacklayout
+-label

all the elements are drawn on top of each other, and when the graph
definition is

rectangle
+-inner rectangle
+-stacklayout
+-label

with the compartment being the top rectangle, the label takes 50% of the top
rectangles area (there's given more space to the compartment as more and
bigger elements are insered, but it looks strange, anyway).

Maybe I can fix this with some preferred/maximum size items...

tobias
Re: Linewrap and more [message #49233 is a reply to message #49103] Sat, 16 September 2006 07:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tobk.gmx.de

Dmitry Stadnik wrote:

> I see )))
>
> Set 'display name' property of the element types in gmfgen model to
> 'Start', 'End' and 'Intermediate' instead of 'Event' (most likely it's
> Gen Top Level Node -> Metamodel Type -> Display Name).

It works. Unfortunately the change is overwritten each time i generate the
gmfgen anew, and since it affects the plugin.xml file only I cannot mark it
@generate NOT (or can I?).

On the bugtracker you write about ElementTypeImpl.getDisplayName() returning
the value, but the common name is a result of the gmf-map, so how can the
model code be affected? There is no such method to overwrite, anyway. Did I
misunderstand this?

tobias
Re: Linewrap and more [message #49707 is a reply to message #49233] Mon, 18 September 2006 07:01 Go to previous message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

tobias wrote:
> It works. Unfortunately the change is overwritten each time i generate the
> gmfgen anew, and since it affects the plugin.xml file only I cannot mark it
> @generate NOT (or can I?).

https://bugs.eclipse.org/bugs/show_bug.cgi?id=157621

> On the bugtracker you write about ElementTypeImpl.getDisplayName() returning
> the value, but the common name is a result of the gmf-map, so how can the
> model code be affected? There is no such method to overwrite, anyway. Did I
> misunderstand this?

There are two cases: EClass may be created by many tools and tool may
create many EClasses; the default value of the aforementioned property
was inferred with only the first case in mind; mea culpa (((. For now
you can change nothing.
Previous Topic:What is the "ModelObject" dropdown list in the gmfgraph wizard for?
Next Topic:Changing from text box to Combo in the elements property view
Goto Forum:
  


Current Time: Mon May 12 10:31:22 EDT 2025

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

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

Back to the top