model commit should only fire changes, but to not add scheme — it is pointless

This commit is contained in:
Vladimir Krivosheev
2016-11-11 13:19:50 +01:00
parent 9615755678
commit c04619f105
4 changed files with 12 additions and 11 deletions
@@ -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("<inspections version=\"1.0\">\n" +
" <option name=\"myName\" value=\"ToConvert\" />\n" +