public VisibleTreeState getVisibleTreeState(InspectionProfile profile) {
   VisibleTreeState state = myProfileNameToState.get(profile.getName());
   if (state == null) {
     state = new VisibleTreeState();
     myProfileNameToState.put(profile.getName(), state);
   }
   return state;
 }
 @Override
 public boolean isProfileLoaded() {
   final InspectionProfile profile = getInspectionProfile();
   final String name = profile.getName();
   return profile.getProfileManager() == this
       ? myName2Profile.containsKey(name)
       : myAppName2Profile.containsKey(name);
 }
 @NotNull
 public synchronized InspectionProfileWrapper getProfileWrapper() {
   final InspectionProfile profile = getInspectionProfile();
   final String profileName = profile.getName();
   if (profile.getProfileManager() == this) {
     if (!myName2Profile.containsKey(profileName)) {
       initProfileWrapper(profile);
     }
     return myName2Profile.get(profileName);
   } else {
     if (!myAppName2Profile.containsKey(profileName)) {
       initProfileWrapper(profile);
     }
     return myAppName2Profile.get(profileName);
   }
 }
 public void updateCurrentProfile() {
   final String name = myInspectionProfile.getName();
   myInspectionProfile =
       (InspectionProfile) myInspectionProfile.getProfileManager().getProfile(name);
 }