mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
compile-server: javac to read all relevant settings from jps project;
introduced "use.memory.temp.cache" and "server.heap.size" options for compile server server is now available in non-internal mode
This commit is contained in:
+10
-14
@@ -43,8 +43,8 @@ import com.intellij.openapi.roots.libraries.LibraryTablesRegistrar;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.util.ShutDownTracker;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.JarFileSystem;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
@@ -71,7 +71,7 @@ import java.util.concurrent.TimeUnit;
|
||||
* @author Eugene Zhuravlev
|
||||
* Date: 9/6/11
|
||||
*/
|
||||
public class JpsServerManager implements ApplicationComponent{
|
||||
public class CompileServerManager implements ApplicationComponent{
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.compiler.JpsServerManager");
|
||||
private static final String COMPILE_SERVER_SYSTEM_ROOT = "compile-server";
|
||||
private volatile OSProcessHandler myProcessHandler;
|
||||
@@ -84,7 +84,7 @@ public class JpsServerManager implements ApplicationComponent{
|
||||
});
|
||||
private final ProjectManager myProjectManager;
|
||||
|
||||
public JpsServerManager(final ProjectManager projectManager) {
|
||||
public CompileServerManager(final ProjectManager projectManager) {
|
||||
myProjectManager = projectManager;
|
||||
final String systemPath = PathManager.getSystemPath();
|
||||
File system = new File(systemPath);
|
||||
@@ -106,8 +106,8 @@ public class JpsServerManager implements ApplicationComponent{
|
||||
});
|
||||
}
|
||||
|
||||
public static JpsServerManager getInstance() {
|
||||
return ApplicationManager.getApplication().getComponent(JpsServerManager.class);
|
||||
public static CompileServerManager getInstance() {
|
||||
return ApplicationManager.getApplication().getComponent(CompileServerManager.class);
|
||||
}
|
||||
|
||||
public void notifyFilesChanged(Collection<String> paths) {
|
||||
@@ -404,18 +404,14 @@ public class JpsServerManager implements ApplicationComponent{
|
||||
cmdLine.addParameter("-XX:ReservedCodeCacheSize=64m");
|
||||
cmdLine.addParameter("-Djava.awt.headless=true");
|
||||
//cmdLine.addParameter("-DuseJavaUtilZip");
|
||||
// todo: get xmx value from settings
|
||||
if (SystemInfo.is64Bit) {
|
||||
cmdLine.addParameter("-Xmx800m");
|
||||
}
|
||||
else {
|
||||
cmdLine.addParameter("-Xmx600m");
|
||||
}
|
||||
cmdLine.addParameter("-Xmx" + Registry.intValue("compiler.server.heap.size") + "m");
|
||||
|
||||
// debugging
|
||||
cmdLine.addParameter("-XX:+HeapDumpOnOutOfMemoryError");
|
||||
//cmdLine.addParameter("-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5008");
|
||||
|
||||
//cmdLine.addParameter("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5008");
|
||||
if (Registry.is("compiler.server.use.memory.temp.cache")) {
|
||||
cmdLine.addParameter("-D"+Server.USE_MEMORY_TEMP_CACHE_OPTION + "=true");
|
||||
}
|
||||
// javac's VM should use the same default locale that IDEA uses in order for javac to print messages in 'correct' language
|
||||
final String lang = System.getProperty("user.language");
|
||||
if (lang != null) {
|
||||
@@ -425,7 +425,7 @@ public class CompileDriver {
|
||||
moduleNames.add(module.getName());
|
||||
}
|
||||
}
|
||||
final JpsServerManager jpsServerManager = JpsServerManager.getInstance();
|
||||
final CompileServerManager jpsServerManager = CompileServerManager.getInstance();
|
||||
final MessageBus messageBus = myProject.getMessageBus();
|
||||
return jpsServerManager.submitCompilationTask(myProject.getLocation(), compileContext.isRebuild(), compileContext.isMake(), moduleNames, paths, new JpsServerResponseHandlerAdapter() {
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ public class CompilerErrorTreeView extends NewErrorTreeViewPanel {
|
||||
public void run() {
|
||||
if (!project.isDisposed()) {
|
||||
project.save();
|
||||
JpsServerManager.getInstance().sendReloadRequest(project);
|
||||
CompileServerManager.getInstance().sendReloadRequest(project);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
+4
-4
@@ -16,9 +16,9 @@
|
||||
package com.intellij.compiler.impl;
|
||||
|
||||
import com.intellij.ProjectTopics;
|
||||
import com.intellij.compiler.CompileServerManager;
|
||||
import com.intellij.compiler.CompilerConfiguration;
|
||||
import com.intellij.compiler.CompilerIOUtil;
|
||||
import com.intellij.compiler.JpsServerManager;
|
||||
import com.intellij.compiler.make.MakeUtil;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.Application;
|
||||
@@ -1367,7 +1367,7 @@ public class TranslatingCompilerFilesMonitor implements ApplicationComponent {
|
||||
});
|
||||
|
||||
if (!pathsToMark.isEmpty()) {
|
||||
JpsServerManager.getInstance().notifyFilesDeleted(pathsToMark);
|
||||
CompileServerManager.getInstance().notifyFilesDeleted(pathsToMark);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1394,7 +1394,7 @@ public class TranslatingCompilerFilesMonitor implements ApplicationComponent {
|
||||
}
|
||||
});
|
||||
if (!pathsToMark.isEmpty()) {
|
||||
JpsServerManager.getInstance().notifyFilesChanged(pathsToMark);
|
||||
CompileServerManager.getInstance().notifyFilesChanged(pathsToMark);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1442,7 +1442,7 @@ public class TranslatingCompilerFilesMonitor implements ApplicationComponent {
|
||||
}
|
||||
});
|
||||
if (!pathsToMark.isEmpty()) {
|
||||
JpsServerManager.getInstance().notifyFilesChanged(pathsToMark);
|
||||
CompileServerManager.getInstance().notifyFilesChanged(pathsToMark);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.compiler.options;
|
||||
|
||||
import com.intellij.compiler.CompileServerManager;
|
||||
import com.intellij.compiler.CompilerConfiguration;
|
||||
import com.intellij.openapi.fileChooser.FileChooser;
|
||||
import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
|
||||
@@ -248,6 +249,11 @@ public class AnnotationProcessorsConfigurable implements SearchableConfigurable,
|
||||
config.setAnnotationProcessorsMap(myProcessorsModel.exportToMap());
|
||||
|
||||
config.setAnotationProcessedModules(getMarkedModules());
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
CompileServerManager.getInstance().sendReloadRequest(myProject);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private Map<Module, String> getMarkedModules() {
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
*/
|
||||
package com.intellij.compiler.options;
|
||||
|
||||
import com.intellij.compiler.CompileServerManager;
|
||||
import com.intellij.compiler.CompilerConfiguration;
|
||||
import com.intellij.compiler.CompilerConfigurationImpl;
|
||||
import com.intellij.compiler.CompilerSettingsFactory;
|
||||
import com.intellij.compiler.JpsServerManager;
|
||||
import com.intellij.compiler.impl.rmiCompiler.RmicConfiguration;
|
||||
import com.intellij.openapi.compiler.CompilerBundle;
|
||||
import com.intellij.openapi.compiler.options.ExcludedEntriesConfigurable;
|
||||
@@ -180,7 +180,7 @@ public class CompilerConfigurable implements SearchableConfigurable.Parent, Conf
|
||||
excludes.apply();
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
JpsServerManager.getInstance().sendReloadRequest(project);
|
||||
CompileServerManager.getInstance().sendReloadRequest(project);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ package com.intellij.compiler.options;
|
||||
|
||||
import com.intellij.compiler.*;
|
||||
import com.intellij.compiler.impl.TranslatingCompilerFilesMonitor;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.compiler.CompilerBundle;
|
||||
import com.intellij.openapi.options.Configurable;
|
||||
import com.intellij.openapi.options.ConfigurationException;
|
||||
@@ -44,7 +43,6 @@ public class CompilerUIConfigurable implements SearchableConfigurable, Configura
|
||||
|
||||
public CompilerUIConfigurable(final Project project) {
|
||||
myProject = project;
|
||||
myCbUseCompileServer.setVisible(ApplicationManager.getApplication().isInternal());
|
||||
myPatternLegendLabel.setText("<html>" +
|
||||
"Use <b>;</b> to separate patterns and <b>!</b> to negate a pattern. " +
|
||||
"Accepted wildcards: <b>?</b> — exactly one symbol; <b>*</b> — zero or more symbols; " +
|
||||
@@ -96,12 +94,12 @@ public class CompilerUIConfigurable implements SearchableConfigurable, Configura
|
||||
// this will schedule for compilation all files that might become compilable after resource patterns' changing
|
||||
TranslatingCompilerFilesMonitor.getInstance().scanSourcesForCompilableFiles(myProject);
|
||||
if (!workspaceConfiguration.USE_COMPILE_SERVER) {
|
||||
JpsServerManager.getInstance().shutdownServer();
|
||||
CompileServerManager.getInstance().shutdownServer();
|
||||
}
|
||||
else {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
JpsServerManager.getInstance().sendReloadRequest(myProject);
|
||||
CompileServerManager.getInstance().sendReloadRequest(myProject);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.compiler.options;
|
||||
|
||||
import com.intellij.compiler.CompileServerManager;
|
||||
import com.intellij.compiler.CompilerConfiguration;
|
||||
import com.intellij.compiler.CompilerConfigurationImpl;
|
||||
import com.intellij.compiler.impl.javaCompiler.BackendCompiler;
|
||||
@@ -45,12 +46,14 @@ public class JavaCompilersTab implements SearchableConfigurable, Configurable.No
|
||||
private JComboBox myCompiler;
|
||||
private final CardLayout myCardLayout;
|
||||
|
||||
private final Project myProject;
|
||||
private final BackendCompiler myDefaultCompiler;
|
||||
private BackendCompiler mySelectedCompiler;
|
||||
private final CompilerConfigurationImpl myCompilerConfiguration;
|
||||
private final Collection<Configurable> myConfigurables;
|
||||
|
||||
public JavaCompilersTab(final Project project, Collection<BackendCompiler> compilers, BackendCompiler defaultCompiler) {
|
||||
myProject = project;
|
||||
myDefaultCompiler = defaultCompiler;
|
||||
myCompilerConfiguration = (CompilerConfigurationImpl)CompilerConfiguration.getInstance(project);
|
||||
myConfigurables = new ArrayList<Configurable>(compilers.size());
|
||||
@@ -122,6 +125,11 @@ public class JavaCompilersTab implements SearchableConfigurable, Configurable.No
|
||||
configurable.apply();
|
||||
}
|
||||
myCompilerConfiguration.setDefaultCompiler(mySelectedCompiler);
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
CompileServerManager.getInstance().sendReloadRequest(myProject);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
*/
|
||||
package com.intellij.compiler;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.components.PersistentStateComponent;
|
||||
import com.intellij.openapi.components.ServiceManager;
|
||||
import com.intellij.openapi.components.State;
|
||||
@@ -56,6 +55,6 @@ public class CompilerWorkspaceConfiguration implements PersistentStateComponent<
|
||||
}
|
||||
|
||||
public boolean useCompileServer() {
|
||||
return USE_COMPILE_SERVER && (ApplicationManager.getApplication().isInternal() || ApplicationManager.getApplication().isUnitTestMode());
|
||||
return USE_COMPILE_SERVER;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class CompileContext extends UserDataHolderBase implements MessageHandler
|
||||
boolean isProjectRebuild,
|
||||
ProjectChunks productionChunks,
|
||||
ProjectChunks testChunks,
|
||||
FSState fsState, TimestampStorage tsStorage, MessageHandler delegateMessageHandler, final ModuleRootsIndex rootsIndex, BuildCanceledStatus cancelStatus) throws ProjectBuildException {
|
||||
FSState fsState, TimestampStorage tsStorage, MessageHandler delegateMessageHandler, final ModuleRootsIndex rootsIndex, BuildCanceledStatus cancelStatus, boolean useMemoryTempCaches) throws ProjectBuildException {
|
||||
myTsStorage = tsStorage;
|
||||
myCancelStatus = cancelStatus;
|
||||
myCompilationStartStamp = System.currentTimeMillis();
|
||||
@@ -58,7 +58,7 @@ public class CompileContext extends UserDataHolderBase implements MessageHandler
|
||||
myTestChunks = testChunks;
|
||||
myFsState = fsState;
|
||||
myDelegateMessageHandler = delegateMessageHandler;
|
||||
myDataManager = new BuildDataManager(projectName);
|
||||
myDataManager = new BuildDataManager(projectName, useMemoryTempCaches);
|
||||
final Project project = scope.getProject();
|
||||
myProjectPaths = new ProjectPaths(project);
|
||||
myRootsIndex = rootsIndex;
|
||||
|
||||
@@ -28,6 +28,7 @@ public class IncProjectBuilder {
|
||||
private final ProjectDescriptor myProjectDescriptor;
|
||||
private final BuilderRegistry myBuilderRegistry;
|
||||
private final BuildCanceledStatus myCancelStatus;
|
||||
private final boolean myUseMemoryTempCaches;
|
||||
private ProjectChunks myProductionChunks;
|
||||
private ProjectChunks myTestChunks;
|
||||
private final List<MessageHandler> myMessageHandlers = new ArrayList<MessageHandler>();
|
||||
@@ -43,10 +44,11 @@ public class IncProjectBuilder {
|
||||
private final float myTotalModulesWork;
|
||||
private final int myTotalBuilderCount;
|
||||
|
||||
public IncProjectBuilder(ProjectDescriptor pd, BuilderRegistry builderRegistry, BuildCanceledStatus cs) {
|
||||
public IncProjectBuilder(ProjectDescriptor pd, BuilderRegistry builderRegistry, BuildCanceledStatus cs, boolean useMemoryTempCaches) {
|
||||
myProjectDescriptor = pd;
|
||||
myBuilderRegistry = builderRegistry;
|
||||
myCancelStatus = cs;
|
||||
myUseMemoryTempCaches = useMemoryTempCaches;
|
||||
myProductionChunks = new ProjectChunks(pd.project, ClasspathKind.PRODUCTION_COMPILE);
|
||||
myTestChunks = new ProjectChunks(pd.project, ClasspathKind.TEST_COMPILE);
|
||||
myTotalModulesWork = (float) pd.rootsIndex.getTotalModuleCount() * 2; /* multiply by 2 to reflect production and test sources */
|
||||
@@ -145,8 +147,8 @@ public class IncProjectBuilder {
|
||||
final FSState fsState = myProjectDescriptor.fsState;
|
||||
final ModuleRootsIndex rootsIndex = myProjectDescriptor.rootsIndex;
|
||||
return new CompileContext(
|
||||
projectName, scope, isMake, isProjectRebuild, myProductionChunks, myTestChunks, fsState, tsStorage, myMessageDispatcher, rootsIndex, myCancelStatus
|
||||
);
|
||||
projectName, scope, isMake, isProjectRebuild, myProductionChunks, myTestChunks, fsState, tsStorage, myMessageDispatcher, rootsIndex, myCancelStatus,
|
||||
myUseMemoryTempCaches);
|
||||
}
|
||||
|
||||
private void cleanOutputRoots(CompileContext context) throws ProjectBuildException {
|
||||
|
||||
@@ -15,6 +15,7 @@ import org.jetbrains.ether.dependencyView.Callbacks;
|
||||
import org.jetbrains.ether.dependencyView.Mappings;
|
||||
import org.jetbrains.jps.Module;
|
||||
import org.jetbrains.jps.ModuleChunk;
|
||||
import org.jetbrains.jps.Project;
|
||||
import org.jetbrains.jps.ProjectPaths;
|
||||
import org.jetbrains.jps.incremental.*;
|
||||
import org.jetbrains.jps.incremental.messages.BuildMessage;
|
||||
@@ -211,11 +212,10 @@ public class JavaBuilder extends Builder{
|
||||
|
||||
final ProjectPaths paths = context.getProjectPaths();
|
||||
|
||||
// todo: consider corresponding setting in CompilerWorkspaceConfiguration
|
||||
final boolean addNotNullAssertions = true;
|
||||
final boolean addNotNullAssertions = context.getProject().getCompilerConfiguration().isAddNotNullAssertions();
|
||||
|
||||
final Collection<File> classpath = paths.getCompilationClasspath(chunk, context.isCompilingTests(), context.isProjectRebuild());
|
||||
final Collection<File> platformCp = paths.getPlatformCompilationClasspath(chunk, context.isCompilingTests(), context.isProjectRebuild());
|
||||
final Collection<File> classpath = paths.getCompilationClasspath(chunk, context.isCompilingTests(), false/*context.isProjectRebuild()*/);
|
||||
final Collection<File> platformCp = paths.getPlatformCompilationClasspath(chunk, context.isCompilingTests(), false/*context.isProjectRebuild()*/);
|
||||
final Map<File, Set<File>> outs = buildOutputDirectoriesMap(context, chunk);
|
||||
final List<String> options = getCompilationOptions(context, chunk);
|
||||
|
||||
@@ -303,8 +303,45 @@ public class JavaBuilder extends Builder{
|
||||
}
|
||||
|
||||
private static List<String> getCompilationOptions(CompileContext context, ModuleChunk chunk) {
|
||||
// todo: read full set of options from settings
|
||||
return Arrays.asList("-g", "-verbose")/*Collections.emptyList()*/;
|
||||
final List<String> options = new ArrayList<String>();
|
||||
options.add("-verbose");
|
||||
|
||||
final Project project = context.getProject();
|
||||
final Map<String, String> javacOpts = project.getCompilerConfiguration().getJavacOptions();
|
||||
final boolean debugInfo = !"false".equals(javacOpts.get("DEBUGGING_INFO"));
|
||||
final boolean nowarn = "true".equals(javacOpts.get("GENERATE_NO_WARNINGS"));
|
||||
final boolean deprecation = !"false".equals(javacOpts.get("DEPRECATION"));
|
||||
if (debugInfo) {
|
||||
options.add("-g");
|
||||
}
|
||||
if (deprecation) {
|
||||
options.add("-deprecation");
|
||||
}
|
||||
if (nowarn) {
|
||||
options.add("-nowarn");
|
||||
}
|
||||
|
||||
final String customArgs = javacOpts.get("ADDITIONAL_OPTIONS_STRING");
|
||||
boolean isEncodingSet = false;
|
||||
if (customArgs != null) {
|
||||
final StringTokenizer tokenizer = new StringTokenizer(customArgs, " \t\r\n");
|
||||
while(tokenizer.hasMoreTokens()) {
|
||||
final String token = tokenizer.nextToken();
|
||||
if ("-g".equals(token) || "-deprecation".equals(token) || "-nowarn".equals(token) || "-verbose".equals(token)){
|
||||
continue;
|
||||
}
|
||||
options.add(token);
|
||||
if ("-encoding".equals(token)) {
|
||||
isEncodingSet = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!isEncodingSet && project.getProjectCharset() != null) {
|
||||
options.add("-encoding");
|
||||
options.add(project.getProjectCharset());
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
private static Map<File, Set<File>> buildOutputDirectoriesMap(CompileContext context, ModuleChunk chunk) {
|
||||
|
||||
@@ -30,7 +30,7 @@ public class BuildDataManager {
|
||||
private final SourceToFormMapping mySrcToFormMap;
|
||||
private final Mappings myMappings;
|
||||
|
||||
public BuildDataManager(String projectName) throws ProjectBuildException {
|
||||
public BuildDataManager(String projectName, final boolean useMemoryTempCaches) throws ProjectBuildException {
|
||||
myProjectName = projectName;
|
||||
try {
|
||||
mySrcToFormMap = createStorage(getSourceToFormsRoot(), new StorageFactory<SourceToFormMapping>() {
|
||||
@@ -42,7 +42,7 @@ public class BuildDataManager {
|
||||
final File mappingsRoot = getMappingsRoot();
|
||||
myMappings = createStorage(mappingsRoot, new StorageFactory<Mappings>() {
|
||||
public Mappings create(File dataFile) throws Exception {
|
||||
return new Mappings(mappingsRoot, false);
|
||||
return new Mappings(mappingsRoot, useMemoryTempCaches);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ public class Server {
|
||||
private static final int MAX_SIMULTANEOUS_BUILD_SESSIONS = Math.max(2, Runtime.getRuntime().availableProcessors());
|
||||
public static final String SERVER_SUCCESS_START_MESSAGE = "JPS Server started successfully. Listening on port: ";
|
||||
public static final String SERVER_ERROR_START_MESSAGE = "Error starting JPS Server: ";
|
||||
public static final String USE_MEMORY_TEMP_CACHE_OPTION = "use.memory.temp.cache";
|
||||
|
||||
private final ChannelGroup myAllOpenChannels = new DefaultChannelGroup("jps-server");
|
||||
private final ChannelFactory myChannelFactory;
|
||||
@@ -97,6 +98,9 @@ public class Server {
|
||||
server.stop();
|
||||
}
|
||||
});
|
||||
|
||||
ServerState.getInstance().setKeepTempCachesInMemory(System.getProperty(USE_MEMORY_TEMP_CACHE_OPTION) != null);
|
||||
|
||||
System.out.println("Server classpath: " + System.getProperty("java.class.path"));
|
||||
System.err.println(SERVER_SUCCESS_START_MESSAGE + port);
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ class ServerState {
|
||||
private final Object myConfigurationLock = new Object();
|
||||
private final Map<String, String> myPathVariables = new HashMap<String, String>();
|
||||
private final List<GlobalLibrary> myGlobalLibraries = new ArrayList<GlobalLibrary>();
|
||||
private volatile boolean myKeepTempCachesInMemory = false;
|
||||
|
||||
public void setGlobals(List<GlobalLibrary> libs, Map<String, String> pathVars) {
|
||||
synchronized (myConfigurationLock) {
|
||||
@@ -50,6 +51,14 @@ class ServerState {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isKeepTempCachesInMemory() {
|
||||
return myKeepTempCachesInMemory;
|
||||
}
|
||||
|
||||
public void setKeepTempCachesInMemory(boolean keepTempCachesInMemory) {
|
||||
myKeepTempCachesInMemory = keepTempCachesInMemory;
|
||||
}
|
||||
|
||||
public void notifyFileChanged(ProjectDescriptor pd, File file) {
|
||||
try {
|
||||
final RootDescriptor rd = pd.rootsIndex.getModuleAndRoot(file);
|
||||
@@ -117,7 +126,7 @@ class ServerState {
|
||||
|
||||
try {
|
||||
final CompileScope compileScope = createCompilationScope(buildType, pd, modules, paths);
|
||||
final IncProjectBuilder builder = new IncProjectBuilder(pd, BuilderRegistry.getInstance(), cs);
|
||||
final IncProjectBuilder builder = new IncProjectBuilder(pd, BuilderRegistry.getInstance(), cs, myKeepTempCachesInMemory);
|
||||
if (msgHandler != null) {
|
||||
builder.addMessageHandler(msgHandler);
|
||||
}
|
||||
|
||||
@@ -121,8 +121,16 @@ analyze.exceptions.on.the.fly.description=Automatically analyze clipboard on fra
|
||||
|
||||
compiler.perform.outputs.refresh.on.start=false
|
||||
compiler.perform.outputs.refresh.on.start.description=Whether to perform initial FS refresh before compilation starts. Need this to detect external changes to output dirs
|
||||
|
||||
compiler.max.static.constants.searches=10000
|
||||
compiler.max.static.constants.searches.description=If the number of changed compile time constants exceeds this value, make will start full-project rebuild
|
||||
|
||||
compiler.server.heap.size=600
|
||||
compiler.server.heap.size.description=Heap size value in MB for the compile server process
|
||||
|
||||
compiler.server.use.memory.temp.cache=false
|
||||
compiler.server.use.memory.temp.cache.description=Store temporary data in memory for faster compilation; requires larger server heap size
|
||||
|
||||
vcs.show.colored.annotations=true
|
||||
vcs.showConsole=true
|
||||
|
||||
|
||||
+6
-3
@@ -1,8 +1,8 @@
|
||||
package org.jetbrains.plugins.groovy.compiler;
|
||||
|
||||
import com.intellij.compiler.CompileServerManager;
|
||||
import com.intellij.compiler.CompilerManagerImpl;
|
||||
import com.intellij.compiler.CompilerWorkspaceConfiguration;
|
||||
import com.intellij.compiler.JpsServerManager;
|
||||
import com.intellij.execution.ExecutionException;
|
||||
import com.intellij.execution.Executor;
|
||||
import com.intellij.execution.application.ApplicationConfiguration;
|
||||
@@ -15,7 +15,10 @@ import com.intellij.execution.runners.ExecutionEnvironment;
|
||||
import com.intellij.execution.runners.ProgramRunner;
|
||||
import com.intellij.execution.ui.RunContentDescriptor;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.*;
|
||||
import com.intellij.openapi.application.AccessToken;
|
||||
import com.intellij.openapi.application.PluginPathManager;
|
||||
import com.intellij.openapi.application.Result;
|
||||
import com.intellij.openapi.application.WriteAction;
|
||||
import com.intellij.openapi.application.ex.ApplicationManagerEx;
|
||||
import com.intellij.openapi.command.WriteCommandAction;
|
||||
import com.intellij.openapi.compiler.*;
|
||||
@@ -119,7 +122,7 @@ public abstract class GroovyCompilerTestCase extends JavaCodeInsightFixtureTestC
|
||||
jdkTable.removeJdk(jdkTable.getInternalJdk());
|
||||
}
|
||||
}.execute();
|
||||
JpsServerManager.getInstance().shutdownServer();
|
||||
CompileServerManager.getInstance().shutdownServer();
|
||||
}
|
||||
|
||||
myMainOutput.tearDown();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<implementation-class>com.intellij.compiler.impl.TranslatingCompilerFilesMonitor</implementation-class>
|
||||
</component>
|
||||
<component>
|
||||
<implementation-class>com.intellij.compiler.JpsServerManager</implementation-class>
|
||||
<implementation-class>com.intellij.compiler.CompileServerManager</implementation-class>
|
||||
</component>
|
||||
</application-components>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user