This commit is contained in:
Vladimir Krivosheev
2016-06-16 12:10:32 +02:00
parent 5851a1b250
commit 8fb60004a2
@@ -146,8 +146,8 @@ public class BuildManager implements Disposable {
private static final String IDEA_PROJECT_DIR_PATTERN = "/.idea/";
private static final Function<String, Boolean> PATH_FILTER =
SystemInfo.isFileSystemCaseSensitive ?
(Function<String, Boolean>)s -> !(s.contains(IDEA_PROJECT_DIR_PATTERN) || s.endsWith(IWS_EXTENSION) || s.endsWith(IPR_EXTENSION)) :
(Function<String, Boolean>)s -> !(StringUtil.endsWithIgnoreCase(s, IWS_EXTENSION) || StringUtil.endsWithIgnoreCase(s, IPR_EXTENSION) || StringUtil.containsIgnoreCase(s, IDEA_PROJECT_DIR_PATTERN));
s -> !(s.contains(IDEA_PROJECT_DIR_PATTERN) || s.endsWith(IWS_EXTENSION) || s.endsWith(IPR_EXTENSION)) :
s -> !(StringUtil.endsWithIgnoreCase(s, IWS_EXTENSION) || StringUtil.endsWithIgnoreCase(s, IPR_EXTENSION) || StringUtil.containsIgnoreCase(s, IDEA_PROJECT_DIR_PATTERN));
private final File mySystemDirectory;
private final ProjectManager myProjectManager;
@@ -307,9 +307,9 @@ public class BuildManager implements Disposable {
}
});
ShutDownTracker.getInstance().registerShutdownTask(() -> stopListening());
ShutDownTracker.getInstance().registerShutdownTask(this::stopListening);
ScheduledFuture<?> future = JobScheduler.getScheduler().scheduleWithFixedDelay((Runnable)() -> runCommand(myGCTask), 3, 180, TimeUnit.MINUTES);
ScheduledFuture<?> future = JobScheduler.getScheduler().scheduleWithFixedDelay(() -> runCommand(myGCTask), 3, 180, TimeUnit.MINUTES);
Disposer.register(this, () -> future.cancel(false));
}
@@ -464,7 +464,7 @@ public class BuildManager implements Disposable {
final List<TargetTypeBuildScope> scopes = CmdlineProtoUtil.createAllModulesScopes(false);
final AutoMakeMessageHandler handler = new AutoMakeMessageHandler(project);
final TaskFuture future = scheduleBuild(
project, false, true, false, scopes, Collections.<String>emptyList(), Collections.<String, String>emptyMap(), handler
project, false, true, false, scopes, Collections.emptyList(), Collections.emptyMap(), handler
);
if (future != null) {
myAutomakeFutures.put(future, project);
@@ -681,13 +681,13 @@ public class BuildManager implements Disposable {
final CmdlineRemoteProto.Message.ControllerMessage params;
if (isRebuild) {
params = CmdlineProtoUtil.createBuildRequest(projectPath, scopes, Collections.<String>emptyList(), userData, globals, null);
params = CmdlineProtoUtil.createBuildRequest(projectPath, scopes, Collections.emptyList(), userData, globals, null);
}
else if (onlyCheckUpToDate) {
params = CmdlineProtoUtil.createUpToDateCheckRequest(projectPath, scopes, paths, userData, globals, currentFSChanges);
}
else {
params = CmdlineProtoUtil.createBuildRequest(projectPath, scopes, isMake ? Collections.<String>emptyList() : paths, userData, globals, currentFSChanges);
params = CmdlineProtoUtil.createBuildRequest(projectPath, scopes, isMake ? Collections.emptyList() : paths, userData, globals, currentFSChanges);
}
if (!usingPreloadedProcess) {
myMessageDispatcher.registerBuildMessageHandler(future, params);
@@ -1333,7 +1333,7 @@ public class BuildManager implements Disposable {
}
private abstract static class BuildManagerPeriodicTask implements Runnable {
private final Alarm myAlarm = new Alarm(Alarm.ThreadToUse.SHARED_THREAD);
private final Alarm myAlarm = new Alarm(Alarm.ThreadToUse.POOLED_THREAD);
private final AtomicBoolean myInProgress = new AtomicBoolean(false);
private final Runnable myTaskRunnable = () -> {
try {