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

Preconditions from the tools are not respected #779

Closed
4 tasks done
Gelio opened this issue Oct 17, 2021 · 2 comments · Fixed by #1035
Closed
4 tasks done

Preconditions from the tools are not respected #779

Gelio opened this issue Oct 17, 2021 · 2 comments · Fixed by #1035

Comments

@Gelio
Copy link

Gelio commented Oct 17, 2021

  • I have checked that this bug has not yet been reported by someone else
  • I have checked that this bug appears on Chrome
  • I have specified the version :
  • other: 0.4.6
  • I have specified my environment :
  • Ubuntu 20.04 LTS

Screenshots

Edge Creation forbidden in Sirius Desktop, as expected (due to preconditions set to aql:false):

Peek.2021-10-17.16-46.mp4

It is allowed in Sirius Web (neither Start nor Complete conditions are checked):

Peek.2021-10-17.16-48.mp4

Steps to reproduce

Add Conneciton Start Precondition or Connection Complete Precondition to an Edge Creation Tool:

image

Expected behavior

  1. The edge creation tool does not appear at all or appears but is disabled (when the Connection Start Precondition results in false)
  2. The edge creation tool has the disabled icon when Connection Complete Precondition results in false

Actual behavior

Despite preconditions being false, the edge can be freely created, as if they were not taken into account.

@pcdavid
Copy link
Member

pcdavid commented Oct 22, 2021

Thanks for the detailed report. This is a known limitation at the moment.
We can not (easily) have the same interactive behavior as Sirius Desktop, as the expressions can only be evaluated on then backend, and getting the same behavior would required requests to the backend every time the end user moves the cursor on a different element.
We could probably however let the creation request pass to the backend but check for these before actually executing the tool, and report a message to the end-user if the tool was not applied because of these.

@Gelio
Copy link
Author

Gelio commented Oct 24, 2021

We could probably however let the creation request pass to the backend but check for these before actually executing the tool, and report a message to the end-user if the tool was not applied because of these.

This sounds like a logical solution 👍

I understand it will take some time to implement and may not be a priority at the moment. Is there any way I can replicate this functionality (disallowing edges to be created under certain conditions) in Sirius Web?
I am in control of the metamodel and the Sirius Web app, so I can modify both and hardcode the condition somewhere.

@sbegaudeau sbegaudeau changed the title Preconditions from Edge Creation tool are not respected Preconditions from the tools are not respected Jan 17, 2022
@sbegaudeau sbegaudeau added this to the 2022.03.0 milestone Feb 3, 2022
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 3, 2022
Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
@sbegaudeau sbegaudeau linked a pull request Feb 3, 2022 that will close this issue
1 task
@sbegaudeau sbegaudeau removed a link to a pull request Feb 3, 2022
1 task
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 7, 2022
Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 7, 2022
Also rename associated mutation and results in DiagramWebSocketContainer

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 7, 2022
Temporary remove the computation of synchronization state in
ContextualPalette frontend component. Will be computed by the backend.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 8, 2022
Implementations must provide the tool sections (and associated tools)
for a given diagram element.
Add a first implementation of this new interface for the compatibility
layer.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 8, 2022
Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 9, 2022
Do not handle CreateEdgeTool preconditions (start & complete) for now.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 9, 2022
Implementations must provide the tool sections (and associated tools)
for a given diagram element.
Add a first implementation of this new interface for the compatibility
layer.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 9, 2022
Implementations must provide the tool sections (and associated tools)
for a given diagram element.
Add a first implementation of this new interface for the compatibility
layer.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 9, 2022
Temporary remove the computation of synchronization state in
ContextualPalette frontend component. Will be computed by the backend.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 9, 2022
Implementations must provide the tool sections (and associated tools)
for a given diagram element.
Add a first implementation of this new interface for the compatibility
layer.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 9, 2022
Implementations must provide the tool sections (and associated tools)
for a given diagram element.
Add a first implementation of this new interface for the compatibility
layer.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 9, 2022
Implementations must provide the tool sections (and associated tools)
for a given diagram element.
Add a first implementation of this new interface for the compatibility
layer.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 9, 2022
Do not handle EdgeCreationTool preconditions (start & complete) yet.
Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 10, 2022
Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 10, 2022
Also rename associated mutation and results in DiagramWebSocketContainer

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 10, 2022
Temporary remove the computation of synchronization state in
ContextualPalette frontend component. Will be computed by the backend.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 14, 2022
Fix warning message in console: 'Warning: Each child in a list should
have a unique "key" prop.'

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 14, 2022
This method is not used anymore. This part is computed by the backend.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 14, 2022
Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-web that referenced this issue Feb 14, 2022
-Add new DataFetcher for toolSections
-Support new API IIdentifierProvider#findVsmElementId

