From c04619f10561265d19babd873cef9e8021bd722b Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Fri, 11 Nov 2016 13:18:47 +0100 Subject: [PATCH] =?UTF-8?q?model=20commit=20should=20only=20fire=20changes?= =?UTF-8?q?,=20but=20to=20not=20add=20scheme=20=E2=80=94=20it=20is=20point?= =?UTF-8?q?less?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../codeInspection/ex/InspectionProfileTest.java | 11 ++++++++--- .../ex/InspectionProfileModifiableModel.kt | 2 +- .../codeInspection/BaseInspectionProfileManager.kt | 7 ------- .../ui/SingleInspectionProfilePanel.java | 3 +++ 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/ex/InspectionProfileTest.java b/java/java-tests/testSrc/com/intellij/codeInspection/ex/InspectionProfileTest.java index de9269ef60a2..ba6bd28fd434 100644 --- a/java/java-tests/testSrc/com/intellij/codeInspection/ex/InspectionProfileTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInspection/ex/InspectionProfileTest.java @@ -94,15 +94,15 @@ public class InspectionProfileTest extends LightIdeaTestCase { public void testSameNameSharedProfile() throws Exception { BaseInspectionProfileManager profileManager = getApplicationProfileManager(); InspectionProfileImpl localProfile = createProfile(); - profileManager.updateProfile(localProfile); + updateProfile(profileManager, localProfile); ProjectInspectionProfileManager projectProfileManager = ProjectInspectionProfileManager.getInstance(getProject()); try { //normally on open project profile wrappers are init for both managers - profileManager.updateProfile(localProfile); + updateProfile(profileManager, localProfile); InspectionProfileImpl profile = new InspectionProfileImpl(PROFILE, InspectionToolRegistrar.getInstance(), projectProfileManager, InspectionProfileImpl.getBaseProfile(), null); - projectProfileManager.updateProfile(profile); + updateProfile(projectProfileManager, profile); projectProfileManager.setRootProfile(profile.getName()); assertTrue(projectProfileManager.getCurrentProfile() == profile); @@ -112,6 +112,11 @@ public class InspectionProfileTest extends LightIdeaTestCase { } } + private static void updateProfile(BaseInspectionProfileManager profileManager, InspectionProfileImpl localProfile) { + profileManager.addProfile(localProfile); + profileManager.fireProfileChanged(localProfile); + } + public void testConvertOldProfile() throws Exception { Element element = JDOMUtil.loadDocument("\n" + "