JetBrains / MPS-extensions

MPS-extensions aims to ease language development within MPS.
https://jetbrains.github.io/MPS-extensions/
Apache License 2.0
80 stars 49 forks source link

Editor Cell and Editor Component references for the MPS console #728

Closed alexanderpann closed 8 months ago

alexanderpann commented 8 months ago

Remark: The references stop working when the corresponding editor is closed or reopened because they use the hashcode of the editor component.

Examples:

#currentEditorComponent.scrollToCell(cellRef@102119)

#print editorComponentRef@52770.getDeepestSelectedCell()

#currentEditorComponent.getSelectedNode().delete()

cellRef@102119 as EditorCell_Property.synchronizeViewWithModel()

cellRef@102119 as EditorCell_Property.getStyle().set(StyleAttributes.BACKGROUND_COLOR, Color.LIGHT_GRAY)