本文整理汇总了Java中com.intellij.uiDesigner.ErrorInfo.getInspectionId方法的典型用法代码示例。如果您正苦于以下问题:Java ErrorInfo.getInspectionId方法的具体用法?Java ErrorInfo.getInspectionId怎么用?Java ErrorInfo.getInspectionId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.uiDesigner.ErrorInfo
的用法示例。
在下文中一共展示了ErrorInfo.getInspectionId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showIntentionPopup
import com.intellij.uiDesigner.ErrorInfo; //导入方法依赖的package包/类
final void showIntentionPopup(){
LOG.debug("showIntentionPopup()");
if(myHint == null || !myHint.isVisible()){
return;
}
final ErrorInfo[] errorInfos = getErrorInfos();
if(!haveFixes(errorInfos)){
return;
}
final ArrayList<ErrorWithFix> fixList = new ArrayList<ErrorWithFix>();
for(ErrorInfo errorInfo: errorInfos) {
final QuickFix[] quickFixes = errorInfo.myFixes;
if (quickFixes.length > 0) {
for (QuickFix fix: quickFixes) {
fixList.add(new ErrorWithFix(errorInfo, fix));
}
}
else if (errorInfo.getInspectionId() != null) {
buildSuppressFixes(errorInfo, fixList, true);
}
}
final ListPopup popup = JBPopupFactory.getInstance().createListPopup(new QuickFixPopupStep(fixList, true));
popup.showUnderneathOf(myHint.getComponent());
}
示例2: buildSuppressFixes
import com.intellij.uiDesigner.ErrorInfo; //导入方法依赖的package包/类
private void buildSuppressFixes(final ErrorInfo errorInfo, final ArrayList<ErrorWithFix> suppressList, boolean named) {
final String suppressName = named
? UIDesignerBundle.message("action.suppress.named.for.component", errorInfo.myDescription)
: UIDesignerBundle.message("action.suppress.for.component");
final String suppressAllName = named
? UIDesignerBundle.message("action.suppress.named.for.all.components", errorInfo.myDescription)
: UIDesignerBundle.message("action.suppress.for.all.components");
final SuppressFix suppressFix = new SuppressFix(myEditor, suppressName,
errorInfo.getInspectionId(), errorInfo.getComponent());
final SuppressFix suppressAllFix = new SuppressFix(myEditor, suppressAllName,
errorInfo.getInspectionId(), null);
suppressList.add(new ErrorWithFix(errorInfo, suppressFix));
suppressList.add(new ErrorWithFix(errorInfo, suppressAllFix));
}