mirror of
https://github.com/OlivierGuinart/Merlin32Language.git
synced 2026-04-19 15:17:04 +00:00
Theme friendly syntax coloring (#6)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user