void (ModifiableRootModel rootModel) { if (myOutputPath != null) { final File pathFile = new File(myOutputPath); if (!pathFile.mkdirs()) { assert pathFile.exists() : "unable to create: " + myOutputPath; } final VirtualFile virtualFile = LocalFileSystem.getInstance().refreshAndFindFileByPath(myOutputPath); assert virtualFile != null : "cannot find output path: " + myOutputPath; rootModel.getModuleExtension(CompilerModuleExtension.class).setCompilerOutputPath(virtualFile); rootModel.getModuleExtension(CompilerModuleExtension.class).inheritCompilerOutputPath(false); rootModel.getModuleExtension(CompilerModuleExtension.class).setExcludeOutput(false); } if (myTestOutputPath != null) { assert new File(myTestOutputPath).mkdirs() : myTestOutputPath; final VirtualFile virtualFile = LocalFileSystem.getInstance().refreshAndFindFileByPath(myTestOutputPath); assert virtualFile != null : "cannot find test output path: " + myTestOutputPath; rootModel.getModuleExtension(CompilerModuleExtension.class).setCompilerOutputPathForTests(virtualFile); rootModel.getModuleExtension(CompilerModuleExtension.class).inheritCompilerOutputPath(false); rootModel.getModuleExtension(CompilerModuleExtension.class).setExcludeOutput(false); } }