Skip to content

Commit

Permalink
[ui] Inject the XbaseResourceForEditorInputFactory for building a res…
Browse files Browse the repository at this point in the history
…ource from the Java editor.

see #492

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Sep 16, 2016
1 parent e33af6a commit e6b7dc5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions eclipse-sarl/plugins/io.sarl.lang.mwe2/GenerateSARL2.mwe2
Expand Up @@ -649,6 +649,11 @@ Workflow {
to = "io.sarl.lang.ui.preferences.SARLBuilderConfigurationBlock"
override = true
}
ui = {
bind = "org.eclipse.xtext.ui.editor.model.IResourceForEditorInputFactory"
to = "org.eclipse.xtext.xbase.ui.editor.XbaseResourceForEditorInputFactory"
}


both = {
bind = "org.eclipse.xtext.generator.IContextualOutputConfigurationProvider"
Expand Down
Expand Up @@ -161,6 +161,7 @@
import org.eclipse.xtext.ui.editor.hover.IEObjectHoverProvider;
import org.eclipse.xtext.ui.editor.hyperlinking.HyperlinkLabelProvider;
import org.eclipse.xtext.ui.editor.hyperlinking.IHyperlinkHelper;
import org.eclipse.xtext.ui.editor.model.IResourceForEditorInputFactory;
import org.eclipse.xtext.ui.editor.model.XtextDocumentProvider;
import org.eclipse.xtext.ui.editor.occurrences.IOccurrenceComputer;
import org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider;
Expand Down Expand Up @@ -193,6 +194,7 @@
import org.eclipse.xtext.xbase.imports.IUnresolvedTypeResolver;
import org.eclipse.xtext.xbase.ui.editor.XbaseDocumentProvider;
import org.eclipse.xtext.xbase.ui.editor.XbaseEditor;
import org.eclipse.xtext.xbase.ui.editor.XbaseResourceForEditorInputFactory;
import org.eclipse.xtext.xbase.ui.generator.trace.XbaseOpenGeneratedFileHandler;
import org.eclipse.xtext.xbase.ui.imports.InteractiveUnresolvedTypeResolver;
import org.eclipse.xtext.xbase.ui.jvmmodel.findrefs.JvmModelFindReferenceHandler;
Expand Down Expand Up @@ -488,6 +490,11 @@ public Class<? extends XtendJavaDocContentAssistProcessor> bindXtendJavaDocConte
return SARLJavaDocContentAssistProcessor.class;
}

// contributed by io.sarl.lang.mwe2.binding.InjectionFragment2 [Bindings provided by SARL API]
public Class<? extends IResourceForEditorInputFactory> bindIResourceForEditorInputFactory() {
return XbaseResourceForEditorInputFactory.class;
}

// contributed by io.sarl.lang.mwe2.binding.InjectionFragment2 [Bindings provided by SARL API]
public void configureSARLFieldOutlineFilter(Binder binder) {
binder.bind(IOutlineContribution.class).annotatedWith(Names.named("SARLFieldOutlineFilter")).to(SARLFieldOutlineFilter.class);
Expand Down

0 comments on commit e6b7dc5

Please sign in to comment.