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

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/

 

 


Back to the top