![](/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.