use of org.eclipse.xtext.xtext.UsedRulesFinder in project xtext-core by eclipse.
the class XbaseUsageDetector method usesXImportSection.
public boolean usesXImportSection(final Grammar grammar) {
final Set<AbstractRule> usedRules = CollectionLiterals.<AbstractRule>newHashSet();
new UsedRulesFinder(usedRules).compute(grammar);
final Function1<AbstractRule, Boolean> _function = (AbstractRule it) -> {
return Boolean.valueOf((Objects.equal(it.getName(), "XImportSection") && Objects.equal(GrammarUtil.getGrammar(it).getName(), "org.eclipse.xtext.xbase.Xtype")));
};
return IterableExtensions.<AbstractRule>exists(usedRules, _function);
}
Aggregations