Browse Source

Rename Value to ValueProxy

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2021 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 19 years ago
parent
commit
01e82efe04
  1. 2
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/CallStackPad.cs
  2. 12
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/TreeListViewDebuggerItem.cs
  3. 2
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebuggerIcons.cs
  4. 20
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DynamicTreeDebuggerRow.cs
  5. 2
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs
  6. 2
      src/AddIns/Misc/Debugger/Debugger.BooInterpreter/Project/Src/DebugeeInterpreterContext.cs
  7. 6
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Exception.cs
  8. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs
  9. 12
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs
  10. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ArrayValue.cs
  11. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/CallFunctionEval.cs
  12. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/NullValue.cs
  13. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectValue.cs
  14. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/PrimitiveValue.cs
  15. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/UnavailableValue.cs
  16. 8
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs
  17. 6
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ValueEventArgs.cs
  18. 8
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Variable.cs
  19. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/VariableCollection.cs

2
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/CallStackPad.cs

@ -117,7 +117,7 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
} }
if (showArgumentValues) { if (showArgumentValues) {
try { try {
argValue = f.GetArgumentVariable(i).Value.AsString; argValue = f.GetArgumentVariable(i).ValueProxy.AsString;
} catch { } } catch { }
} }
if (parameterName != null && argValue != null) { if (parameterName != null && argValue != null) {

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

@ -71,18 +71,18 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
if (this.TreeListView != null) { if (this.TreeListView != null) {
((DebuggerTreeListView)this.TreeListView).DelayRefresh(); ((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[0].Text = Variable.Name;
this.SubItems[1].Text = Variable.Value.AsString; this.SubItems[1].Text = Variable.ValueProxy.AsString;
this.SubItems[2].Text = Variable.Value.Type; this.SubItems[2].Text = Variable.ValueProxy.Type;
this.ImageIndex = DebuggerIcons.GetImageListIndex(variable); this.ImageIndex = DebuggerIcons.GetImageListIndex(variable);
if (!IsExpanded) { if (!IsExpanded) {
// Show plus sign // Show plus sign
if (variable.Value.MayHaveSubVariables && Items.Count == 0) { if (variable.ValueProxy.MayHaveSubVariables && Items.Count == 0) {
TreeListViewItem dummy = new TreeListViewItem(); TreeListViewItem dummy = new TreeListViewItem();
this.AfterExpand += delegate { dummy.Remove(); }; this.AfterExpand += delegate { dummy.Remove(); };
Items.Add(dummy); Items.Add(dummy);
@ -97,8 +97,8 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
if (!populated) { if (!populated) {
Items.Clear(); Items.Clear();
// Do not sort names of array items // Do not sort names of array items
this.Items.SortOrder = variable.Value is ArrayValue ? SortOrder.None : SortOrder.Ascending; this.Items.SortOrder = variable.ValueProxy is ArrayValue ? SortOrder.None : SortOrder.Ascending;
LocalVarPad.AddVariableCollectionToTree(variable.Value.SubVariables, this.Items); LocalVarPad.AddVariableCollectionToTree(variable.ValueProxy.SubVariables, this.Items);
populated = true; populated = true;
} }
} }

2
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DebuggerIcons.cs

@ -41,7 +41,7 @@ namespace Debugger
public static int GetImageListIndex(Variable variable) public static int GetImageListIndex(Variable variable)
{ {
if (variable.Value is ObjectValue) { if (variable.ValueProxy is ObjectValue) {
return 0; // Class return 0; // Class
} else { } else {
return 1; // Field return 1; // Field

20
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/DynamicTreeDebuggerRow.cs

@ -88,22 +88,22 @@ namespace ICSharpCode.SharpDevelop.Services
image = DebuggerIcons.GetImage(variable); image = DebuggerIcons.GetImage(variable);
this[1].Text = ""; // Icon this[1].Text = ""; // Icon
this[2].Text = variable.Name; this[2].Text = variable.Name;
if (ShowValuesInHexadecimal && variable.Value is PrimitiveValue && variable.Value.IsInteger) { if (ShowValuesInHexadecimal && variable.ValueProxy is PrimitiveValue && variable.ValueProxy.IsInteger) {
this[3].Text = String.Format("0x{0:X}", (variable.Value as PrimitiveValue).Primitive); this[3].Text = String.Format("0x{0:X}", (variable.ValueProxy as PrimitiveValue).Primitive);
} else { } else {
this[3].Text = variable.Value.AsString; this[3].Text = variable.ValueProxy.AsString;
} }
this[3].AllowLabelEdit = variable.Value is PrimitiveValue && this[3].AllowLabelEdit = variable.ValueProxy is PrimitiveValue &&
variable.Value.ManagedType != typeof(string) && variable.ValueProxy.ManagedType != typeof(string) &&
!ShowValuesInHexadecimal; !ShowValuesInHexadecimal;
ObjectValue objValue = variable.Value as ObjectValue; ObjectValue objValue = variable.ValueProxy as ObjectValue;
if (objValue != null) { if (objValue != null) {
objValue.ToStringText.Changed -= Update; objValue.ToStringText.Changed -= Update;
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; this.ShowMinusWhileExpanded = true;
dirty = false; dirty = false;
@ -118,7 +118,7 @@ namespace ICSharpCode.SharpDevelop.Services
void OnLabelEdited(object sender, DynamicListEventArgs e) void OnLabelEdited(object sender, DynamicListEventArgs e)
{ {
PrimitiveValue val = (PrimitiveValue)variable.Value; PrimitiveValue val = (PrimitiveValue)variable.ValueProxy;
string newValue = ((DynamicListItem)sender).Text; string newValue = ((DynamicListItem)sender).Text;
try { try {
val.Primitive = newValue; val.Primitive = newValue;
@ -191,7 +191,7 @@ namespace ICSharpCode.SharpDevelop.Services
void Populate() void Populate()
{ {
Fill(this, Variable.Value.SubVariables); Fill(this, Variable.ValueProxy.SubVariables);
populated = true; populated = true;
} }

2
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs

@ -238,7 +238,7 @@ namespace ICSharpCode.SharpDevelop.Services
if (variable == null) { if (variable == null) {
return null; return null;
} else { } else {
return variable.Value.AsString; return variable.ValueProxy.AsString;
} }
} }

2
src/AddIns/Misc/Debugger/Debugger.BooInterpreter/Project/Src/DebugeeInterpreterContext.cs

@ -68,7 +68,7 @@ namespace Debugger
assembly = LoadAssembly(typeof(DebugeeInteractiveInterpreter).Assembly.Location); assembly = LoadAssembly(typeof(DebugeeInteractiveInterpreter).Assembly.Location);
Variable interpreterType = Eval.NewString(process, typeof(DebugeeInteractiveInterpreter).FullName); Variable interpreterType = Eval.NewString(process, typeof(DebugeeInteractiveInterpreter).FullName);
interpreter = Eval.CallFunction(process, typeof(Assembly), "CreateInstance", assembly, new Variable[] {interpreterType}); interpreter = Eval.CallFunction(process, typeof(Assembly), "CreateInstance", assembly, new Variable[] {interpreterType});
interpreter_localVariable = interpreter.Value.SubVariables["localVariable"]; interpreter_localVariable = interpreter.ValueProxy.SubVariables["localVariable"];
RunCommand( RunCommand(
"import System\n" + "import System\n" +
"import System.IO\n" + "import System.IO\n" +

6
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Exception.cs

@ -15,7 +15,7 @@ namespace Debugger
Process process; Process process;
Thread thread; Thread thread;
ICorDebugValue corValue; ICorDebugValue corValue;
Value runtimeValue; ValueProxy runtimeValue;
ObjectValueClass runtimeValueException; ObjectValueClass runtimeValueException;
ExceptionType exceptionType; ExceptionType exceptionType;
SourcecodeSegment location; SourcecodeSegment location;
@ -42,9 +42,9 @@ namespace Debugger
Variable.Flags.Default, Variable.Flags.Default,
new IExpirable[] {process.PauseSession}, new IExpirable[] {process.PauseSession},
new IMutable[] {}, new IMutable[] {},
delegate { return corValue; } ).Value; delegate { return corValue; } ).ValueProxy;
runtimeValueException = ((ObjectValue)runtimeValue).GetClass("System.Exception"); runtimeValueException = ((ObjectValue)runtimeValue).GetClass("System.Exception");
message = runtimeValueException.SubVariables["_message"].Value.AsString; message = runtimeValueException.SubVariables["_message"].ValueProxy.AsString;
if (thread.LastFunctionWithLoadedSymbols != null) { if (thread.LastFunctionWithLoadedSymbols != null) {
location = thread.LastFunctionWithLoadedSymbols.NextStatement; location = thread.LastFunctionWithLoadedSymbols.NextStatement;

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs

@ -404,7 +404,7 @@ namespace Debugger
get { get {
// TODO: Should work for static // TODO: Should work for static
if (!IsStatic) { if (!IsStatic) {
foreach(Variable var in ThisVariable.Value.SubVariables) { foreach(Variable var in ThisVariable.ValueProxy.SubVariables) {
yield return var; yield return var;
} }
} }

12
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs

@ -149,14 +149,14 @@ namespace Debugger
if (!HasBeenLoaded) return lastPriority; if (!HasBeenLoaded) return lastPriority;
if (process.IsRunning) return lastPriority; if (process.IsRunning) return lastPriority;
Value runTimeValue = RuntimeValue; ValueProxy runTimeValue = RuntimeValue;
if (runTimeValue is NullValue) return ThreadPriority.Normal; 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; return lastPriority;
} }
} }
public Value RuntimeValue { public ValueProxy RuntimeValue {
get { get {
if (!HasBeenLoaded) throw new DebuggerException("Thread has not started jet"); if (!HasBeenLoaded) throw new DebuggerException("Thread has not started jet");
process.AssertPaused(); process.AssertPaused();
@ -166,7 +166,7 @@ namespace Debugger
Variable.Flags.Default, Variable.Flags.Default,
new IExpirable[] {process.PauseSession}, new IExpirable[] {process.PauseSession},
new IMutable[] {}, new IMutable[] {},
delegate { return CorThread.Object;} ).Value; delegate { return CorThread.Object;} ).ValueProxy;
} }
} }
@ -174,9 +174,9 @@ namespace Debugger
get { get {
if (!HasBeenLoaded) return lastName; if (!HasBeenLoaded) return lastName;
if (process.IsRunning) return lastName; if (process.IsRunning) return lastName;
Value runtimeVar = RuntimeValue; ValueProxy runtimeVar = RuntimeValue;
if (runtimeVar is NullValue) return lastName; 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; if (runtimeName is NullValue) return string.Empty;
lastName = runtimeName.AsString.ToString(); lastName = runtimeName.AsString.ToString();
return lastName; return lastName;

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ArrayValue.cs

@ -13,7 +13,7 @@ using Debugger.Wrappers.CorDebug;
namespace Debugger namespace Debugger
{ {
public class ArrayValue: Value public class ArrayValue: ValueProxy
{ {
uint[] dimensions; uint[] dimensions;

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/CallFunctionEval.cs

@ -30,7 +30,7 @@ namespace Debugger
List<ICorDebugValue> corArgs = new List<ICorDebugValue>(); List<ICorDebugValue> corArgs = new List<ICorDebugValue>();
try { try {
if (thisValue != null) { if (thisValue != null) {
Value val = thisValue.Value; ValueProxy val = thisValue.ValueProxy;
if (!(val is ObjectValue)) { if (!(val is ObjectValue)) {
throw new EvalSetupException("Can not evaluate on a value which is not an object"); throw new EvalSetupException("Can not evaluate on a value which is not an object");
} }

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/NullValue.cs

@ -9,7 +9,7 @@ using System;
namespace Debugger namespace Debugger
{ {
public class NullValue: Value public class NullValue: ValueProxy
{ {
public override string AsString { public override string AsString {
get { get {

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectValue.cs

@ -11,7 +11,7 @@ using Debugger.Wrappers.CorDebug;
namespace Debugger namespace Debugger
{ {
public class ObjectValue: Value public class ObjectValue: ValueProxy
{ {
ObjectValueClass topClass; ObjectValueClass topClass;
Variable toStringText; Variable toStringText;

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/PrimitiveValue.cs

@ -11,7 +11,7 @@ using Debugger.Wrappers.CorDebug;
namespace Debugger namespace Debugger
{ {
public class PrimitiveValue: Value public class PrimitiveValue: ValueProxy
{ {
public override string AsString { public override string AsString {
get { get {

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/UnavailableValue.cs

@ -9,7 +9,7 @@ using System;
namespace Debugger namespace Debugger
{ {
public class UnavailableValue: Value public class UnavailableValue: ValueProxy
{ {
string message; string message;

8
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs

@ -10,7 +10,7 @@ using Debugger.Wrappers.CorDebug;
namespace Debugger namespace Debugger
{ {
public abstract class Value: RemotingObjectBase public abstract class ValueProxy: RemotingObjectBase
{ {
Variable variable; Variable variable;
@ -32,9 +32,9 @@ namespace Debugger
} }
} }
protected Value FreshValue { protected ValueProxy FreshValue {
get { 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"); if (variable == null) throw new ArgumentNullException("variable");
this.variable = variable; this.variable = variable;

6
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ValueEventArgs.cs

@ -12,15 +12,15 @@ namespace Debugger
[Serializable] [Serializable]
public class ValueEventArgs : ProcessEventArgs public class ValueEventArgs : ProcessEventArgs
{ {
Value val; ValueProxy val;
public Value Value { public ValueProxy ValueProxy {
get { get {
return val; return val;
} }
} }
public ValueEventArgs(Value val): base(val.Process) public ValueEventArgs(ValueProxy val): base(val.Process)
{ {
this.val = val; this.val = val;
} }

8
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Variable.cs

@ -48,7 +48,7 @@ namespace Debugger
CorValueGetter corValueGetter; CorValueGetter corValueGetter;
IMutable[] mutateDependencies; IMutable[] mutateDependencies;
protected Value currentValue; protected ValueProxy currentValue;
protected ICorDebugValue currentCorValue; protected ICorDebugValue currentCorValue;
protected PauseSession currentCorValuePauseSession; protected PauseSession currentCorValuePauseSession;
@ -89,7 +89,7 @@ namespace Debugger
} }
} }
public Value Value { public ValueProxy ValueProxy {
get { get {
if (currentValue == null) { if (currentValue == null) {
try { try {
@ -265,7 +265,7 @@ namespace Debugger
return corValue; return corValue;
} }
Value CreateValue() ValueProxy CreateValue()
{ {
ICorDebugValue corValue = this.CorValue; ICorDebugValue corValue = this.CorValue;
@ -273,7 +273,7 @@ namespace Debugger
return new NullValue(this); return new NullValue(this);
} }
CorElementType type = Value.GetCorType(corValue); CorElementType type = ValueProxy.GetCorType(corValue);
switch(type) { switch(type) {
case CorElementType.BOOLEAN: case CorElementType.BOOLEAN:

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/VariableCollection.cs

@ -94,7 +94,7 @@ namespace Debugger
if (index != -1) { if (index != -1) {
string rootVariable = variableName.Substring(0, index); string rootVariable = variableName.Substring(0, index);
string subVariable = variableName.Substring(index + 1); string subVariable = variableName.Substring(index + 1);
return this[rootVariable].Value.SubVariables[subVariable]; return this[rootVariable].ValueProxy.SubVariables[subVariable];
} else { } else {
foreach (Variable v in this) { foreach (Variable v in this) {
if (v.Name == variableName) return v; if (v.Name == variableName) return v;

Loading…
Cancel
Save