Search in sources :

Example 1 with ProfileChangeAdapter

use of com.intellij.profile.ProfileChangeAdapter in project intellij-community by JetBrains.

the class WholeFileLocalInspectionsPassFactory method projectOpened.

@Override
public void projectOpened() {
    final ProfileChangeAdapter myProfilesListener = new ProfileChangeAdapter() {

        @Override
        public void profileChanged(InspectionProfile profile) {
            myFileToolsCache.clear();
        }

        @Override
        public void profileActivated(InspectionProfile oldProfile, @Nullable InspectionProfile profile) {
            myFileToolsCache.clear();
        }
    };
    myProfileManager.addProfileChangeListener(myProfilesListener, myProject);
    Disposer.register(myProject, myFileToolsCache::clear);
}
Also used : InspectionProfile(com.intellij.codeInspection.InspectionProfile) ProfileChangeAdapter(com.intellij.profile.ProfileChangeAdapter) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

InspectionProfile (com.intellij.codeInspection.InspectionProfile)1 ProfileChangeAdapter (com.intellij.profile.ProfileChangeAdapter)1 Nullable (org.jetbrains.annotations.Nullable)1