void (final CompilerMessage message) { if (myProject == null) { return; } final Runnable task = () -> { if (myProject.isDisposed()) { return; } VirtualFile file = message.getVirtualFile(); if (file == null) { Navigatable navigatable = message.getNavigatable(); if (navigatable instanceof OpenFileDescriptor) { file = ((OpenFileDescriptor)navigatable).getFile(); } } if (file != null) { WolfTheProblemSolver.getInstance(myProject).queue(file); } }; final Application app = ApplicationManager.getApplication(); if (app.isDispatchThread()) { app.executeOnPooledThread(task); } else { task.run(); } }