Search in sources :

Example 1 with XtextFakeResourceContext

use of org.yakindu.base.xtext.utils.jface.viewers.context.XtextFakeResourceContext in project statecharts by Yakindu.

the class StatechartDefinitionSection method getXtextResourceProvider.

protected IEditedResourceProvider getXtextResourceProvider(Injector injector) {
    return new IEditedResourceProvider() {

        @Override
        public XtextResource createResource() {
            XtextFakeResourceContext resource = new XtextFakeResourceContext(injector);
            xtextResource = resource.getFakeResource();
            xtextResource.eAdapters().add(new ContextElementAdapter(StatechartDefinitionSection.this));
            return xtextResource;
        }
    };
}
Also used : IEditedResourceProvider(org.eclipse.xtext.ui.editor.embedded.IEditedResourceProvider) ContextElementAdapter(org.yakindu.sct.model.sgraph.util.ContextElementAdapter) XtextFakeResourceContext(org.yakindu.base.xtext.utils.jface.viewers.context.XtextFakeResourceContext)

Aggregations

IEditedResourceProvider (org.eclipse.xtext.ui.editor.embedded.IEditedResourceProvider)1 XtextFakeResourceContext (org.yakindu.base.xtext.utils.jface.viewers.context.XtextFakeResourceContext)1 ContextElementAdapter (org.yakindu.sct.model.sgraph.util.ContextElementAdapter)1