mirror of
https://github.com/fadden/6502bench.git
synced 2025-07-24 22:25:06 +00:00
Add message list, part 1
This converts the "problem list viewer" tool to a grid that appears below the code list view when non-empty. Not all messages are problems, so it's being renamed to "message list".
This commit is contained in:
@@ -74,8 +74,6 @@ namespace SourceGen {
|
||||
public bool IsDebugAnalysisTimersOpen { get { return mShowAnalysisTimersDialog != null; } }
|
||||
private Tools.WpfGui.ShowText mShowAnalyzerOutputDialog;
|
||||
public bool IsDebugAnalyzerOutputOpen { get { return mShowAnalyzerOutputDialog != null; } }
|
||||
private Tools.WpfGui.ProblemListViewer mShowProblemListDialog;
|
||||
public bool IsDebugProblemListOpen { get { return mShowProblemListDialog != null; } }
|
||||
private Tools.WpfGui.ShowText mShowUndoRedoHistoryDialog;
|
||||
public bool IsDebugUndoRedoHistoryOpen { get { return mShowUndoRedoHistoryDialog != null; } }
|
||||
|
||||
@@ -893,10 +891,6 @@ namespace SourceGen {
|
||||
}
|
||||
}
|
||||
|
||||
if (mShowProblemListDialog != null) {
|
||||
mShowProblemListDialog.Update();
|
||||
}
|
||||
|
||||
if (FormatDescriptor.DebugCreateCount != 0) {
|
||||
Debug.WriteLine("FormatDescriptor total=" + FormatDescriptor.DebugCreateCount +
|
||||
" prefab=" + FormatDescriptor.DebugPrefabCount + " (" +
|
||||
@@ -937,6 +931,10 @@ namespace SourceGen {
|
||||
mReanalysisTimer.StartTask("Call DisasmProject.Analyze()");
|
||||
mProject.Analyze(reanalysisRequired, mGenerationLog, mReanalysisTimer);
|
||||
mReanalysisTimer.EndTask("Call DisasmProject.Analyze()");
|
||||
|
||||
mReanalysisTimer.StartTask("Update message list");
|
||||
UpdateMessageList();
|
||||
mReanalysisTimer.EndTask("Update message list");
|
||||
}
|
||||
|
||||
mReanalysisTimer.StartTask("Generate DisplayList");
|
||||
@@ -944,6 +942,14 @@ namespace SourceGen {
|
||||
mReanalysisTimer.EndTask("Generate DisplayList");
|
||||
}
|
||||
|
||||
private void UpdateMessageList() {
|
||||
List<MainWindow.MessageListItem> items = new List<MainWindow.MessageListItem>();
|
||||
foreach (MessageList.MessageEntry entry in mProject.Messages) {
|
||||
items.Add(MessageList.FormatMessage(entry, mOutputFormatter));
|
||||
}
|
||||
mMainWin.UpdateMessageList(items);
|
||||
}
|
||||
|
||||
#endregion Project management
|
||||
|
||||
#region Main window UI event handlers
|
||||
@@ -1243,7 +1249,6 @@ namespace SourceGen {
|
||||
mHexDumpDialog?.Close();
|
||||
mShowAnalysisTimersDialog?.Close();
|
||||
mShowAnalyzerOutputDialog?.Close();
|
||||
mShowProblemListDialog?.Close();
|
||||
mShowUndoRedoHistoryDialog?.Close();
|
||||
|
||||
while (mUnownedWindows.Count > 0) {
|
||||
@@ -1285,7 +1290,6 @@ namespace SourceGen {
|
||||
mHexDumpDialog?.Close();
|
||||
mShowAnalysisTimersDialog?.Close();
|
||||
mShowAnalyzerOutputDialog?.Close();
|
||||
mShowProblemListDialog?.Close();
|
||||
mShowUndoRedoHistoryDialog?.Close();
|
||||
|
||||
// Discard all project state.
|
||||
@@ -3679,22 +3683,6 @@ namespace SourceGen {
|
||||
}
|
||||
}
|
||||
|
||||
public void Debug_ShowProblemList() {
|
||||
if (mShowProblemListDialog == null) {
|
||||
Tools.WpfGui.ProblemListViewer dlg =
|
||||
new Tools.WpfGui.ProblemListViewer(null, mProject, mOutputFormatter);
|
||||
dlg.Closing += (sender, e) => {
|
||||
Debug.WriteLine("Problem list window closed");
|
||||
mShowProblemListDialog = null;
|
||||
};
|
||||
dlg.Show();
|
||||
mShowProblemListDialog = dlg;
|
||||
} else {
|
||||
// Ask the dialog to close. Do the cleanup in the event.
|
||||
mShowProblemListDialog.Close();
|
||||
}
|
||||
}
|
||||
|
||||
public void Debug_ShowUndoRedoHistory() {
|
||||
if (mShowUndoRedoHistoryDialog == null) {
|
||||
Tools.WpfGui.ShowText dlg = new Tools.WpfGui.ShowText(null,
|
||||
|
Reference in New Issue
Block a user