void () { ThreadGroupDescriptorImpl groupDescriptor = (ThreadGroupDescriptorImpl)myNode.getDescriptor(); ThreadGroupReferenceProxyImpl threadGroup = groupDescriptor.getThreadGroupReference(); List<ThreadReferenceProxyImpl> threads = new ArrayList<>(threadGroup.threads()); threads.sort(ThreadReferenceProxyImpl.ourComparator); final DebuggerContextImpl debuggerContext = getDebuggerContext(); final SuspendContextImpl suspendContext = debuggerContext.getSuspendContext(); final EvaluationContextImpl evaluationContext = suspendContext != null && !suspendContext.isResumed() ? debuggerContext.createEvaluationContext() : null; boolean showCurrent = ThreadsViewSettings.getInstance().SHOW_CURRENT_THREAD; for (final ThreadGroupReferenceProxyImpl group : threadGroup.threadGroups()) { if (group != null) { DebuggerTreeNodeImpl threadNode = myNodeManager.createNode(myNodeManager.getThreadGroupDescriptor(groupDescriptor, group), evaluationContext); if (showCurrent && ((ThreadGroupDescriptorImpl)threadNode.getDescriptor()).isCurrent()) { myChildren.add(0, threadNode); } else { myChildren.add(threadNode); } } } ArrayList<DebuggerTreeNodeImpl> threadNodes = new ArrayList<>(); for (ThreadReferenceProxyImpl thread : threads) { if (thread != null) { final DebuggerTreeNodeImpl threadNode = myNodeManager.createNode(myNodeManager.getThreadDescriptor(groupDescriptor, thread), evaluationContext); if (showCurrent && ((ThreadDescriptorImpl)threadNode.getDescriptor()).isCurrent()) { threadNodes.add(0, threadNode); } else { threadNodes.add(threadNode); } } } myChildren.addAll(threadNodes); updateUI(true); }