use of com.google.idea.blaze.base.lang.buildfile.language.semantics.RuleDefinition in project intellij by bazelbuild.
the class LoadedSkylarkExtensionTest method setBuiltInRuleNames.
private void setBuiltInRuleNames(String... ruleNames) {
ImmutableMap.Builder<String, RuleDefinition> rules = ImmutableMap.builder();
for (String name : ruleNames) {
rules.put(name, new RuleDefinition(name, ImmutableMap.of(), null));
}
MockBuildLanguageSpecProvider specProvider = new MockBuildLanguageSpecProvider();
specProvider.setRules(rules.build());
registerApplicationService(BuildLanguageSpecProvider.class, specProvider);
specProvider.setRules(rules.build());
}
use of com.google.idea.blaze.base.lang.buildfile.language.semantics.RuleDefinition in project intellij by bazelbuild.
the class BuiltInRuleAnnotatorTest method setRules.
private void setRules(String... ruleNames) {
ImmutableMap.Builder<String, RuleDefinition> rules = ImmutableMap.builder();
for (String name : ruleNames) {
rules.put(name, new RuleDefinition(name, ImmutableMap.of(), null));
}
specProvider.setRules(rules.build());
}
use of com.google.idea.blaze.base.lang.buildfile.language.semantics.RuleDefinition in project intellij by bazelbuild.
the class BuiltInFunctionCompletionContributorTest method setRules.
private void setRules(String... ruleNames) {
ImmutableMap.Builder<String, RuleDefinition> rules = ImmutableMap.builder();
for (String name : ruleNames) {
rules.put(name, new RuleDefinition(name, ImmutableMap.of(), null));
}
specProvider.setRules(rules.build());
}
use of com.google.idea.blaze.base.lang.buildfile.language.semantics.RuleDefinition in project intellij by bazelbuild.
the class RuleTargetCompletionTest method setBuildLanguageSpecRules.
private static void setBuildLanguageSpecRules(MockBuildLanguageSpecProvider specProvider, String... ruleNames) {
ImmutableMap.Builder<String, RuleDefinition> rules = ImmutableMap.builder();
for (String name : ruleNames) {
rules.put(name, new RuleDefinition(name, ImmutableMap.of(), null));
}
specProvider.setRules(rules.build());
}
use of com.google.idea.blaze.base.lang.buildfile.language.semantics.RuleDefinition in project intellij by bazelbuild.
the class BuiltInFunctionAttributeCompletionContributorTest method setRuleAndAttributes.
private void setRuleAndAttributes(String ruleName, String... attributes) {
ImmutableMap.Builder<String, AttributeDefinition> map = ImmutableMap.builder();
for (String attr : attributes) {
map.put(attr, new AttributeDefinition(attr, Build.Attribute.Discriminator.UNKNOWN, false, null, null));
}
RuleDefinition rule = new RuleDefinition(ruleName, map.build(), null);
specProvider.setRules(ImmutableMap.of(ruleName, rule));
}
Aggregations