Theme friendly syntax coloring (#6)

This commit is contained in:
OlivierGuinart
2017-10-15 11:47:30 -07:00
committed by GitHub
parent 00d040f247
commit 5d91a554df
4 changed files with 24 additions and 27 deletions
+12 -22
View File
@@ -1,8 +1,6 @@
using System.ComponentModel.Composition;
using System.Windows.Media;
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Utilities;
//using Microsoft.VisualStudio.Language.StandardClassification;
using System.ComponentModel.Composition;
namespace VSMerlin32.Coloring.Classification
{
@@ -11,73 +9,65 @@ namespace VSMerlin32.Coloring.Classification
[Export(typeof(EditorFormatDefinition))]
[ClassificationType(ClassificationTypeNames = Merlin32TokenHelper.Merlin32Comment)]
[Name("Merlin32CommentFormat")]
[UserVisible(false)]
[UserVisible(true)]
[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;
this.DisplayName = "Merlin32 Comments"; //human readable version of the name
}
}
[Export(typeof(EditorFormatDefinition))]
[ClassificationType(ClassificationTypeNames = Merlin32TokenHelper.Merlin32Opcode)]
[Name("Merlin32OpcodeFormat")]
[UserVisible(false)]
[UserVisible(true)]
[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;
this.DisplayName = "Merlin32 Opcodes"; //human readable version of the name
}
}
[Export(typeof(EditorFormatDefinition))]
[ClassificationType(ClassificationTypeNames = Merlin32TokenHelper.Merlin32Directive)]
[Name("Merlin32DirectiveFormat")]
[UserVisible(false)]
[UserVisible(true)]
[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;
this.DisplayName = "Merlin32 Directives"; //human readable version of the name
}
}
[Export(typeof(EditorFormatDefinition))]
[ClassificationType(ClassificationTypeNames = Merlin32TokenHelper.Merlin32DataDefine)]
[Name("Merlin32DataDefineFormat")]
[UserVisible(false)]
[UserVisible(true)]
[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;
this.DisplayName = "Merlin32 Data Definitions"; //human readable version of the name
}
}
[Export(typeof(EditorFormatDefinition))]
[ClassificationType(ClassificationTypeNames = Merlin32TokenHelper.Merlin32Text)]
[Name("Merlin32TextFormat")]
[UserVisible(false)]
[UserVisible(true)]
[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;
this.DisplayName = "Merlin32 Strings"; //human readable version of the name
}
}
#endregion //Format definition