archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
955 stars 268 forks source link

Feature request: Completely visual grouping of objects #813

Closed heikkil closed 2 years ago

heikkil commented 2 years ago

Archi has two group-like elements in its palette: Grouping and Group, but they behave exactly the same in a drawing. When you place objects inside them, they can be moved together by dragging the group. This also has an extremely annoying side effect: Objects inside and outside the group can not any more aligned to each other using the alignment icons at the top of the window!

Would it be possible to enable that alignment, please?

I can see at least two approaches to that.

  1. 'Group' is labelled as "visual group element". Make it really just plain visual. Just something that could be placed under objects for visual effect but that would not affect the movement nor alignment of objects.

  2. Since it is possible to place all objects inside each other, this alignment problem touches all visual elements, so it could there be a more general solution where alignment is made possible? For example, by a switch that turns of the strict grouping and enables alignment when the user explicitely wants it?

Phillipus commented 2 years ago

The behaviour of the existing visual Group as a container won't be changed. You can use a Note instead if you want a non-container object.

The issue with alignment comes from the way the Eclipse Graphical Editing Framework (GEF) handles object alignment in different containers. This behaviour is baked into that code. However, should anyone care to contribute a patch to handle this differently, take a look here:

https://github.com/archimatetool/archi/tree/master/org.eclipse.gef/src/org/eclipse/gef

heikkil commented 2 years ago

Using the note object that lives in the same layer with other objects for visually grouping them is an excellent solution. Solves my immediate practical problem with alignments. Thanks!