Browse Source

Highlighting editor: allow changing the default text color and selection color.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5583 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Daniel Grunwald 16 years ago
parent
commit
843a8c4788
  1. 2
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/AvalonEdit.AddIn.csproj
  2. 6
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditor.cs
  3. 9
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditorView.cs
  4. 57
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CustomizableHighlightingColorizer.cs
  5. 50
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/Converters.cs
  6. 20
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/CustomizedHighlightingItem.cs
  7. 124
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/HighlightingOptions.xaml.cs
  8. 15
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/NamedColorHighlightingItem.cs
  9. 68
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/SimpleHighlightingItem.cs
  10. 32
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/BAT-Mode.xshd
  11. 1
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/Resources.cs
  12. 1
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/ICSharpCode.AvalonEdit.csproj
  13. 4
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/TextEditor.xaml

2
src/AddIns/DisplayBindings/AvalonEdit.AddIn/AvalonEdit.AddIn.csproj

@ -103,6 +103,7 @@ @@ -103,6 +103,7 @@
<DependentUpon>BehaviorOptions.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Src\Options\Converters.cs" />
<Compile Include="Src\Options\CustomizedHighlightingItem.cs" />
<Compile Include="Src\Options\GeneralEditorOptions.xaml.cs">
<DependentUpon>GeneralEditorOptions.xaml</DependentUpon>
@ -115,6 +116,7 @@ @@ -115,6 +116,7 @@
</Compile>
<Compile Include="Src\Options\IHighlightingItem.cs" />
<Compile Include="Src\Options\NamedColorHighlightingItem.cs" />
<Compile Include="Src\Options\SimpleHighlightingItem.cs" />
<Compile Include="Src\Options\TextViewOptions.xaml.cs">
<DependentUpon>TextViewOptions.xaml</DependentUpon>
<SubType>Code</SubType>

6
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditor.cs

@ -174,9 +174,9 @@ namespace ICSharpCode.AvalonEdit.AddIn @@ -174,9 +174,9 @@ namespace ICSharpCode.AvalonEdit.AddIn
{
// CustomizableHighlightingColorizer loads the new values automatically, we just need
// to force a refresh in AvalonEdit.
primaryTextEditor.TextArea.TextView.Redraw();
primaryTextEditor.UpdateCustomizedHighlighting();
if (secondaryTextEditor != null)
secondaryTextEditor.TextArea.TextView.Redraw();
secondaryTextEditor.UpdateCustomizedHighlighting();
}
protected virtual CodeEditorView CreateTextEditor()
@ -485,8 +485,10 @@ namespace ICSharpCode.AvalonEdit.AddIn @@ -485,8 +485,10 @@ namespace ICSharpCode.AvalonEdit.AddIn
get { return primaryTextEditor.SyntaxHighlighting; }
set {
primaryTextEditor.SyntaxHighlighting = value;
primaryTextEditor.UpdateCustomizedHighlighting();
if (secondaryTextEditor != null) {
secondaryTextEditor.SyntaxHighlighting = value;
secondaryTextEditor.UpdateCustomizedHighlighting();
}
}
}

9
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditorView.cs

