Skip to content

Commit

Permalink
#1 add: VS 2015 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Art-Stea1th committed Sep 21, 2017
1 parent d172ffe commit e5b2f40
Show file tree
Hide file tree
Showing 8 changed files with 193 additions and 288 deletions.
252 changes: 108 additions & 144 deletions Extension/ASD.ESH/ASD.ESH.csproj

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions Extension/ASD.ESH/Classification/Classifier.SpansConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Classification;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Text;
using Microsoft.VisualStudio.Text;
Expand All @@ -15,7 +16,6 @@ internal sealed class SpansConverter {

private SemanticModel model;
private SyntaxNode root;

private ITextSnapshot snapshot;

public SpansConverter(SemanticModel model, SyntaxNode root, ITextSnapshot snapshot) {
Expand Down Expand Up @@ -55,11 +55,11 @@ private ISymbol GetSymbol(TextSpan textSpan) {

private SyntaxNode GetExpression(SyntaxNode node) {

switch (node) {
case ArgumentSyntax s:
return s.Expression;
case AttributeArgumentSyntax s:
return s.Expression;
switch (node.Kind()) {
case SyntaxKind.Argument:
return (node as ArgumentSyntax).Expression;
case SyntaxKind.AttributeArgument:
return (node as AttributeArgumentSyntax).Expression;
default:
return node;
}
Expand Down
14 changes: 8 additions & 6 deletions Extension/ASD.ESH/Classification/TypesRegistry.Definitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,14 @@ public LocalFormatDefinition()

private abstract class FormatDefinition : ClassificationFormatDefinition {

public FormatDefinition(string displayName, string defaultForegroundColor)
: this(displayName) => ForegroundColor = (Color)ColorConverter
.ConvertFromString(defaultForegroundColor);

public FormatDefinition(string displayName)
=> DisplayName = $"User Tags - {displayName}";
public FormatDefinition(string displayName, string defaultForegroundColor) : this(displayName) {
ForegroundColor = (Color)ColorConverter
.ConvertFromString(defaultForegroundColor);
}

public FormatDefinition(string displayName) {
DisplayName = $"User Tags - {displayName}";
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Extension/ASD.ESH/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
[assembly: Guid("40DF615B-99F6-4F5D-B5DB-9D87F4801E2E")]
[assembly: ComVisible(false)]

[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.*")]
76 changes: 12 additions & 64 deletions Extension/ASD.ESH/app.config
Original file line number Diff line number Diff line change
@@ -1,67 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Linq" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.Extensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Linq.Expressions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.InteropServices" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Thread" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.0.0" newVersion="1.2.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
111 changes: 51 additions & 60 deletions Extension/ASD.ESH/packages.config
Original file line number Diff line number Diff line change
@@ -1,63 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ManagedEsent" version="1.9.4" targetFramework="net47" />
<package id="Microsoft.CodeAnalysis.Analyzers" version="1.1.0" targetFramework="net47" />
<package id="Microsoft.CodeAnalysis.Common" version="2.3.2" targetFramework="net47" />
<package id="Microsoft.CodeAnalysis.CSharp" version="2.3.2" targetFramework="net47" />
<package id="Microsoft.CodeAnalysis.EditorFeatures.Text" version="2.3.2" targetFramework="net47" />
<package id="Microsoft.CodeAnalysis.VisualBasic" version="2.3.2" targetFramework="net47" />
<package id="Microsoft.CodeAnalysis.Workspaces.Common" version="2.3.2" targetFramework="net47" />
<package id="Microsoft.VisualStudio.CoreUtility" version="15.0.26606" targetFramework="net47" />
<package id="Microsoft.VisualStudio.Text.Data" version="15.0.26606" targetFramework="net47" />
<package id="Microsoft.VisualStudio.Text.Logic" version="15.0.26606" targetFramework="net47" />
<package id="Microsoft.VisualStudio.Text.UI" version="15.0.26606" targetFramework="net47" />
<package id="Microsoft.VisualStudio.Text.UI.Wpf" version="15.0.26606" targetFramework="net47" />
<package id="Microsoft.VSSDK.BuildTools" version="15.1.192" targetFramework="net47" developmentDependency="true" />
<package id="System.AppContext" version="4.3.0" targetFramework="net47" />
<package id="System.Collections" version="4.3.0" targetFramework="net47" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net47" />
<package id="System.Collections.Immutable" version="1.3.1" targetFramework="net47" />
<package id="System.Composition" version="1.0.31" targetFramework="net47" />
<package id="System.Composition.AttributedModel" version="1.0.31" targetFramework="net47" />
<package id="System.Composition.Convention" version="1.0.31" targetFramework="net47" />
<package id="System.Composition.Hosting" version="1.0.31" targetFramework="net47" />
<package id="System.Composition.Runtime" version="1.0.31" targetFramework="net47" />
<package id="System.Composition.TypedParts" version="1.0.31" targetFramework="net47" />
<package id="System.Console" version="4.3.0" targetFramework="net47" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net47" />
<package id="System.Diagnostics.FileVersionInfo" version="4.3.0" targetFramework="net47" />
<package id="System.Diagnostics.StackTrace" version="4.3.0" targetFramework="net47" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net47" />
<package id="System.Dynamic.Runtime" version="4.3.0" targetFramework="net47" />
<package id="System.Globalization" version="4.3.0" targetFramework="net47" />
<package id="System.IO" version="4.3.0" targetFramework="net47" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net47" />
<package id="System.IO.FileSystem" version="4.3.0" targetFramework="net47" />
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net47" />
<package id="System.Linq" version="4.3.0" targetFramework="net47" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net47" />
<package id="System.Reflection" version="4.3.0" targetFramework="net47" />
<package id="System.Reflection.Metadata" version="1.4.2" targetFramework="net47" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net47" />
<package id="System.Runtime" version="4.3.0" targetFramework="net47" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net47" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net47" />
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net47" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net47" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net47" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net47" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net47" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net47" />
<package id="System.Text.Encoding.CodePages" version="4.3.0" targetFramework="net47" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net47" />
<package id="System.Threading" version="4.3.0" targetFramework="net47" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net47" />
<package id="System.Threading.Tasks.Parallel" version="4.3.0" targetFramework="net47" />
<package id="System.Threading.Thread" version="4.3.0" targetFramework="net47" />
<package id="System.ValueTuple" version="4.3.0" targetFramework="net47" />
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net47" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net47" />
<package id="System.Xml.XmlDocument" version="4.3.0" targetFramework="net47" />
<package id="System.Xml.XPath" version="4.3.0" targetFramework="net47" />
<package id="System.Xml.XPath.XDocument" version="4.3.0" targetFramework="net47" />
<package id="Microsoft.CodeAnalysis.Analyzers" version="1.1.0" targetFramework="net46" />
<package id="Microsoft.CodeAnalysis.Common" version="1.3.2" targetFramework="net46" />
<package id="Microsoft.CodeAnalysis.CSharp" version="1.3.2" targetFramework="net46" />
<package id="Microsoft.CodeAnalysis.EditorFeatures.Text" version="1.3.2" targetFramework="net46" />
<package id="Microsoft.CodeAnalysis.Workspaces.Common" version="1.3.2" targetFramework="net46" />
<package id="Microsoft.Composition" version="1.0.27" targetFramework="net46" />
<package id="Microsoft.VisualStudio.CoreUtility" version="14.3.25407" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Text.Data" version="14.3.25407" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Text.Logic" version="14.3.25407" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Text.UI" version="14.3.25407" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Text.UI.Wpf" version="14.3.25407" targetFramework="net46" />
<package id="System.AppContext" version="4.1.0" targetFramework="net46" />
<package id="System.Collections" version="4.0.11" targetFramework="net46" />
<package id="System.Collections.Concurrent" version="4.0.12" targetFramework="net46" />
<package id="System.Collections.Immutable" version="1.2.0" targetFramework="net46" />
<package id="System.Console" version="4.0.0" targetFramework="net46" />
<package id="System.Diagnostics.Debug" version="4.0.11" targetFramework="net46" />
<package id="System.Diagnostics.FileVersionInfo" version="4.0.0" targetFramework="net46" />
<package id="System.Diagnostics.StackTrace" version="4.0.1" targetFramework="net46" />
<package id="System.Diagnostics.Tools" version="4.0.1" targetFramework="net46" />
<package id="System.Dynamic.Runtime" version="4.0.11" targetFramework="net46" />
<package id="System.Globalization" version="4.0.11" targetFramework="net46" />
<package id="System.IO.FileSystem" version="4.0.1" targetFramework="net46" />
<package id="System.IO.FileSystem.Primitives" version="4.0.1" targetFramework="net46" />
<package id="System.Linq" version="4.1.0" targetFramework="net46" />
<package id="System.Linq.Expressions" version="4.1.0" targetFramework="net46" />
<package id="System.Reflection" version="4.1.0" targetFramework="net46" />
<package id="System.Reflection.Metadata" version="1.3.0" targetFramework="net46" />
<package id="System.Reflection.Primitives" version="4.0.1" targetFramework="net46" />
<package id="System.Resources.ResourceManager" version="4.0.1" targetFramework="net46" />
<package id="System.Runtime" version="4.1.0" targetFramework="net46" />
<package id="System.Runtime.Extensions" version="4.1.0" targetFramework="net46" />
<package id="System.Runtime.Handles" version="4.0.1" targetFramework="net46" />
<package id="System.Runtime.InteropServices" version="4.1.0" targetFramework="net46" />
<package id="System.Runtime.Numerics" version="4.0.1" targetFramework="net46" />
<package id="System.Security.Cryptography.Algorithms" version="4.2.0" targetFramework="net46" />
<package id="System.Security.Cryptography.Encoding" version="4.0.0" targetFramework="net46" />
<package id="System.Security.Cryptography.Primitives" version="4.0.0" targetFramework="net46" />
<package id="System.Security.Cryptography.X509Certificates" version="4.1.0" targetFramework="net46" />
<package id="System.Text.Encoding" version="4.0.11" targetFramework="net46" />
<package id="System.Text.Encoding.CodePages" version="4.0.1" targetFramework="net46" />
<package id="System.Text.Encoding.Extensions" version="4.0.11" targetFramework="net46" />
<package id="System.Threading" version="4.0.11" targetFramework="net46" />
<package id="System.Threading.Tasks" version="4.0.11" targetFramework="net46" />
<package id="System.Threading.Tasks.Parallel" version="4.0.1" targetFramework="net46" />
<package id="System.Threading.Thread" version="4.0.0" targetFramework="net46" />
<package id="System.Xml.ReaderWriter" version="4.0.11" targetFramework="net46" />
<package id="System.Xml.XDocument" version="4.0.11" targetFramework="net46" />
<package id="System.Xml.XmlDocument" version="4.0.1" targetFramework="net46" />
<package id="System.Xml.XPath" version="4.0.1" targetFramework="net46" />
<package id="System.Xml.XPath.XDocument" version="4.0.1" targetFramework="net46" />
</packages>
12 changes: 6 additions & 6 deletions Extension/ASD.ESH/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="40DF615B-99F6-4F5D-B5DB-9D87F4801E2E" Version="1.0" Language="en-US" Publisher="Stanislav Kuzmich [Art.Stea1th]" />
<Identity Id="40DF615B-99F6-4F5D-B5DB-9D87F4801E2E" Version="1.1" Language="en-US" Publisher="Stanislav Kuzmich [Art.Stea1th]" />
<DisplayName>Enhanced Syntax Highlighting</DisplayName>
<Description xml:space="preserve">Visual Studio editor classifier extension based on the Roslyn APIs to enhanced highlighting custom tags in C# code.</Description>
<MoreInfo>https://github.com/Art-Stea1th/Enhanced-Syntax-Highlighting</MoreInfo>
<Icon>Assets\Icon.png</Icon>
<PreviewImage>Assets\Preview.png</PreviewImage>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.0,16.0)" />
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[15.0,16.0)" />
<InstallationTarget Id="Microsoft.VisualStudio.Enterprise" Version="[15.0,16.0)" />
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[14.0,]" />
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[14.0,]" />
<InstallationTarget Id="Microsoft.VisualStudio.Enterprise" Version="[14.0,]" />
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.6,)" />
</Dependencies>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,16.0)" DisplayName="Visual Studio core editor" />
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[14.0,]" DisplayName="Visual Studio core editor" />
</Prerequisites>
<Assets>
<Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%|" />
Expand Down
2 changes: 1 addition & 1 deletion Extension/Enhanced Syntax Highlighting.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.12
VisualStudioVersion = 15.0.26730.16
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{55825433-8076-45FA-81A7-7689FE7964B8}"
ProjectSection(SolutionItems) = preProject
Expand Down

0 comments on commit e5b2f40

Please sign in to comment.