Maybe it is not worth the effort, but a for-comprehension could simplify this method.

A method like
```scala
def abortEarly[A](a: => A): Option[A] = {
  if (progressMonitor.isCanceled()) None
  else Some(a)
}
```
could help to write something like
```scala
for {
  tree <- abortEarly(unitTree)
  allSymbols <- ...
  rawSymbolInfos <- ...
  ...
}
```