Author: toshok
Date: 2005-04-24 05:57:50 -0400 (Sun, 24 Apr 2005)
New Revision: 43511
Modified:
trunk/debugger/ChangeLog
trunk/debugger/frontend/Command.cs
Log:
2005-04-24 Chris Toshok <[EMAIL PROTECTED]>
* frontend/Command.cs (SetCommand): override DoResolve and
DoExecute so we can both handle debugger settings as well as
expressions representing assignments ("set lang auto" and "set x =
3", respectively).
Modified: trunk/debugger/ChangeLog
===================================================================
--- trunk/debugger/ChangeLog 2005-04-24 06:46:09 UTC (rev 43510)
+++ trunk/debugger/ChangeLog 2005-04-24 09:57:50 UTC (rev 43511)
@@ -1,3 +1,10 @@
+2005-04-24 Chris Toshok <[EMAIL PROTECTED]>
+
+ * frontend/Command.cs (SetCommand): override DoResolve and
+ DoExecute so we can both handle debugger settings as well as
+ expressions representing assignments ("set lang auto" and "set x =
+ 3", respectively).
+
2005-04-22 Chris Toshok <[EMAIL PROTECTED]>
* backends/MonoThreadManager.cs (MonoThreadManager.ThreadCreated):
Modified: trunk/debugger/frontend/Command.cs
===================================================================
--- trunk/debugger/frontend/Command.cs 2005-04-24 06:46:09 UTC (rev 43510)
+++ trunk/debugger/frontend/Command.cs 2005-04-24 09:57:50 UTC (rev 43511)
@@ -1219,6 +1219,8 @@
public class SetCommand : NestedCommand, IDocumentableCommand
{
+ Expression expr;
+
#region set subcommands
private class SetLangCommand : DebuggerCommand
{
@@ -1279,6 +1281,30 @@
RegisterSubcommand ("style", typeof (SetStyleCommand));
}
+ protected override bool DoResolve (ScriptingContext context)
+ {
+ if (Argument != "") {
+ Expression e = ParseExpression (context);
+ if (e is AssignmentExpression) {
+ expr = e.Resolve (context);
+ return (expr != null);
+ }
+ }
+
+ return base.DoResolve (context);
+ }
+
+ protected override void DoExecute (ScriptingContext context)
+ {
+ if (expr != null) {
+ expr.Evaluate (context);
+ }
+ else {
+ base.DoExecute (context);
+ }
+ }
+
+
// IDocumentableCommand
public CommandFamily Family { get { return
CommandFamily.Support; } }
public string Description { get { return "Set things."; } }
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches