Java源码示例:com.intellij.execution.process.KillableProcessHandler

示例1
@NotNull
private ProcessHandler createProcessHandler(GeneralCommandLine commandLine) throws ExecutionException {
    return new KillableProcessHandler(commandLine) {
        @NotNull
        @Override
        protected BaseOutputReader.Options readerOptions() {
            return new BaseOutputReader.Options() {
                @Override
                public BaseDataReader.SleepingPolicy policy() {
                    return BaseDataReader.SleepingPolicy.BLOCKING;
                }

                @Override
                public boolean splitToLines() {
                    return false;
                }

                @Override
                public boolean withSeparators() {
                    return true;
                }
            };
        }
    };
}