简体   繁体   English

Sonarqube从小部件加载设置

[英]Sonarqube load settings from widget

I have an custom plugin for SonarQube (6.1) and I'm trying to figure out how to add some sort of configuration interface. 我有一个针对SonarQube(6.1)的自定义插件,我试图弄清楚如何添加某种配置界面。

The use case should be following: 用例应如下:

  • User configures settings of the plugin in SonarQube UI from the plugin's widget 用户通过插件的小部件在SonarQube UI中配置插件的设置
  • When the user runs the analysis (with the mentioned plugin) the behavior of the plugin will depend on the user settings 当用户运行分析(使用提到的插件)时,插件的行为将取决于用户设置

Is this use case possible? 这种用例可行吗? Can SonarQube load settings from widget? SonarQube可以从小部件加载设置吗?

You may want to have a look at the PropertyDefinition extension point in SQ ( https://github.com/SonarSource/sonarqube/blob/master/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinition.java ). 您可能想看看SQ中的PropertyDefinition扩展点( https://github.com/SonarSource/sonarqube/blob/master/sonar-plugin-api/src/main/java/org/sonar/api/config /PropertyDefinition.java )。

You won't get the ability to configure the property in plugin's widget but in SQ's admin page (or a project's admin page). 您将无法在插件的小部件中配置属性,而只能在SQ的管理页面(或项目的管理页面)中配置属性。 This is the feature usually used to pass configuration to a plugin. 这是通常用于将配置传递给插件的功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM