mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 16:28:56 +00:00
bugfix: binding for partial content assist is IDE, not UI
Signed-off-by: Moritz Eysholdt <moritz.eysholdt@typefox.io>
This commit is contained in:
parent
9b43417e24
commit
07d38dd13b
2 changed files with 11 additions and 11 deletions
|
@ -489,6 +489,12 @@ class XtextAntlrGeneratorFragment2 extends AbstractAntlrGeneratorFragment2 {
|
|||
.to(«grammar.lexerClass».class);
|
||||
''')
|
||||
.addTypeToType('org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser'.typeRef, grammar.parserClass)
|
||||
if (partialParsing) {
|
||||
rtBindings.addTypeToType(
|
||||
"org.eclipse.xtext.ide.editor.contentassist.antlr.ContentAssistContextFactory".typeRef,
|
||||
"org.eclipse.xtext.ide.editor.contentassist.antlr.PartialContentAssistContextFactory".typeRef
|
||||
)
|
||||
}
|
||||
rtBindings.contributeTo(language.ideGenModule)
|
||||
}
|
||||
|
||||
|
@ -539,12 +545,6 @@ class XtextAntlrGeneratorFragment2 extends AbstractAntlrGeneratorFragment2 {
|
|||
.addConfiguredBinding("ContentAssistLexerProvider", '''
|
||||
binder.bind(«caLexerClass».class).toProvider(«LexerProvider».create(«caLexerClass».class));
|
||||
''')
|
||||
if (partialParsing) {
|
||||
uiBindings.addTypeToType(
|
||||
"org.eclipse.xtext.ide.editor.contentassist.antlr.ContentAssistContextFactory".typeRef,
|
||||
"org.eclipse.xtext.ide.editor.contentassist.antlr.PartialContentAssistContextFactory".typeRef
|
||||
)
|
||||
}
|
||||
uiBindings.contributeTo(language.eclipsePluginGenModule)
|
||||
}
|
||||
|
||||
|
|
|
@ -1487,6 +1487,11 @@ public class XtextAntlrGeneratorFragment2 extends AbstractAntlrGeneratorFragment
|
|||
Grammar _grammar = this.getGrammar();
|
||||
TypeReference _parserClass = naming.getParserClass(_grammar);
|
||||
final GuiceModuleAccess.BindingFactory rtBindings = _addConfiguredBinding.addTypeToType(_typeRef, _parserClass);
|
||||
if (this.partialParsing) {
|
||||
TypeReference _typeRef_1 = TypeReference.typeRef("org.eclipse.xtext.ide.editor.contentassist.antlr.ContentAssistContextFactory");
|
||||
TypeReference _typeRef_2 = TypeReference.typeRef("org.eclipse.xtext.ide.editor.contentassist.antlr.PartialContentAssistContextFactory");
|
||||
rtBindings.addTypeToType(_typeRef_1, _typeRef_2);
|
||||
}
|
||||
IXtextGeneratorLanguage _language = this.getLanguage();
|
||||
GuiceModuleAccess _ideGenModule = _language.getIdeGenModule();
|
||||
rtBindings.contributeTo(_ideGenModule);
|
||||
|
@ -1616,11 +1621,6 @@ public class XtextAntlrGeneratorFragment2 extends AbstractAntlrGeneratorFragment
|
|||
}
|
||||
};
|
||||
final GuiceModuleAccess.BindingFactory uiBindings = _addTypeToType_2.addConfiguredBinding("ContentAssistLexerProvider", _client_3);
|
||||
if (this.partialParsing) {
|
||||
TypeReference _typeRef_4 = TypeReference.typeRef("org.eclipse.xtext.ide.editor.contentassist.antlr.ContentAssistContextFactory");
|
||||
TypeReference _typeRef_5 = TypeReference.typeRef("org.eclipse.xtext.ide.editor.contentassist.antlr.PartialContentAssistContextFactory");
|
||||
uiBindings.addTypeToType(_typeRef_4, _typeRef_5);
|
||||
}
|
||||
IXtextGeneratorLanguage _language = this.getLanguage();
|
||||
GuiceModuleAccess _eclipsePluginGenModule = _language.getEclipsePluginGenModule();
|
||||
uiBindings.contributeTo(_eclipsePluginGenModule);
|
||||
|
|
Loading…
Reference in a new issue