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

Implemented request/response actions, code cleanup #103

Merged
merged 2 commits into from
Sep 3, 2019

Conversation

spoenemann
Copy link
Contributor

Fixes #8, fixes #85.

  • Added RequestAction and ResponseAction interfaces.
  • Added a request method to IActionDispatcher to dispatch requests and wait for the response.
  • Split Viewer in three classes ModelViewer, HiddenModelViewer, PopupModelViewer.
  • Allow commands to return a cause action.
  • Pass the cause action to the viewer and its decorators so they can link any created response action with the original request.
  • Added ModelRequestCommand to ease the implementation of requests for model details.
  • Added getSelection and getViewport to LocalModelSource based on corresponding request/response actions.

Copy link
Contributor

@planger planger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you very much! I think especially request / response actions will come in handy for several use cases and avoiding model updates for commands that don't change anything in the model may have a positive impact on performance.

I only found a very minor suggestion inline regarding the naming. Other than that, this looks great to me!

src/base/commands/command.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@JanKoehnlein JanKoehnlein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great step forward!
See my comments.

src/base/commands/command.ts Outdated Show resolved Hide resolved
src/features/bounds/bounds-manipulation.ts Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[arch] reading SModel from the outside Support request / response scheme
3 participants