mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-89834 IntelliJ automatically re-import projects when active profiles change
This commit is contained in:
+9
-7
@@ -53,6 +53,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.TestOnly;
|
||||
import org.jetbrains.idea.maven.model.MavenConstants;
|
||||
import org.jetbrains.idea.maven.utils.MavenMergingUpdateQueue;
|
||||
import org.jetbrains.idea.maven.utils.MavenProgressIndicator;
|
||||
import org.jetbrains.idea.maven.utils.MavenUtil;
|
||||
|
||||
import java.io.File;
|
||||
@@ -237,27 +238,28 @@ public class MavenProjectsManagerWatcher {
|
||||
|
||||
public synchronized void addManagedFilesWithProfiles(List<VirtualFile> files, List<String> explicitProfiles) {
|
||||
myProjectsTree.addManagedFilesWithProfiles(files, explicitProfiles);
|
||||
scheduleUpdateAll();
|
||||
scheduleUpdateAll(false, true);
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
public synchronized void resetManagedFilesAndProfilesInTests(List<VirtualFile> files, List<String> explicitProfiles) {
|
||||
myProjectsTree.resetManagedFilesAndProfiles(files, explicitProfiles);
|
||||
scheduleUpdateAll();
|
||||
scheduleUpdateAll(false, true);
|
||||
}
|
||||
|
||||
public synchronized void removeManagedFiles(List<VirtualFile> files) {
|
||||
myProjectsTree.removeManagedFiles(files);
|
||||
scheduleUpdateAll();
|
||||
scheduleUpdateAll(false, true);
|
||||
}
|
||||
|
||||
public synchronized void setExplicitProfiles(Collection<String> profiles) {
|
||||
myProjectsTree.setExplicitProfiles(profiles);
|
||||
scheduleUpdateAll();
|
||||
}
|
||||
|
||||
private void scheduleUpdateAll() {
|
||||
scheduleUpdateAll(false, true);
|
||||
if(myManager.getImportingSettings().isImportAutomatically()) {
|
||||
scheduleUpdateAll(false, true);
|
||||
} else {
|
||||
myProjectsTree.updateAll(false, myGeneralSettings, new MavenProgressIndicator());
|
||||
}
|
||||
}
|
||||
|
||||
public void scheduleUpdateAll(boolean force, final boolean forceImportAndResolve) {
|
||||
|
||||
Reference in New Issue
Block a user