void () { cancelFilteringTask(); myDebugProcess.getManagerThread().schedule(new DebuggerContextCommandImpl(myDebugProcess.getDebuggerContext()) { @Override public Priority getPriority() { return Priority.LOWEST; } @Override public void threadAction(@NotNull SuspendContextImpl suspendContext) { final EvaluationContextImpl evaluationContext = new EvaluationContextImpl(suspendContext, suspendContext.getFrameProxy()); List<JavaReferenceInfo> instances = myRepresentation.fetchInstances(evaluationContext); synchronized (myFilteringTaskLock) { ApplicationManager.getApplication().runReadAction(() -> { myFilteringTask = new FilteringTask(myClassName, myDebugProcess, myFilterConditionEditor.getExpression(), new MyValuesList(instances), new MyFilteringCallback(evaluationContext)); myFilteringTaskFuture = ApplicationManager.getApplication().executeOnPooledThread(myFilteringTask); }); } } }); }