コード例 #1
0
 @NotNull
 public InspectionProfileEntry[] getInspectionTools(PsiElement element) {
   initInspectionTools();
   List<InspectionTool> result = new ArrayList<InspectionTool>();
   for (Tools toolList : myTools.values()) {
     result.add((InspectionTool) toolList.getInspectionTool(element));
   }
   return result.toArray(new InspectionTool[result.size()]);
 }
コード例 #2
0
 public InspectionProfileEntry getToolById(String id, PsiElement element) {
   initInspectionTools();
   for (Tools toolList : myTools.values()) {
     final InspectionProfileEntry tool = toolList.getInspectionTool(element);
     String toolId =
         tool instanceof LocalInspectionToolWrapper
             ? ((LocalInspectionToolWrapper) tool).getID()
             : tool.getShortName();
     if (id.equals(toolId)) return tool;
   }
   return null;
 }
コード例 #3
0
 public InspectionProfileEntry getInspectionTool(
     @NotNull String shortName, @NotNull PsiElement element) {
   final Tools toolList = getTools(shortName);
   return toolList != null ? toolList.getInspectionTool(element) : null;
 }