use of org.yakindu.base.xtext.utils.jface.viewers.StyledTextXtextAdapter in project statecharts by Yakindu.
the class AbstractEditorPropertySection method enableXtext.
protected void enableXtext(Control styledText, Injector injector) {
final StyledTextXtextAdapter xtextAdapter = new StyledTextXtextAdapter(injector);
xtextAdapter.getFakeResourceContext().getFakeResource().eAdapters().add(new ContextElementAdapter(this));
xtextAdapter.adapt((StyledText) styledText);
initContextMenu(styledText);
completionProposalAdapter = new CompletionProposalAdapter(styledText, xtextAdapter.getContentAssistant(), KeyStroke.getInstance(SWT.CTRL, SWT.SPACE), null);
}
Aggregations