restore compatibility — InspectionProjectProfileManager should be class as before
authorVladimir Krivosheev <vladimir.krivosheev@jetbrains.com>
Wed, 13 Jul 2016 11:26:45 +0000 (13:26 +0200)
committerVladimir Krivosheev <vladimir.krivosheev@jetbrains.com>
Wed, 13 Jul 2016 11:26:45 +0000 (13:26 +0200)
platform/analysis-impl/src/com/intellij/profile/codeInspection/BaseInspectionProfileManager.kt
platform/analysis-impl/src/com/intellij/profile/codeInspection/InspectionProjectProfileManager.java
platform/analysis-impl/src/com/intellij/profile/codeInspection/ProjectInspectionProfileManager.kt

index 5b2f2fa05e849830bc9db433e16583ff5acd61d1..cc8af7e4137a5cfdb75562fb86b12f3289adc194 100644 (file)
@@ -32,7 +32,7 @@ import com.intellij.util.messages.MessageBus
 @JvmField
 internal val LOG = Logger.getInstance(BaseInspectionProfileManager::class.java)
 
-abstract class BaseInspectionProfileManager(messageBus: MessageBus) :  InspectionProfileManager {
+abstract class BaseInspectionProfileManager(messageBus: MessageBus) :  InspectionProjectProfileManager() {
   protected abstract val schemeManager: SchemeManager<InspectionProfileImpl>
 
   protected val profileListeners: MutableList<ProfileChangeAdapter> = ContainerUtil.createLockFreeCopyOnWriteList<ProfileChangeAdapter>()
index aa04276811133e188ac1fc00ce440caaadc9c262..068ee1408609e258682b22a09c0271e36443cd80 100644 (file)
@@ -21,14 +21,15 @@ import com.intellij.psi.PsiElement;
 import org.jetbrains.annotations.NotNull;
 
 // todo deprecate
-public interface InspectionProjectProfileManager extends InspectionProfileManager {
-  static InspectionProjectProfileManager getInstance(@NotNull Project project){
+// cannot be interface due to backward compatibility
+public abstract class InspectionProjectProfileManager implements InspectionProfileManager {
+  public static InspectionProjectProfileManager getInstance(@NotNull Project project){
     return project.getComponent(InspectionProjectProfileManager.class);
   }
 
   @NotNull
   @Deprecated
-  default InspectionProfile getInspectionProfile() {
+  public InspectionProfile getInspectionProfile() {
     return getCurrentProfile();
   }
 
@@ -37,7 +38,7 @@ public interface InspectionProjectProfileManager extends InspectionProfileManage
    */
   @SuppressWarnings({"UnusedDeclaration"})
   @NotNull
-  default InspectionProfile getInspectionProfile(PsiElement element){
+  public InspectionProfile getInspectionProfile(PsiElement element){
     return getCurrentProfile();
   }
 }
index e1503a5d2b1dc5f39bae1e02abb9aa9854e03a9b..412721780458da232c939da8f6046cfd0de19d12 100644 (file)
@@ -56,7 +56,7 @@ class ProjectInspectionProfileManager(val project: Project,
                                       private val applicationProfileManager: InspectionProfileManager,
                                       private val scopeManager: DependencyValidationManager,
                                       private val localScopesHolder: NamedScopeManager,
-                                      schemeManagerFactory: SchemeManagerFactory) : BaseInspectionProfileManager(project.messageBus), PersistentStateComponent<Element>, InspectionProjectProfileManager {
+                                      schemeManagerFactory: SchemeManagerFactory) : BaseInspectionProfileManager(project.messageBus), PersistentStateComponent<Element> {
   companion object {
     @JvmStatic
     fun getInstanceImpl(project: Project): ProjectInspectionProfileManager {