void () { Runnable runnable = () -> { try { FileUtil.copyDir(new File(JavaTestUtil.getJavaTestDataPath() + "/psi/arrayIndexOutOfBounds/src"), VfsUtilCore.virtualToIoFile(myProjectRoot)); } catch (IOException e) { LOG.error(e); } VirtualFileManager.getInstance().syncRefresh(); }; CommandProcessor.getInstance().executeCommand(myProject, runnable, "", null); }