use of org.eclipse.xtext.xtext.generator.model.IXtextGeneratorFileSystemAccess in project xtext-core by eclipse.
the class XtextAntlrGeneratorFragment2 method generateProductionGrammar.
protected void generateProductionGrammar() {
@Extension final GrammarNaming naming = this.productionNaming;
final IXtextGeneratorFileSystemAccess fsa = this.getProjectConfig().getRuntime().getSrcGen();
this.productionGenerator.generate(this.getGrammar(), this.getOptions(), fsa);
this.runAntlr(naming.getParserGrammar(this.getGrammar()), naming.getLexerGrammar(this.getGrammar()), fsa);
this.simplifyUnorderedGroupPredicatesIfRequired(this.getGrammar(), fsa, naming.getInternalParserClass(this.getGrammar()));
this.splitParserAndLexerIfEnabled(fsa, naming.getInternalParserClass(this.getGrammar()), naming.getLexerClass(this.getGrammar()));
this.normalizeTokens(fsa, naming.getLexerGrammar(this.getGrammar()).getTokensFileName());
this.suppressWarnings(fsa, naming.getInternalParserClass(this.getGrammar()), naming.getLexerClass(this.getGrammar()));
this.normalizeLineDelimiters(fsa, naming.getInternalParserClass(this.getGrammar()), naming.getLexerClass(this.getGrammar()));
}
use of org.eclipse.xtext.xtext.generator.model.IXtextGeneratorFileSystemAccess in project xtext-core by eclipse.
the class ContentAssistFragment2 method generate.
@Override
public void generate() {
ManifestAccess _manifest = this.getProjectConfig().getEclipsePlugin().getManifest();
boolean _tripleNotEquals = (_manifest != null);
if (_tripleNotEquals) {
Set<String> _requiredBundles = this.getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles();
_requiredBundles.add("org.eclipse.xtext.ui");
}
GuiceModuleAccess.BindingFactory _bindingFactory = new GuiceModuleAccess.BindingFactory();
TypeReference _typeReference = new TypeReference("org.eclipse.xtext.ui.editor.contentassist.IContentProposalProvider");
_bindingFactory.addTypeToType(_typeReference, this.getProposalProviderClass(this.getGrammar())).contributeTo(this.getLanguage().getEclipsePluginGenModule());
IXtextGeneratorFileSystemAccess _srcGen = this.getProjectConfig().getEclipsePlugin().getSrcGen();
boolean _tripleNotEquals_1 = (_srcGen != null);
if (_tripleNotEquals_1) {
this.generateGenJavaProposalProvider();
}
if ((this.isGenerateStub() && (this.getProjectConfig().getEclipsePlugin().getSrc() != null))) {
boolean _isGenerateXtendStub = this.isGenerateXtendStub();
if (_isGenerateXtendStub) {
this.generateXtendProposalProviderStub();
ManifestAccess _manifest_1 = this.getProjectConfig().getEclipsePlugin().getManifest();
boolean _tripleNotEquals_2 = (_manifest_1 != null);
if (_tripleNotEquals_2) {
Set<String> _requiredBundles_1 = this.getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles();
String _xbaseLibVersionLowerBound = this.getProjectConfig().getRuntime().getXbaseLibVersionLowerBound();
String _plus = ("org.eclipse.xtext.xbase.lib;bundle-version=\"" + _xbaseLibVersionLowerBound);
String _plus_1 = (_plus + "\"");
_requiredBundles_1.add(_plus_1);
Set<String> _requiredBundles_2 = this.getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles();
_requiredBundles_2.add("org.eclipse.xtend.lib;resolution:=optional");
}
} else {
this.generateJavaProposalProviderStub();
}
}
ManifestAccess _manifest_2 = this.getProjectConfig().getEclipsePlugin().getManifest();
boolean _tripleNotEquals_3 = (_manifest_2 != null);
if (_tripleNotEquals_3) {
Set<String> _exportedPackages = this.getProjectConfig().getEclipsePlugin().getManifest().getExportedPackages();
String _packageName = this.getProposalProviderClass(this.getGrammar()).getPackageName();
_exportedPackages.add(_packageName);
}
}
Aggregations