void (List<VirtualFile> files, MavenExplicitProfiles profiles) { List<String> newFiles; MavenExplicitProfiles newProfiles; synchronized (myStateLock) { newFiles = new ArrayList<>(myManagedFilesPaths); newFiles.addAll(MavenUtil.collectPaths(files)); newProfiles = myExplicitProfiles.clone(); newProfiles.getEnabledProfiles().addAll(profiles.getEnabledProfiles()); newProfiles.getDisabledProfiles().addAll(profiles.getDisabledProfiles()); } resetManagedFilesPathsAndProfiles(newFiles, newProfiles); }