|
|
|
@ -90,11 +90,56 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
@@ -90,11 +90,56 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
|
|
|
|
|
AddVariableToTree(e.Variable, tree); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
List<Variable> publicStatic = new List<Variable>(); |
|
|
|
|
List<Variable> publicInstance = new List<Variable>(); |
|
|
|
|
List<Variable> privateStatic = new List<Variable>(); |
|
|
|
|
List<Variable> privateInstance = new List<Variable>(); |
|
|
|
|
|
|
|
|
|
foreach(Variable variable in varCollection) { |
|
|
|
|
ClassVariable classVariable = variable as ClassVariable; |
|
|
|
|
if (classVariable == null) { |
|
|
|
|
publicInstance.Add(variable); |
|
|
|
|
} else { |
|
|
|
|
if (classVariable.IsPublic) { |
|
|
|
|
if (classVariable.IsStatic) { |
|
|
|
|
publicStatic.Add(variable); |
|
|
|
|
} else { |
|
|
|
|
publicInstance.Add(variable); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
if (classVariable.IsStatic) { |
|
|
|
|
privateStatic.Add(variable); |
|
|
|
|
} else { |
|
|
|
|
privateInstance.Add(variable); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (privateInstance.Count > 0) { |
|
|
|
|
AddMenu("<Private Members>", privateInstance, tree); |
|
|
|
|
} |
|
|
|
|
if (publicStatic.Count > 0) { |
|
|
|
|
AddMenu("<Public Static Members>", publicStatic, tree); |
|
|
|
|
} |
|
|
|
|
if (privateStatic.Count > 0) { |
|
|
|
|
AddMenu("<Private Static Members>", privateStatic, tree); |
|
|
|
|
} |
|
|
|
|
// Public Members
|
|
|
|
|
foreach(Variable variable in publicInstance) { |
|
|
|
|
AddVariableToTree(variable, tree); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void AddMenu(string name, List<Variable> variables, TreeListViewItemCollection tree) |
|
|
|
|
{ |
|
|
|
|
TreeListViewItem menu = new TreeListViewItem(name, 0); |
|
|
|
|
tree.Add(menu); |
|
|
|
|
foreach(Variable variable in variables) { |
|
|
|
|
AddVariableToTree(variable, menu.Items); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void AddVariableToTree(Variable variableToAdd, TreeListViewItemCollection tree) |
|
|
|
|
{ |
|
|
|
|
TreeListViewDebuggerItem newItem = new TreeListViewDebuggerItem(variableToAdd); |
|
|
|
@ -105,7 +150,9 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
@@ -105,7 +150,9 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
|
|
|
|
|
private void localVarList_BeforeExpand(object sender, TreeListViewCancelEventArgs e) |
|
|
|
|
{ |
|
|
|
|
if (debuggerCore.IsPaused) { |
|
|
|
|
((TreeListViewDebuggerItem)e.Item).BeforeExpand(); |
|
|
|
|
if (e.Item is TreeListViewDebuggerItem) { |
|
|
|
|
((TreeListViewDebuggerItem)e.Item).BeforeExpand(); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
MessageBox.Show("You can not explore variables while the debuggee is running."); |
|
|
|
|
e.Cancel = true; |
|
|
|
|