Browse Source

More cleanup.

pull/16/merge
mkonicek 14 years ago
parent
commit
58713b7b45
  1. 9
      src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/ObjectGraphControl.xaml.cs
  2. 16
      src/AddIns/Debugger/Debugger.AddIn/Visualizers/GridVisualizer/GridVisualizerWindow.xaml.cs

9
src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/ObjectGraphControl.xaml.cs

@ -38,7 +38,7 @@ namespace Debugger.AddIn.Visualizers.Graph @@ -38,7 +38,7 @@ namespace Debugger.AddIn.Visualizers.Graph
static double mouseWheelZoomSpeed = 0.05;
/// <summary> Long-lived map telling which graph nodes and content nodes the user expanded. </summary>
/// <summary> Tells which graph nodes and content nodes the user expanded. </summary>
static Expanded expanded = new Expanded();
public ObjectGraphControl()
@ -62,10 +62,6 @@ namespace Debugger.AddIn.Visualizers.Graph @@ -62,10 +62,6 @@ namespace Debugger.AddIn.Visualizers.Graph
public void Refresh()
{
// Almost all of the blocking is done ContentPropertyNode.Evaluate,
// which is being called by WPF for all the properties.
// It would be better if we were filling the node texts ourselves in a loop,
// so that we could cancel any time. UI would redraw gradually thanks to INotifyPropertyChanged.
try {
Debugger.AddIn.TreeModel.Utils.DoEvents(debuggerService.DebuggedProcess);
} catch(AbortedBecauseDebuggeeResumedException) {
@ -80,7 +76,6 @@ namespace Debugger.AddIn.Visualizers.Graph @@ -80,7 +76,6 @@ namespace Debugger.AddIn.Visualizers.Graph
return;
}
if (debuggerService.IsProcessRunning) {
// "Process not paused" exception still occurs
ErrorMessage("Cannot inspect when the process is running.");
return;
}
@ -166,7 +161,6 @@ namespace Debugger.AddIn.Visualizers.Graph @@ -166,7 +161,6 @@ namespace Debugger.AddIn.Visualizers.Graph
{
this.txtError.Text = message;
this.pnlError.Visibility = Visibility.Visible;
//MessageBox.Show(ex.Message, "Exception", MessageBoxButton.OK, MessageBoxImage.Error);
}
void RegisterExpandCollapseEvents(PositionedGraph posGraph)
@ -197,7 +191,6 @@ namespace Debugger.AddIn.Visualizers.Graph @@ -197,7 +191,6 @@ namespace Debugger.AddIn.Visualizers.Graph
expanded.Expressions.SetExpanded(e.Property.Expression);
// add edge (+ possibly nodes) to underlying object graph (no need to fully rebuild)
// TODO can add more nodes if they are expanded - now this adds always one node
e.Property.ObjectGraphProperty.TargetNode = this.objectGraphBuilder.ObtainNodeForExpression(e.Property.Expression);
LayoutGraph(this.objectGraph);
}

16
src/AddIns/Debugger/Debugger.AddIn/Visualizers/GridVisualizer/GridVisualizerWindow.xaml.cs

@ -13,11 +13,11 @@ using System.Windows.Data; @@ -13,11 +13,11 @@ using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using Debugger.AddIn.TreeModel;
using Debugger.AddIn.Visualizers.PresentationBindings;
using Debugger.AddIn.Visualizers.Utils;
using Debugger.MetaData;
using ICSharpCode.Core;
using ICSharpCode.NRefactory.Ast;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Debugging;
@ -117,8 +117,8 @@ namespace Debugger.AddIn.Visualizers.GridVisualizer @@ -117,8 +117,8 @@ namespace Debugger.AddIn.Visualizers.GridVisualizer
try {
shownExpr = debuggerService.GetExpression(txtExpression.Text);
shownValue = shownExpr.Evaluate(debuggerService.DebuggedProcess);
} catch(GetValueException) {
// display ex.Message
} catch(GetValueException e) {
MessageService.ShowMessage(e.Message);
}
if (shownValue != null && !shownValue.IsNull) {
GridValuesProvider gridValuesProvider;
@ -134,7 +134,7 @@ namespace Debugger.AddIn.Visualizers.GridVisualizer @@ -134,7 +134,7 @@ namespace Debugger.AddIn.Visualizers.GridVisualizer
var debugListExpression = DebuggerHelpers.CreateDebugListExpression(shownExpr, itemType, out debugListType);
gridValuesProvider = CreateListValuesProvider(debugListExpression, itemType);
} else {
// Value cannot be displayed in GridVisualizer
// Not IList or IEnumerable<T> - can't be displayed in GridVisualizer
return;
}
}
@ -144,10 +144,10 @@ namespace Debugger.AddIn.Visualizers.GridVisualizer @@ -144,10 +144,10 @@ namespace Debugger.AddIn.Visualizers.GridVisualizer
this.columnHider = new GridViewColumnHider((GridView)this.listView.View);
cmbColumns.ItemsSource = this.columnHider.HideableColumns;
}
} catch (GetValueException) {
// display ex msg
} catch (DebuggerVisualizerException) {
// display ex msg
} catch (GetValueException e) {
MessageService.ShowMessage(e.Message);
} catch (DebuggerVisualizerException e) {
MessageService.ShowMessage(e.Message);
}
}

Loading…
Cancel
Save