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 @@ -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) {

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

@ -71,18 +71,18 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads @@ -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 @@ -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;
}
}

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

@ -41,7 +41,7 @@ namespace Debugger @@ -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

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

@ -88,22 +88,22 @@ namespace ICSharpCode.SharpDevelop.Services @@ -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 @@ -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 @@ -191,7 +191,7 @@ namespace ICSharpCode.SharpDevelop.Services
void Populate()
{
Fill(this, Variable.Value.SubVariables);
Fill(this, Variable.ValueProxy.SubVariables);
populated = true;
}

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

@ -238,7 +238,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -238,7 +238,7 @@ namespace ICSharpCode.SharpDevelop.Services
if (variable == null) {
return null;
} 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 @@ -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" +

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

@ -15,7 +15,7 @@ namespace Debugger @@ -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 @@ -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;

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

@ -404,7 +404,7 @@ namespace Debugger @@ -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;
}
}

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

@ -149,14 +149,14 @@ namespace Debugger @@ -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 @@ -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 @@ -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;

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

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

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

@ -30,7 +30,7 @@ namespace Debugger @@ -30,7 +30,7 @@ namespace Debugger
List<ICorDebugValue> corArgs = new List<ICorDebugValue>();
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");
}

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

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

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

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

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

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

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

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

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

@ -10,7 +10,7 @@ using Debugger.Wrappers.CorDebug; @@ -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 @@ -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 @@ -100,7 +100,7 @@ namespace Debugger
}
}
protected Value(Variable variable)
protected ValueProxy(Variable variable)
{
if (variable == null) throw new ArgumentNullException("variable");
this.variable = variable;

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

@ -12,15 +12,15 @@ namespace Debugger @@ -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;
}

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

@ -48,7 +48,7 @@ namespace Debugger @@ -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 @@ -89,7 +89,7 @@ namespace Debugger
}
}
public Value Value {
public ValueProxy ValueProxy {
get {
if (currentValue == null) {
try {
@ -265,7 +265,7 @@ namespace Debugger @@ -265,7 +265,7 @@ namespace Debugger
return corValue;
}
Value CreateValue()
ValueProxy CreateValue()
{
ICorDebugValue corValue = this.CorValue;
@ -273,7 +273,7 @@ namespace Debugger @@ -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:

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

@ -94,7 +94,7 @@ namespace Debugger @@ -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;

Loading…
Cancel
Save