diff --git a/T4Toolbox.Common.props b/T4Toolbox.Common.props
index 17567f1..2197892 100644
--- a/T4Toolbox.Common.props
+++ b/T4Toolbox.Common.props
@@ -7,7 +7,7 @@
$(MSBuildProjectName)
$(MSBuildProjectName)
Properties
- v4.6
+ v4.7.2
15.0
15.0
diff --git a/src/T4Toolbox.DirectiveProcessors/T4Toolbox.DirectiveProcessors.csproj b/src/T4Toolbox.DirectiveProcessors/T4Toolbox.DirectiveProcessors.csproj
index f925e84..715f5e4 100644
--- a/src/T4Toolbox.DirectiveProcessors/T4Toolbox.DirectiveProcessors.csproj
+++ b/src/T4Toolbox.DirectiveProcessors/T4Toolbox.DirectiveProcessors.csproj
@@ -3,6 +3,8 @@
{E0282961-2D83-48CC-B4D4-8257449CF8F7}
Library
+ v4.7.2
+
diff --git a/src/T4Toolbox.TemplateAnalysis/T4Toolbox.TemplateAnalysis.csproj b/src/T4Toolbox.TemplateAnalysis/T4Toolbox.TemplateAnalysis.csproj
index c146ee5..bd5d848 100644
--- a/src/T4Toolbox.TemplateAnalysis/T4Toolbox.TemplateAnalysis.csproj
+++ b/src/T4Toolbox.TemplateAnalysis/T4Toolbox.TemplateAnalysis.csproj
@@ -8,6 +8,8 @@
..\..\packages\YaccLexTools.0.2.2\tools\
"$(YaccLexTools)gplex.exe"
"$(YaccLexTools)gppg.exe"
+ v4.7.2
+
diff --git a/src/T4Toolbox.VisualStudio.Editor/T4Toolbox.VisualStudio.Editor.csproj b/src/T4Toolbox.VisualStudio.Editor/T4Toolbox.VisualStudio.Editor.csproj
index 575bf15..146cf53 100644
--- a/src/T4Toolbox.VisualStudio.Editor/T4Toolbox.VisualStudio.Editor.csproj
+++ b/src/T4Toolbox.VisualStudio.Editor/T4Toolbox.VisualStudio.Editor.csproj
@@ -5,12 +5,15 @@
{FDE953D3-AD27-4398-8EF4-293C0CEBDC3E}
Library
+ v4.7.2
+
+
diff --git a/src/T4Toolbox.VisualStudio.Editor/TemplateQuickInfoSource.cs b/src/T4Toolbox.VisualStudio.Editor/TemplateQuickInfoSource.cs
index 22f61d4..96f5028 100644
--- a/src/T4Toolbox.VisualStudio.Editor/TemplateQuickInfoSource.cs
+++ b/src/T4Toolbox.VisualStudio.Editor/TemplateQuickInfoSource.cs
@@ -5,12 +5,13 @@
namespace T4Toolbox.VisualStudio.Editor
{
using System;
- using System.Collections.Generic;
using System.Diagnostics;
+ using System.Threading;
+ using System.Threading.Tasks;
using Microsoft.VisualStudio.Language.Intellisense;
using Microsoft.VisualStudio.Text;
- internal sealed class TemplateQuickInfoSource : IQuickInfoSource
+ internal sealed class TemplateQuickInfoSource : IAsyncQuickInfoSource
{
private readonly TemplateAnalyzer analyzer;
@@ -20,18 +21,14 @@ public TemplateQuickInfoSource(ITextBuffer buffer)
this.analyzer = TemplateAnalyzer.GetOrCreate(buffer);
}
- public void AugmentQuickInfoSession(IQuickInfoSession session, IList
-
+
\ No newline at end of file
diff --git a/src/T4Toolbox.VisualStudio/Resources.Designer.cs b/src/T4Toolbox.VisualStudio/Resources.Designer.cs
index c81db75..6987f9b 100644
--- a/src/T4Toolbox.VisualStudio/Resources.Designer.cs
+++ b/src/T4Toolbox.VisualStudio/Resources.Designer.cs
@@ -19,7 +19,7 @@ namespace T4Toolbox.VisualStudio {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
diff --git a/src/T4Toolbox.VisualStudio/T4Toolbox.VisualStudio.csproj b/src/T4Toolbox.VisualStudio/T4Toolbox.VisualStudio.csproj
index b1c22a7..05861d2 100644
--- a/src/T4Toolbox.VisualStudio/T4Toolbox.VisualStudio.csproj
+++ b/src/T4Toolbox.VisualStudio/T4Toolbox.VisualStudio.csproj
@@ -10,6 +10,8 @@
false
false
true
+ v4.7.2
+
diff --git a/src/T4Toolbox.vsix/T4Toolbox.vsix.csproj b/src/T4Toolbox.vsix/T4Toolbox.vsix.csproj
index 6f31ecc..d2e8536 100644
--- a/src/T4Toolbox.vsix/T4Toolbox.vsix.csproj
+++ b/src/T4Toolbox.vsix/T4Toolbox.vsix.csproj
@@ -23,6 +23,8 @@
false
false
+ v4.7.2
+
diff --git a/src/T4Toolbox.vsix/source.extension.vsixmanifest b/src/T4Toolbox.vsix/source.extension.vsixmanifest
index 1141602..80c98a8 100644
--- a/src/T4Toolbox.vsix/source.extension.vsixmanifest
+++ b/src/T4Toolbox.vsix/source.extension.vsixmanifest
@@ -1,31 +1,31 @@
-
-
- T4 Toolbox for Visual Studio 2017
- Extends Text Templates with syntax colorization, error reporting, outlining, QuickInfo tooltips, statement completion, generation of multiple output files with source control integration, support for template parameters in Solution Explorer properties and more.
- https://github.com/olegsych/T4Toolbox
- License.txt
- http://olegsych.github.io/T4Toolbox/getting-started.html
- https://github.com/olegsych/T4Toolbox/releases
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ T4 Toolbox for Visual Studio 2019
+ Extends Text Templates with syntax colorization, error reporting, outlining, QuickInfo tooltips, statement completion, generation of multiple output files with source control integration, support for template parameters in Solution Explorer properties and more.
+ https://github.com/olegsych/T4Toolbox
+ License.txt
+ http://olegsych.github.io/T4Toolbox/getting-started.html
+ https://github.com/olegsych/T4Toolbox/releases
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/T4Toolbox/T4Toolbox.csproj b/src/T4Toolbox/T4Toolbox.csproj
index 1f4013f..949d8f0 100644
--- a/src/T4Toolbox/T4Toolbox.csproj
+++ b/src/T4Toolbox/T4Toolbox.csproj
@@ -3,6 +3,8 @@
{682E771A-76F7-4972-BBDC-1250B67F399B}
Library
+ v4.7.2
+
diff --git a/test/T4Toolbox.VisualStudio.Editor.Tests/FakeQuickInfoSession.cs b/test/T4Toolbox.VisualStudio.Editor.Tests/FakeQuickInfoSession.cs
index 138701b..1957edf 100644
--- a/test/T4Toolbox.VisualStudio.Editor.Tests/FakeQuickInfoSession.cs
+++ b/test/T4Toolbox.VisualStudio.Editor.Tests/FakeQuickInfoSession.cs
@@ -5,109 +5,73 @@
namespace T4Toolbox.VisualStudio.Editor
{
using System;
+ using System.Collections.Generic;
+ using System.Threading.Tasks;
using Microsoft.VisualStudio.Language.Intellisense;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Utilities;
- internal class FakeQuickInfoSession : IQuickInfoSession
+ internal class FakeQuickInfoSession : IAsyncQuickInfoSession
{
public SnapshotPoint? SnapshotTriggerPoint { get; set; }
- #region IQuickInfoSession
+ #region IAsyncQuickInfoSession
- ITrackingSpan IQuickInfoSession.ApplicableToSpan
+ public ITrackingSpan ApplicableToSpan
{
get { throw new NotImplementedException(); }
}
- event EventHandler IQuickInfoSession.ApplicableToSpanChanged
- {
- add { throw new NotImplementedException(); }
- remove { throw new NotImplementedException(); }
- }
-
- BulkObservableCollection IQuickInfoSession.QuickInfoContent
+ public IEnumerable Content
{
get { throw new NotImplementedException(); }
}
- bool IQuickInfoSession.TrackMouse
+ public bool HasInteractiveContent
{
get { throw new NotImplementedException(); }
}
- void IIntellisenseSession.Collapse()
+ public QuickInfoSessionOptions Options
{
- throw new NotImplementedException();
- }
-
- void IIntellisenseSession.Dismiss()
- {
- throw new NotImplementedException();
- }
-
- event EventHandler IIntellisenseSession.Dismissed
- {
- add { throw new NotImplementedException(); }
- remove { throw new NotImplementedException(); }
- }
-
- SnapshotPoint? IIntellisenseSession.GetTriggerPoint(ITextSnapshot textSnapshot)
- {
- return this.SnapshotTriggerPoint;
- }
-
- ITrackingPoint IIntellisenseSession.GetTriggerPoint(ITextBuffer textBuffer)
- {
- throw new NotImplementedException();
+ get { throw new NotImplementedException(); }
}
- bool IIntellisenseSession.IsDismissed
+ public QuickInfoSessionState State
{
get { throw new NotImplementedException(); }
}
- bool IIntellisenseSession.Match()
+ public ITextView TextView
{
- throw new NotImplementedException();
+ get { throw new NotImplementedException(); }
}
- IIntellisensePresenter IIntellisenseSession.Presenter
+ public PropertyCollection Properties
{
get { throw new NotImplementedException(); }
}
- event EventHandler IIntellisenseSession.PresenterChanged
+ public event EventHandler StateChanged
{
add { throw new NotImplementedException(); }
remove { throw new NotImplementedException(); }
}
- void IIntellisenseSession.Recalculate()
+ public Task DismissAsync()
{
throw new NotImplementedException();
}
- event EventHandler IIntellisenseSession.Recalculated
- {
- add { throw new NotImplementedException(); }
- remove { throw new NotImplementedException(); }
- }
-
- void IIntellisenseSession.Start()
+ public ITrackingPoint GetTriggerPoint(ITextBuffer textBuffer)
{
throw new NotImplementedException();
}
- ITextView IIntellisenseSession.TextView
+ public SnapshotPoint? GetTriggerPoint(ITextSnapshot snapshot)
{
- get { throw new NotImplementedException(); }
- }
-
- PropertyCollection IPropertyOwner.Properties
- {
- get { throw new NotImplementedException(); }
+ return this.SnapshotTriggerPoint;
}
#endregion
diff --git a/test/T4Toolbox.VisualStudio.Editor.Tests/T4Toolbox.VisualStudio.Editor.Tests.csproj b/test/T4Toolbox.VisualStudio.Editor.Tests/T4Toolbox.VisualStudio.Editor.Tests.csproj
index 04650d0..fc43aef 100644
--- a/test/T4Toolbox.VisualStudio.Editor.Tests/T4Toolbox.VisualStudio.Editor.Tests.csproj
+++ b/test/T4Toolbox.VisualStudio.Editor.Tests/T4Toolbox.VisualStudio.Editor.Tests.csproj
@@ -12,6 +12,7 @@
+
diff --git a/test/T4Toolbox.VisualStudio.Editor.Tests/TemplateQuickInfoSourceProviderTest.cs b/test/T4Toolbox.VisualStudio.Editor.Tests/TemplateQuickInfoSourceProviderTest.cs
index 37d7888..37005d7 100644
--- a/test/T4Toolbox.VisualStudio.Editor.Tests/TemplateQuickInfoSourceProviderTest.cs
+++ b/test/T4Toolbox.VisualStudio.Editor.Tests/TemplateQuickInfoSourceProviderTest.cs
@@ -30,14 +30,14 @@ public static void TemplateQuickInfoSourceProviderIsSealedAndNotMeantToHaveChild
[Fact]
public static void TemplateQuickInfoSourceProviderImplementsIQuickSourceProviderInterface()
{
- Assert.Equal(typeof(IQuickInfoSourceProvider), typeof(TemplateQuickInfoSourceProvider).GetInterfaces()[0]);
+ Assert.Equal(typeof(IAsyncQuickInfoSourceProvider), typeof(TemplateQuickInfoSourceProvider).GetInterfaces()[0]);
}
[Fact]
public static void TemplateQuickInfoSourceProviderExportsIQuickSourceProviderInterface()
{
ExportAttribute attribute = typeof(TemplateQuickInfoSourceProvider).GetCustomAttributes(false).OfType().Single();
- Assert.Equal(typeof(IQuickInfoSourceProvider), attribute.ContractType);
+ Assert.Equal(typeof(IAsyncQuickInfoSourceProvider), attribute.ContractType);
}
[Fact]
@@ -67,7 +67,7 @@ public static void TemplateQuickInfoSourceProviderCanBeConstructedByVisualStudio
typeof(SubstituteExporter)))
using (var container = new CompositionContainer(catalog))
{
- Lazy export = container.GetExport();
+ Lazy export = container.GetExport();
Assert.IsType(export.Value);
}
}
@@ -84,7 +84,7 @@ public static void CreateTaggerThrowsArgumentNullExceptionWhenBufferIsNullToFail
{
var provider = new TemplateQuickInfoSourceProvider(Substitute.For());
var e = Assert.Throws(() => provider.TryCreateQuickInfoSource(null));
- Assert.Equal("buffer", e.ParamName);
+ Assert.Equal("textBuffer", e.ParamName);
}
[Fact]
@@ -93,7 +93,7 @@ public static void TryCreateQuickInfoSourceReturnsTemplateQuickInfoSource()
ITemplateEditorOptions options = OptionsWithQuickInfoTooltipsEnabled(true);
var provider = new TemplateQuickInfoSourceProvider(options);
var textBuffer = new FakeTextBuffer(string.Empty);
- IQuickInfoSource quickInfoSource = provider.TryCreateQuickInfoSource(textBuffer);
+ IAsyncQuickInfoSource quickInfoSource = provider.TryCreateQuickInfoSource(textBuffer);
Assert.Equal(typeof(TemplateQuickInfoSource), quickInfoSource.GetType());
}
@@ -103,8 +103,8 @@ public static void TryCreateQuickInfoSourceReturnsSameObjectWhenCalledMultipleTi
ITemplateEditorOptions options = OptionsWithQuickInfoTooltipsEnabled(true);
var provider = new TemplateQuickInfoSourceProvider(options);
var textBuffer = new FakeTextBuffer(string.Empty);
- IQuickInfoSource source1 = provider.TryCreateQuickInfoSource(textBuffer);
- IQuickInfoSource source2 = provider.TryCreateQuickInfoSource(textBuffer);
+ IAsyncQuickInfoSource source1 = provider.TryCreateQuickInfoSource(textBuffer);
+ IAsyncQuickInfoSource source2 = provider.TryCreateQuickInfoSource(textBuffer);
Assert.Same(source1, source2);
}
diff --git a/test/T4Toolbox.VisualStudio.Editor.Tests/TemplateQuickInfoSourceTest.cs b/test/T4Toolbox.VisualStudio.Editor.Tests/TemplateQuickInfoSourceTest.cs
index e94ae99..60b5b30 100644
--- a/test/T4Toolbox.VisualStudio.Editor.Tests/TemplateQuickInfoSourceTest.cs
+++ b/test/T4Toolbox.VisualStudio.Editor.Tests/TemplateQuickInfoSourceTest.cs
@@ -5,8 +5,11 @@
namespace T4Toolbox.VisualStudio.Editor
{
using System;
- using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
using Microsoft.VisualStudio.Text;
+
using Xunit;
public static class TemplateQuickInfoSourceTest
@@ -24,80 +27,67 @@ public static void TemplateQuickInfoSourceIsSealedAndNotMeantToBeExtended()
}
[Fact]
- public static void AugmentQuickInfoSessionReturnsNoContentOrApplicableSpanWhenBufferIsEmpty()
+ public static async Task AugmentQuickInfoSessionReturnsNoContentOrApplicableSpanWhenBufferIsEmpty()
{
var buffer = new FakeTextBuffer(string.Empty);
var session = new FakeQuickInfoSession();
using (var source = new TemplateQuickInfoSource(buffer))
{
- var quickInfoContent = new List();
- ITrackingSpan applicableToSpan;
- source.AugmentQuickInfoSession(session, quickInfoContent, out applicableToSpan);
+ var result = await source.GetQuickInfoItemAsync(session, CancellationToken.None);
- Assert.Equal(0, quickInfoContent.Count);
- Assert.Null(applicableToSpan);
+ Assert.Null(result?.ApplicableToSpan);
}
}
[Fact]
- public static void AugmentQuickInfoSessionReturnsNoContentOrApplicableSpanSyntaxNodeAtTriggerPointHasNoDescription()
+ public static async Task AugmentQuickInfoSessionReturnsNoContentOrApplicableSpanSyntaxNodeAtTriggerPointHasNoDescription()
{
var buffer = new FakeTextBuffer("<# code #>");
var session = new FakeQuickInfoSession { SnapshotTriggerPoint = new SnapshotPoint(buffer.CurrentSnapshot, 3) };
using (var source = new TemplateQuickInfoSource(buffer))
{
- var quickInfoContent = new List();
- ITrackingSpan applicableToSpan;
- source.AugmentQuickInfoSession(session, quickInfoContent, out applicableToSpan);
+ var result = await source.GetQuickInfoItemAsync(session, CancellationToken.None);
- Assert.Equal(0, quickInfoContent.Count);
- Assert.Null(applicableToSpan);
+ Assert.Null(result?.ApplicableToSpan);
}
}
[Fact]
- public static void AugmentQuickInfoSessionReturnsNoContentOrApplicableSpanWhenBufferContainsTemplateThatCouldNotBeParsed()
+ public static async Task AugmentQuickInfoSessionReturnsNoContentOrApplicableSpanWhenBufferContainsTemplateThatCouldNotBeParsed()
{
var buffer = new FakeTextBuffer("<#");
var session = new FakeQuickInfoSession { SnapshotTriggerPoint = new SnapshotPoint(buffer.CurrentSnapshot, 1) };
using (var source = new TemplateQuickInfoSource(buffer))
{
- var quickInfoContent = new List();
- ITrackingSpan applicableToSpan;
- source.AugmentQuickInfoSession(session, quickInfoContent, out applicableToSpan);
+ var result = await source.GetQuickInfoItemAsync(session, CancellationToken.None);
- Assert.Equal(0, quickInfoContent.Count);
- Assert.Null(applicableToSpan);
+ Assert.Null(result?.ApplicableToSpan);
}
}
[Fact]
- public static void AugmentQuickInfoSessionReturnsDescriptionOfSyntaxNodeAtTriggerPoint()
+ public static async Task AugmentQuickInfoSessionReturnsDescriptionOfSyntaxNodeAtTriggerPoint()
{
var buffer = new FakeTextBuffer("<#@ assembly name=\"System\" #>");
var session = new FakeQuickInfoSession { SnapshotTriggerPoint = new SnapshotPoint(buffer.CurrentSnapshot, 5) };
using (var source = new TemplateQuickInfoSource(buffer))
{
- var quickInfoContent = new List();
- ITrackingSpan applicableToSpan;
- source.AugmentQuickInfoSession(session, quickInfoContent, out applicableToSpan);
+ var result = await source.GetQuickInfoItemAsync(session, CancellationToken.None);
- Assert.Contains("assembly", (string)quickInfoContent[0], StringComparison.Ordinal);
+ Assert.Contains("assembly", (string)result.Item, StringComparison.Ordinal);
}
}
[Fact]
- public static void AugmentQuickInfoSessionReturnsSpanOfSyntaxNodeProvidingDescription()
+ public static async Task AugmentQuickInfoSessionReturnsSpanOfSyntaxNodeProvidingDescription()
{
var buffer = new FakeTextBuffer("<#@ assembly name=\"System\" #>");
var session = new FakeQuickInfoSession { SnapshotTriggerPoint = new SnapshotPoint(buffer.CurrentSnapshot, 15) };
using (var source = new TemplateQuickInfoSource(buffer))
{
- var quickInfoContent = new List();
- ITrackingSpan applicableToSpan;
- source.AugmentQuickInfoSession(session, quickInfoContent, out applicableToSpan);
+ var result = await source.GetQuickInfoItemAsync(session, CancellationToken.None);
- Assert.Equal(new Span(13, 13), applicableToSpan.GetSpan(buffer.CurrentSnapshot).Span);
+ Assert.Equal(new Span(13, 13), result.ApplicableToSpan.GetSpan(buffer.CurrentSnapshot).Span);
}
}
}