[java] selects CP shortening method _after_ JDK is set

... otherwise @argfile is never chosen
This commit is contained in:
Roman Shevchenko
2019-01-19 17:16:49 +01:00
parent 90c12267d4
commit 5b464ff616
2 changed files with 6 additions and 4 deletions
@@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.execution;
import com.intellij.ExtensionPoints;
@@ -198,7 +198,6 @@ public abstract class JavaTestFrameworkRunnableState<T extends
protected JavaParameters createJavaParameters() throws ExecutionException {
final JavaParameters javaParameters = new JavaParameters();
Project project = getConfiguration().getProject();
javaParameters.setShortenCommandLine(getConfiguration().getShortenCommandLine(), project);
final Module module = getConfiguration().getConfigurationModule().getModule();
Sdk jdk = module == null ? ProjectRootManager.getInstance(project).getProjectSdk() : ModuleRootManager.getInstance(module).getSdk();
@@ -233,6 +232,8 @@ public abstract class JavaTestFrameworkRunnableState<T extends
javaParameters.getVMParametersList().addProperty("idea.test.cyclic.buffer.size", String.valueOf(ConsoleBuffer.getCycleBufferSize()));
}
javaParameters.setShortenCommandLine(getConfiguration().getShortenCommandLine(), project);
return javaParameters;
}
@@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.execution.application;
import com.intellij.codeInsight.daemon.impl.analysis.JavaModuleGraphUtil;
@@ -41,7 +41,6 @@ public abstract class ApplicationCommandLineState<T extends
protected JavaParameters createJavaParameters() throws ExecutionException {
final JavaParameters params = new JavaParameters();
T configuration = getConfiguration();
params.setShortenCommandLine(configuration.getShortenCommandLine(), configuration.getProject());
params.setMainClass(myConfiguration.getRunClass());
setupJavaParameters(params);
@@ -61,6 +60,8 @@ public abstract class ApplicationCommandLineState<T extends
setupModulePath(params, module);
params.setShortenCommandLine(configuration.getShortenCommandLine(), configuration.getProject());
return params;
}