![](/img/trans.png)
[英]How to get inspections or static code analysis errors in intellij Idea from Intellij Idea Plugin programmatically?
[英]How to show ColorPicker from my action in IntelliJ IDEA plugin DevKit?
如何在IntelliJ IDEA插件DevKit中显示我的动作中的ColorPicker? 例如,我有一个动作:
public class TextBoxes extends AnAction {
public void actionPerformed(AnActionEvent event) {
// Some code
}
}
我想在其中显示ColorPicker小部件:
ColorPicker colorPicker = new ColorPicker(args); // Like that
ColorPicker.showDialog(args); // Or like that
在新的ColorPicker(args)格式中,需要一个Disposable父对象。 我应该在哪里买到这个? 在ColorPicker.showDialog(args); 还需要一个Component父对象。 而且我无法理解我应该在哪里获得这个对象? 哪一个是从com.intellij.ui.ColorPicker包中显示ColorPicker的正确方法?
请这样做:
public class TextBoxes extends AnAction {
@Override
public void actionPerformed(AnActionEvent event) {
Color color = ColorPicker.showDialog(...)
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.