I'd find this more efficient and more readable:

    tree.collect {
      case Message(name, _) => (name,  ImportedSymbol(packageName, false))
      case EnumStatement(name, _, _) => (name,  ImportedSymbol(packageName, true))
    }