-
Notifications
You must be signed in to change notification settings - Fork 30
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
Ensure we apply feedback actions already on SetModel #322
Conversation
073c9e7
to
ec76f61
Compare
- Avoid code duplication by moving function into feedback dispatcher
@tortmayr Locally I seem some exceptions I still need to have a look at. Will report back. |
ec76f61
to
bf32b58
Compare
@tortmayr I managed to resolve the dependency issue by using the contribution provider approach from Theia. |
bf32b58
to
8fa1e67
Compare
- Avoid unnecessary types in contribution-provider, re-use GLSP ones - Use undefined instead of 'null' - Export 'ContributionProvider' also as 'TYPES.IContributionProvider' - Adapt copyright header
058c9b0
to
b6c7b18
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Change seems to work great for the most part.
I only have two minor nitpicks, (the final ones I promise😉 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for your patience 😉
One minor suggestion, but nothing that should prevent merging this.
- Ensure we apply feedback actions already on SetModel - Avoid code duplication by moving function into feedback dispatcher - Use 'rank' instead of 'priority' for feedback commands - unify - ContributionProvider to replace @multiInject to better time lazy init Fixes eclipse-glsp/glsp#1239
- Ensure we apply feedback actions already on SetModel - Avoid code duplication by moving function into feedback dispatcher - Use 'rank' instead of 'priority' for feedback commands - unify - ContributionProvider to replace @multiInject to better time lazy init Fixes eclipse-glsp/glsp#1239
What it does
Ensure that feedback actions are already applied on set-model and not only on update-model.
Fixes eclipse-glsp/glsp#1239
How to test
In the workflow example, you can add a startup listener that adds feedback early on, e.g.,
With this (and the correct binding in the module) you should see that we have a select feedback registered and applied even if all you do is open the model.
Follow-ups
Changelog
This PR should be mentioned in the changelog
This PR introduces a breaking change (if yes, provide more details below for the changelog and the migration guide)
Method
FeedbackAwareUpdateModelCommand.getFeedbackCommands
was move toIFeedbackEmitter
for re-use, resulting in two new methods:getFeedbackCommands
andapplyFeedbackCommands
.Method
FeedbackAwareUpdateModelCommand.getPriority
was replaced by a genericrank
property and theRanked
namespace.The
priority
property (higher priority equals earlier execution) inFeedbackCommand
was superseeded by arank
property (lower rank equals earlier execution).