boolean (@NotNull ProcessHandler processHandler) { if (!(processHandler instanceof OSProcessHandler) || processHandler instanceof ColoredProcessHandler) { return false; } Process process = ((OSProcessHandler)processHandler).getProcess(); return process instanceof PtyProcess || (process instanceof PtyBasedProcess && ((PtyBasedProcess)process).hasPty()); }