diff --git a/platform/analysis-impl/src/com/intellij/codeInspection/ex/InspectionProfileImpl.java b/platform/analysis-impl/src/com/intellij/codeInspection/ex/InspectionProfileImpl.java index 8a5cb7897290..37db1b4380f3 100644 --- a/platform/analysis-impl/src/com/intellij/codeInspection/ex/InspectionProfileImpl.java +++ b/platform/analysis-impl/src/com/intellij/codeInspection/ex/InspectionProfileImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -546,7 +546,7 @@ public class InspectionProfileImpl extends ProfileEx implements ModifiableModel, @NotNull private List createTools(Project project) { if (mySource != null) { - return ContainerUtil.map(mySource.getAllTools(project), new Function() { + return ContainerUtil.map(mySource.getDefaultStates(project), new Function() { @NotNull @Override public InspectionToolWrapper fun(@NotNull ScopeToolState state) { diff --git a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/SingleInspectionProfilePanel.java b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/SingleInspectionProfilePanel.java index d32b7f7db42f..e6739382489e 100644 --- a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/SingleInspectionProfilePanel.java +++ b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/SingleInspectionProfilePanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -196,7 +196,7 @@ public class SingleInspectionProfilePanel extends JPanel { private boolean wereToolSettingsModified(Descriptor descriptor) { InspectionToolWrapper toolWrapper = descriptor.getToolWrapper(); - if (toolWrapper == null || !mySelectedProfile.isToolEnabled(descriptor.getKey())) { + if (!mySelectedProfile.isToolEnabled(descriptor.getKey(), descriptor.getScope(), myProjectProfileManager.getProject())) { return false; } Element oldConfig = descriptor.getConfig(); @@ -722,9 +722,8 @@ public class SingleInspectionProfilePanel extends JPanel { final InspectionConfigTreeNode node = new InspectionConfigTreeNode(descriptor, null, !hasNonDefaultScope, enabled, !hasNonDefaultScope); getGroupNode(myRoot, descriptor.getGroup()).add(node); if (hasNonDefaultScope) { - for (ScopeToolState nonDefaultState : nonDefaultTools) { - node.add(new InspectionConfigTreeNode(new Descriptor(nonDefaultState, mySelectedProfile, - project), nonDefaultState, false, false)); + for (Descriptor desc : myDescriptors.get(descriptor)) { + node.add(new InspectionConfigTreeNode(desc, desc.getState(), false, false)); } node.add(new InspectionConfigTreeNode(descriptor, descriptor.getState(), true, false)); }