From 01e82efe044009ea374c44c5ef3e421ba5a4ecaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Srbeck=C3=BD?= Date: Sat, 4 Nov 2006 16:49:04 +0000 Subject: [PATCH] Rename Value to ValueProxy git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2021 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Project/Src/Pads/CallStackPad.cs | 2 +- .../Src/Pads/TreeListViewDebuggerItem.cs | 12 +++++------ .../Project/Src/Service/DebuggerIcons.cs | 2 +- .../Src/Service/DynamicTreeDebuggerRow.cs | 20 +++++++++---------- .../Project/Src/Service/WindowsDebugger.cs | 2 +- .../Project/Src/DebugeeInterpreterContext.cs | 2 +- .../Project/Src/Threads/Exception.cs | 6 +++--- .../Project/Src/Threads/Function.cs | 2 +- .../Project/Src/Threads/Thread.cs | 12 +++++------ .../Project/Src/Variables/ArrayValue.cs | 2 +- .../Src/Variables/Evals/CallFunctionEval.cs | 2 +- .../Project/Src/Variables/NullValue.cs | 2 +- .../Project/Src/Variables/ObjectValue.cs | 2 +- .../Project/Src/Variables/PrimitiveValue.cs | 2 +- .../Project/Src/Variables/UnavailableValue.cs | 2 +- .../Project/Src/Variables/Value.cs | 8 ++++---- .../Project/Src/Variables/ValueEventArgs.cs | 6 +++--- .../Project/Src/Variables/Variable.cs | 8 ++++---- .../Src/Variables/VariableCollection.cs | 2 +- 19 files changed, 48 insertions(+), 48 deletions(-) diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/CallStackPad.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/CallStackPad.cs index a0d5ef499a..ca4d01dfc9 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/CallStackPad.cs +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/CallStackPad.cs @@ -117,7 +117,7 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads } if (showArgumentValues) { try { - argValue = f.GetArgumentVariable(i).Value.AsString; + argValue = f.GetArgumentVariable(i).ValueProxy.AsString; } catch { } } if (parameterName != null && argValue != null) { diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/TreeListViewDebuggerItem.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/TreeListViewDebuggerItem.cs index 1205ff1f85..58aff74b4e 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/TreeListViewDebuggerItem.cs +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/TreeListViewDebuggerItem.cs @@ -71,18 +71,18 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads if (this.TreeListView != null) { ((DebuggerTreeListView)this.TreeListView).DelayRefresh(); - Highlight = (Variable.Value.AsString != SubItems[1].Text); + Highlight = (Variable.ValueProxy.AsString != SubItems[1].Text); } this.SubItems[0].Text = Variable.Name; - this.SubItems[1].Text = Variable.Value.AsString; - this.SubItems[2].Text = Variable.Value.Type; + this.SubItems[1].Text = Variable.ValueProxy.AsString; + this.SubItems[2].Text = Variable.ValueProxy.Type; this.ImageIndex = DebuggerIcons.GetImageListIndex(variable); if (!IsExpanded) { // Show plus sign - if (variable.Value.MayHaveSubVariables && Items.Count == 0) { + if (variable.ValueProxy.MayHaveSubVariables && Items.Count == 0) { TreeListViewItem dummy = new TreeListViewItem(); this.AfterExpand += delegate { dummy.Remove(); }; Items.Add(dummy); @@ -97,8 +97,8 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads if (!populated) { Items.Clear(); // Do not sort names of array items - this.Items.SortOrder = variable.Value is ArrayValue ? SortOrder.None : SortOrder.Ascending; - LocalVarPad.AddVariableCollectionToTree(variable.Value.SubVariables, this.Items); + this.Items.SortOrder = variable.ValueProxy is ArrayValue ? SortOrder.None : SortOrder.Ascending; + LocalVarPad.AddVariableCollectionToTree(variable.ValueProxy.SubVariables, this.Items); populated = true; } } diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebuggerIcons.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebuggerIcons.cs index bd6a133fd5..41d4881dba 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebuggerIcons.cs +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebuggerIcons.cs @@ -41,7 +41,7 @@ namespace Debugger public static int GetImageListIndex(Variable variable) { - if (variable.Value is ObjectValue) { + if (variable.ValueProxy is ObjectValue) { return 0; // Class } else { return 1; // Field diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DynamicTreeDebuggerRow.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DynamicTreeDebuggerRow.cs index 764abbfe78..1a248e4772 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DynamicTreeDebuggerRow.cs +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DynamicTreeDebuggerRow.cs @@ -88,22 +88,22 @@ namespace ICSharpCode.SharpDevelop.Services image = DebuggerIcons.GetImage(variable); this[1].Text = ""; // Icon this[2].Text = variable.Name; - if (ShowValuesInHexadecimal && variable.Value is PrimitiveValue && variable.Value.IsInteger) { - this[3].Text = String.Format("0x{0:X}", (variable.Value as PrimitiveValue).Primitive); + if (ShowValuesInHexadecimal && variable.ValueProxy is PrimitiveValue && variable.ValueProxy.IsInteger) { + this[3].Text = String.Format("0x{0:X}", (variable.ValueProxy as PrimitiveValue).Primitive); } else { - this[3].Text = variable.Value.AsString; + this[3].Text = variable.ValueProxy.AsString; } - this[3].AllowLabelEdit = variable.Value is PrimitiveValue && - variable.Value.ManagedType != typeof(string) && + this[3].AllowLabelEdit = variable.ValueProxy is PrimitiveValue && + variable.ValueProxy.ManagedType != typeof(string) && !ShowValuesInHexadecimal; - ObjectValue objValue = variable.Value as ObjectValue; + ObjectValue objValue = variable.ValueProxy as ObjectValue; if (objValue != null) { objValue.ToStringText.Changed -= Update; objValue.ToStringText.Changed += Update; - this[3].Text = objValue.ToStringText.Value.AsString; + this[3].Text = objValue.ToStringText.ValueProxy.AsString; } - this.ShowPlus = variable.Value.MayHaveSubVariables; + this.ShowPlus = variable.ValueProxy.MayHaveSubVariables; this.ShowMinusWhileExpanded = true; dirty = false; @@ -118,7 +118,7 @@ namespace ICSharpCode.SharpDevelop.Services void OnLabelEdited(object sender, DynamicListEventArgs e) { - PrimitiveValue val = (PrimitiveValue)variable.Value; + PrimitiveValue val = (PrimitiveValue)variable.ValueProxy; string newValue = ((DynamicListItem)sender).Text; try { val.Primitive = newValue; @@ -191,7 +191,7 @@ namespace ICSharpCode.SharpDevelop.Services void Populate() { - Fill(this, Variable.Value.SubVariables); + Fill(this, Variable.ValueProxy.SubVariables); populated = true; } diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs index eaf8b247a3..fb4dd66e39 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs @@ -238,7 +238,7 @@ namespace ICSharpCode.SharpDevelop.Services if (variable == null) { return null; } else { - return variable.Value.AsString; + return variable.ValueProxy.AsString; } } diff --git a/src/AddIns/Misc/Debugger/Debugger.BooInterpreter/Project/Src/DebugeeInterpreterContext.cs b/src/AddIns/Misc/Debugger/Debugger.BooInterpreter/Project/Src/DebugeeInterpreterContext.cs index a8cffa5bc2..3dae1b7a39 100644 --- a/src/AddIns/Misc/Debugger/Debugger.BooInterpreter/Project/Src/DebugeeInterpreterContext.cs +++ b/src/AddIns/Misc/Debugger/Debugger.BooInterpreter/Project/Src/DebugeeInterpreterContext.cs @@ -68,7 +68,7 @@ namespace Debugger assembly = LoadAssembly(typeof(DebugeeInteractiveInterpreter).Assembly.Location); Variable interpreterType = Eval.NewString(process, typeof(DebugeeInteractiveInterpreter).FullName); interpreter = Eval.CallFunction(process, typeof(Assembly), "CreateInstance", assembly, new Variable[] {interpreterType}); - interpreter_localVariable = interpreter.Value.SubVariables["localVariable"]; + interpreter_localVariable = interpreter.ValueProxy.SubVariables["localVariable"]; RunCommand( "import System\n" + "import System.IO\n" + diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Exception.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Exception.cs index 68b74a5dfa..af1ba4b338 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Exception.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Exception.cs @@ -15,7 +15,7 @@ namespace Debugger Process process; Thread thread; ICorDebugValue corValue; - Value runtimeValue; + ValueProxy runtimeValue; ObjectValueClass runtimeValueException; ExceptionType exceptionType; SourcecodeSegment location; @@ -42,9 +42,9 @@ namespace Debugger Variable.Flags.Default, new IExpirable[] {process.PauseSession}, new IMutable[] {}, - delegate { return corValue; } ).Value; + delegate { return corValue; } ).ValueProxy; runtimeValueException = ((ObjectValue)runtimeValue).GetClass("System.Exception"); - message = runtimeValueException.SubVariables["_message"].Value.AsString; + message = runtimeValueException.SubVariables["_message"].ValueProxy.AsString; if (thread.LastFunctionWithLoadedSymbols != null) { location = thread.LastFunctionWithLoadedSymbols.NextStatement; diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs index 55531caf04..e637848d39 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs @@ -404,7 +404,7 @@ namespace Debugger get { // TODO: Should work for static if (!IsStatic) { - foreach(Variable var in ThisVariable.Value.SubVariables) { + foreach(Variable var in ThisVariable.ValueProxy.SubVariables) { yield return var; } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs index 32cedfb87a..4281118d11 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs @@ -149,14 +149,14 @@ namespace Debugger if (!HasBeenLoaded) return lastPriority; if (process.IsRunning) return lastPriority; - Value runTimeValue = RuntimeValue; + ValueProxy runTimeValue = RuntimeValue; if (runTimeValue is NullValue) return ThreadPriority.Normal; - lastPriority = (ThreadPriority)(int)(runTimeValue["m_Priority"].Value as PrimitiveValue).Primitive; + lastPriority = (ThreadPriority)(int)(runTimeValue["m_Priority"].ValueProxy as PrimitiveValue).Primitive; return lastPriority; } } - public Value RuntimeValue { + public ValueProxy RuntimeValue { get { if (!HasBeenLoaded) throw new DebuggerException("Thread has not started jet"); process.AssertPaused(); @@ -166,7 +166,7 @@ namespace Debugger Variable.Flags.Default, new IExpirable[] {process.PauseSession}, new IMutable[] {}, - delegate { return CorThread.Object;} ).Value; + delegate { return CorThread.Object;} ).ValueProxy; } } @@ -174,9 +174,9 @@ namespace Debugger get { if (!HasBeenLoaded) return lastName; if (process.IsRunning) return lastName; - Value runtimeVar = RuntimeValue; + ValueProxy runtimeVar = RuntimeValue; if (runtimeVar is NullValue) return lastName; - Value runtimeName = runtimeVar["m_Name"].Value; + ValueProxy runtimeName = runtimeVar["m_Name"].ValueProxy; if (runtimeName is NullValue) return string.Empty; lastName = runtimeName.AsString.ToString(); return lastName; diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ArrayValue.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ArrayValue.cs index 6bcc5cbe01..c3cfeef512 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ArrayValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ArrayValue.cs @@ -13,7 +13,7 @@ using Debugger.Wrappers.CorDebug; namespace Debugger { - public class ArrayValue: Value + public class ArrayValue: ValueProxy { uint[] dimensions; diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/CallFunctionEval.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/CallFunctionEval.cs index b67a33bf3a..0ce91198f9 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/CallFunctionEval.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/CallFunctionEval.cs @@ -30,7 +30,7 @@ namespace Debugger List corArgs = new List(); try { if (thisValue != null) { - Value val = thisValue.Value; + ValueProxy val = thisValue.ValueProxy; if (!(val is ObjectValue)) { throw new EvalSetupException("Can not evaluate on a value which is not an object"); } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/NullValue.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/NullValue.cs index 76e0bba9bd..d70bfd3833 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/NullValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/NullValue.cs @@ -9,7 +9,7 @@ using System; namespace Debugger { - public class NullValue: Value + public class NullValue: ValueProxy { public override string AsString { get { diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectValue.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectValue.cs index b976d900dc..0fbd089813 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectValue.cs @@ -11,7 +11,7 @@ using Debugger.Wrappers.CorDebug; namespace Debugger { - public class ObjectValue: Value + public class ObjectValue: ValueProxy { ObjectValueClass topClass; Variable toStringText; diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/PrimitiveValue.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/PrimitiveValue.cs index 71ab8b9dcf..a6f108b719 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/PrimitiveValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/PrimitiveValue.cs @@ -11,7 +11,7 @@ using Debugger.Wrappers.CorDebug; namespace Debugger { - public class PrimitiveValue: Value + public class PrimitiveValue: ValueProxy { public override string AsString { get { diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/UnavailableValue.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/UnavailableValue.cs index e9ed4c2fbb..59f21e4737 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/UnavailableValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/UnavailableValue.cs @@ -9,7 +9,7 @@ using System; namespace Debugger { - public class UnavailableValue: Value + public class UnavailableValue: ValueProxy { string message; diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs index d2cb077cf4..68495436d5 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs @@ -10,7 +10,7 @@ using Debugger.Wrappers.CorDebug; namespace Debugger { - public abstract class Value: RemotingObjectBase + public abstract class ValueProxy: RemotingObjectBase { Variable variable; @@ -32,9 +32,9 @@ namespace Debugger } } - protected Value FreshValue { + protected ValueProxy FreshValue { get { - return variable.Value; + return variable.ValueProxy; } } @@ -100,7 +100,7 @@ namespace Debugger } } - protected Value(Variable variable) + protected ValueProxy(Variable variable) { if (variable == null) throw new ArgumentNullException("variable"); this.variable = variable; diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ValueEventArgs.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ValueEventArgs.cs index 4095ea7c2f..5ec4075537 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ValueEventArgs.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ValueEventArgs.cs @@ -12,15 +12,15 @@ namespace Debugger [Serializable] public class ValueEventArgs : ProcessEventArgs { - Value val; + ValueProxy val; - public Value Value { + public ValueProxy ValueProxy { get { return val; } } - public ValueEventArgs(Value val): base(val.Process) + public ValueEventArgs(ValueProxy val): base(val.Process) { this.val = val; } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Variable.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Variable.cs index 97bd9e1c3a..f3b9762e3e 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Variable.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Variable.cs @@ -48,7 +48,7 @@ namespace Debugger CorValueGetter corValueGetter; IMutable[] mutateDependencies; - protected Value currentValue; + protected ValueProxy currentValue; protected ICorDebugValue currentCorValue; protected PauseSession currentCorValuePauseSession; @@ -89,7 +89,7 @@ namespace Debugger } } - public Value Value { + public ValueProxy ValueProxy { get { if (currentValue == null) { try { @@ -265,7 +265,7 @@ namespace Debugger return corValue; } - Value CreateValue() + ValueProxy CreateValue() { ICorDebugValue corValue = this.CorValue; @@ -273,7 +273,7 @@ namespace Debugger return new NullValue(this); } - CorElementType type = Value.GetCorType(corValue); + CorElementType type = ValueProxy.GetCorType(corValue); switch(type) { case CorElementType.BOOLEAN: diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/VariableCollection.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/VariableCollection.cs index 8c2a0af431..b1e90a1881 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/VariableCollection.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/VariableCollection.cs @@ -94,7 +94,7 @@ namespace Debugger if (index != -1) { string rootVariable = variableName.Substring(0, index); string subVariable = variableName.Substring(index + 1); - return this[rootVariable].Value.SubVariables[subVariable]; + return this[rootVariable].ValueProxy.SubVariables[subVariable]; } else { foreach (Variable v in this) { if (v.Name == variableName) return v;