@ -54,6 +54,8 @@ namespace ICSharpCode.AvalonEdit.AddIn @@ -54,6 +54,8 @@ namespace ICSharpCode.AvalonEdit.AddIn
options = ICSharpCode.AvalonEdit.AddIn.Options.CodeEditorOptions.Instance;
options.BindToTextEditor(this);
UpdateCustomizedHighlighting();
bracketRenderer = new BracketHighlightRenderer(this.TextArea.TextView);
this.MouseHover += TextEditorMouseHover;
@ -418,6 +420,13 @@ namespace ICSharpCode.AvalonEdit.AddIn @@ -418,6 +420,13 @@ namespace ICSharpCode.AvalonEdit.AddIn
FetchCustomizations(highlightingDefinition.Name));
}
public void UpdateCustomizedHighlighting()
{
string language = this.SyntaxHighlighting != null ? this.SyntaxHighlighting.Name : null;
CustomizableHighlightingColorizer.ApplyCustomizationsToDefaultElements(this, FetchCustomizations(language));
this.TextArea.TextView.Redraw(); // manually redraw if default elements didn't change but customized highlightings did
}
static IEnumerable<CustomizedHighlightingColor> FetchCustomizations(string languageName)
{
// Access CustomizedHighlightingColor.ActiveColors within enumerator so that always the latest version is used.

57
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CustomizableHighlightingColorizer.cs

@ -13,6 +13,7 @@ using System.Windows; @@ -13,6 +13,7 @@ using System.Windows;
using System.Windows.Media;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Editing;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Rendering;
@ -23,6 +24,52 @@ namespace ICSharpCode.AvalonEdit.AddIn @@ -23,6 +24,52 @@ namespace ICSharpCode.AvalonEdit.AddIn
/// </summary>
public class CustomizableHighlightingColorizer : HighlightingColorizer
{
public const string DefaultTextAndBackground = "Default text/background";
public const string SelectedText = "Selected text";
public static void ApplyCustomizationsToDefaultElements(TextEditor textEditor, IEnumerable<CustomizedHighlightingColor> customizations)
{
textEditor.ClearValue(TextEditor.BackgroundProperty);
textEditor.ClearValue(TextEditor.ForegroundProperty);
textEditor.TextArea.ClearValue(TextArea.SelectionBorderProperty);
textEditor.TextArea.ClearValue(TextArea.SelectionBrushProperty);
textEditor.TextArea.ClearValue(TextArea.SelectionForegroundProperty);
bool assignedDefaultText = false;
bool assignedSelectedText = false;
foreach (CustomizedHighlightingColor color in customizations) {
switch (color.Name) {
case DefaultTextAndBackground:
if (assignedDefaultText)
continue;
assignedDefaultText = true;
if (color.Background != null)
textEditor.Background = CreateFrozenBrush(color.Background.Value);
if (color.Foreground != null)
textEditor.Foreground = CreateFrozenBrush(color.Foreground.Value);
break;
case SelectedText:
if (assignedSelectedText)
continue;
assignedSelectedText = true;
if (color.Background != null) {
Pen pen = new Pen(CreateFrozenBrush(color.Background.Value), 1);
pen.Freeze();
textEditor.TextArea.SelectionBorder = pen;
SolidColorBrush back = new SolidColorBrush(color.Background.Value);
back.Opacity = 0.7;
back.Freeze();
textEditor.TextArea.SelectionBrush = back;
}
if (color.Foreground != null) {
textEditor.TextArea.SelectionForeground = CreateFrozenBrush(color.Foreground.Value);
}
break;
}
}
}
readonly IEnumerable<CustomizedHighlightingColor> customizations;
public CustomizableHighlightingColorizer(HighlightingRuleSet ruleSet, IEnumerable<CustomizedHighlightingColor> customizations)
@ -101,8 +148,7 @@ namespace ICSharpCode.AvalonEdit.AddIn @@ -101,8 +148,7 @@ namespace ICSharpCode.AvalonEdit.AddIn
public CustomizedBrush(Color color)
{
brush = new SolidColorBrush(color);
brush.Freeze();
brush = CreateFrozenBrush(color);
}
public override Brush GetBrush(ITextRunConstructionContext context)
@ -115,5 +161,12 @@ namespace ICSharpCode.AvalonEdit.AddIn @@ -115,5 +161,12 @@ namespace ICSharpCode.AvalonEdit.AddIn
return brush.ToString();
}
}
static SolidColorBrush CreateFrozenBrush(Color color)
{
SolidColorBrush brush = new SolidColorBrush(color);
brush.Freeze();
return brush;
}
}
}

50
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/Converters.cs

@ -0,0 +1,50 @@ @@ -0,0 +1,50 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <author name="Daniel Grunwald"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
namespace ICSharpCode.AvalonEdit.AddIn.Options
{
sealed class BooleanToBoldConverter : IValueConverter
{
public static readonly BooleanToBoldConverter Instance = new BooleanToBoldConverter();
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if ((bool)value)
return FontWeights.Bold;
else
return FontWeights.Normal;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotSupportedException();
}
}
sealed class BooleanToDefaultStringConverter : IValueConverter
{
public static readonly BooleanToDefaultStringConverter Instance = new BooleanToDefaultStringConverter();
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if ((bool)value)
return "(Default)";
else
return null;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotSupportedException();
}
}
}

20
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/CustomizedHighlightingItem.cs

