Browse Source

Fixed SD2-1503. Invalid expression error message prompt displayed by watch window.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3740 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 17 years ago
parent
commit
6e80d05d88
  1. 12
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/WatchPad.cs

12
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/WatchPad.cs

@ -45,6 +45,14 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads @@ -45,6 +45,14 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
}
}
public class ErrorInfoNode : ICorDebug.InfoNode
{
public ErrorInfoNode(string name, string text) : base(name, text)
{
Image = IconService.GetBitmap("Icons.16x16.Error");
}
}
public sealed class WatchItemName: NodeTextBox {
public WatchItemName()
{
@ -239,7 +247,9 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads @@ -239,7 +247,9 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
nodes.Add(new TreeViewVarNode(debuggedProcess, watchList, valNode));
} catch (GetValueException) {
MessageService.ShowError(string.Format(StringParser.Parse("${res:MainWindow.Windows.Debug.Watch.InvalidExpression}"), nod.Content.Name));
string error = String.Format(StringParser.Parse("${res:MainWindow.Windows.Debug.Watch.InvalidExpression}"), nod.Content.Name);
ErrorInfoNode infoNode = new ErrorInfoNode(nod.Content.Name, error);
nodes.Add(new TreeViewVarNode(debuggedProcess, watchList, infoNode));
}
}

Loading…
Cancel
Save