Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
AssetObjectEditorFormat.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under MIT License. See LICENSE.md for details.
3 //
4 // This file is part of YamlDotNet - A .NET library for YAML.
5 // Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Antoine Aubry
6 
7 // Permission is hereby granted, free of charge, to any person obtaining a copy of
8 // this software and associated documentation files (the "Software"), to deal in
9 // the Software without restriction, including without limitation the rights to
10 // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
11 // of the Software, and to permit persons to whom the Software is furnished to do
12 // so, subject to the following conditions:
13 
14 // The above copyright notice and this permission notice shall be included in all
15 // copies or substantial portions of the Software.
16 
17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 // SOFTWARE.
24 
25 using System.ComponentModel.Composition;
26 using Microsoft.VisualStudio.Language.StandardClassification;
27 using Microsoft.VisualStudio.Text.Classification;
29 
30 namespace SiliconStudio.Paradox.VisualStudio.Assets
31 {
32  #region Format definition
33  [Export(typeof(EditorFormatDefinition))]
34  [ClassificationType(ClassificationTypeNames = AssetObjectDefinitions.AnchorClassificationName)]
35  [Name("Paradox.YamlAnchorFormat")]
36  [UserVisible(true)] //this should be visible to the end user
37  [Order(Before = Priority.Default)] //set the priority to be after the default classifiers
38  [BaseDefinition(PredefinedClassificationTypeNames.SymbolReference)]
39  internal sealed class YamlAnchorFormat : ClassificationFormatDefinition
40  {
41  [ImportingConstructor]
42  public YamlAnchorFormat(AssetObjectClassificationColorManager colorManager)
43  {
44  DisplayName = "Paradox YAML Anchor"; //human readable version of the name
45  var classificationColor = colorManager.GetClassificationColor(AssetObjectDefinitions.AnchorClassificationName);
46  ForegroundColor = classificationColor.ForegroundColor;
47  BackgroundColor = classificationColor.BackgroundColor;
48  }
49  }
50 
51  [Export(typeof(EditorFormatDefinition))]
52  [ClassificationType(ClassificationTypeNames = AssetObjectDefinitions.AliasClassificationName)]
53  [Name("Paradox.YamlAliasFormat")]
54  [UserVisible(true)] //this should be visible to the end user
55  [Order(Before = Priority.Default)] //set the priority to be after the default classifiers
56  [BaseDefinition(PredefinedClassificationTypeNames.Literal)]
57  internal sealed class YamlAliasFormat : ClassificationFormatDefinition
58  {
59  [ImportingConstructor]
60  public YamlAliasFormat(AssetObjectClassificationColorManager colorManager)
61  {
62  DisplayName = "Paradox YAML Alias"; //human readable version of the name
63  var classificationColor = colorManager.GetClassificationColor(AssetObjectDefinitions.AliasClassificationName);
64  ForegroundColor = classificationColor.ForegroundColor;
65  BackgroundColor = classificationColor.BackgroundColor;
66  }
67  }
68 
69  [Export(typeof(EditorFormatDefinition))]
70  [ClassificationType(ClassificationTypeNames = AssetObjectDefinitions.KeyClassificationName)]
71  [Name("Paradox.YamlKeyFormat")]
72  [UserVisible(true)] //this should be visible to the end user
73  [Order(Before = Priority.Default)] //set the priority to be after the default classifiers
74  [BaseDefinition(PredefinedClassificationTypeNames.Keyword)]
75  internal sealed class YamlKeyFormat : ClassificationFormatDefinition
76  {
77  [ImportingConstructor]
78  public YamlKeyFormat(AssetObjectClassificationColorManager colorManager)
79  {
80  DisplayName = "Paradox YAML Key"; //human readable version of the name
81  var classificationColor = colorManager.GetClassificationColor(AssetObjectDefinitions.KeyClassificationName);
82  ForegroundColor = classificationColor.ForegroundColor;
83  BackgroundColor = classificationColor.BackgroundColor;
84  }
85  }
86 
87  [Export(typeof(EditorFormatDefinition))]
88  [ClassificationType(ClassificationTypeNames = AssetObjectDefinitions.NumberClassificationName)]
89  [Name("Paradox.YamlNumberFormat")]
90  [UserVisible(true)] //this should be visible to the end user
91  [Order(Before = Priority.Default)] //set the priority to be after the default classifiers
92  [BaseDefinition(PredefinedClassificationTypeNames.Number)]
93  internal sealed class YamlNumberFormat : ClassificationFormatDefinition
94  {
95  [ImportingConstructor]
96  public YamlNumberFormat(AssetObjectClassificationColorManager colorManager)
97  {
98  DisplayName = "Paradox YAML Number"; //human readable version of the name
99  var classificationColor = colorManager.GetClassificationColor(AssetObjectDefinitions.NumberClassificationName);
100  ForegroundColor = classificationColor.ForegroundColor;
101  BackgroundColor = classificationColor.BackgroundColor;
102  }
103  }
104 
105  [Export(typeof(EditorFormatDefinition))]
106  [ClassificationType(ClassificationTypeNames = AssetObjectDefinitions.ErrorClassificationName)]
107  [Name("Paradox.YamlErrorFormat")]
108  [UserVisible(true)] //this should be visible to the end user
109  [Order(Before = Priority.Default)] //set the priority to be after the default classifiers
110  [BaseDefinition(PredefinedClassificationTypeNames.Other)]
111  internal sealed class YamlErrorFormat : ClassificationFormatDefinition
112  {
113  [ImportingConstructor]
114  public YamlErrorFormat(AssetObjectClassificationColorManager colorManager)
115  {
116  DisplayName = "Paradox YAML Error"; //human readable version of the name
117  var classificationColor = colorManager.GetClassificationColor(AssetObjectDefinitions.ErrorClassificationName);
118  ForegroundColor = classificationColor.ForegroundColor;
119  BackgroundColor = classificationColor.BackgroundColor;
120  }
121  }
122  #endregion //Format definition
123 }
SiliconStudio.Core.Utilities Utilities
Definition: Texture.cs:29