@ -21,7 +21,8 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options @@ -21,7 +21,8 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
readonly string language;
CustomizedHighlightingColor customization;
public CustomizedHighlightingItem(List<CustomizedHighlightingColor> customizationList, IHighlightingItem original, string language)
public CustomizedHighlightingItem(List<CustomizedHighlightingColor> customizationList, IHighlightingItem original, string language,
bool canSetForeground = true, bool canSetBackground = true, bool canSetFont = true)
{
if (customizationList == null)
throw new ArgumentNullException("customizationList");
@ -30,6 +31,9 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options @@ -30,6 +31,9 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
this.customizationList = customizationList;
this.original = original;
this.language = language;
this.CanSetForeground = canSetForeground;
this.CanSetBackground = canSetBackground;
this.CanSetFont = canSetFont;
foreach (CustomizedHighlightingColor c in customizationList) {
if (c.Language == language && c.Name == this.Name) {
this.customization = c;
@ -165,17 +169,9 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options @@ -165,17 +169,9 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
get { return original.CanUseDefaultColors; }
}
public bool CanSetForeground {
get { return true; }
}
public bool CanSetBackground {
get { return true; }
}
public bool CanSetFont {
get { return true; }
}
public bool CanSetForeground { get; private set; }
public bool CanSetBackground { get; private set; }
public bool CanSetFont { get; private set; }
public bool IsCustomized {
get { return customization != null || original.IsCustomized; }

124
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/HighlightingOptions.xaml.cs

@ -12,9 +12,10 @@ using System.IO; @@ -12,9 +12,10 @@ using System.IO;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using System.Xml;
using ICSharpCode.AvalonEdit.Editing;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Highlighting.Xshd;
using ICSharpCode.AvalonEdit.Rendering;
@ -62,14 +63,14 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options @@ -62,14 +63,14 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
ICSharpCode.Core.AddInTree.BuildItems<AddInTreeSyntaxMode>(SyntaxModeDoozer.Path, null, false).AsParallel()
.Select(m => m.LoadXshd())
)
.Where(def => def.Elements.OfType<XshdColor>().Any(c => c.ExampleText != null))
//.Where(def => def.Elements.OfType<XshdColor>().Any(c => c.ExampleText != null))
.OrderBy(def => def.Name)
.ToList();
}
customizationList = CustomizedHighlightingColor.LoadColors();
languageComboBox.Items.Clear();
//languageComboBox.Items.Add(new XshdSyntaxDefinition { Name = "All languages" });
languageComboBox.Items.Add(new XshdSyntaxDefinition { Name = "All languages" });
foreach (XshdSyntaxDefinition def in allSyntaxDefinitions)
languageComboBox.Items.Add(def);
if (allSyntaxDefinitions.Count > 0)
@ -81,16 +82,23 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options @@ -81,16 +82,23 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
listBox.Items.Clear();
XshdSyntaxDefinition xshd = (XshdSyntaxDefinition)languageComboBox.SelectedItem;
if (xshd != null) {
IHighlightingDefinition def = HighlightingManager.Instance.GetDefinition(xshd.Name);
if (def == null) {
throw new InvalidOperationException("Expected that all XSHDs are registered in default highlighting manager; but highlighting definition was not found");
} else {
foreach (XshdColor namedColor in xshd.Elements.OfType<XshdColor>()) {
if (namedColor.ExampleText != null) {
IHighlightingItem item = new NamedColorHighlightingItem(def, namedColor);
item = new CustomizedHighlightingItem(customizationList, item, xshd.Name);
listBox.Items.Add(item);
item.PropertyChanged += item_PropertyChanged;
IHighlightingItem defaultText;
CreateDefaultEntries(languageComboBox.SelectedIndex == 0 ? null : xshd.Name, out defaultText);
if (languageComboBox.SelectedIndex > 0) {
// Create entries for all customizable colors in the syntax highlighting definition
// (but don't do this for the "All languages" pseudo-entry)
IHighlightingDefinition def = HighlightingManager.Instance.GetDefinition(xshd.Name);
if (def == null) {
throw new InvalidOperationException("Expected that all XSHDs are registered in default highlighting manager; but highlighting definition was not found");
} else {
foreach (XshdColor namedColor in xshd.Elements.OfType<XshdColor>()) {
if (namedColor.ExampleText != null) {
IHighlightingItem item = new NamedColorHighlightingItem(defaultText, namedColor) { ParentDefinition = def };
item = new CustomizedHighlightingItem(customizationList, item, xshd.Name);
listBox.Items.Add(item);
item.PropertyChanged += item_PropertyChanged;
}
}
}
}
@ -98,6 +106,37 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options @@ -98,6 +106,37 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
listBox.SelectedIndex = 0;
}
}
void CreateDefaultEntries(string language, out IHighlightingItem defaultText)
{
// Create entry for "default text/background"
defaultText = new SimpleHighlightingItem(CustomizableHighlightingColorizer.DefaultTextAndBackground, ta => ta.Document.Text = "Normal text") {
Foreground = SystemColors.WindowTextColor,
Background = SystemColors.WindowColor
};
defaultText = new CustomizedHighlightingItem(customizationList, defaultText, null, canSetFont: false);
if (language != null)
defaultText = new CustomizedHighlightingItem(customizationList, defaultText, language, canSetFont: false);
defaultText.PropertyChanged += item_PropertyChanged;
listBox.Items.Add(defaultText);
// Create entry for "Selected text"
IHighlightingItem selectedText = new SimpleHighlightingItem(
CustomizableHighlightingColorizer.SelectedText,
ta => {
ta.Document.Text = "Selected text";
ta.Selection = new SimpleSelection(0, 13);
})
{
Foreground = SystemColors.HighlightTextColor,
Background = SystemColors.HighlightColor
};
selectedText = new CustomizedHighlightingItem(customizationList, selectedText, null, canSetFont: false);
if (language != null)
selectedText = new CustomizedHighlightingItem(customizationList, selectedText, language, canSetFont: false);
selectedText.PropertyChanged += item_PropertyChanged;
listBox.Items.Add(selectedText);
}
void item_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
@ -126,50 +165,23 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options @@ -126,50 +165,23 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
void UpdatePreview()
{
var item = (IHighlightingItem)listBox.SelectedItem;
TextView textView = textEditor.TextArea.TextView;
textView.LineTransformers.Remove(colorizer);
if (item != null) {
colorizer = new CustomizableHighlightingColorizer(item.ParentDefinition.MainRuleSet, customizationList);
textView.LineTransformers.Add(colorizer);
item.ShowExample(textEditor.TextArea);
XshdSyntaxDefinition xshd = (XshdSyntaxDefinition)languageComboBox.SelectedItem;
if (xshd != null) {
var customizationsForCurrentLanguage = customizationList.Where(c => c.Language == null || c.Language == xshd.Name);
CustomizableHighlightingColorizer.ApplyCustomizationsToDefaultElements(textEditor, customizationsForCurrentLanguage);
var item = (IHighlightingItem)listBox.SelectedItem;
TextView textView = textEditor.TextArea.TextView;
textView.LineTransformers.Remove(colorizer);
colorizer = null;
if (item != null) {
if (item.ParentDefinition != null) {
colorizer = new CustomizableHighlightingColorizer(item.ParentDefinition.MainRuleSet, customizationsForCurrentLanguage);
textView.LineTransformers.Add(colorizer);
}
textEditor.Select(0, 0);
item.ShowExample(textEditor.TextArea);
}
}
}
}
sealed class BooleanToBoldConverter : IValueConverter
{
public static readonly BooleanToBoldConverter Instance = new BooleanToBoldConverter();
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if ((bool)value)
return FontWeights.Bold;
else
return FontWeights.Normal;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotSupportedException();
}
}
sealed class BooleanToDefaultStringConverter : IValueConverter
{
public static readonly BooleanToDefaultStringConverter Instance = new BooleanToDefaultStringConverter();
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if ((bool)value)
return "(Default)";
else
return null;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotSupportedException();
}
}
}

