[mono/monodevelop] 4192a0f3: [TextEditor] Fixed typo.

1 view
Skip to first unread message

Mike Krüger (mkrueger@xamarin.com)

unread,
Mar 30, 2012, 4:56:37 PM3/30/12
to Mono Patches List

Branch: refs/heads/newresolver
Home: https://github.com/mono/monodevelop
Compare: https://github.com/mono/monodevelop/compare/2dd7517...4192a0f

Commit: 4192a0f3401a7e6f12370a6153f0c3cba2ae1d8e
Author: Mike Krüger <mkru...@xamarin.com> (mkrueger)
Date: 2012-03-30 20:55:19 GMT
URL: https://github.com/mono/monodevelop/commit/4192a0f3401a7e6f12370a6153f0c3cba2ae1d8e

[TextEditor] Fixed typo.

Changed paths:
M main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs
M main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/MonoDevelopHexEditorStyle.cs
M main/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultMarker.cs
M main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/ColorShemeEditor.cs
M main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/HighlightingPanel.cs
M main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleCache.cs
M main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorPrintOperation.cs
M main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs
M main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/StyledSourceEditorOptions.cs
M main/src/core/Mono.Texteditor/Makefile.am
M main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/DefaultStyle.cs
M main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ISyntaxMode.cs
M main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Keywords.cs
M main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Marker.cs
M main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Match.cs
M main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ReferencedChunkStyle.cs
M main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Rule.cs
M main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Span.cs
M main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxMode.cs
M main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxModeService.cs
M main/src/core/Mono.Texteditor/Mono.TextEditor.Theatrics/SmartScrolledWindow.cs
M main/src/core/Mono.Texteditor/Mono.TextEditor.csproj
M main/src/core/Mono.Texteditor/Mono.TextEditor/ClipboardActions.cs
M main/src/core/Mono.Texteditor/Mono.TextEditor/FoldingScreenbackgroundRenderer.cs
M main/src/core/Mono.Texteditor/Mono.TextEditor/ITextEditorOptions.cs
M main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditor.cs
M main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditorData.cs
M main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditorOptions.cs
M main/src/core/Mono.Texteditor/Mono.TextEditor/TextViewMargin.cs
M main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs
Added paths:
A main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ColorScheme.cs
Removed paths:
D main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ColorSheme.cs

Modified: main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs
===================================================================
@@ -1,4 +1,4 @@
-//
+//
// SyntaxMode.cs
//
// Author:
@@ -275,7 +275,7 @@ public override SpanParser CreateSpanParser (LineSegment line, CloneableStack<Sp
return new CSharpSpanParser (this, spanStack ?? line.StartSpan.Clone ());
}

- public override ChunkParser CreateChunkParser (SpanParser spanParser, ColorSheme style, LineSegment line)
+ public override ChunkParser CreateChunkParser (SpanParser spanParser, ColorScheme style, LineSegment line)
{
EnsureGuiDocument ();
return new CSharpChunkParser (this, spanParser, style, line);
@@ -394,7 +394,7 @@ public void Reset ()
}*/
CSharpSyntaxMode csharpSyntaxMode;

