Search in sources :

Example 1 with EmbeddedEditorModelAccess

use of org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorModelAccess in project statecharts by Yakindu.

the class StatechartDefinitionSection method createSpecificationEditor.

protected EmbeddedEditor createSpecificationEditor() {
    EmbeddedEditor embeddedEditor = createEmbeddedEditor();
    EmbeddedEditorModelAccess modelAccess = embeddedEditor.createPartialEditor();
    String specification = ((Statechart) getContextObject()).getSpecification();
    modelAccess.updateModel(specification != null ? specification : "");
    GridDataFactory.fillDefaults().grab(true, true).span(2, 1).applyTo(embeddedEditor.getViewer().getControl());
    initializeEmbeddedEditorWidget(embeddedEditor);
    return embeddedEditor;
}
Also used : EmbeddedEditor(org.eclipse.xtext.ui.editor.embedded.EmbeddedEditor) Statechart(org.yakindu.sct.model.sgraph.Statechart) EmbeddedEditorModelAccess(org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorModelAccess)

Aggregations

EmbeddedEditor (org.eclipse.xtext.ui.editor.embedded.EmbeddedEditor)1 EmbeddedEditorModelAccess (org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorModelAccess)1 Statechart (org.yakindu.sct.model.sgraph.Statechart)1