Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] Serialize all size/position in notation

Hello,

   Concerning the links, don’t forget than the position of anchors is in percentage of the size of the attached node and this  percentage is defined by the user click during the link creation. So the saved anchor location is always somewhere inside the node and never on a border.



I would like to add a few other notes for consideration:
- In the diagram runtime draw2d layout is called asynchronously so it is not trivial to get the computed implicit bounds of nodes in any batch operation.
- the visible position of the bendpoint may have almost nothing common with the actual model constraints (e.g, consider "avoid obstructions" mode). As far as I understand the routing algorithms in GMF runtime
- even when the routing logic is not
As far as I understand, the link routing in runtime happens again asynchronously after the first (already async) step of computing the actual bounds for nodes is done.

I obviously don't want to say that it is impossible to wait long enough


On Wed, Jul 22, 2015 at 1:26 PM, LORENZO Vincent <vincent.lorenzo@xxxxxx> wrote:

Hi,

   Concerning the links, don’t forget than the position of anchors is in percentage of the size of the attached node and this  percentage is defined by the user click during the link creation. So the saved anchor location is always somewhere inside the node and never on a border.

It is the same thing for the bendpoints, which are defnined using percentage of the distance between the source AND the target.

Moreover, when you move a node or an anchor, the bendpoints location are not updated. Finally, changing the routing style from Oblique to rectilinear or tree routing, could create bendpoints which are not serialized and the anchors are not updated.

 

So taking directly the information serialized in the notation for the links doesn’t allow to get the final display of the diagram. We need to use the points calculated by the routers to know how to display links.

 

Vincent

 

 

De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de LETAVERNIER Camille
Envoyé : mercredi 22 juillet 2015 09:50
À : Papyrus Project list
Objet : [PROVENANCE INTERNET] Re: [mdt-papyrus.dev] Serialize all size/position in notation

 

Hi,

 

Ø  It seems to me that it would be easy to build an export function in the diagram editor that produces a notation model with the layout "pinned" for interchange purposes, but I'm not sure how that would be more useful than exporting directly to DD/SVG/whatever.

The Papyrus Notation model contains more information than DD/SVG/Others, so that would still be useful as a pre-processing step before any further transformation. Since Notation to DI already relies on Papyrus Notation, that would also limit the number of changes required to make this work.

 

Still, I would rely on a new property rather than the current bounds, so that the export tool knows whether the layout is automatic or fixed. So I’d recommend:

 

-          A new layout property (Similar to the current LayoutConstraint/Bounds) that indicates the actual runtime size

-          This new property is not serialized (Doesn’t exist at all) in standard Papyrus models, but can be added during an export operation

This also means that we’d need an API to pre-process all diagrams in batch mode (This component would still have to load the diagrams internally to get all the required info)

 

Camille

 

De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de Christian W. Damus
Envoyé : mercredi 22 juillet 2015 09:24
À : Papyrus Project list
Objet : Re: [mdt-papyrus.dev] Serialize all size/position in notation

 

Hi,

 

Good question.

 

Currently, the GMF notation model combines the cue for automatic computation of layout in the attributes of a view that would store the computed layout information.  In particular, location or size set to (and thus persisted as) their default (-1, -1) values indicate that layout is automatic.

 

To change this such that the auto layout is a separate attribute is feasible, but then storing the computed layout information implies possibly unacceptable version control impact.  If changes in the model that trigger adjustment of the layout, then we would have a greater likelihood of conflicting changes is the notation in a team situation.

 

It seems to me that it would be easy to build an export function in the diagram editor that produces a notation model with the layout "pinned" for interchange purposes, but I'm not sure how that would be more useful than exporting directly to DD/SVG/whatever.

 

Some $0.02 to contribute to the discussion, at least.

 

Christian 

 

 

On Wed, Jul 22, 2015 at 8:41 AM, MAGGI Benoit <Benoit.MAGGI@xxxxxx> wrote:

Hi everyone,

 

Here is a question/suggestion made Maged Elaasar when I met him last month.

 

What about saving all position/size in the notation file ?

ð  It will help to reuse the the notation file in different context

 

For example : It will help to generate a static website for documentation (using Hudson nightly build)

 

His use case was transform a diagram in DD DI and svg.

He has to load the diagram with Papyrus to get the auto layout mechanism running and finally get the positions

 

Regards,

Benoit

 

1 : http://www.omg.org/spec/DD/1.1/PDF/

2 : http://www.w3.org/TR/SVG11/

 

 


_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev



--

Michael "Borlander" Golubev
Eclipse Committer (GMF, UML2Tools)
at Montages Think Tank, 
Prague, Czech Republic
1165/1 Dvorecka, 14700, Prague-4 Podoli

tek: +420 602 483 463


Back to the top