Browse Source

Fixed two bugs in the HighlightingEditor (might fix forum-7900).

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3118 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 17 years ago
parent
commit
a1093526c3
  1. 2
      src/AddIns/Misc/HighlightingEditor/Project/Src/EditHighlightingPanel.cs
  2. 8
      src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/EnvironmentNode.cs

2
src/AddIns/Misc/HighlightingEditor/Project/Src/EditHighlightingPanel.cs

@ -225,6 +225,8 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -225,6 +225,8 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
private SchemeNode LoadFile(XmlTextReader reader, bool userList, string name)
{
if (reader == null)
return null;
errors.Clear();
try {
XmlValidatingReader validatingReader = new XmlValidatingReader(reader);

8
src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/EnvironmentNode.cs

@ -20,8 +20,8 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -20,8 +20,8 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
{
class EnvironmentNode : AbstractNode
{
public static string[] ColorNames;
public string[] ColorDescs;
public string[] ColorNames;
public string[] ColorDescs;
public EditorHighlightColor[] Colors;
const string CustomColorPrefix = "Custom$";
@ -55,7 +55,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -55,7 +55,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
}
}
EnvironmentNode.ColorNames = envColorNames.ToArray();
this.ColorNames = envColorNames.ToArray();
this.ColorDescs = envColorDescriptions.ToArray();
this.Colors = envColors.ToArray();
StringParser.Parse(ColorDescs);
@ -116,7 +116,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -116,7 +116,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
EnvironmentNode node = (EnvironmentNode)parent;
listView.Items.Clear();
for (int i = 0; i <= EnvironmentNode.ColorNames.GetUpperBound(0); ++i) {
for (int i = 0; i <= node.ColorNames.GetUpperBound(0); ++i) {
listView.Items.Add(new EnvironmentItem(i, node.ColorDescs[i], node.Colors[i], listView.Font));
}
}

Loading…
Cancel
Save