Enable file change tracking with Workspace and EditorSession.

Also include misc. clean-ups related to removing unneeded PowerShell Language Service code.
This commit is contained in:
Karl Burtram
2016-07-16 01:14:12 -07:00
parent f2bb986f42
commit 4ad506f6f2
10 changed files with 237 additions and 60 deletions

View File

@@ -3,11 +3,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
// using Microsoft.SqlTools.EditorServices.Console;
// using Microsoft.SqlTools.EditorServices.Extensions;
using System;
using Microsoft.SqlTools.EditorServices.Session;
// using Microsoft.SqlTools.EditorServices.Utility;
// using System.IO;
namespace Microsoft.SqlTools.EditorServices
{
@@ -15,12 +12,8 @@ namespace Microsoft.SqlTools.EditorServices
/// Manages a single session for all editor services. This
/// includes managing all open script files for the session.
/// </summary>
public class EditorSession
public class EditorSession : IDisposable
{
public void StartSession(HostDetails hostDetails, ProfilePaths profilePaths)
{
}
#if false
#region Properties
/// <summary>
@@ -33,6 +26,59 @@ namespace Microsoft.SqlTools.EditorServices
/// </summary>
public SqlToolsContext SqlToolsContext { get; private set; }
#endregion
#region Public Methods
/// <summary>
/// Starts the session using the provided IConsoleHost implementation
/// for the ConsoleService.
/// </summary>
/// <param name="hostDetails">
/// Provides details about the host application.
/// </param>
/// <param name="profilePaths">
/// An object containing the profile paths for the session.
/// </param>
public void StartSession(HostDetails hostDetails, ProfilePaths profilePaths)
{
// Initialize all services
this.SqlToolsContext = new SqlToolsContext(hostDetails, profilePaths);
// this.LanguageService = new LanguageService(this.SqlToolsContext);
// this.DebugService = new DebugService(this.SqlToolsContext);
// this.ConsoleService = new ConsoleService(this.SqlToolsContext);
// this.ExtensionService = new ExtensionService(this.SqlToolsContext);
// this.InstantiateAnalysisService();
// Create a workspace to contain open files
this.Workspace = new Workspace(this.SqlToolsContext.SqlToolsVersion);
}
#endregion
#region IDisposable Implementation
/// <summary>
/// Disposes of any Runspaces that were created for the
/// services used in this session.
/// </summary>
public void Dispose()
{
}
#endregion
#if false
#region Properties
/// <summary>
/// Gets the LanguageService instance for this session.
/// </summary>