Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove implicit behaviors/tools in View-based diagrams #1563

Closed
pcdavid opened this issue Jan 9, 2023 · 3 comments · Fixed by #1577 or #1655
Closed

Remove implicit behaviors/tools in View-based diagrams #1563

pcdavid opened this issue Jan 9, 2023 · 3 comments · Fixed by #1577 or #1655

Comments

@pcdavid
Copy link
Member

pcdavid commented Jan 9, 2023

Currently, when a View-based diagram element (Node or Edge) does not specify any behavior for a given kind of tool (e.g. direct edit, delete, etc.), the runtime automatically provides a default one.
This is nice for quick startup, but it also means it is impossible to disable any of these tools, as even if the studio makers does not provide a tool, some behavior will be provided.

  • The new rule will be that if a particular tool (for a given diagram element) is not explicitly present in the View model, the corresponding behavior should be simply disabled.
  • When the user will create a new Node or Edge, in the same way as they currently get a default style element automatically created, they will get automatically configured tools for all the standard beahviors. These will be implemented thanks to Make the default/canonical tools' behavior callable from standard AQL expressions and/or operations #1562 and provide the same behavior as the current default, only explicitly visible in the view model.
@pcdavid
Copy link
Member Author

pcdavid commented Jan 11, 2023

org.eclipse.sirius.components.view.emf.diagram.ViewToolSectionsProvider will need to be updated not to provide tools (direct edit, delete from model) which are not explicitly configured in the View model. Except that in ViewToolSectionsProvider we do not have direct access to the actuel View model, only to the converted and "opaque" DiagramDescription & co.

@pcdavid
Copy link
Member Author

pcdavid commented Jan 11, 2023

We might need the work from #1422 to handle this.

@pcdavid
Copy link
Member Author

pcdavid commented Jan 11, 2023

We might need the work from #1422 to handle this.

There's a workaround. It's a bit of a kludge, but it will do until #1422 is done.

pcdavid added a commit that referenced this issue Jan 12, 2023
If a diagram description does not explicitly configure a delete/direct
edit/element creation tool, the corresponding behavior is simply
disabled.

By default, new nodes, edges and tools are explicitly configured to
invoke the default canonical behavior; it is just made explicit in the
model and can now serve as a based or removed to disable the behavior.

Bug: #1563
Signed-off-by: Pierre-Charles David <[email protected]>
@pcdavid pcdavid linked a pull request Jan 12, 2023 that will close this issue
39 tasks
pcdavid added a commit that referenced this issue Jan 16, 2023
If a diagram description does not explicitly configure a delete/direct
edit/element creation tool, the corresponding behavior is simply
disabled.

By default, new nodes, edges and tools are explicitly configured to
invoke the default canonical behavior; it is just made explicit in the
model and can now serve as a based or removed to disable the behavior.

Bug: #1563
Signed-off-by: Pierre-Charles David <[email protected]>
pcdavid added a commit that referenced this issue Jan 25, 2023
If a diagram description does not explicitly configure a delete/direct
edit/element creation tool, the corresponding behavior is simply
disabled.

By default, new nodes, edges and tools are explicitly configured to
invoke the default canonical behavior; it is just made explicit in the
model and can now serve as a base or removed to disable the behavior.

Bug: #1563
Signed-off-by: Pierre-Charles David <[email protected]>
sbegaudeau pushed a commit that referenced this issue Jan 25, 2023
If a diagram description does not explicitly configure a delete/direct
edit/element creation tool, the corresponding behavior is simply
disabled.

By default, new nodes, edges and tools are explicitly configured to
invoke the default canonical behavior; it is just made explicit in the
model and can now serve as a base or removed to disable the behavior.

Bug: #1563
Signed-off-by: Pierre-Charles David <[email protected]>
sbegaudeau pushed a commit that referenced this issue Jan 25, 2023
If a diagram description does not explicitly configure a delete/direct
edit/element creation tool, the corresponding behavior is simply
disabled.

By default, new nodes, edges and tools are explicitly configured to
invoke the default canonical behavior; it is just made explicit in the
model and can now serve as a base or removed to disable the behavior.

Bug: #1563
Signed-off-by: Pierre-Charles David <[email protected]>
pcdavid added a commit that referenced this issue Feb 2, 2023
@pcdavid pcdavid linked a pull request Feb 2, 2023 that will close this issue
39 tasks
sbegaudeau pushed a commit that referenced this issue Feb 3, 2023
sbegaudeau pushed a commit that referenced this issue Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment