add 'compiler.automake.allow.parallel' registry option;

delete outdated jps registry options
This commit is contained in:
Eugene Zhuravlev
2018-10-31 13:04:17 +03:00
parent 718c402f64
commit 8c71e31e07
6 changed files with 28 additions and 23 deletions
@@ -87,7 +87,8 @@ import org.jetbrains.jps.cmdline.ClasspathBootstrap;
import org.jetbrains.jps.incremental.Utils;
import org.jetbrains.jps.model.java.compiler.JavaCompilers;
import javax.tools.*;
import javax.tools.JavaCompiler;
import javax.tools.ToolProvider;
import java.awt.*;
import java.io.File;
import java.io.IOException;
@@ -321,7 +322,7 @@ public class BuildManager implements Disposable {
EditorFactory.getInstance().getEventMulticaster().addDocumentListener(new DocumentListener() {
@Override
public void documentChanged(@NotNull DocumentEvent e) {
if (Registry.is("compiler.document.save.enabled", true)) {
if (Registry.is("compiler.document.save.enabled", false)) {
final Document document = e.getDocument();
if (FileDocumentManager.getInstance().isDocumentUnsaved(document)) {
final VirtualFile file = FileDocumentManager.getInstance().getFile(document);
@@ -536,7 +537,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.emptyList(), Collections.emptyMap(), handler
project, false, true, false, scopes, Collections.emptyList(), Collections.singletonMap(BuildParametersKeys.IS_AUTOMAKE, "true"), handler
);
if (future != null) {
myAutomakeFutures.put(future, project);
@@ -1061,8 +1062,6 @@ public class BuildManager implements Disposable {
final CompilerWorkspaceConfiguration config = CompilerWorkspaceConfiguration.getInstance(project);
final GeneralCommandLine cmdLine = new GeneralCommandLine();
cmdLine.setExePath(vmExecutablePath);
//cmdLine.addParameter("-XX:MaxPermSize=150m");
//cmdLine.addParameter("-XX:ReservedCodeCacheSize=64m");
boolean isProfilingMode = false;
String userDefinedHeapSize = null;
@@ -1125,6 +1124,12 @@ public class BuildManager implements Disposable {
cmdLine.addParameter("-D"+ GlobalOptions.GENERATE_CLASSPATH_INDEX_OPTION +"=" + shouldGenerateIndex);
}
cmdLine.addParameter("-D" + GlobalOptions.COMPILE_PARALLEL_OPTION + "=" + config.PARALLEL_COMPILATION);
if (config.PARALLEL_COMPILATION) {
final boolean allowParallelAutomake = Registry.is("compiler.automake.allow.parallel", true);
if (!allowParallelAutomake) {
cmdLine.addParameter("-D" + GlobalOptions.ALLOW_PARALLEL_AUTOMAKE_OPTION + "=false");
}
}
cmdLine.addParameter("-D" + GlobalOptions.REBUILD_ON_DEPENDENCY_CHANGE_OPTION + "=" + config.REBUILD_ON_DEPENDENCY_CHANGE);
if (Registry.is("compiler.build.report.statistics")) {
@@ -1163,10 +1168,6 @@ public class BuildManager implements Disposable {
}
}
if (!Registry.is("compiler.process.use.memory.temp.cache")) {
cmdLine.addParameter("-D"+ GlobalOptions.USE_MEMORY_TEMP_CACHE_OPTION + "=false");
}
// javac's VM should use the same default locale that IDEA uses in order for javac to print messages in 'correct' language
cmdLine.setCharset(mySystemCharset);
cmdLine.addParameter("-D" + CharsetToolkit.FILE_ENCODING_PROPERTY + "=" + mySystemCharset.name());