void () { final List<ThreadState> threads = ThreadDumpAction.buildThreadStates(process.getVirtualMachineProxy()); ApplicationManager.getApplication().invokeLater(() -> ExportToFileUtil.chooseFileAndExport(project, ThreadDumpPanel.createToFileExporter(project, threads)), ModalityState.nonModal()); }