1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-12-01 22:50:35 +00:00
6502bench/SourceGen/Tools/WpfGui/ProblemListViewer.xaml
Andy McFadden 41cd30a8c6 Add Problem List Viewer to debug menu
The analyzer sometimes runs into things that don't seem right, like
hidden labels or references to non-existent symbols, but has no way
to report them.  This adds a problem viewer.

I'm not quite ready to turn this into a real feature, so for now it's
a free-floating window accessed from the debug menu.

Also, updated some documentation.
2019-09-21 13:43:01 -07:00

62 lines
2.9 KiB
XML

<!--
Copyright 2019 faddenSoft
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<Window x:Class="SourceGen.Tools.WpfGui.ProblemListViewer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SourceGen.Tools.WpfGui"
xmlns:system="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d"
Title="Problems" ShowInTaskbar="True"
Height="500" Width="500" ResizeMode="CanResizeWithGrip"
Loaded="Window_Loaded">
<Window.Resources>
<system:String x:Key="str_HiddenLabel">Hidden label</system:String>
<system:String x:Key="str_UnresolvedWeakRef">Ref'd symbol not found</system:String>
<system:String x:Key="str_LabelIgnored">Label ignored</system:String>
<system:String x:Key="str_FormatDescriptorIgnored">Format ignored</system:String>
</Window.Resources>
<DockPanel Margin="8">
<TextBlock DockPanel.Dock="Top" Text="Problems detected during analysis:"/>
<DataGrid DockPanel.Dock="Bottom" Name="problemsGrid" Margin="0,4,0,0"
IsReadOnly="True"
ItemsSource="{Binding FormattedProblems}"
FontFamily="{StaticResource GeneralMonoFont}"
SnapsToDevicePixels="True"
GridLinesVisibility="Vertical"
VerticalGridLinesBrush="#FF7F7F7F"
AutoGenerateColumns="False"
HeadersVisibility="Column"
CanUserReorderColumns="False"
SelectionMode="Single">
<!-- should probably add ellipsis: https://stackoverflow.com/a/12880111/294248 -->
<DataGrid.Columns>
<DataGridTextColumn Header="Severity" Width="64" Binding="{Binding Severity}"/>
<DataGridTextColumn Header="Offset" Width="53" Binding="{Binding Offset}"/>
<DataGridTextColumn Header="Type" Width="119" Binding="{Binding Type}"/>
<DataGridTextColumn Header="Context" Width="119" Binding="{Binding Context}"/>
<DataGridTextColumn Header="Resolution" Width="119" Binding="{Binding Resolution}"/>
</DataGrid.Columns>
</DataGrid>
</DockPanel>
</Window>