- public CSharpChunkParser (CSharpSyntaxMode csharpSyntaxMode, SpanParser spanParser, ColorSheme style, LineSegment line) : base (csharpSyntaxMode, spanParser, style, line)
+ public CSharpChunkParser (CSharpSyntaxMode csharpSyntaxMode, SpanParser spanParser, ColorScheme style, LineSegment line) : base (csharpSyntaxMode, spanParser, style, line)
{
this.csharpSyntaxMode = csharpSyntaxMode;
foreach (var tag in CommentTag.SpecialCommentTags) {

Modified: main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/MonoDevelopHexEditorStyle.cs
===================================================================
@@ -34,7 +34,7 @@ namespace MonoDevelop.HexEditor
{
public class MonoDevelopHexEditorStyle : HexEditorStyle
{
- ColorSheme colorStyle;
+ ColorScheme colorStyle;
Mono.MHex.HexEditor hexEditor;

public MonoDevelopHexEditorStyle (Mono.MHex.HexEditor hexEditor)
@@ -70,7 +70,7 @@ void SetStyle ()

public override Color HexOffsetHighlighted {
get {
- return Mono.TextEditor.Highlighting.ColorSheme.ToGdkColor (colorStyle.LineNumberFgHighlighted);
+ return Mono.TextEditor.Highlighting.ColorScheme.ToGdkColor (colorStyle.LineNumberFgHighlighted);
}
}

@@ -100,25 +100,25 @@ void SetStyle ()

public override Color IconBarBg {
get {
- return Mono.TextEditor.Highlighting.ColorSheme.ToGdkColor (colorStyle.IconBarBg);
+ return Mono.TextEditor.Highlighting.ColorScheme.ToGdkColor (colorStyle.IconBarBg);
}
}

public override Color IconBarSeperator {
get {
- return Mono.TextEditor.Highlighting.ColorSheme.ToGdkColor (colorStyle.IconBarSeperator);
+ return Mono.TextEditor.Highlighting.ColorScheme.ToGdkColor (colorStyle.IconBarSeperator);
}
}

public override Color BookmarkColor1 {
get {
- return Mono.TextEditor.Highlighting.ColorSheme.ToGdkColor (colorStyle.BookmarkColor1);
+ return Mono.TextEditor.Highlighting.ColorScheme.ToGdkColor (colorStyle.BookmarkColor1);
}
}

public override Color BookmarkColor2 {
get {
- return Mono.TextEditor.Highlighting.ColorSheme.ToGdkColor (colorStyle.BookmarkColor2);
+ return Mono.TextEditor.Highlighting.ColorScheme.ToGdkColor (colorStyle.BookmarkColor2);
}
}

@@ -136,7 +136,7 @@ void SetStyle ()

public override Color HighlightOffset {
get {
- return Mono.TextEditor.Highlighting.ColorSheme.ToGdkColor (colorStyle.SearchTextBg);
+ return Mono.TextEditor.Highlighting.ColorScheme.ToGdkColor (colorStyle.SearchTextBg);
}
}
}

Modified: main/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultMarker.cs
===================================================================
@@ -60,15 +60,15 @@ static string GetColor (Result result)
{
switch (result.Level) {
case Severity.None:
- return Mono.TextEditor.Highlighting.ColorSheme.DefaultString;
+ return Mono.TextEditor.Highlighting.ColorScheme.DefaultString;
case Severity.Error:
- return Mono.TextEditor.Highlighting.ColorSheme.ErrorUnderlineString;
+ return Mono.TextEditor.Highlighting.ColorScheme.ErrorUnderlineString;
case Severity.Warning:
- return Mono.TextEditor.Highlighting.ColorSheme.WarningUnderlineString;
+ return Mono.TextEditor.Highlighting.ColorScheme.WarningUnderlineString;
case Severity.Suggestion:
- return Mono.TextEditor.Highlighting.ColorSheme.SuggestionUnderlineString;
+ return Mono.TextEditor.Highlighting.ColorScheme.SuggestionUnderlineString;
case Severity.Hint:
- return Mono.TextEditor.Highlighting.ColorSheme.HintUnderlineString;
+ return Mono.TextEditor.Highlighting.ColorScheme.HintUnderlineString;
default:
throw new System.ArgumentOutOfRangeException ();
}

Modified: main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/ColorShemeEditor.cs
===================================================================
@@ -73,7 +73,7 @@ class ColorMetaData {
}

TextEditor textEditor;
- ColorSheme colorSheme;
+ ColorScheme colorSheme;
Gtk.TreeStore colorStore = new Gtk.TreeStore (typeof (string), typeof(ChunkStyle), typeof(ColorMetaData));
string fileName;
HighlightingPanel panel;
@@ -267,7 +267,7 @@ void SyntaxCellRenderer (Gtk.CellLayout cell_layout, Gtk.CellRenderer cell, Gtk.

}

- void ApplyStyle (ColorSheme sheme)
+ void ApplyStyle (ColorScheme sheme)
{
sheme.Name = entryName.Text;
sheme.Description = entryDescription.Text;
@@ -361,7 +361,7 @@ void HandleTreeviewColorsSelectionChanged (object sender, EventArgs e)
this.checkbuttonItalic.Sensitive = true;
}

- public void SetSheme (ColorSheme style)
+ public void SetSheme (ColorScheme style)
{
if (style == null)
throw new ArgumentNullException ("style");

Modified: main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/HighlightingPanel.cs
===================================================================
@@ -37,7 +37,7 @@ namespace MonoDevelop.SourceEditor.OptionPanels
{
public partial class HighlightingPanel : Gtk.Bin, IOptionsPanel
{
- ListStore styleStore = new ListStore (typeof (string), typeof (Mono.TextEditor.Highlighting.ColorSheme));
+ ListStore styleStore = new ListStore (typeof (string), typeof (Mono.TextEditor.Highlighting.ColorScheme));

public HighlightingPanel ()
{
@@ -95,7 +95,7 @@ void HandleStyleTreeviewSelectionChanged (object sender, EventArgs e)
Gtk.TreeIter iter;
if (!styleTreeview.Selection.GetSelected (out iter))
return;
- var sheme = (Mono.TextEditor.Highlighting.ColorSheme)styleStore.GetValue (iter, 1);
+ var sheme = (Mono.TextEditor.Highlighting.ColorScheme)styleStore.GetValue (iter, 1);
if (sheme == null)
return;
this.buttonExport.Sensitive = true;
@@ -111,13 +111,13 @@ void HandleButtonEdithandleClicked (object sender, EventArgs e)
TreeIter selectedIter;
if (styleTreeview.Selection.GetSelected (out selectedIter)) {
var editor = new ColorShemeEditor (this);
- editor.SetSheme ((Mono.TextEditor.Highlighting.ColorSheme)this.styleStore.GetValue (selectedIter, 1));
+ editor.SetSheme ((Mono.TextEditor.Highlighting.ColorScheme)this.styleStore.GetValue (selectedIter, 1));
MessageService.RunCustomDialog (editor, dialog);
editor.Destroy ();
}
}

- Mono.TextEditor.Highlighting.ColorSheme LoadStyle (string styleName, bool showException = true)
+ Mono.TextEditor.Highlighting.ColorScheme LoadStyle (string styleName, bool showException = true)
{
try {
return Mono.TextEditor.Highlighting.SyntaxModeService.GetColorStyle (Style, styleName);
@@ -163,7 +163,7 @@ void RemoveColorScheme (object sender, EventArgs args)
TreeIter selectedIter;
if (!styleTreeview.Selection.GetSelected (out selectedIter))
return;
- var sheme = (Mono.TextEditor.Highlighting.ColorSheme)this.styleStore.GetValue (selectedIter, 1);
+ var sheme = (Mono.TextEditor.Highlighting.ColorScheme)this.styleStore.GetValue (selectedIter, 1);

string fileName = Mono.TextEditor.Highlighting.SyntaxModeService.GetFileNameForStyle (sheme);

@@ -184,7 +184,7 @@ void HandleButtonExportClicked (object sender, EventArgs e)
return;
TreeIter selectedIter;
if (styleTreeview.Selection.GetSelected (out selectedIter)) {
- var sheme = (Mono.TextEditor.Highlighting.ColorSheme)this.styleStore.GetValue (selectedIter, 1);
+ var sheme = (Mono.TextEditor.Highlighting.ColorScheme)this.styleStore.GetValue (selectedIter, 1);
sheme.Save (dialog.SelectedFile);
}

@@ -248,7 +248,7 @@ public virtual void ApplyChanges ()
DefaultSourceEditorOptions.Instance.EnableSemanticHighlighting = this.enableSemanticHighlightingCheckbutton.Active;
TreeIter selectedIter;
if (styleTreeview.Selection.GetSelected (out selectedIter)) {
- ColorSheme sheme = ((Mono.TextEditor.Highlighting.ColorSheme)this.styleStore.GetValue (selectedIter, 1));
+ ColorScheme sheme = ((Mono.TextEditor.Highlighting.ColorScheme)this.styleStore.GetValue (selectedIter, 1));
DefaultSourceEditorOptions.Instance.ColorScheme = sheme != null ? sheme.Name : null;
}
}

Modified: main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleCache.cs
===================================================================
@@ -109,7 +109,7 @@ internal LayoutDescriptor CreateLayoutDescriptor (ErrorText errorText)

void SetColors ()
{
- ColorSheme style = editor.ColorStyle;
+ ColorScheme style = editor.ColorStyle;
if (style == null)
style = new DefaultStyle (editor.Style);
errorGc = (HslColor)(style.GetChunkStyle ("bubble.error").Color);
@@ -158,7 +158,7 @@ static void AdjustColorMatrix (Cairo.Color[,,,,] colorMatrix , int side, Cairo.C
string typeString = isError ? "error" : "warning";
Cairo.Color[,,,,] colorMatrix = new Cairo.Color[2, 2, 3, 2, 2];

- ColorSheme style = editor.ColorStyle;
+ ColorScheme style = editor.ColorStyle;
if (style == null)
style = new DefaultStyle (editor.Style);

@@ -181,7 +181,7 @@ static void AdjustColorMatrix (Cairo.Color[,,,,] colorMatrix , int side, Cairo.C
}
}
}
- var selectionColor = ColorSheme.ToCairoColor (style.Selection.BackgroundColor);
+ var selectionColor = ColorScheme.ToCairoColor (style.Selection.BackgroundColor);
for (int i = 0; i < 2; i++) {
for (int j = 0; j < 2; j++) {
for (int k = 0; k < 3; k++) {

Modified: main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorPrintOperation.cs
===================================================================
@@ -91,7 +91,7 @@ protected override void OnEndPrint (PrintContext context)
double pageWidth, pageHeight;

Pango.Layout layout;
- Mono.TextEditor.Highlighting.ColorSheme style;
+ Mono.TextEditor.Highlighting.ColorScheme style;

string headerText;
string footerText;

Modified: main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs
===================================================================
@@ -1704,7 +1704,7 @@ public ErrorMarker (Error info, LineSegment line)
this.LineSegment = line; // may be null if no line is assigned to the error.
this.Wave = true;

- ColorName = info.ErrorType == ErrorType.Warning ? Mono.TextEditor.Highlighting.ColorSheme.WarningUnderlineString : Mono.TextEditor.Highlighting.ColorSheme.ErrorUnderlineString;
+ ColorName = info.ErrorType == ErrorType.Warning ? Mono.TextEditor.Highlighting.ColorScheme.WarningUnderlineString : Mono.TextEditor.Highlighting.ColorScheme.ErrorUnderlineString;

if (Info.Region.BeginLine == info.Region.EndLine) {
this.StartCol = Info.Region.BeginColumn;

Modified: main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/StyledSourceEditorOptions.cs
===================================================================
@@ -187,7 +187,7 @@ void HandleDefaultsChanged (object sender, EventArgs e)
set { throw new NotSupportedException (); }
}

- public Mono.TextEditor.Highlighting.ColorSheme GetColorStyle (Gtk.Style widgetStyle)
+ public Mono.TextEditor.Highlighting.ColorScheme GetColorStyle (Gtk.Style widgetStyle)
{
return DefaultSourceEditorOptions.Instance.GetColorStyle (widgetStyle);
}

Modified: main/src/core/Mono.Texteditor/Makefile.am
===================================================================
@@ -22,7 +22,7 @@ FILES = \
Mono.TextEditor.Highlighting/Chunk.cs \
Mono.TextEditor.Highlighting/ChunkStyle.cs \
Mono.TextEditor.Highlighting/CloneableStack.cs \
- Mono.TextEditor.Highlighting/ColorSheme.cs \
+ Mono.TextEditor.Highlighting/ColorScheme.cs \
Mono.TextEditor.Highlighting/DefaultStyle.cs \
Mono.TextEditor.Highlighting/HighlightingPartitioner.cs \
Mono.TextEditor.Highlighting/ISyntaxMode.cs \

Renamed: main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ColorScheme.cs
===================================================================
@@ -33,9 +33,9 @@

namespace Mono.TextEditor.Highlighting
{
- public class ColorSheme
+ public class ColorScheme
{
- public static ColorSheme Empty = new ColorSheme ();
+ public static ColorScheme Empty = new ColorScheme ();

Dictionary<string, ChunkStyle> styleLookupTable = new Dictionary<string, ChunkStyle> ();
Dictionary<string, string> customPalette = new Dictionary<string, string> ();
@@ -433,7 +433,7 @@ public static Cairo.Color ToCairoColor (Gdk.Color color, double alpha)
alpha);
}

- protected ColorSheme ()
+ protected ColorScheme ()
{
SetStyle (DefaultString, 0, 0, 0, 255, 255, 255);
SetStyle (ReadOnlyTextBgString, 0xFA, 0xFA, 0xF8);
@@ -725,7 +725,7 @@ public Cairo.Color GetColorFromString (string colorString)

public const string NameAttribute = "name";

- static void ReadStyleTree (XmlReader reader, ColorSheme result, string curName, string curWeight, string curColor, string curBgColor)
+ static void ReadStyleTree (XmlReader reader, ColorScheme result, string curName, string curWeight, string curColor, string curBgColor)
{
string name = reader.GetAttribute ("name");
string weight = reader.GetAttribute ("weight") ?? curWeight;
@@ -750,9 +750,9 @@ static void ReadStyleTree (XmlReader reader, ColorSheme result, string curName,
});
}

- public static ColorSheme LoadFrom (XmlReader reader)
+ public static ColorScheme LoadFrom (XmlReader reader)
{
- var result = new ColorSheme ();
+ var result = new ColorScheme ();
XmlReadHelper.ReadList (reader, "EditorStyle", delegate () {
switch (reader.LocalName) {
case "EditorStyle":
@@ -815,9 +815,9 @@ public void Save (string fileName)
writer.Close ();
}

- public ColorSheme Clone ()
+ public ColorScheme Clone ()
{
- ColorSheme clone = (ColorSheme)MemberwiseClone ();
+ ColorScheme clone = (ColorScheme)MemberwiseClone ();
clone.styleLookupTable = new Dictionary<string, ChunkStyle> (styleLookupTable);
return clone;
}

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/DefaultStyle.cs
===================================================================
@@ -29,7 +29,7 @@

namespace Mono.TextEditor.Highlighting
{
- public class DefaultStyle : ColorSheme
+ public class DefaultStyle : ColorScheme
{
ChunkStyle defaultStyle;
public override ChunkStyle Default {

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ISyntaxMode.cs
===================================================================
@@ -30,7 +30,7 @@
namespace Mono.TextEditor.Highlighting
{
/// <summary>
- /// The basic inferace for all syntax modes
+ /// The basic interface for all syntax modes
/// </summary>
public interface ISyntaxMode
{
@@ -57,7 +57,7 @@ public interface ISyntaxMode
/// <param name='length'>
/// The length of the text converted to chunks.
/// </param>
- IEnumerable<Chunk> GetChunks (ColorSheme style, LineSegment line, int offset, int length);
+ IEnumerable<Chunk> GetChunks (ColorScheme style, LineSegment line, int offset, int length);
}
}


Modified: main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Keywords.cs
===================================================================
@@ -56,7 +56,7 @@ public Keywords ()
{
}

- public virtual bool GetIsValid (ColorSheme style)
+ public virtual bool GetIsValid (ColorScheme style)
{
if (style.GetChunkStyle (Color) == null) {
System.Console.WriteLine("color:" + Color + " not found.");

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Marker.cs
===================================================================
@@ -47,7 +47,7 @@ public Marker ()
{
}

- public virtual bool GetIsValid (ColorSheme style)
+ public virtual bool GetIsValid (ColorScheme style)
{
return style.GetChunkStyle (Color) != null;
}

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Match.cs
===================================================================
@@ -50,7 +50,7 @@ public class Match
}
}

- public virtual bool GetIsValid (ColorSheme style)
+ public virtual bool GetIsValid (ColorScheme style)
{
return style.GetChunkStyle (Color) != null;
}
@@ -118,7 +118,7 @@ static bool ReadFloatEnd (string text, ref int i)
return false;
}

- public override bool GetIsValid (ColorSheme style)
+ public override bool GetIsValid (ColorScheme style)
{
return true;
}

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ReferencedChunkStyle.cs
===================================================================
@@ -30,7 +30,7 @@ namespace Mono.TextEditor.Highlighting
{
class ReferencedChunkStyle : ChunkStyle
{
- ColorSheme style;
+ ColorScheme style;
string referencedStyle;
public override Cairo.Color CairoColor {
get {
@@ -56,7 +56,7 @@ class ReferencedChunkStyle : ChunkStyle
}
}

- public ReferencedChunkStyle (ColorSheme style, string referencedStyle)
+ public ReferencedChunkStyle (ColorScheme style, string referencedStyle)
{
this.style = style;
this.referencedStyle = referencedStyle;

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Rule.cs
===================================================================
@@ -50,7 +50,7 @@ public class Rule
}
}

- public virtual bool GetIsValid (ColorSheme style)
+ public virtual bool GetIsValid (ColorScheme style)
{
foreach (Keywords keyword in keywords) {
if (!keyword.GetIsValid (style)) {

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Span.cs
===================================================================
@@ -59,7 +59,7 @@ public Span ()
{
}

- public virtual bool GetIsValid (ColorSheme style)
+ public virtual bool GetIsValid (ColorScheme style)
{
return (string.IsNullOrEmpty (Color) || style.GetChunkStyle (Color) != null) &&
(string.IsNullOrEmpty (TagColor) || style.GetChunkStyle (TagColor) != null) &&

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxMode.cs
===================================================================
@@ -108,7 +108,7 @@ public SyntaxMode (TextDocument doc) : this ()
this.doc = doc;
}

- public bool Validate (ColorSheme style)
+ public bool Validate (ColorScheme style)
{
if (!GetIsValid (style)) {
return false;
@@ -121,7 +121,7 @@ public bool Validate (ColorSheme style)
return true;
}

- public virtual IEnumerable<Chunk> GetChunks (ColorSheme style, LineSegment line, int offset, int length)
+ public virtual IEnumerable<Chunk> GetChunks (ColorScheme style, LineSegment line, int offset, int length)
{
SpanParser spanParser = CreateSpanParser (line, null);
ChunkParser chunkParser = CreateChunkParser (spanParser, style, line);
@@ -161,7 +161,7 @@ public virtual IEnumerable<Chunk> GetChunks (ColorSheme style, LineSegment line,
}
}

- public virtual string GetTextWithoutMarkup (ColorSheme style, int offset, int length)
+ public virtual string GetTextWithoutMarkup (ColorScheme style, int offset, int length)
{
return doc.GetTextAt (offset, length);
}
@@ -193,7 +193,7 @@ public virtual SpanParser CreateSpanParser (LineSegment line, CloneableStack<Spa
return new SpanParser (this, spanStack ?? line.StartSpan.Clone ());
}

- public virtual ChunkParser CreateChunkParser (SpanParser spanParser, ColorSheme style, LineSegment line)
+ public virtual ChunkParser CreateChunkParser (SpanParser spanParser, ColorScheme style, LineSegment line)
{
return new ChunkParser (this, spanParser, style, line);
}
@@ -446,7 +446,7 @@ public class ChunkParser
internal int lineOffset;
protected SyntaxMode mode;

- public ChunkParser (SyntaxMode mode, SpanParser spanParser, ColorSheme style, LineSegment line)
+ public ChunkParser (SyntaxMode mode, SpanParser spanParser, ColorScheme style, LineSegment line)
{
this.mode = mode;
this.doc = mode.Document;

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxModeService.cs
===================================================================
@@ -40,7 +40,7 @@ namespace Mono.TextEditor.Highlighting
public static class SyntaxModeService
{
static Dictionary<string, ISyntaxModeProvider> syntaxModes = new Dictionary<string, ISyntaxModeProvider> ();
- static Dictionary<string, ColorSheme> styles = new Dictionary<string, ColorSheme> ();
+ static Dictionary<string, ColorScheme> styles = new Dictionary<string, ColorScheme> ();
static Dictionary<string, IXmlProvider> syntaxModeLookup = new Dictionary<string, IXmlProvider> ();
static Dictionary<string, IXmlProvider> styleLookup = new Dictionary<string, IXmlProvider> ();
static Dictionary<string, string> isLoadedFromFile = new Dictionary<string, string> ();
@@ -60,7 +60,7 @@ public static class SyntaxModeService
}
}

- public static string GetFileNameForStyle (ColorSheme style)
+ public static string GetFileNameForStyle (ColorScheme style)
{
string result;
if (!isLoadedFromFile.TryGetValue (style.Name, out result))
@@ -75,7 +75,7 @@ public static void InstallSyntaxMode (string mimeType, ISyntaxModeProvider modeP
syntaxModes[mimeType] = modeProvider;
}

- public static ColorSheme GetColorStyle (Gtk.Style widgetStyle, string name)
+ public static ColorScheme GetColorStyle (Gtk.Style widgetStyle, string name)
{
if (styles.ContainsKey (name))
return styles [name];
@@ -95,7 +95,7 @@ public static IXmlProvider GetProvider (SyntaxMode mode)
return null;
}

- public static IXmlProvider GetProvider (ColorSheme style)
+ public static IXmlProvider GetProvider (ColorScheme style)
{
if (styleLookup.ContainsKey (style.Name))
return styleLookup[style.Name];
@@ -108,7 +108,7 @@ static void LoadStyle (string name)
throw new System.ArgumentException ("Style " + name + " not found", "name");
XmlReader reader = styleLookup [name].Open ();
try {
- styles [name] = ColorSheme.LoadFrom (reader);
+ styles [name] = ColorScheme.LoadFrom (reader);
} catch (Exception e) {
throw new IOException ("Error while loading style :" + name, e);
} finally {
@@ -168,7 +168,7 @@ public static bool ValidateAllSyntaxModes ()
}
styleLookup.Clear ();
bool result = true;
- foreach (KeyValuePair<string, ColorSheme> style in styles) {
+ foreach (KeyValuePair<string, ColorScheme> style in styles) {
var checkedModes = new HashSet<ISyntaxModeProvider> ();
foreach (var mode in syntaxModes) {
if (checkedModes.Contains (mode.Value))
@@ -183,7 +183,7 @@ public static bool ValidateAllSyntaxModes ()
return result;
}

- public static void Remove (ColorSheme style)
+ public static void Remove (ColorScheme style)
{
if (styles.ContainsKey (style.Name))
styles.Remove (style.Name);
@@ -416,7 +416,7 @@ public static void LoadStylesAndModes (string path)
}
} else if (file.EndsWith ("Style.xml")) {
using (XmlTextReader reader = new XmlTextReader (file)) {
- string styleName = Scan (reader, ColorSheme.NameAttribute);
+ string styleName = Scan (reader, ColorScheme.NameAttribute);
styleLookup [styleName] = new UrlXmlProvider (file);
isLoadedFromFile [styleName] = file;
}
@@ -440,7 +440,7 @@ public static void LoadStylesAndModes (Assembly assembly)
} else if (resource.EndsWith ("Style.xml")) {
using (Stream stream = assembly.GetManifestResourceStream (resource))
using (XmlTextReader reader = new XmlTextReader (stream)) {
- string styleName = Scan (reader, ColorSheme.NameAttribute);
+ string styleName = Scan (reader, ColorScheme.NameAttribute);
styleLookup [styleName] = new ResourceXmlProvider (assembly, resource);
}
}
@@ -467,7 +467,7 @@ public static void RemoveSyntaxMode (IXmlProvider provider)
}
}

- public static void AddStyle (string fileName, ColorSheme style)
+ public static void AddStyle (string fileName, ColorScheme style)
{
isLoadedFromFile [style.Name] = fileName;
styles [style.Name] = style;
@@ -475,14 +475,14 @@ public static void AddStyle (string fileName, ColorSheme style)
public static void AddStyle (IXmlProvider provider)
{
using (XmlReader reader = provider.Open ()) {
- string styleName = Scan (reader, ColorSheme.NameAttribute);
+ string styleName = Scan (reader, ColorScheme.NameAttribute);
styleLookup [styleName] = provider;
}
}
public static void RemoveStyle (IXmlProvider provider)
{
using (XmlReader reader = provider.Open ()) {
- string styleName = Scan (reader, ColorSheme.NameAttribute);
+ string styleName = Scan (reader, ColorScheme.NameAttribute);
styleLookup.Remove (styleName);
}
}

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor.Theatrics/SmartScrolledWindow.cs
===================================================================
@@ -254,7 +254,7 @@ protected override bool OnExposeEvent (EventExpose evnt)
cr.SharpLineY (alloc.X, alloc.Y, right, alloc.Y);
cr.SharpLineY (alloc.X, bottom, right, bottom);

- cr.Color = Mono.TextEditor.Highlighting.ColorSheme.ToCairoColor (Style.Dark (State));
+ cr.Color = Mono.TextEditor.Highlighting.ColorScheme.ToCairoColor (Style.Dark (State));
cr.Stroke ();
}
return base.OnExposeEvent (evnt);

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor.csproj
===================================================================
@@ -37,18 +37,23 @@
<Reference Include="Mono.Posix" />
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<SpecificVersion>False</SpecificVersion>
+ <Package>glib-sharp-2.0</Package>
</Reference>
<Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<SpecificVersion>False</SpecificVersion>
+ <Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<SpecificVersion>False</SpecificVersion>
+ <Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<SpecificVersion>False</SpecificVersion>
+ <Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<SpecificVersion>False</SpecificVersion>
+ <Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System" />
@@ -172,7 +177,6 @@
<Compile Include="Mono.TextEditor\SegmentTree.cs" />
<Compile Include="Mono.TextEditor.Utils\RedBlackTree.cs" />
<Compile Include="Mono.TextEditor\HeightTree.cs" />
- <Compile Include="Mono.TextEditor.Highlighting\ColorSheme.cs" />
<Compile Include="Mono.TextEditor\GtkWorkarounds.cs" />
<Compile Include="Mono.TextEditor\Annotatable.cs" />
<Compile Include="Mono.TextEditor\IndentStyle.cs" />
@@ -184,6 +188,7 @@
<Compile Include="Mono.TextEditor\SyntaxModeChangeEventArgs.cs" />
<Compile Include="Mono.TextEditor\DocumentRegion.cs" />
<Compile Include="Mono.TextEditor.Utils\TextFileUtility.cs" />
+ <Compile Include="Mono.TextEditor.Highlighting\ColorScheme.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Mono.TextEditor.dll.config">

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor/ClipboardActions.cs
===================================================================
@@ -123,11 +123,11 @@ public void ClipboardClearFunc (Clipboard clipboard)

public TextDocument copiedDocument;
public TextDocument monoDocument; // has a slightly different format !!!
- public Mono.TextEditor.Highlighting.ColorSheme docStyle;
+ public Mono.TextEditor.Highlighting.ColorScheme docStyle;
ITextEditorOptions options;
Mono.TextEditor.Highlighting.ISyntaxMode mode;

- static string GenerateRtf (TextDocument doc, Mono.TextEditor.Highlighting.ISyntaxMode mode, Mono.TextEditor.Highlighting.ColorSheme style, ITextEditorOptions options)
+ static string GenerateRtf (TextDocument doc, Mono.TextEditor.Highlighting.ISyntaxMode mode, Mono.TextEditor.Highlighting.ColorScheme style, ITextEditorOptions options)
{
StringBuilder rtfText = new StringBuilder ();
List<Gdk.Color> colorList = new List<Gdk.Color> ();

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor/FoldingScreenbackgroundRenderer.cs
===================================================================
@@ -116,7 +116,7 @@ public void Draw (Cairo.Context cr, Cairo.Rectangle area, LineSegment lineSegmen
role = roles [segment];
}
DrawRoundRectangle (cr, (role & Roles.Start) == Roles.Start, (role & Roles.End) == Roles.End, xPos, y, editor.LineHeight / 2, rectangleWidth, lineHeight);
- cr.Color = ColorSheme.ToCairoColor (hslColor);
+ cr.Color = ColorScheme.ToCairoColor (hslColor);
cr.Fill ();
/* if (segment == foldSegments.Count - 1) {
cr.Color = new Cairo.Color (0.5, 0.5, 0.5, 1);

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor/ITextEditorOptions.cs
===================================================================
@@ -70,7 +70,7 @@ public interface ITextEditorOptions : IDisposable
string ColorScheme { get; set; }
string DefaultEolMarker { get; set; }

- ColorSheme GetColorStyle (Gtk.Style widgetStyle);
+ ColorScheme GetColorStyle (Gtk.Style widgetStyle);

event EventHandler Changed;
}

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditor.cs
===================================================================
@@ -1686,7 +1686,7 @@ protected virtual void OnPainted (PaintEventArgs e)
}
}

- public Mono.TextEditor.Highlighting.ColorSheme ColorStyle {
+ public Mono.TextEditor.Highlighting.ColorScheme ColorStyle {
get {
return this.textEditorData.ColorStyle;
}

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditorData.cs
===================================================================
@@ -210,10 +210,10 @@ void HandleDocumentsplitterhandleLineInserted (object sender, LineEventArgs e)
}
}

- ColorSheme colorStyle;
- public ColorSheme ColorStyle {
+ ColorScheme colorStyle;
+ public ColorScheme ColorStyle {
get {
- return colorStyle ?? ColorSheme.Empty;
+ return colorStyle ?? ColorScheme.Empty;
}
set {
colorStyle = value;

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditorOptions.cs
===================================================================
@@ -469,7 +469,7 @@ void DisposeFont ()
}
}

- public virtual ColorSheme GetColorStyle (Gtk.Style widgetStyle)
+ public virtual ColorScheme GetColorStyle (Gtk.Style widgetStyle)
{
return SyntaxModeService.GetColorStyle (widgetStyle, ColorScheme);
}

Modified: main/src/core/Mono.Texteditor/Mono.TextEditor/TextViewMargin.cs
===================================================================
@@ -109,7 +109,7 @@ public class TextViewMargin : Margin
get { return textEditor.Caret; }
}

- public Mono.TextEditor.Highlighting.ColorSheme ColorStyle {
+ public Mono.TextEditor.Highlighting.ColorScheme ColorStyle {
get { return this.textEditor.ColorStyle; }
}

@@ -902,7 +902,7 @@ public ChunkDescriptor (LineSegment line, int offset, int length, Chunk[] chunk)
}

Dictionary<LineSegment, ChunkDescriptor> chunkDict = new Dictionary<LineSegment, ChunkDescriptor> ();
- IEnumerable<Chunk> GetCachedChunks (ISyntaxMode mode, TextDocument doc, Mono.TextEditor.Highlighting.ColorSheme style, LineSegment line, int offset, int length)
+ IEnumerable<Chunk> GetCachedChunks (ISyntaxMode mode, TextDocument doc, Mono.TextEditor.Highlighting.ColorScheme style, LineSegment line, int offset, int length)
{
ChunkDescriptor descriptor;
if (chunkDict.TryGetValue (line, out descriptor)) {

Modified: main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs
===================================================================
@@ -58,7 +58,7 @@ class SearchResultWidget : HBox, ILocationList
const int SearchResultColumn = 0;
const int DidReadColumn = 1;

- Mono.TextEditor.Highlighting.ColorSheme highlightStyle;
+ Mono.TextEditor.Highlighting.ColorScheme highlightStyle;

ScrolledWindow scrolledwindowLogView;
PadTreeView treeviewSearchResults;
@@ -480,7 +480,7 @@ void ResultTextDataFunc (TreeViewColumn column, CellRenderer cell, TreeModel mod
int pos2 = FindPosition (markup, col + searchResult.Length, out tag);
if (pos1 >= 0 && pos2 >= 0) {
markup = tag.StartsWith ("span") ? markup.Insert (pos2, "</span></span><" + tag + ">") : markup.Insert (pos2, "</span>");
- Color searchColor = Mono.TextEditor.Highlighting.ColorSheme.ToGdkColor (highlightStyle.SearchTextBg);
+ Color searchColor = Mono.TextEditor.Highlighting.ColorScheme.ToGdkColor (highlightStyle.SearchTextBg);
double b1 = Mono.TextEditor.HslColor.Brightness (searchColor);
double b2 = Mono.TextEditor.HslColor.Brightness (AdjustColor (Style.Base (StateType.Normal), highlightStyle.Default.Color));
double delta = Math.Abs (b1 - b2);
Reply all
Reply to author
Forward
0 new messages