@CheckForNull private static VirtualFile getCompilerTestOutputPath(final Module module) { final CompilerModuleExtension compilerModuleExtension = CompilerModuleExtension.getInstance(module); if (compilerModuleExtension != null) { VirtualFile file = compilerModuleExtension.getCompilerOutputPathForTests(); if (exists(file)) { return file; } } return null; }
public void configureByModule(final Module module, @MagicConstant(valuesFromClass = MonkeyParameters.class) final int classPathType, boolean forTests) throws CantRunException { CompilerModuleExtension extension = CompilerModuleExtension.getInstance(module); if (extension != null) { outputPath = forTests ? extension.getCompilerOutputPathForTests() : extension.getCompilerOutputPath(); } final Sdk moduleSdk = getModuleSdk(module); if ((classPathType & SDK_ONLY) != 0) { if (moduleSdk == null) { throw CantRunException.noJdkConfigured(); } setSdk(moduleSdk); } }
private void updateOutputPathPresentation() { if (getCompilerExtension().isCompilerOutputPathInherited()) { final String baseUrl = ProjectStructureConfigurable.getInstance(myProject).getProjectConfig().getCompilerOutputUrl(); moduleCompileOutputChanged(baseUrl, getModel().getModule().getName()); } else { final VirtualFile compilerOutputPath = getCompilerExtension().getCompilerOutputPath(); if (compilerOutputPath != null) { myOutputPathPanel.setText(FileUtil.toSystemDependentName(compilerOutputPath.getPath())); } else { final String compilerOutputUrl = getCompilerExtension().getCompilerOutputUrl(); if (compilerOutputUrl != null) { myOutputPathPanel.setText(FileUtil.toSystemDependentName(VfsUtilCore.urlToPath(compilerOutputUrl))); } } final VirtualFile testsOutputPath = getCompilerExtension().getCompilerOutputPathForTests(); if (testsOutputPath != null) { myTestsOutputPathPanel.setText(FileUtil.toSystemDependentName(testsOutputPath.getPath())); } else { final String testsOutputUrl = getCompilerExtension().getCompilerOutputUrlForTests(); if (testsOutputUrl != null) { myTestsOutputPathPanel.setText(FileUtil.toSystemDependentName(VfsUtilCore.urlToPath(testsOutputUrl))); } } } }