Bug: eclipse-sirius/sirius-web#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 17, 2022
Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 17, 2022
Also rename associated mutation and results in DiagramWebSocketContainer

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 17, 2022
Temporary remove the computation of synchronization state in
ContextualPalette frontend component. Will be computed by the backend.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 17, 2022
Implementations must provide the tool sections (and associated tools)
for a given diagram element.
Add a first implementation of this new interface for the compatibility
layer.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 17, 2022
Do not handle EdgeCreationTool preconditions (start & complete) yet.
Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 17, 2022
Fix warning message in console: 'Warning: Each child in a list should
have a unique "key" prop.'

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 17, 2022
This method is not used anymore. This part is computed by the backend.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 17, 2022
Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
AxelRICHARD added a commit to AxelRICHARD/sirius-components that referenced this issue Feb 17, 2022
Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
@sbegaudeau sbegaudeau linked a pull request Feb 21, 2022 that will close this issue
1 task
sbegaudeau pushed a commit to AxelRICHARD/sirius-components that referenced this issue Mar 1, 2022
Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
sbegaudeau pushed a commit to AxelRICHARD/sirius-components that referenced this issue Mar 1, 2022
Also rename associated mutation and results in DiagramWebSocketContainer

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
sbegaudeau pushed a commit to AxelRICHARD/sirius-components that referenced this issue Mar 1, 2022
Temporary remove the computation of synchronization state in
ContextualPalette frontend component. Will be computed by the backend.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
sbegaudeau pushed a commit to AxelRICHARD/sirius-components that referenced this issue Mar 1, 2022
Implementations must provide the tool sections (and associated tools)
for a given diagram element.
Add a first implementation of this new interface for the compatibility
layer.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
sbegaudeau pushed a commit to AxelRICHARD/sirius-components that referenced this issue Mar 1, 2022
Do not handle EdgeCreationTool preconditions (start & complete) yet.
Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
sbegaudeau pushed a commit to AxelRICHARD/sirius-components that referenced this issue Mar 1, 2022
Fix warning message in console: 'Warning: Each child in a list should
have a unique "key" prop.'

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
sbegaudeau pushed a commit to AxelRICHARD/sirius-components that referenced this issue Mar 1, 2022
This method is not used anymore. This part is computed by the backend.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
sbegaudeau pushed a commit to AxelRICHARD/sirius-components that referenced this issue Mar 1, 2022
Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
sbegaudeau pushed a commit to AxelRICHARD/sirius-components that referenced this issue Mar 1, 2022
sbegaudeau pushed a commit to AxelRICHARD/sirius-components that referenced this issue Mar 4, 2022
…ram element

A new API based on the IToolSectionsProvider is now available in order to let
specifiers define which tools are available dynamically when the contextual
palette is requested by the frontend.

An implementation has been provided for the Sirius RCP compatibility layer which
uses the various preconditions which can be defined in an odesign file in order
to compute the tool sections and tools which should be available for a specific
diagram element.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
sbegaudeau pushed a commit to AxelRICHARD/sirius-components that referenced this issue Mar 7, 2022
…ram element

A new API based on the IToolSectionsProvider is now available in order to let
specifiers define which tools are available dynamically when the contextual
palette is requested by the frontend.

An implementation has been provided for the Sirius RCP compatibility layer which
uses the various preconditions which can be defined in an odesign file in order
to compute the tool sections and tools which should be available for a specific
diagram element.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
@sbegaudeau sbegaudeau self-assigned this Mar 7, 2022
sbegaudeau pushed a commit to AxelRICHARD/sirius-components that referenced this issue Mar 8, 2022
…ram element

A new API based on the IToolSectionsProvider is now available in order to let
specifiers define which tools are available dynamically when the contextual
palette is requested by the frontend.

An implementation has been provided for the Sirius RCP compatibility layer which
uses the various preconditions which can be defined in an odesign file in order
to compute the tool sections and tools which should be available for a specific
diagram element.

Bug: eclipse-sirius#779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
sbegaudeau pushed a commit that referenced this issue Mar 8, 2022
…ram element

A new API based on the IToolSectionsProvider is now available in order to let
specifiers define which tools are available dynamically when the contextual
palette is requested by the frontend.

An implementation has been provided for the Sirius RCP compatibility layer which
uses the various preconditions which can be defined in an odesign file in order
to compute the tool sections and tools which should be available for a specific
diagram element.

Bug: #779
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants