Merge 9d646f5004
into 00d040f247
This commit is contained in:
commit
c8f57abf0c
|
@ -1,84 +0,0 @@
|
|||
using System.ComponentModel.Composition;
|
||||
using System.Windows.Media;
|
||||
using Microsoft.VisualStudio.Text.Classification;
|
||||
using Microsoft.VisualStudio.Utilities;
|
||||
//using Microsoft.VisualStudio.Language.StandardClassification;
|
||||
|
||||
namespace VSMerlin32.Coloring.Classification
|
||||
{
|
||||
#region Format definition
|
||||
|
||||
[Export(typeof(EditorFormatDefinition))]
|
||||
[ClassificationType(ClassificationTypeNames = Merlin32TokenHelper.Merlin32Comment)]
|
||||
[Name("Merlin32CommentFormat")]
|
||||
[UserVisible(false)]
|
||||
[Order(Before = Priority.Default)]
|
||||
internal sealed class CommentFormat : ClassificationFormatDefinition
|
||||
{
|
||||
public CommentFormat()
|
||||
{
|
||||
this.DisplayName = "This is a comment"; //human readable version of the name
|
||||
this.ForegroundColor = Colors.Green;
|
||||
}
|
||||
}
|
||||
|
||||
[Export(typeof(EditorFormatDefinition))]
|
||||
[ClassificationType(ClassificationTypeNames = Merlin32TokenHelper.Merlin32Opcode)]
|
||||
[Name("Merlin32OpcodeFormat")]
|
||||
[UserVisible(false)]
|
||||
[Order(Before = Priority.Default)]
|
||||
internal sealed class OpcodeFormat : ClassificationFormatDefinition
|
||||
{
|
||||
public OpcodeFormat()
|
||||
{
|
||||
this.DisplayName = "This is an opcode"; //human readable version of the name
|
||||
this.ForegroundColor = Colors.Blue;
|
||||
// this.IsBold = true;
|
||||
}
|
||||
}
|
||||
|
||||
[Export(typeof(EditorFormatDefinition))]
|
||||
[ClassificationType(ClassificationTypeNames = Merlin32TokenHelper.Merlin32Directive)]
|
||||
[Name("Merlin32DirectiveFormat")]
|
||||
[UserVisible(false)]
|
||||
[Order(Before = Priority.Default)]
|
||||
internal sealed class DirectiveFormat : ClassificationFormatDefinition
|
||||
{
|
||||
public DirectiveFormat()
|
||||
{
|
||||
this.DisplayName = "This is an directive"; //human readable version of the name
|
||||
this.ForegroundColor = Colors.DarkCyan;
|
||||
// this.IsBold = true;
|
||||
}
|
||||
}
|
||||
|
||||
[Export(typeof(EditorFormatDefinition))]
|
||||
[ClassificationType(ClassificationTypeNames = Merlin32TokenHelper.Merlin32DataDefine)]
|
||||
[Name("Merlin32DataDefineFormat")]
|
||||
[UserVisible(false)]
|
||||
[Order(Before = Priority.Default)]
|
||||
internal sealed class DataDefineFormat : ClassificationFormatDefinition
|
||||
{
|
||||
public DataDefineFormat()
|
||||
{
|
||||
this.DisplayName = "This is data definition"; //human readable version of the name
|
||||
this.ForegroundColor = Colors.DarkOrchid;
|
||||
// this.IsBold = true;
|
||||
}
|
||||
}
|
||||
|
||||
[Export(typeof(EditorFormatDefinition))]
|
||||
[ClassificationType(ClassificationTypeNames = Merlin32TokenHelper.Merlin32Text)]
|
||||
[Name("Merlin32TextFormat")]
|
||||
[UserVisible(false)]
|
||||
[Order(Before = Priority.Default)]
|
||||
internal sealed class TextFormat : ClassificationFormatDefinition
|
||||
{
|
||||
public TextFormat()
|
||||
{
|
||||
this.DisplayName = "This is a text"; //human readable version of the name
|
||||
this.ForegroundColor = Colors.DarkRed;
|
||||
}
|
||||
}
|
||||
#endregion //Format definition
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
using System.ComponentModel.Composition;
|
||||
using Microsoft.VisualStudio.Text.Classification;
|
||||
using Microsoft.VisualStudio.Utilities;
|
||||
|
||||
namespace VSMerlin32.Coloring.Classification
|
||||
{
|
||||
internal static class OrdinaryClassificationDefinition
|
||||
{
|
||||
#region Type definition
|
||||
|
||||
/// <summary>
|
||||
/// Defines the "opcode" classification type.
|
||||
/// </summary>
|
||||
[Export(typeof(ClassificationTypeDefinition))]
|
||||
[Name(Merlin32TokenHelper.Merlin32Opcode)]
|
||||
internal static ClassificationTypeDefinition Opcode = null;
|
||||
|
||||
/// <summary>
|
||||
/// Defines the "directive" classification type.
|
||||
/// </summary>
|
||||
[Export(typeof(ClassificationTypeDefinition))]
|
||||
[Name(Merlin32TokenHelper.Merlin32Directive)]
|
||||
internal static ClassificationTypeDefinition Directive = null;
|
||||
|
||||
/// <summary>
|
||||
/// Defines the "datadefine" classification type.
|
||||
/// </summary>
|
||||
[Export(typeof(ClassificationTypeDefinition))]
|
||||
[Name(Merlin32TokenHelper.Merlin32DataDefine)]
|
||||
internal static ClassificationTypeDefinition Datadefine = null;
|
||||
|
||||
/// <summary>
|
||||
/// Defines the "text" classification type.
|
||||
/// </summary>
|
||||
[Export(typeof(ClassificationTypeDefinition))]
|
||||
[Name(Merlin32TokenHelper.Merlin32Text)]
|
||||
internal static ClassificationTypeDefinition Text = null;
|
||||
|
||||
/// <summary>
|
||||
/// Defines the "comment" classification type.
|
||||
/// </summary>
|
||||
[Export(typeof(ClassificationTypeDefinition))]
|
||||
[Name(Merlin32TokenHelper.Merlin32Comment)]
|
||||
internal static ClassificationTypeDefinition Comment = null;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.Composition;
|
||||
using Microsoft.VisualStudio.Language.StandardClassification;
|
||||
using Microsoft.VisualStudio.Text;
|
||||
using Microsoft.VisualStudio.Text.Classification;
|
||||
using Microsoft.VisualStudio.Text.Tagging;
|
||||
|
@ -52,8 +53,11 @@ namespace VSMerlin32.Coloring.Classification
|
|||
_aggregator = merlin32TagAggregator;
|
||||
_merlin32Types = new Dictionary<Merlin32TokenTypes, IClassificationType>();
|
||||
|
||||
foreach (Merlin32TokenTypes token in Enum.GetValues(typeof(Merlin32TokenTypes)))
|
||||
_merlin32Types[token] = typeService.GetClassificationType(token.ToString());
|
||||
_merlin32Types[Merlin32TokenTypes.Merlin32Comment] = typeService.GetClassificationType(PredefinedClassificationTypeNames.Comment);
|
||||
_merlin32Types[Merlin32TokenTypes.Merlin32Text] = typeService.GetClassificationType(PredefinedClassificationTypeNames.String);
|
||||
_merlin32Types[Merlin32TokenTypes.Merlin32Opcode] = typeService.GetClassificationType(PredefinedClassificationTypeNames.Keyword);
|
||||
_merlin32Types[Merlin32TokenTypes.Merlin32DataDefine] = typeService.GetClassificationType(PredefinedClassificationTypeNames.SymbolDefinition);
|
||||
_merlin32Types[Merlin32TokenTypes.Merlin32Directive] = typeService.GetClassificationType(PredefinedClassificationTypeNames.Operator);
|
||||
}
|
||||
|
||||
public event EventHandler<SnapshotSpanEventArgs> TagsChanged
|
||||
|
|
|
@ -82,6 +82,10 @@
|
|||
<Reference Include="Microsoft.VisualStudio.Language.Intellisense">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<<<<<<< HEAD
|
||||
<Reference Include="Microsoft.VisualStudio.Language.StandardClassification, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
|
||||
=======
|
||||
>>>>>>> master
|
||||
<Reference Include="Microsoft.VisualStudio.OLE.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<HintPath>packages\VSSDK.OLE.Interop.7.0.4\lib\net20\Microsoft.VisualStudio.OLE.Interop.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
@ -119,8 +123,6 @@
|
|||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Coloring\Classification\ClassificationFormat.cs" />
|
||||
<Compile Include="Coloring\Classification\ClassificationType.cs" />
|
||||
<Compile Include="Coloring\Data\SnapshotHelper.cs" />
|
||||
<Compile Include="Resources\data.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
|
|
Loading…
Reference in New Issue