Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More cleanup.

  • Loading branch information...
commit 58713b7b457b63b68e762380e3f740ca850b9629 1 parent 7d86f20
Martin Konicek mkonicek authored
9 src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/ObjectGraphControl.xaml.cs
View
@@ -38,7 +38,7 @@ public partial class ObjectGraphControl : UserControl
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 @@ public void Clear()
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 @@ public void Refresh()
return;
}
if (debuggerService.IsProcessRunning) {
- // "Process not paused" exception still occurs
ErrorMessage("Cannot inspect when the process is running.");
return;
}
@@ -166,7 +161,6 @@ void ErrorMessage(string message)
{
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 @@ void node_PropertyExpanded(object sender, PositionedPropertyEventArgs e)
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
View
@@ -13,11 +13,11 @@
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 @@ public void Refresh()
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 @@ public void Refresh()
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 @@ public void Refresh()
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);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.