[lsp] Document the logMessage notification and split into its own file

This commit is contained in:
Ben Langmuir
2018-12-07 22:29:02 -08:00
parent 4775d9689c
commit ea2e15bd08
2 changed files with 31 additions and 15 deletions

View File

@@ -0,0 +1,31 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
/// Notifcation from the server containing a log message.
///
/// - Parameters:
/// - type: The kind of log message.
/// - message: The contents of the message.
public struct LogMessage: NotificationType, Hashable {
public static let method: String = "window/logMessage"
/// The kind of log message.
public var type: WindowMessageType
/// The contents of the message.
public var message: String
public init(type: WindowMessageType, message: String) {
self.type = type
self.message = message
}
}

View File

@@ -159,21 +159,6 @@ public struct Exit: NotificationType, Hashable {
public static let method: String = "exit"
}
// MARK: - Window -
public struct LogMessage: NotificationType, Hashable {
public static let method: String = "window/logMessage"
public var type: WindowMessageType
public var message: String
public init(type: WindowMessageType, message: String) {
self.type = type
self.message = message
}
}
public protocol TextDocumentRequest: RequestType {
var textDocument: TextDocumentIdentifier { get }