* Misc. clean-ups related to removing unneeded PowerShell Language Service code.
* Remove unneeded files and clean up remaining code.
* Enable file change tracking with Workspace and EditorSession.
This commit is contained in:
Karl Burtram
2016-07-16 01:20:56 -07:00
committed by GitHub
parent c78292a680
commit ea3d015961
61 changed files with 275 additions and 3777 deletions

View File

@@ -3,11 +3,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer
{

View File

@@ -83,4 +83,3 @@ namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer
public object Data { get; set; }
}
}

View File

@@ -4,11 +4,6 @@
//
using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer
{

View File

@@ -1,111 +0,0 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer
{
public class ExtensionCommandAddedNotification
{
public static readonly
EventType<ExtensionCommandAddedNotification> Type =
EventType<ExtensionCommandAddedNotification>.Create("SqlTools/extensionCommandAdded");
public string Name { get; set; }
public string DisplayName { get; set; }
}
public class ExtensionCommandUpdatedNotification
{
public static readonly
EventType<ExtensionCommandUpdatedNotification> Type =
EventType<ExtensionCommandUpdatedNotification>.Create("SqlTools/extensionCommandUpdated");
public string Name { get; set; }
}
public class ExtensionCommandRemovedNotification
{
public static readonly
EventType<ExtensionCommandRemovedNotification> Type =
EventType<ExtensionCommandRemovedNotification>.Create("SqlTools/extensionCommandRemoved");
public string Name { get; set; }
}
public class ClientEditorContext
{
public string CurrentFilePath { get; set; }
public Position CursorPosition { get; set; }
public Range SelectionRange { get; set; }
}
public class InvokeExtensionCommandRequest
{
public static readonly
RequestType<InvokeExtensionCommandRequest, string> Type =
RequestType<InvokeExtensionCommandRequest, string>.Create("SqlTools/invokeExtensionCommand");
public string Name { get; set; }
public ClientEditorContext Context { get; set; }
}
public class GetEditorContextRequest
{
public static readonly
RequestType<GetEditorContextRequest, ClientEditorContext> Type =
RequestType<GetEditorContextRequest, ClientEditorContext>.Create("editor/getEditorContext");
}
public enum EditorCommandResponse
{
Unsupported,
OK
}
public class InsertTextRequest
{
public static readonly
RequestType<InsertTextRequest, EditorCommandResponse> Type =
RequestType<InsertTextRequest, EditorCommandResponse>.Create("editor/insertText");
public string FilePath { get; set; }
public string InsertText { get; set; }
public Range InsertRange { get; set; }
}
public class SetSelectionRequest
{
public static readonly
RequestType<SetSelectionRequest, EditorCommandResponse> Type =
RequestType<SetSelectionRequest, EditorCommandResponse>.Create("editor/setSelection");
public Range SelectionRange { get; set; }
}
public class SetCursorPositionRequest
{
public static readonly
RequestType<SetCursorPositionRequest, EditorCommandResponse> Type =
RequestType<SetCursorPositionRequest, EditorCommandResponse>.Create("editor/setCursorPosition");
public Position CursorPosition { get; set; }
}
public class OpenFileRequest
{
public static readonly
RequestType<string, EditorCommandResponse> Type =
RequestType<string, EditorCommandResponse>.Create("editor/openFile");
}
}

View File

@@ -4,11 +4,6 @@
//
using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer
{

View File

@@ -61,12 +61,27 @@ namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer
public class DidChangeTextDocumentParams : TextDocumentIdentifier
{
public TextDocumentUriChangeEvent TextDocument { get; set; }
/// <summary>
/// Gets or sets the list of changes to the document content.
/// </summary>
public TextDocumentChangeEvent[] ContentChanges { get; set; }
}
public class TextDocumentUriChangeEvent
{
/// <summary>
/// Gets or sets the Uri of the changed text document
/// </summary>
public string Uri { get; set; }
/// <summary>
/// Gets or sets the Version of the changed text document
/// </summary>
public int Version { get; set; }
}
public class TextDocumentChangeEvent
{
/// <summary>