Search in sources :

Example 1 with StyledTextXtextAdapter

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);
}
Also used : CompletionProposalAdapter(org.yakindu.base.xtext.utils.jface.fieldassist.CompletionProposalAdapter) StyledTextXtextAdapter(org.yakindu.base.xtext.utils.jface.viewers.StyledTextXtextAdapter) ContextElementAdapter(org.yakindu.sct.model.sgraph.util.ContextElementAdapter)

Aggregations

CompletionProposalAdapter (org.yakindu.base.xtext.utils.jface.fieldassist.CompletionProposalAdapter)1 StyledTextXtextAdapter (org.yakindu.base.xtext.utils.jface.viewers.StyledTextXtextAdapter)1 ContextElementAdapter (org.yakindu.sct.model.sgraph.util.ContextElementAdapter)1