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

Rework Action/Operation handler API #425

Closed
tortmayr opened this issue Oct 18, 2021 · 0 comments · Fixed by eclipse-glsp/glsp-server#135
Closed

Rework Action/Operation handler API #425

tortmayr opened this issue Oct 18, 2021 · 0 comments · Fixed by eclipse-glsp/glsp-server#135
Assignees
Projects

Comments

@tortmayr
Copy link
Contributor

Remove modelstate argument from handle() method & deprecate current implementation of the basic action/operation handlers.

@tortmayr tortmayr added this to New in GLSP kanban via automation Oct 18, 2021
@tortmayr tortmayr moved this from New to In progress in GLSP kanban Oct 19, 2021
@tortmayr tortmayr self-assigned this Oct 19, 2021
tortmayr added a commit to eclipse-glsp/glsp-server that referenced this issue Oct 19, 2021
With the DI rework #127 its no longer necessary to pass the model state object as part of the execute method. instead action/operation handlers
can simply directly inject the model state if the want to use it.  Since action & operation handlers are now client session scoped an arbitary state object can be injected and used for execution. (Part of eclipse-glsp/glsp/issues/120)

- Remove the modelstate argument from the execute() method of `ActionHandler` and `OperationHandler`
- Remove `Handler` super interface because it doesn't provide any additional value
- Add documentation for affected API.
- Introduce new `DefaultActionHandler` & `DefaultOperationHandler` that serve as replacement for the now deprecated `BasicActionHandler` & `BasicOperationHandler`
- Deprecate `BasicOperationHandler` & `BasicActionHandler` & `BasicCreateOperationHandler`
- Replace usage of `BasicActionHandler` with `DefaultActionHandler`
- Replace usage of `BasicOperationHandler'  with `DefaultActionHandler`
- Replace usage of `BasicCreateOperationhandler'  with `DefaultOperationHandler` & `DefaultCreateOperationHandler`

Fixes eclipse-glsp/glsp/issues/425
tortmayr added a commit to eclipse-glsp/glsp-server that referenced this issue Oct 25, 2021
With the DI rework #127 its no longer necessary to pass the model state object as part of the execute method. instead action/operation handlers
can simply directly inject the model state if the want to use it.  Since action & operation handlers are now client session scoped an arbitary state object can be injected and used for execution. (Part of eclipse-glsp/glsp/issues/120)

- Remove the modelstate argument from the execute() method of `ActionHandler` and `OperationHandler`
- Remove `Handler` super interface because it doesn't provide any additional value
- Add documentation for affected API.
- Introduce new `DefaultActionHandler` & `DefaultOperationHandler` that serve as replacement for the now deprecated `BasicActionHandler` & `BasicOperationHandler`
- Deprecate `BasicOperationHandler` & `BasicActionHandler` & `BasicCreateOperationHandler`
- Replace usage of `BasicActionHandler` with `DefaultActionHandler`
- Replace usage of `BasicOperationHandler'  with `DefaultActionHandler`
- Replace usage of `BasicCreateOperationhandler'  with `DefaultOperationHandler` & `DefaultCreateOperationHandler`

Fixes eclipse-glsp/glsp/issues/425
GLSP kanban automation moved this from In progress to Done Oct 26, 2021
tortmayr added a commit to eclipse-glsp/glsp-server that referenced this issue Oct 26, 2021
* #425#120 Rework Actionhandler/Operationhandler API

With the DI rework #127 its no longer necessary to pass the model state object as part of the execute method. instead action/operation handlers
can simply directly inject the model state if the want to use it.  Since action & operation handlers are now client session scoped an arbitary state object can be injected and used for execution. (Part of eclipse-glsp/glsp/issues/120)

- Remove the modelstate argument from the execute() method of `ActionHandler` and `OperationHandler`
- Remove `Handler` super interface because it doesn't provide any additional value
- Add documentation for affected API.
- Introduce new `DefaultActionHandler` & `DefaultOperationHandler` that serve as replacement for the now deprecated `BasicActionHandler` & `BasicOperationHandler`
- Deprecate `BasicOperationHandler` & `BasicActionHandler` & `BasicCreateOperationHandler`
- Replace usage of `BasicActionHandler` with `DefaultActionHandler`
- Replace usage of `BasicOperationHandler'  with `DefaultActionHandler`
- Replace usage of `BasicCreateOperationhandler'  with `DefaultOperationHandler` & `DefaultCreateOperationHandler`

Fixes eclipse-glsp/glsp/issues/425


* Remove GModelState from interfaces as it should now be injected instead

This simplifies the use of custom model state classes because
implementations can now inject their concrete custom class instead of
the generic GModelState that they'd have to cast again.
Also several implementations often don't need the model state making the
method parameter superfluous.

Fixes eclipse-glsp/glsp/issues/120


Co-authored-by: Philip Langer <planger@eclipsesource.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
GLSP kanban
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant