Java 类com.intellij.openapi.projectRoots.impl.MockJdkWrapper 实例源码

项目:error-prone-aspirator    文件:ErrorProneIdeaCompiler.java   
private Sdk getJdkForStartupCommand(final ModuleChunk chunk) {
  final Sdk jdk = chunk.getJdk();
  if (ApplicationManager.getApplication().isUnitTestMode() && JavacConfiguration.getOptions(myProject, JavacConfiguration.class).isTestsUseExternalCompiler()) {
    final String jdkHomePath = CompilerConfigurationImpl.getTestsExternalCompilerHome();
    if (jdkHomePath == null) {
      throw new IllegalArgumentException("[TEST-MODE] Cannot determine home directory for JDK to use javac from");
    }
    // when running under Mock JDK use VM executable from the JDK on which the tests run
    return new MockJdkWrapper(jdkHomePath, jdk);
  }
  return jdk;
}
项目:error-prone-aspirator    文件:ErrorProneIdeaCompiler.java   
private Sdk getJdkForStartupCommand(final ModuleChunk chunk) {
  final Sdk jdk = chunk.getJdk();
  if (ApplicationManager.getApplication().isUnitTestMode() && JavacConfiguration.getOptions(myProject, JavacConfiguration.class).isTestsUseExternalCompiler()) {
    final String jdkHomePath = CompilerConfigurationImpl.getTestsExternalCompilerHome();
    if (jdkHomePath == null) {
      throw new IllegalArgumentException("[TEST-MODE] Cannot determine home directory for JDK to use javac from");
    }
    // when running under Mock JDK use VM executable from the JDK on which the tests run
    return new MockJdkWrapper(jdkHomePath, jdk);
  }
  return jdk;
}
项目:tools-idea    文件:JavacCompiler.java   
private Sdk getJdkForStartupCommand(final ModuleChunk chunk) {
  final Sdk jdk = chunk.getJdk();
  if (ApplicationManager.getApplication().isUnitTestMode() && JavacConfiguration.getOptions(myProject, JavacConfiguration.class).isTestsUseExternalCompiler()) {
    final String jdkHomePath = CompilerConfigurationImpl.getTestsExternalCompilerHome();
    if (jdkHomePath == null) {
      throw new IllegalArgumentException("[TEST-MODE] Cannot determine home directory for JDK to use javac from");
    }
    // when running under Mock JDK use VM executable from the JDK on which the tests run
    return new MockJdkWrapper(jdkHomePath, jdk);
  }
  return jdk;
}