-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workaround for ugly rainbow tooltips in VS2017 15.6 (issue #233)
- Loading branch information
Showing
5 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
using System; | ||
|
||
namespace Winterdom.Viasfora.Contracts { | ||
public interface IVsFeatures { | ||
bool IsSupported(String featureName); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
using System; | ||
|
||
namespace Winterdom.Viasfora { | ||
public static class KnownFeatures { | ||
public const String TooltipApi = nameof(TooltipApi); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using Microsoft.VisualStudio.Language.Intellisense; | ||
using System; | ||
using System.ComponentModel.Composition; | ||
using Winterdom.Viasfora.Contracts; | ||
|
||
namespace Winterdom.Viasfora.Util { | ||
[Export(typeof(IVsFeatures))] | ||
public class VsFeatures : IVsFeatures { | ||
public bool IsSupported(string featureName) { | ||
switch ( featureName ) { | ||
case KnownFeatures.TooltipApi: | ||
return IsQuickInfoSourceDeprecated(); | ||
} | ||
throw new InvalidOperationException("Unknown feature: " + featureName); | ||
} | ||
|
||
private bool IsQuickInfoSourceDeprecated() { | ||
return typeof(IQuickInfoSource) | ||
.GetCustomAttributes(typeof(ObsoleteAttribute), false) | ||
.Length > 0; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters