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

Revise TypeHints and server side feedback for creation actions #211

Closed
tortmayr opened this issue Mar 25, 2021 · 0 comments · Fixed by eclipse-glsp/glsp-server-node#60
Closed
Assignees
Labels
Projects

Comments

@tortmayr
Copy link
Contributor

The current implementation of the EdgeTypeHints has certain limitations:

  • The use of sets for source and target element ids is insufficient to model relationships like:
    Source A can connect to Target B
    Source A can't connect to Target A
    Source B can connect to Target A
  • It should be possible to specify the maximal amount of connected edges for a ShapeElementType
  • It should be optionally possible to query the server for advanced connection info.

See also
https://spectrum.chat/glsp/general/how-edgetypehint-works~5ddb2b91-3863-4019-bc4d-03e2e948cb90

@tortmayr tortmayr added enhancement New feature or request server-java client labels Mar 25, 2021
@tortmayr tortmayr added this to New in GLSP kanban via automation Mar 25, 2021
@planger planger moved this from New to Backlog in GLSP kanban Mar 25, 2021
@planger planger added this to the 1.0.0 Graduation Release milestone Jul 9, 2021
@planger planger changed the title Revise TypeHInts and server side feedback for creation actions Revise TypeHints and server side feedback for creation actions Oct 7, 2021
@tortmayr tortmayr removed this from the 1.0.0 Graduation Release milestone Nov 5, 2021
@planger planger added this to the 1.0.0 Release milestone Mar 9, 2022
@tortmayr tortmayr modified the milestones: 1.0.0 Release, 2.0.0 Release Jan 5, 2023
@planger planger moved this from Backlog to To do in GLSP kanban Jul 11, 2023
@planger planger moved this from To do to In progress in GLSP kanban Sep 21, 2023
tortmayr added a commit to eclipse-glsp/glsp-client that referenced this issue Sep 24, 2023
- Refactor EdgeTypeHint definition
  -  Add a new 'dynamic' property, indicating that new edges need and additional check with the server before allowing creation
  -  Make source/target element type ids properties optional
  If not defined, all potential element types are considered to be valid sources/targets
- Add `RequestEdgeCheckAction` and `EdgeCheckResultAction` response to implement
 the dynamic check
- Update the EdgeCreationTool to check with the server when trying to
create a new edge configured as Dynamic

-Refactor `TypeHintsProvider` and `ApplyTypeHintsCommand
 - Simplify type-hints aware can connect implementation. Just validate against the source/target types
    of the edge hint that is applicable for the given routable 
  - Ensure that the default (i.e. class-level implementation) of  `canConnect` is called if no typehint is applicable to the given routable
 - Remove `getValidEdgeElementTypes` function from `TypeHintsProvider`.  Was only used
    for the old type-hints aware `canConnect` implementation. Is no longer needed and incomplete anyways (does not consider nested subtypes)
- Add tests for type-hints feature
  Fixes eclipse-glsp/glsp#45
- Remove `hasCompatibleType` utility function from `smodel-util` as it is no longer used
  and the implementation was incomplete anyways (did not consider nested subtypes)

- Also: Don't use stroked lines for edges until eclipse-glsp/glsp/issues/1083 is fixed

Part of eclipse-glsp/glsp/issues/211

Co-authored-by: Camille Letavernier <cletavernier@eclipsesource.com >
tortmayr pushed a commit to eclipse-glsp/glsp-client that referenced this issue Sep 26, 2023
…285)

- Refactor EdgeTypeHint definition
  -  Add a new 'dynamic' property, indicating that new edges need and additional check with the server before allowing creation
  -  Make source/target element type ids properties optional
  If not defined, all potential element types are considered to be valid sources/targets
- Add `RequestEdgeCheckAction` and `EdgeCheckResultAction` response to implement
 the dynamic check
- Update the EdgeCreationTool to check with the server when trying to
create a new edge configured as Dynamic

-Refactor `TypeHintsProvider` and `ApplyTypeHintsCommand
 - Simplify type-hints aware can connect implementation. Just validate against the source/target types
    of the edge hint that is applicable for the given routable 
  - Ensure that the default (i.e. class-level implementation) of  `canConnect` is called if no typehint is applicable to the given routable
 - Remove `getValidEdgeElementTypes` function from `TypeHintsProvider`.  Was only used
    for the old type-hints aware `canConnect` implementation. Is no longer needed and incomplete anyways (does not consider nested subtypes)
- Add tests for type-hints feature
  Fixes eclipse-glsp/glsp#45
- Remove `hasCompatibleType` utility function from `smodel-util` as it is no longer used
  and the implementation was incomplete anyways (did not consider nested subtypes)

- Also: Don't use stroked lines for edges until eclipse-glsp/glsp/issues/1083 is fixed

Part of eclipse-glsp/glsp/issues/211

Co-authored-by: Camille Letavernier <cletavernier@eclipsesource.com >
tortmayr added a commit to eclipse-glsp/glsp-server-node that referenced this issue Sep 26, 2023
…ons (#210)

- Add action handler for `RequestEdgeCheckAction` and `EdgeCreationChecker` API
- Add a optional `EdgeCreationchecker` component that can be implemented by adopters to provide dynamic typehints
- Adapt workflow example to use dynamic edge hints for weighted edges

Also: Update eslint config to show warnings if we import from internal index instead of the relative path to the file

Fixes eclipse-glsp/glsp/issues/211
tortmayr added a commit to eclipse-glsp/glsp-server-node that referenced this issue Sep 26, 2023
…ons (#210)

- Add action handler for `RequestEdgeCheckAction` and `EdgeCreationChecker` API
- Add a optional `EdgeCreationchecker` component that can be implemented by adopters to provide dynamic typehints
- Adapt workflow example to use dynamic edge hints for weighted edges

Also: Update eslint config to show warnings if we import from internal index instead of the relative path to the file

Fixes eclipse-glsp/glsp/issues/211
GLSP kanban automation moved this from In progress to Done Sep 27, 2023
tortmayr added a commit to eclipse-glsp/glsp-server-node that referenced this issue Sep 27, 2023
#60)

* GLSP-211: Revise TypeHints and server side feedback for creation actions (#210)

- Add action handler for `RequestEdgeCheckAction` and `EdgeCreationChecker` API
- Add a optional `EdgeCreationchecker` component that can be implemented by adopters to provide dynamic typehints
- Adapt workflow example to use dynamic edge hints for weighted edges

Also: Update eslint config to show warnings if we import from internal index instead of the relative path to the file

Fixes eclipse-glsp/glsp/issues/211
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
GLSP kanban
  
Done
3 participants