Repository navigation
Conversation
…ttern changes A completion menu opened by typing next to a cell offers the side transforms of that border. When the pattern changed, the entries were rebuilt from the substitute actions of the anchor cell instead, so the side transforms were lost after the first key and a transform longer than one character could never be completed by typing it. The update now reuses the providers of the menu that was opened, as hasCodeCompletionActions already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Node attributes (jetbrains.mps.lang.core.structure.NodeAttribute) wrap the
cell of the node they are attached to, the first attribute outermost as in
MPS. The notation of an attribute says where that node goes with the new
`attributed` cell.
Each layer is an ordinary cell creation call. The `attributed` cell derives
the next layer inward from the model (the attribute's parent and its next
attribute), so nothing is handed down while rendering and adding or removing
an attribute only rebuilds the layers next to it. An attribute whose notation
has no `attributed` cell is not rendered, and its check messages stay on the
attributed node. Without any notation the reflective editor shows it around
the node. The reflective editor no longer lists `smodelAttribute` as a child
role.
Adding an attribute needs no intention: typing the first constant in front of
the `attributed` cell in front of a node adds it, and the first constant
behind it behind the node. Where the caret is decides how it nests with the
existing ones, the attributed concepts and `multiple` of the attribute info
are respected, and where several nodes start at the same position the
outermost one gets it. Deleting the attribute's own text removes it and keeps
the node.
In the notation language, `AttributedCell` is generated to
`attributed { attributedConcept(...); multiple(...) }` from the concept's
`@attribute info`. ReviewMigration gets a notation that uses it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Test Results623 tests 610 ✅ 10m 57s ⏱️ Results for commit 743131a. ♻️ This comment has been updated with latest results. |
Rendering the editor after a model change ran the typesystem and constraints checks of the whole root node while holding the incremental engine's lock. An edit like pressing Enter had to wait for it, which took more than two seconds in larger root nodes. The editor now only reads the messages published by the last completed check. The checks run in the background in an incremental engine of their own and in a read action that a write action cancels. The messages are published per node, so a new check result only re-renders the cells of the affected nodes. IncrementalModelChecker can now be cancelled. MPS executes model access in a non-cancelable section, so the cancellation is checked explicitly instead of through the ProgressManager. Cancelled checks are re-executed after retryCancelledChecks() instead of staying cached as failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… is open Services are disposed inside a write action. Stopping the Ktor server there waited for the Netty event loops, without any timeout, while a request handler on one of them waited for a read action. MPS could only be killed. The servers are now stopped when the application is about to close or the plugin is about to be unloaded, which is before that write action. Stopping them in dispose() remains as a fallback and gives up after a bounded time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A reference cell generated from an MPS notation writes its target as NodePresentationUtil.presentation, which ends in SNode.getPresentation(). ModelixNodeAsMPSNode answered that with the stored name and otherwise with the toString() of the modelix node. A target whose name is derived by a property getter in the constraints, like an optionally named BlockInstance, has no stored name and was written as `MPSWritableNode(node=(instance of ...))`. getPresentation() now does what MPS's SNode does: it calls the getPresentation behavior, which reads the name through SNodeAccessUtil and so applies the property getter. The behavior runs on the wrapper instead of the unwrapped SNode, so every read it makes is still dependency tracked and the cell follows changes of the name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nces on wrapped nodes ModelixNodeAsMPSNode left some SNode methods to SNodeBase, which throws, and reduced others to what modelix can resolve: - putUserObject threw and getUserObject always returned null. Behaviors of iets3 and other languages cache data in user objects, and since the presentation of a node is computed by its behavior, they also run on wrapped nodes now. User objects are kept on the MPS node, or on the wrapper for a node of another kind. - setReference with an SNodeReference, a ResolveInfo or an SReference threw. The node reference is stored through modelix. A ResolveInfo that holds a node is set as that node, so that a wrapper never ends up in an MPS node, and the other ones are passed to the MPS node. An SReference is stored as what it points to, because MPS only accepts its own references of the node. - getReference returned null for a reference whose target cannot be resolved, and the target node reference of a reference was computed by resolving it. MPS code finds broken references as ones that exist without a target and writes them with their resolve info, so the reference now exists as long as it points somewhere, says where it points to without resolving, and has the resolve info of the MPS reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The link of a super concept is found by its name. The test failed only because of a concept id that doesn't exist, not because of the lookup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
Node attributes (
jetbrains.mps.lang.core.structure.NodeAttribute) are now rendered and editable in the projectional editor.attributedcell (AttributedCellTemplate, DSLattributed { attributedConcept(...); multiple(...) }).CellCreationCall(AttributedNodeCellCreationCall). Theattributedcell works out the next layer inward from the model alone (the attribute's parent and the next attribute after it), the way a child cell would.ChildSpecReferencenow holds aCellCreationCall, so adding or removing an attribute only rebuilds the layers next to it.attributedcell is not rendered, so it can't hide the node, and its check messages stay on the attributed node.attributed node:line.smodelAttributeas a child role.attributedin front of a node adds the attribute; typing the first constant after it behind the node does the same.multiplefrom@attribute infoare respected.AttributedCellconcept with behavior, acanBeChildconstraint (node-attribute notations only), an editor and a generator rule that reads@attribute info.ReviewMigrationin thejetbrains.mps.lang.corenotation now uses it (@Review(reason)above the node).Separate fix in the first commit
updateCodeCompletionActionsrebuilt the menu entries from the anchor cell's substitute actions. When the menu had been opened as a side transform, this dropped all of its entries on the second keystroke, so no side transform longer than one character could be completed by typing it. It now reuses the menu that was opened, ashasCodeCompletionActionsalready did. This affects all multi-character side transforms, not only attributes.Notes for reviewers
IConceptEditorRegistrygainedgetAllConceptEditors(), implemented inLanguageAspectsFromMPSModules; the editor uses it to find attribute notations.allChildrenrather than thesmodelAttributelink, because a model may store that role by name or by ID, and reading it one way registers an incremental dependency that misses changes stored the other way.CodeCompletionTest's list of known duplicates lost its<smodelAttribute>tokens because of the reflective-editor change.Tests
NodeAttributeTest(kernelf, 14 tests): rendering and nesting order, both fallbacks, adding by typing before, after, nested and key by key, themultipleand concept restrictions, and delete to remove.BaseLanguageTests(MPS-backed):@Reviewrenders above a method, typing it adds it, deleting it removes it. All 31 tests in that module pass.projectional-editorandkernelf-editorpass; the JS targets compile; the headless MPS build (:mps:assembleMpsModules) generates and compiles the notation modules.🤖 Generated with Claude Code