ThreadDump (ThreadDump threadDump) { IdeEventQueue eventQueue = IdeEventQueue.getInstance(); String enrichedDump = threadDump.getRawDump() + "\n" + EVENT_COUNTS_HEADER + "\nPosted: " + eventQueue.getPostedEventCount() + "\nPosted (system): " + eventQueue.getPostedSystemEventCount() + "\nReturned: " + eventQueue.getReturnedEventCount(); return new ThreadDump(enrichedDump, threadDump.getEDTStackTrace(), threadDump.getThreadInfos()); }