本文整理汇总了Java中org.sonar.api.profiles.ProfileDefinition类的典型用法代码示例。如果您正苦于以下问题:Java ProfileDefinition类的具体用法?Java ProfileDefinition怎么用?Java ProfileDefinition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProfileDefinition类属于org.sonar.api.profiles包,在下文中一共展示了ProfileDefinition类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: loadExtensions
import org.sonar.api.profiles.ProfileDefinition; //导入依赖的package包/类
private static void loadExtensions(ComponentContainer container, PluginInfo pluginInfo, Plugin.Context context) {
for (Object extension : context.getExtensions()) {
Boolean isSlPluginOrNull = pluginInfo.isSonarLintSupported();
boolean isExplicitlySonarLintCompatible = isSlPluginOrNull != null && isSlPluginOrNull.booleanValue();
if (isExplicitlySonarLintCompatible) {
// When plugin itself claim to be compatible with SonarLint, only load @SonarLintSide extensions
// filter out non officially supported Sensors
if (!blacklisted(extension) && ExtensionUtils.isSonarLintSide(extension) && (PluginCacheLoader.isWhitelisted(pluginInfo.getKey()) || isNotSensor(extension))) {
container.addExtension(pluginInfo, extension);
}
} else if (!blacklisted(extension) && (ExtensionUtils.isScannerSide(extension) || ExtensionUtils.isType(extension, ProfileDefinition.class))) {
// Here we have whitelisted extensions of whitelisted plugins
container.addExtension(pluginInfo, extension);
} else {
LOG.debug("Extension {} was blacklisted as it is not used by SonarLint", className(extension));
}
}
}
开发者ID:instalint-org,项目名称:instalint,代码行数:19,代码来源:ExtensionInstaller.java
示例2: getExtensions
import org.sonar.api.profiles.ProfileDefinition; //导入依赖的package包/类
@Override
public List getExtensions() {
List extensions = new ArrayList<Object>();
extensions.add(new AbstractLanguage("vbnet") {
@Override
public String[] getFileSuffixes() {
return new String[] {".vb"};
}
});
extensions.add(new ProfileDefinition() {
@Override
public RulesProfile createProfile(ValidationMessages validation) {
RulesProfile profile = RulesProfile.create("Sonar Way", "vbnet");
profile.setDefaultProfile(true);
return profile;
}
});
return extensions;
}
开发者ID:GregBartlett,项目名称:sonar-resharper,代码行数:27,代码来源:FakeVbNetPlugin.java
示例3: profilesByLanguage
import org.sonar.api.profiles.ProfileDefinition; //导入依赖的package包/类
private static ListMultimap<String, RulesProfile> profilesByLanguage(ProfileDefinition[] profileDefinitions) {
ListMultimap<String, RulesProfile> byLang = ArrayListMultimap.create();
for (ProfileDefinition definition : profileDefinitions) {
ValidationMessages validation = ValidationMessages.create();
RulesProfile profile = definition.createProfile(validation);
if (profile != null && !validation.hasErrors()) {
byLang.put(StringUtils.lowerCase(profile.getLanguage()), profile);
}
}
return byLang;
}
开发者ID:instalint-org,项目名称:instalint,代码行数:12,代码来源:StandaloneActiveRulesProvider.java
示例4: StandaloneActiveRulesProvider
import org.sonar.api.profiles.ProfileDefinition; //导入依赖的package包/类
public StandaloneActiveRulesProvider(StandaloneRuleDefinitionsLoader ruleDefsLoader, ProfileDefinition[] profileDefinitions) {
this.ruleDefsLoader = ruleDefsLoader;
this.profileDefinitions = profileDefinitions;
}
开发者ID:instalint-org,项目名称:instalint,代码行数:5,代码来源:StandaloneActiveRulesProvider.java
注:本文中的org.sonar.api.profiles.ProfileDefinition类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论