<commit_before>﻿// The MIT License (MIT)
//
// Copyright (c) 2016 <NAME>
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

using System.ComponentModel.Composition;
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Utilities;
using AsmDude.Tools;

namespace AsmDude {

    [Export(typeof(EditorFormatDefinition))] // export as EditorFormatDefinition otherwise the syntax coloring does not work
    [ClassificationType(ClassificationTypeNames = "mnemonic")]
    [Name("mnemonic")]  //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class OpcodeP : ClassificationFormatDefinition {
        
        public OpcodeP() {
            //Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "INFO: Entering constructor for: {0}", this.ToString()));
            DisplayName = "mnemonic"; //human readable version of the name
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Opcode);
        }
    }

    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "register")]
    [Name("register")] //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class RegisterP : ClassificationFormatDefinition {
        public RegisterP() {
            DisplayName = "register"; //human readable version of the name
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Register);
        }
    }

    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "remark")]
    [Name("remark")] //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class RemarkP : ClassificationFormatDefinition {
        public RemarkP() {
            DisplayName = "remark"; //human readable version of the name
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Remark);
            IsItalic = true;
        }
    }

    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "directive")]
    [Name("directive")] //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class DirectiveP : ClassificationFormatDefinition {
        public DirectiveP() {
            DisplayName = "directive"; //human readable version of the name
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Directive);
            IsItalic = true;
        }
    }

    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "jump")]
    [Name("jump")] //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class JumpP : ClassificationFormatDefinition {
        public JumpP() {
            DisplayName = "jump"; //human readable version of the name
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Jump);
        }
    }

    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "label")]
    [Name("label")] //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class LabelP : ClassificationFormatDefinition {
        public LabelP() {
            DisplayName = "Display label"; //human readable version of the name
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Label);
            //TextDecorations = System.Windows.TextDecorations.Underline;
        }
    }

    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "labelDef")]
    [Name("labelDef")] //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class LabelDefP : ClassificationFormatDefinition {
        public LabelDefP() {
            DisplayName = "Display label Def"; //human readable version of the name
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Label);
            //TextDecorations = System.Windows.TextDecorations.Underline;
        }
    }

    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "constant")]
    [Name("constant")] //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class ConstantP : ClassificationFormatDefinition {
        public ConstantP() {
            DisplayName = "constant"; //human readable version of the name
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Constant);
        }
    }

    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "misc")]
    [Name("misc")] //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class MiscP : ClassificationFormatDefinition {
        public MiscP() {
            DisplayName = "misc"; //human readable version of the name
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Misc);
        }
    }<commit_msg>updated the human readable names of the Syntax highlighting items that can be found in Tools>Options>Environment>Fonts and Colors>Text Editor<commit_after>﻿// The MIT License (MIT)
//
// Copyright (c) 2016 <NAME>
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

using System.ComponentModel.Composition;
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Utilities;
using AsmDude.Tools;

namespace AsmDude {

    [Export(typeof(EditorFormatDefinition))] // export as EditorFormatDefinition otherwise the syntax coloring does not work
    [ClassificationType(ClassificationTypeNames = "mnemonic")]
    [Name("mnemonic")]  //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class OpcodeP : ClassificationFormatDefinition {
        
        public OpcodeP() {
            //Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "INFO: Entering constructor for: {0}", this.ToString()));
            DisplayName = "AsmDude - Mnemonic"; //human readable version of the name found in Tools>Options>Environment>Fonts and Colors>Text Editor
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Opcode);
        }
    }

    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "register")]
    [Name("register")] //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class RegisterP : ClassificationFormatDefinition {
        public RegisterP() {
            DisplayName = "AsmDude - Register"; //human readable version of the name found in Tools>Options>Environment>Fonts and Colors>Text Editor
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Register);
        }
    }

    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "remark")]
    [Name("remark")] //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class RemarkP : ClassificationFormatDefinition {
        public RemarkP() {
            DisplayName = "AsmDude - Remark"; //human readable version of the name found in Tools>Options>Environment>Fonts and Colors>Text Editor
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Remark);
            IsItalic = true;
        }
    }

    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "directive")]
    [Name("directive")] //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class DirectiveP : ClassificationFormatDefinition {
        public DirectiveP() {
            DisplayName = "AsmDude - Directive"; //human readable version of the name found in Tools>Options>Environment>Fonts and Colors>Text Editor
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Directive);
            IsItalic = true;
        }
    }

    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "jump")]
    [Name("jump")] //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class JumpP : ClassificationFormatDefinition {
        public JumpP() {
            DisplayName = "AsmDude - Jump"; //human readable version of the name
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Jump);
        }
    }

    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "label")]
    [Name("label")] //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class LabelP : ClassificationFormatDefinition {
        public LabelP() {
            DisplayName = "AsmDude - Label"; //human readable version of the name found in Tools>Options>Environment>Fonts and Colors>Text Editor
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Label);
            //TextDecorations = System.Windows.TextDecorations.Underline;
        }
    }

    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "labelDef")]
    [Name("labelDef")] //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class LabelDefP : ClassificationFormatDefinition {
        public LabelDefP() {
            DisplayName = "AsmDude - Label Definition"; //human readable version of the name found in Tools>Options>Environment>Fonts and Colors>Text Editor
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Label);
            //TextDecorations = System.Windows.TextDecorations.Underline;
        }
    }

    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "constant")]
    [Name("constant")] //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class ConstantP : ClassificationFormatDefinition {
        public ConstantP() {
            DisplayName = "AsmDude - Constant"; //human readable version of the name found in Tools>Options>Environment>Fonts and Colors>Text Editor
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Constant);
        }
    }

    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "misc")]
    [Name("misc")] //this should be visible to the end user
    [UserVisible(true)] //set the priority to be after the default classifiers
    [Order(Before = Priority.Default)]
    internal sealed class MiscP : ClassificationFormatDefinition {
        public MiscP() {
            DisplayName = "AsmDude - Misc"; //human readable version of the name found in Tools>Options>Environment>Fonts and Colors>Text Editor
            ForegroundColor = AsmDudeToolsStatic.convertColor(Settings.Default.SyntaxHighlighting_Misc);
        }
    }
{'fraction_non_alphanumeric': 0.0860747473377196, 'fraction_numerical': 0.0006782880010852608, 'mean_word_length': 3.6599241466498103, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6541108', 'n_tokens_mistral': 3751, 'n_tokens_neox': 3578, 'n_words': 1229}