mps-aspect-editor
Skill1.7k starsChanged 2 months agoApache-2.0View on GitHub
Use when creating or changing MPS editor definitions — the overall workflow from scaffolding a `ConceptEditorDeclaration` through componentizing reusable `EditorComponentDeclaration`s, refining cell models and cell layouts, applying style sheets and indent-layout style items, wiring smart references, leveraging inheritance via super-concepts and interfaces, inspecting (`print_node_json`, `show_node_representation`) and validating (`check_root_node_problems`). Covers `jetbrains.mps.lang.editor` cell models (`CellModel_RefNode`/`CellModel_RefNodeList`/`CellModel_RefCell`/`CellModel_Property`/`CellModel_Constant`), layout choices, and JSON blueprints for common editor shapes. For the non-layout side (action maps, keymaps, transformation/substitute menus) use `mps-aspect-editor-menus-and-keymaps`.
Trending
Quiet since October.thin dataabout the whole repository
Who's talking about JetBrains/MPS
- mbeddr/mps-gradle-plugin“Null pointer exception on generate”GitHub · May 18, 2020 · 1 reactions
- nebojsa-vuksic/skill-atlas“Scan every repository of an organization or user”GitHub · Oct 1, 2026
- modelix/modelix.editor“Implement MPS shortcuts”GitHub · Feb 21, 2023
The biggest 3 of 3 mentions linking to the repository that our crawl found. Each line is their own headline.
In this repository83 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- actionsSkill
- bugfix-workflowSkill
- code-styleSkill
- commitsSkill
- debuggingSkill
- mps-aspect-accessoriesSkill
- mps-aspect-actionsSkill
- mps-aspect-behaviorSkill
- mps-aspect-constraintsSkill
- mps-aspect-dataflowSkill
- mps-aspect-editor-menus-and-keymapsSkill
- mps-aspect-editorSkill
- mps-aspect-generation-planSkill
- mps-aspect-generatorSkill
- mps-aspect-intentionsSkill
- mps-aspect-migrationsSkill
- mps-aspect-structure-conceptsSkill
- mps-aspect-textgenSkill
- mps-aspect-typesystemSkill
- mps-baselanguageSkill
- mps-build-languageSkill
- mps-consoleSkill
- mps-distribution-buildSkill
- mps-dsl-memorySkill
- mps-ide-pluginSkill
- mps-lang-core-xmlSkill
- mps-language-analysisSkill
- mps-language-aspects-overviewSkill
- mps-language-inheritanceSkill
- mps-language-modularitySkill
- mps-mcp-workflowSkill
- mps-model-manipulationSkill
- mps-node-editingSkill
- mps-project-managementSkill
- mps-quotationsSkill
- mps-run-configurationsSkill
- mps-testsSkill
- registrySkill
- skill-optimization-studySkill
- ssrSkill
- teamcity-cliSkill
- actionsSkill
- bugfix-workflowSkill
- code-styleSkill
- commitsSkill
- debuggingSkill
- mps-aspect-accessoriesSkill
- mps-aspect-actionsSkill
- mps-aspect-behaviorSkill
- mps-aspect-constraintsSkill
- mps-aspect-dataflowSkill
- mps-aspect-editor-menus-and-keymapsSkill
- mps-aspect-generation-planSkill
- mps-aspect-generatorSkill
- mps-aspect-intentionsSkill
- mps-aspect-migrationsSkill
- mps-aspect-structure-conceptsSkill
- mps-aspect-textgenSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Smart references: no wrapping layout cell — just a single CellModel_RefCell whose editorComponent is an InlineEditorComponent with a …
- Very specific: line 23
Componentize shared cells: when several concept editors repeat the same cell group, factor it into an EditorComponentDeclaration (bound to …
- Very specific: line 24
Stylesheets: check for existing style classes in extended languages before creating new ones in a StyleSheet node.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MPS Editor — Technical Reference
Loading companion skills
Companion names in this skill are lazy dependencies: load only those relevant to the current task. If this skill came from an MCP server, use the host's skill loader to resolve the companion's unique discovered entry URI on the same host-assigned originating server. If the host has no server-backed skill loader, stop and report that limitation; do not silently fall back to a filesystem copy. If this skill came from a filesystem catalog, load the named sibling from that same catalog at <skills-root>/<skill-name>/SKILL.md, even if remote skill loaders are also available. Do not invent a tool name or server endpoint.
The jetbrains.mps.lang.editor language defines projectional editors as trees of cell models (display elements) with cell layouts and style items. This skill is the technical lookup: concept names, suffixes, style classes, and the rules that decide which cell model to use where.
Critical Directives
- Always use
CellModel_RefNodeListfor0..nor1..nchildren.CellModel_RefNodeis for single cardinality only. - Use
IndentLayoutOnNewLineStyleClassItem(apply to the cell that should start on a new line) instead of the legacyIndentLayoutNewLineStyle(applied to the cell before the break) — the latter is easier to get wrong. - Reference cells: set the internal
CellModel_Property(e.g.name) inside anInlineEditorComponenttoreadOnly=trueso the referenced target cannot be accidentally renamed through the editor. - Smart references: no wrapping layout cell — just a single
CellModel_RefCellwhoseeditorComponentis anInlineEditorComponentwith aCellModel_Property(relationDeclaration: name,readOnly: true). - List empty state: a
CellModel_RefNodeListalready synthesizes an editable empty cell (caret lands there,Ctrl+Spaceworks). Add an explicitemptyCellModel(e.g. aCellModel_Constant "<no items>") only to customize the empty cell — but a plain constant is read-only and loses the instant-typing, so to keep it, put the hint in the constant'snullText(nottext) and add anEditableStyleClassItem(flag=true). See the Editable Empty-List Placeholder pattern inreferences/editor-patterns.md. - Inheritance: components can be reused if defined for the concept, its super-concepts, or implemented interfaces.
- Componentize shared cells: when several concept editors repeat the same cell group, factor it into an
EditorComponentDeclaration(bound to the most general concept or interface that owns the relations) and reuse it viaCellModel_Component. Seereferences/editor-components.md. - Stylesheets: check for existing style classes in extended languages before creating new ones in a
StyleSheetnode.
Common Workflow
- Check whether the editor model already exists — it almost always does.
editoris one of a language's default aspects (alongsidestructure,constraints,behavior,typesystem), so any non-trivial language already has it. Confirm withmps_mcp_get_project_structure(it lists the module's models) before doing anything else. Only when a brand-new language genuinely has no editor model do you create one — withmps_mcp_create_modelwithmoduleName: "<lang>"andmodelName: "<lang>.editor"(aspect IDeditor, case-sensitive, no@suffix; see aspect-model-stereotypes.md). Action maps, keymaps, transformation/substitute menus live in the sameeditormodel — there is no separate aspect ID for them. - Scaffold first —
mps_mcp_scaffold_editorbuilds a default editor that wires properties/children/references to sensible cell models. - Componentize reusable cell groups into an
EditorComponentDeclarationand embed them withCellModel_Component— seereferences/editor-components.mdfor the manual andmps_mcp_scaffold_editor(type="component",includeComponents,detectComponents) paths. - Refine cell choice and layout using the catalog below.
- Inspect with
mps_mcp_print_node(structural, textual or HTML projection). - Validate with
mps_mcp_check_root_node_problems.
Node cell layout vs. inspected cell layout
A ConceptEditorDeclaration holds two editor sections:
- Node cell layout — the
cellModelchild (cardinality1). The main editor, shown inline in the document where the node appears. - Inspected cell layout — the
inspectedCellModelchild (cardinality0..1). A secondary definition shown in the Inspector tool window when the caret is on this node in the main editor. Typically used for less-important or less-frequently read/modified properties so they stay out of the main layout.
Both roles accept any EditorCellModel and are built the same way (collections, property cells, ref cells, …). The inspected section is optional — omit inspectedCellModel when everything belongs in the main editor. See references/editor-patterns/inspected-cell-layout.md.
Related Skills
mps-aspect-editor-menus-and-keymaps— for action maps, cell keymaps, transformation menus, substitute menus, side transforms, paste wrappers, copy-paste handlers, completion styling, and reference presentation. Use this skill alongside that one when authoring an editor end-to-end.mps-aspect-structure-concepts— concept declarations supply the relations (properties / children / references) the editor wires up.mps-language-aspects-overview— for the broader authoring order around editors.
Reference Index
Start here — most common case: laying out cells for one concept → read only references/cell-models.md; a known layout shape (child on its own line, indented block, vertical list) → only references/editor-patterns.md; a style item's accepted literals → only references/stylesheet-values.md.
- Open
references/cell-models.mdfor the catalog of cell-model concepts (ConceptEditorDeclaration,EditorComponentDeclaration,CellModel_Collection,CellModel_Constant,CellModel_Property,CellModel_ReadOnlyModelAccessor,CellModel_RefNode,CellModel_RefNodeList,CellModel_RefCell,CellModel_Component,InlineEditorComponent) with their suffixes and purpose. - Open
references/indent-layout-styles.mdfor the style-item catalog (IndentLayoutOnNewLineStyleClassItem,IndentLayoutIndentStyleClassItem,IndentLayoutNewLineChildrenStyleClassItem,SelectableStyleSheetItem) used insideCellLayout_Indent. - Open
references/editor-patterns.mdfor ready-to-paste JSON / pseudo-code patterns: indented child on a new line, named concept with keyword header, transparent list, smart-reference cell, a minimalConceptEditorDeclarationJSON template, a concept editor with an inspected cell layout, the empty-constant vertical-gap separator, the editable empty-list placeholder with a disappearingnullTexthint (EditableStyleClassItem), and the annotation (node attribute) editor withCellModel_AttributedNodeCell(attributed node), guillemet labels, and keyboard-deletability. - Open
references/editor-components.mdfor how to factor editor design into reusable editor components: what anEditorComponentDeclarationis, the inheritance rule, and step-by-step manual (mps_mcp_insert_root_node_from_json+CellModel_Component) and scaffold (mps_mcp_scaffold_editor) recipes with a worked Kaja example. - Open
references/stylesheet-values.mdfor the enum literals accepted by stylesheet items:_Colors_Enum(darkBlue,gray,darkGreen,black, …) forForegroundColorStyleClassItem.colorand other color items,_FontStyle_Enum(PLAIN,BOLD,ITALIC,BOLD_ITALIC,QUERY) forFontStyleStyleClassItem.style, plusUnderlineStyleandFocusPolicy.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

