-
Notifications
You must be signed in to change notification settings - Fork 29
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
GLSP-865: Align client model namespace with server model #291
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.
Change looks good to me overall but there are a few classes still exported with SModel...
. Other than that, I could not identify any issues, thank you Tobias!
Also export all SModel elements (and releated) as aliased/augmented classes in the `GModel` namespace. This means we now can consistently use the GModel syntax on both server and client side. Move package-internal glsp-sprotty reexport into dedicated package. The package-internal reexport required overhead with `tsc-alias` which did not play well with the test setup and ide support (auto-import). Using a dedicated package also improved DevXP in glsp-client as auto-import now longer suggests imports from sprotty or sprotty-protocol. Sprotty and GLSP use different definitions of `Action`. While they are fully compatible this kind of breaks the IDE support for API that uses `Action`. e.g. Implementing an `IActionHandler` would have always auto-imported the wrong `Action` type (from sprotty-protocol). To bypass this issue we extend the sprotty core API classes in question and reexport them instead (see action-override.ts). Also: - reexport sprotty modules that are used in glsp as `FeatureModules`. - Refactor `Argumentable` interface to a model feature and rename to `ArgsAware` and ensure that the argsFeature gets added to each element per default - Augment all actions directly provided by sprotty-protocol to provide a typeguard via namespace - Move all reusable autocomplete compontens into base package - Remove "baseUrl" from tsconfig to avoid breaking "src" auto imports in vscode Part of eclipse-glsp/glsp/issues/865
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.
Great, now the changes look good ot me!
Also export all SModel elements (and releated) as aliased/augmented classes in the
GModel
namespace. This means we now can consistently use the GModel syntax on both server and client side.Move package-internal glsp-sprotty reexport into dedicated package. The package-internal reexport required overhead with
tsc-alias
which did not play well with the test setup and ide support (auto-import). Using a dedicated package also improved DevXP in glsp-client as auto-import now longer suggests imports from sprotty or sprotty-protocol.Sprotty and GLSP use different definitions of
Action
. While they are fully compatible this kind of breaks the IDE support for API that usesAction
. e.g. Implementing anIActionHandler
would have always auto-imported the wrongAction
type (from sprotty-protocol). To bypass this issue we extend the sprotty core API classes in question and reexport them instead (see action-override.ts).Also:
FeatureModules
.Argumentable
interface to a model feature and rename toArgsAware
and ensure that the argsFeature gets added to each element per defaultPart of eclipse-glsp/glsp/issues/865