Package com.intellij.codeInspection.ex

Examples of com.intellij.codeInspection.ex.InspectionProfileImpl


    for (LocalInspectionTool tool : localInspectionTools) {
      _enableInspectionTool(tool, availableToolsMap, availableLocalTools);
    }

    final InspectionProfileImpl profile = new InspectionProfileImpl("Configurable") {
      public InspectionProfileEntry[] getInspectionTools() {
        if (availableLocalTools != null){
          final Collection<LocalInspectionToolWrapper> tools = availableLocalTools.values();
          return tools.toArray(new LocalInspectionToolWrapper[tools.size()]);
        }
        return new InspectionProfileEntry[0];
      }

      public boolean isToolEnabled(HighlightDisplayKey key) {
        return key != null && availableToolsMap.containsKey(key.toString());
      }

      public HighlightDisplayLevel getErrorLevel(HighlightDisplayKey key) {
        final LocalInspectionTool localInspectionTool = availableToolsMap.get(key.toString());
        return localInspectionTool != null ? localInspectionTool.getDefaultLevel() : HighlightDisplayLevel.WARNING;
      }


      public InspectionTool getInspectionTool(String shortName) {
        if (availableToolsMap.containsKey(shortName)) {
          return new LocalInspectionToolWrapper(availableToolsMap.get(shortName));
        }
        return null;
      }

    };
    final InspectionProfileManager inspectionProfileManager = InspectionProfileManager.getInstance();
    inspectionProfileManager.addProfile(profile);
    inspectionProfileManager.setRootProfile(profile.getName());
    InspectionProjectProfileManager.getInstance(getProject()).updateProfile(profile);

    assertFalse(getPsiManager().isDisposed());

    CodeStyleSettingsManager.getInstance(getProject()).setTemporarySettings(new CodeStyleSettings());
View Full Code Here

TOP

Related Classes of com.intellij.codeInspection.ex.InspectionProfileImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.