private HighlightingSessionImpl(@Nonnull PsiFile psiFile, @Nonnull DaemonProgressIndicator progressIndicator, EditorColorsScheme editorColorsScheme) { myPsiFile = psiFile; myProgressIndicator = progressIndicator; myEditorColorsScheme = editorColorsScheme; myProject = psiFile.getProject(); myDocument = PsiDocumentManager.getInstance(myProject).getDocument(psiFile); myEDTQueue = new TransferToEDTQueue<Runnable>("Apply highlighting results", runnable -> { runnable.run(); return true; }, o -> myProject.isDisposed() || getProgressIndicator().isCanceled()) { @Override protected void schedule(@Nonnull Runnable updateRunnable) { ApplicationManager.getApplication().invokeLater(updateRunnable, ModalityState.any()); } }; }
public GeneralTestEventsProcessor(Project project, @NotNull String testFrameworkName) { myProject = project; myEventPublisher = project.getMessageBus().syncPublisher(SMTRunnerEventsListener.TEST_STATUS); myTestFrameworkName = testFrameworkName; myTransferToEDTQueue = new TransferToEDTQueue<Runnable>("SM queue", new Processor<Runnable>() { @Override public boolean process(Runnable runnable) { runnable.run(); return true; } }, project.getDisposed(), 300); }
public GeneralTestEventsProcessor(Project project, @Nonnull String testFrameworkName, @Nonnull SMTestProxy.SMRootTestProxy testsRootProxy) { myProject = project; myEventPublisher = project.getMessageBus().syncPublisher(SMTRunnerEventsListener.TEST_STATUS); myTestFrameworkName = testFrameworkName; myTransferToEDTQueue = new TransferToEDTQueue<>("SM queue", runnable -> { runnable.run(); return true; }, project.getDisposed()); myTestsRootProxy = testsRootProxy; }
public TransferToEDTQueue<Runnable> getLaterInvocator() { return myLaterInvocator; }