mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
move deleteProfile to impl
This commit is contained in:
@@ -68,10 +68,15 @@ public class InspectionProfileTest extends LightIdeaTestCase {
|
||||
finally {
|
||||
//noinspection AssignmentToStaticFieldFromInstanceMethod
|
||||
InspectionProfileImpl.INIT_INSPECTIONS = false;
|
||||
InspectionProfileManager.getInstance().deleteProfile(PROFILE);
|
||||
getApplicationProfileManager().deleteProfile(PROFILE);
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static BaseInspectionProfileManager getApplicationProfileManager() {
|
||||
return (BaseInspectionProfileManager)InspectionProfileManager.getInstance();
|
||||
}
|
||||
|
||||
public void testCopyProjectProfile() throws Exception {
|
||||
final Element element = loadProfile();
|
||||
final InspectionProfileImpl profile = createProfile();
|
||||
@@ -90,7 +95,7 @@ public class InspectionProfileTest extends LightIdeaTestCase {
|
||||
}
|
||||
|
||||
public void testSameNameSharedProfile() throws Exception {
|
||||
BaseInspectionProfileManager profileManager = (BaseInspectionProfileManager)InspectionProfileManager.getInstance();
|
||||
BaseInspectionProfileManager profileManager = getApplicationProfileManager();
|
||||
InspectionProfileImpl localProfile = createProfile();
|
||||
profileManager.updateProfile(localProfile);
|
||||
|
||||
@@ -291,8 +296,7 @@ public class InspectionProfileTest extends LightIdeaTestCase {
|
||||
|
||||
Element toImportElement = profile.writeScheme();
|
||||
final InspectionProfileImpl importedProfile =
|
||||
InspectionToolsConfigurable.importInspectionProfile(toImportElement,
|
||||
(BaseInspectionProfileManager)InspectionProfileManager.getInstance(), getProject(), null);
|
||||
InspectionToolsConfigurable.importInspectionProfile(toImportElement, getApplicationProfileManager(), getProject(), null);
|
||||
|
||||
//check merged
|
||||
Element mergedElement = JDOMUtil.loadDocument(mergedText).getRootElement();
|
||||
|
||||
@@ -37,7 +37,5 @@ public interface ProfileManager {
|
||||
@NotNull
|
||||
String[] getAvailableProfileNames();
|
||||
|
||||
void deleteProfile(@NotNull String name);
|
||||
|
||||
void addProfileChangeListener(@NotNull ProfileChangeAdapter listener, @NotNull Disposable parent);
|
||||
}
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ abstract class BaseInspectionProfileManager(messageBus: MessageBus) : Inspectio
|
||||
schemeManager.addScheme(profile)
|
||||
}
|
||||
|
||||
override final fun deleteProfile(name: String) {
|
||||
final fun deleteProfile(name: String) {
|
||||
schemeManager.removeScheme(name)?.let {
|
||||
schemeRemoved(it)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user