Improve autocomplete locking

This commit is contained in:
Karl Burtram
2016-09-18 01:54:32 -07:00
parent 41198e9357
commit e74a392ca9
5 changed files with 272 additions and 103 deletions

View File

@@ -3,14 +3,16 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System;
using System.Collections.Generic;
using System.Threading;
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.SmoMetadataProvider;
using Microsoft.SqlServer.Management.SqlParser.Binder;
using Microsoft.SqlServer.Management.SqlParser.Common;
using Microsoft.SqlServer.Management.SqlParser.Intellisense;
using Microsoft.SqlServer.Management.SqlParser.MetadataProvider;
using Microsoft.SqlServer.Management.SqlParser.Parser;
using System;
using System.Threading;
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
{
@@ -33,7 +35,6 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
get { return this.buildingMetadataEvent; }
}
/// <summary>
/// Gets or sets a flag determining is the LanguageService is connected
/// </summary>
@@ -56,7 +57,6 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
isQuotedIdentifierSet: true,
compatibilityLevel: DatabaseCompatibilityLevel,
transactSqlVersion: TransactSqlVersion);
this.IsConnected = true;
}
}
@@ -143,6 +143,11 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
/// </summary>
public MetadataDisplayInfoProvider MetadataDisplayInfoProvider { get; set; }
/// <summary>
/// Gets or sets the current autocomplete suggestion list
/// </summary>
public IEnumerable<Declaration> CurrentSuggestions { get; set; }
/// <summary>
/// Gets the database compatibility level from a server version
/// </summary>
@@ -193,6 +198,6 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
default:
return TransactSqlVersion.Current;
}
}
}
}
}