15
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/NamedColorHighlightingItem.cs

@ -18,16 +18,17 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options @@ -18,16 +18,17 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
{
sealed class NamedColorHighlightingItem : IHighlightingItem
{
readonly IHighlightingItem defaultText;
readonly XshdColor color;
public NamedColorHighlightingItem(IHighlightingDefinition parentDefinition, XshdColor color)
public NamedColorHighlightingItem(IHighlightingItem defaultText, XshdColor color)
{
if (parentDefinition == null)
throw new ArgumentNullException("parentDefinition");
if (defaultText == null)
throw new ArgumentNullException("defaultText");
if (color == null)
throw new ArgumentNullException("color");
this.ParentDefinition = parentDefinition;
this.defaultText = defaultText;
this.color = color;
}
@ -59,7 +60,7 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options @@ -59,7 +60,7 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
if (c != null)
return c.Value;
else
return Colors.Black;
return defaultText.Foreground;
}
set {
throw new NotSupportedException();
@ -81,7 +82,7 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options @@ -81,7 +82,7 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
if (c != null)
return c.Value;
else
return Colors.White;
return defaultText.Background;
}
set {
throw new NotSupportedException();
@ -126,7 +127,7 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options @@ -126,7 +127,7 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
return color.Name;
}
public IHighlightingDefinition ParentDefinition { get; private set; }
public IHighlightingDefinition ParentDefinition { get; set; }
public void ShowExample(TextArea exampleTextArea)
{

68
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/SimpleHighlightingItem.cs

@ -0,0 +1,68 @@ @@ -0,0 +1,68 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <author name="Daniel Grunwald"/>
// <version>$Revision$</version>
// </file>
using System;
using System.ComponentModel;
using System.Windows.Media;
using ICSharpCode.AvalonEdit.Editing;
using ICSharpCode.AvalonEdit.Highlighting;
namespace ICSharpCode.AvalonEdit.AddIn.Options
{
sealed class SimpleHighlightingItem : IHighlightingItem
{
readonly Action<TextArea> onShowExample;
public SimpleHighlightingItem(string name, Action<TextArea> onShowExample)
{
this.Name = name;
this.onShowExample = onShowExample;
}
public event PropertyChangedEventHandler PropertyChanged { add {} remove {} }
public string Name { get; private set; }
public bool Bold { get; set; }
public bool Italic { get; set; }
public Color Foreground { get; set; }
public bool UseDefaultForeground { get; set; }
public Color Background { get; set; }
public bool UseDefaultBackground { get; set; }
public bool CanUseDefaultColors { get; set; }
public bool CanSetForeground {
get { return false; }
}
public bool CanSetBackground {
get { return false; }
}
public bool CanSetFont {
get { return false; }
}
public bool IsCustomized {
get { return false; }
}
public IHighlightingDefinition ParentDefinition { get; set; }
public void Reset()
{
}
public void ShowExample(TextArea exampleTextArea)
{
if (onShowExample != null)
onShowExample(exampleTextArea);
}
}
}

32
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/BAT-Mode.xshd

@ -1,32 +0,0 @@ @@ -1,32 +0,0 @@
<?xml version="1.0"?>
<!-- syntaxdefinition for BAT 2000 by Mike Krueger -->
<SyntaxDefinition name = "BAT" extensions = ".bat">
<Environment>
<Default color = "Yellow" bgcolor = "Black"/>
<Selection color = "White" bgcolor = "Purple"/>
<VRuler color = "Green"/>
<InvalidLines color = "Red"/>
<CaretMarker color = "Yellow"/>
<LineNumbers color = "Gray" bgcolor = "Black"/>
<FoldLine color = "Cyan" bgcolor = "Black"/>
<FoldMarker color = "Cyan" bgcolor = "White"/>
<SelectedFoldLine color = "Green" bgcolor="Black"/>
<EOLMarkers color = "#E0E0E5"/>
<SpaceMarkers color = "#E0E0E5"/>
<TabMarkers color = "#E0E0E5"/>
</Environment>
<Digits name = "Digits" bold = "false" italic = "false" color = "Yellow"/>
<RuleSets>
<RuleSet ignorecase = "false">
<Delimiters> </Delimiters>
</RuleSet>
</RuleSets>
</SyntaxDefinition>

1
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/Resources.cs

@ -31,7 +31,6 @@ namespace ICSharpCode.AvalonEdit.Highlighting @@ -31,7 +31,6 @@ namespace ICSharpCode.AvalonEdit.Highlighting
hlm.RegisterHighlighting("HTML", new[] { ".htm", ".html" }, "HTML-Mode.xshd");
hlm.RegisterHighlighting("ASP/XHTML", new[] { ".asp", ".aspx", ".asax", ".asmx" }, "ASPX.xshd");
//hlm.RegisterHighlighting("Batch", new[] { ".bat", ".cmd" }, "BAT-Mode.xshd");
hlm.RegisterHighlighting("Boo", new[] { ".boo" }, "Boo.xshd");
hlm.RegisterHighlighting("Coco", new[] { ".atg" }, "Coco-Mode.xshd");
hlm.RegisterHighlighting("C++", new[] { ".c", ".h", ".cc", ".cpp" , ".hpp" }, "CPP-Mode.xshd");

1
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/ICSharpCode.AvalonEdit.csproj

@ -374,7 +374,6 @@ @@ -374,7 +374,6 @@
</Compile>
<Resource Include="themes\RightArrow.cur" />
<EmbeddedResource Include="Highlighting\Resources\ASPX.xshd" />
<EmbeddedResource Include="Highlighting\Resources\BAT-Mode.xshd" />
<EmbeddedResource Include="Highlighting\Resources\Boo.xshd" />
<EmbeddedResource Include="Highlighting\Resources\Coco-Mode.xshd" />
<EmbeddedResource Include="Highlighting\Resources\CPP-Mode.xshd" />

4
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/TextEditor.xaml

@ -19,6 +19,8 @@ @@ -19,6 +19,8 @@
HorizontalContentAlignment="Left"
Background="{TemplateBinding Background}"
Padding="{TemplateBinding Padding}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
/>
<ControlTemplate.Triggers>
<Trigger Property="WordWrap"
@ -37,7 +39,7 @@ @@ -37,7 +39,7 @@
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="SelectionBrush">
<Setter.Value>
<SolidColorBrush
<SolidColorBrush
Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}"
Opacity="0.7"/>
</Setter.Value>

Loading…
Cancel
Save