package jetbrains.mps.editor.runtime;
/*Generated by MPS */
import jetbrains.mps.nodeEditor.EditorComponent;
import org.jetbrains.mps.openapi.model.SNode;
import org.jetbrains.mps.openapi.module.SRepository;
import jetbrains.mps.nodeEditor.configuration.EditorConfigurationBuilder;
/**
* This editor component was designed to be used in headless mode. Instance of this editor component can be created
* in order to:
*
* - render the node tree as projection-specific text
* - render the node tree as a picture
* - call some editor-specific actions - e.g. substitute
* - ...
*/
public class HeadlessEditorComponent extends EditorComponent {
public HeadlessEditorComponent(SNode node, SRepository repository) {
super(repository, new EditorConfigurationBuilder().withUI(false).build());
editNode(node);
}
@Override
protected void attachListeners() {
}
@Override
protected void detachListeners() {
}
@Override
protected void assertInEDT() {
// empty method because we suppose HeadlessEditorComponent should be called from different threads.
// in the future all EDT-specific stuff should be removed from this class & so this method will
// present only inside EditorComponent with the UI attached to it.
}
}