mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inspection settings: do not override stored settings when try to init from source profile (IDEA-112668)
This commit is contained in:
+2
-2
@@ -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<InspectionToolWrapper> createTools(Project project) {
|
||||
if (mySource != null) {
|
||||
return ContainerUtil.map(mySource.getAllTools(project), new Function<ScopeToolState, InspectionToolWrapper>() {
|
||||
return ContainerUtil.map(mySource.getDefaultStates(project), new Function<ScopeToolState, InspectionToolWrapper>() {
|
||||
@NotNull
|
||||
@Override
|
||||
public InspectionToolWrapper fun(@NotNull ScopeToolState state) {
|
||||
|
||||
+4
-5
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user