-
Notifications
You must be signed in to change notification settings - Fork 22
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
Improve Codec handling for multi module use #231
Conversation
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 @eneufeld for the contribution! This is a big improvement over the current design.
...ud.modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/common/codecs/CodecProvider.java
Show resolved
Hide resolved
...ud.modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/common/codecs/CodecProvider.java
Show resolved
Hide resolved
...server.emf/src/org/eclipse/emfcloud/modelserver/emf/common/codecs/DefaultCodecsProvider.java
Outdated
Show resolved
Hide resolved
...ud.modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/di/DefaultModelServerModule.java
Outdated
Show resolved
Hide resolved
...fcloud.modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/patch/EMFCommandHandler.java
Show resolved
Hide resolved
....emfcloud.modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/util/JsonPatchHelper.java
Outdated
Show resolved
Hide resolved
....emfcloud.modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/util/JsonPatchHelper.java
Outdated
Show resolved
Hide resolved
Oops, sorry, I didn't notice that this PR was just a draft and now I cannot dismiss my review because it's a draft. |
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 for the updates! Sorry, I have new requests for changes that I should have found the first time around.
...ud.modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/common/codecs/CodecProvider.java
Show resolved
Hide resolved
...ud.modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/common/codecs/CodecProvider.java
Outdated
Show resolved
Hide resolved
....modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/common/codecs/DICodecsManager.java
Outdated
Show resolved
Hide resolved
....modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/common/codecs/DICodecsManager.java
Outdated
Show resolved
Hide resolved
good catches, I will add those, thank you! |
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.
Looks great! I don't know what the problem is with the build. Works fine for me, including the tests.
Thanks Eugen! I didn't have time to look into it yet, but regarding the build, the EMF tests are failing that are only included in the |
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 for clarifying that, @ndoschek . Indeed, the test failures seem to be finding XMI encodings where JSON encodings were expected. The same tests fail when running the maven build with m2
profile and from the Eclipse launch configuration.
Good thing we have the tests running ;-) . |
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.
Seems to work. Thanks!
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 a lot Eugen! Overall it looks good to me, I added some minor nitpicks inline.
Would be great if you could have a look, thanks!
...ud.modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/common/codecs/CodecsManager.java
Show resolved
Hide resolved
...ud.modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/common/codecs/CodecProvider.java
Outdated
Show resolved
Hide resolved
...ud.modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/common/codecs/CodecProvider.java
Outdated
Show resolved
Hide resolved
....modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/common/codecs/DICodecsManager.java
Outdated
Show resolved
Hide resolved
....modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/common/codecs/DICodecsManager.java
Show resolved
Hide resolved
....modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/common/codecs/DICodecsManager.java
Outdated
Show resolved
Hide resolved
...server.emf/src/org/eclipse/emfcloud/modelserver/emf/common/codecs/DefaultCodecsProvider.java
Outdated
Show resolved
Hide resolved
....emfcloud.modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/util/JsonPatchHelper.java
Outdated
Show resolved
Hide resolved
....emfcloud.modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/util/JsonPatchHelper.java
Outdated
Show resolved
Hide resolved
...fcloud.modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/patch/EMFCommandHandler.java
Show resolved
Hide resolved
Currently Codecs are only registered using the format they support. This is not enough if different codecs are needed for the same format but different models. The new API uses a CodecProvider that can be used with a bazaar pattern so that the best fitting CodecProvider can be retrieved. Fix eclipse-emfcloud#230
- add static methods to CodecProvider - change DefaultCodecsProvider to have a map instead of a Set - add JavaDoc
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 for the update Eugen! Looks good to me, two final minors from my side. Thanks!
...ud.modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/common/codecs/CodecsManager.java
Outdated
Show resolved
Hide resolved
...d.modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/common/watchers/ModelWatcher.java
Show resolved
Hide resolved
...ud.modelserver.emf/src/org/eclipse/emfcloud/modelserver/emf/common/codecs/CodecProvider.java
Outdated
Show resolved
Hide resolved
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 a lot Eugen! 👍
Currently Codecs are only registered using the format they support.
This is not enough if different codecs are needed for the same
format but different models.
The new API uses a CodecProvider that can be used with a bazaar pattern
so that the best fitting CodecProvider can be retrieved.
Fix #230