GLSP-1727: Keep applying computed bounds when an entry cannot be applied - #295
Merged
Merged
Conversation
martin-fleck-at
force-pushed
the
issues/1727-resilient-computed-bounds
branch
from
August 25, 2026 14:32
06d515d to
8f2e6d3
Compare
A single unresolvable element in a ComputedBoundsAction aborted the whole batch: the client had already measured every element, but one stale id threw and the server dropped the remaining bounds, alignments and routes along with the model update the client was waiting for. Mirrors the same fix in glsp-server-node. - resolve elements through the index Optional instead of getOrThrow, so an unknown id yields an empty result - report a route with fewer than two points as not applicable rather than as an error, a client may have nothing to report for an unmeasured edge yet - log a skipped entry, routes at debug level because an edge the client has not finished routing yet is expected - split the apply step into applyElementBounds, applyAlignments and applyRoutes - leave applyRoutingPoints strict, an unknown id in a ChangeRoutingPointsOperation is a real error Adjusting the apply step previously meant overriding executeAction, which also takes over the revision check and the model lock. ComputedBoundsActionHandler now dispatches through overridable per-kind methods, so an adopter can replace one kind and rebind the handler, as the workflow example does for other handlers. LayoutUtil.applyRoute now returns Optional<GEdge>; noted in the changelog under potentially breaking changes. Relates to eclipse-glsp/glsp#1727
martin-fleck-at
force-pushed
the
issues/1727-resilient-computed-bounds
branch
from
August 25, 2026 15:15
8f2e6d3 to
349a673
Compare
tortmayr
reviewed
Aug 26, 2026
- deprecate LayoutUtil.applyBounds(root, action, modelState), it calls the static per-kind methods and therefore skips the overridable ones on ComputedBoundsActionHandler - point the batch test at the live per-kind methods, so the deprecated entry point has no callers left - drop the duplicated TestGModelState from both tests, updateRoot on DefaultGModelState already builds and stores the index - assert the applied route keeps only the intermediate point and puts source and target under their args keys - keep the root parameter on the handler's applyBounds, glsp-server-node has the same signature and an override may want the root Relates to eclipse-glsp/glsp#1727
martin-fleck-at
force-pushed
the
issues/1727-resilient-computed-bounds
branch
from
August 26, 2026 09:10
7e09e12 to
b1fb4e2
Compare
tortmayr
approved these changes
Aug 26, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
A single unresolvable element in a ComputedBoundsAction aborted the whole batch: the client had already measured every element, but one stale id threw and the server dropped the remaining bounds, alignments and routes along with the model update the client was waiting for. Mirrors the same fix in glsp-server-node.
Adjusting the apply step previously meant overriding executeAction, which also takes over the revision check and the model lock. ComputedBoundsActionHandler now dispatches through overridable per-kind methods, so an adopter can replace one kind and rebind the handler, as the workflow example does for other handlers.
LayoutUtil.applyRoute now returns Optional; noted in the changelog under potentially breaking changes.
Relates to eclipse-glsp/glsp#1727
How to test
Follow-ups
Changelog