我在 Jetbrains MPS 中有一个概念,我想为其创建一个自定义编辑器。
这个概念有许多孩子。
对于每个孩子,我想显示孩子自己的编辑器,但前面有一个“-”。
我不完全确定我是否正在尝试以正确的方式解决这个问题。
但我的第一次尝试是在子节点上循环的自定义单元格。
我的问题是我不知道如何找到子节点的编辑器单元格:
我的手机提供商:
return new AbstractCellProvider(node) {
@Override
public EditorCell createEditorCell(EditorContext ctx) {
EditorCell_Collection cells = EditorCell_Collection.createVertical(ctx, node);
foreach n in node.elements {
EditorCell_Collection a = EditorCell_Collection.createHorizontal(ctx, node);
EditorCell_Label label = new EditorCell_Constant(ctx, node, "-");
a.addEditorCell(label);
cells.addEditorCell(a);
how to add the child node's editor here?
}
return cells;
}