2019-04-29 23:34:09 +00:00
|
|
|
<!--
|
|
|
|
Copyright 2019 faddenSoft
|
2019-06-16 23:34:47 +00:00
|
|
|
|
2019-04-29 23:34:09 +00:00
|
|
|
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.
|
|
|
|
-->
|
2019-05-23 20:38:41 +00:00
|
|
|
|
2019-07-20 20:28:10 +00:00
|
|
|
<Window x:Class="SourceGen.WpfGui.MainWindow"
|
2019-04-29 23:34:09 +00:00
|
|
|
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"
|
2019-07-20 20:28:10 +00:00
|
|
|
xmlns:local="clr-namespace:SourceGen.WpfGui"
|
2019-10-20 21:40:32 +00:00
|
|
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
2019-04-29 23:34:09 +00:00
|
|
|
mc:Ignorable="d"
|
2019-05-03 22:43:16 +00:00
|
|
|
Title="6502bench SourceGen"
|
2019-07-20 20:28:10 +00:00
|
|
|
Icon="/SourceGen;component/Res/SourceGenIcon.ico"
|
2019-12-11 01:41:00 +00:00
|
|
|
Width="1200" Height="700" MinWidth="800" MinHeight="500" ResizeMode="CanResizeWithGrip"
|
2019-06-19 23:31:56 +00:00
|
|
|
SourceInitialized="Window_SourceInitialized"
|
2019-06-12 01:45:08 +00:00
|
|
|
Loaded="Window_Loaded"
|
2019-06-19 23:31:56 +00:00
|
|
|
LocationChanged="Window_LocationChanged"
|
|
|
|
SizeChanged="Window_SizeChanged"
|
|
|
|
MouseDown="Window_MouseDown"
|
|
|
|
Closing="Window_Closing">
|
2019-04-29 23:34:09 +00:00
|
|
|
|
|
|
|
<Window.Resources>
|
2019-05-23 20:38:41 +00:00
|
|
|
<ResourceDictionary>
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
|
|
<ResourceDictionary Source="CodeListItemStyle.xaml"/>
|
2019-10-13 00:23:32 +00:00
|
|
|
<ResourceDictionary Source="/Res/CommandIcons.xaml"/>
|
|
|
|
<!--<ResourceDictionary Source="/Res/Theme_Light.xaml"/>-->
|
2019-05-23 20:38:41 +00:00
|
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
|
2019-07-15 22:32:27 +00:00
|
|
|
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
|
|
|
|
|
2019-10-21 01:02:23 +00:00
|
|
|
<!-- strings for message button -->
|
|
|
|
<system:String x:Key="str_MessageSingularFmt">{0} message</system:String>
|
|
|
|
<system:String x:Key="str_MessageSingularWarningFmt">{0} message ({1} warning/error)</system:String>
|
|
|
|
<system:String x:Key="str_MessagePluralFmt">{0} messages</system:String>
|
|
|
|
<system:String x:Key="str_MessagePluralWarningFmt">{0} messages ({1} warning/error)</system:String>
|
|
|
|
|
2019-05-23 20:38:41 +00:00
|
|
|
<!-- don't center the ListView(GridView) column headers
|
|
|
|
https://stackoverflow.com/q/44119146/294248
|
|
|
|
(style without ID applies to all instances of that type)
|
2019-05-12 23:27:28 +00:00
|
|
|
-->
|
2019-05-23 20:38:41 +00:00
|
|
|
<Style TargetType="{x:Type GridViewColumnHeader}">
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
|
|
|
</Style>
|
2019-05-28 01:46:09 +00:00
|
|
|
|
2019-07-06 22:51:57 +00:00
|
|
|
<RoutedUICommand x:Key="AboutCmd" Text="About..."/>
|
2019-05-28 01:46:09 +00:00
|
|
|
<RoutedUICommand x:Key="AssembleCmd" Text="Assemble...">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Ctrl+Shift+A</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2019-06-07 21:03:34 +00:00
|
|
|
<RoutedUICommand x:Key="CloseCmd" Text="Close"/>
|
2019-12-29 01:14:29 +00:00
|
|
|
<RoutedUICommand x:Key="ConcatenateFilesCmd" Text="Concatenate Files..."/>
|
2020-06-24 00:21:18 +00:00
|
|
|
<RoutedUICommand x:Key="ConvertOmfCmd" Text="Convert OMF..."/>
|
2019-09-19 22:53:23 +00:00
|
|
|
<RoutedUICommand x:Key="CreateLocalVariableTableCmd" Text="Create Local Variable Table..."/>
|
2019-07-14 20:50:15 +00:00
|
|
|
<RoutedUICommand x:Key="DeleteMlcCmd" Text="Delete Note/Long Comment">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Del</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
ORG rework, part 5
Updated project file format to save the new map entries.
Tweaked appearance of .arend directives to show the .arstart address
in the operand field. This makes it easier to match them up on screen.
Also, add a synthetic comment on auto-generated .arstart entries.
Added .arstart/.arend to the things that respond to Jump to Operand
(Ctrl+J). Selecting one jumps to the other end. (Well, it jumps
to the code nearest the other, which will do for now.)
Added a menu item to display a text rendering of the address map.
Helpful when things get complicated.
Modified the linear map iterator to return .arend items with the offset
of the last byte in the region, rather than the first byte of the
following region. While the "exclusive end" approach is pretty
common, it caused problems when updating the line list, because it
meant that the .arend directives were outside the range of offsets
being updated (and, for directives at the end of the file, outside
the file itself). This was painful to deal with for partial updates.
Changing this required some relatively subtle changes and annoyed some
of the debug assertions, such as the one where all Line items have
offsets that match the start of a line, but it's the cleaner approach.
2021-09-28 00:02:18 +00:00
|
|
|
<RoutedUICommand x:Key="EditAddressCmd" Text="Define Address Region..."/>
|
2019-07-06 22:51:57 +00:00
|
|
|
<RoutedUICommand x:Key="EditAppSettingsCmd" Text="Settings..."/>
|
2019-07-11 22:55:43 +00:00
|
|
|
<RoutedUICommand x:Key="EditCommentCmd" Text="Edit Comment...">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<!-- this works, but appears as "Ctrl+Oem1", so override tip in menu items -->
|
|
|
|
<KeyGesture>Ctrl+Semicolon</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2020-07-09 00:56:27 +00:00
|
|
|
<RoutedUICommand x:Key="EditDataBankCmd" Text="Edit Data Bank..."/>
|
2019-07-07 23:18:46 +00:00
|
|
|
<RoutedUICommand x:Key="EditHeaderCommentCmd" Text="Edit Header Comment..."/>
|
2019-07-08 22:40:30 +00:00
|
|
|
<RoutedUICommand x:Key="EditOperandCmd" Text="Edit Operand...">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Ctrl+O</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2019-07-07 00:24:42 +00:00
|
|
|
<RoutedUICommand x:Key="EditLabelCmd" Text="Edit Label...">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Ctrl+L</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2019-09-19 22:53:23 +00:00
|
|
|
<RoutedUICommand x:Key="EditLocalVariableTableCmd" Text="Edit Prior Local Variable Table..."/>
|
2019-07-07 23:18:46 +00:00
|
|
|
<RoutedUICommand x:Key="EditLongCommentCmd" Text="Edit Long Comment...">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Ctrl+M</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2019-07-14 00:04:47 +00:00
|
|
|
<RoutedUICommand x:Key="EditNoteCmd" Text="Edit Note...">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Ctrl+N</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2019-12-13 19:29:37 +00:00
|
|
|
<RoutedUICommand x:Key="EditProjectPropertiesSymbolsCmd">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>F6</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2019-07-14 20:18:10 +00:00
|
|
|
<RoutedUICommand x:Key="EditProjectSymbolCmd" Text="Edit Project Symbol..."/>
|
2019-06-22 20:20:31 +00:00
|
|
|
<RoutedUICommand x:Key="EditStatusFlagsCmd" Text="Override Status Flags..."/>
|
2020-03-02 02:18:31 +00:00
|
|
|
<RoutedUICommand x:Key="EditVisualizationSetCmd" Text="Create/Edit Visualization Set...">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Alt+V</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2019-06-22 20:20:31 +00:00
|
|
|
<RoutedUICommand x:Key="ExitCmd" Text="Exit"/>
|
2020-03-30 23:04:37 +00:00
|
|
|
<RoutedUICommand x:Key="ExportCmd" Text="Export...">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Ctrl+Shift+E</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2019-07-07 20:28:45 +00:00
|
|
|
<RoutedUICommand x:Key="FindNextCmd" Text="Find Next">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>F3</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2019-10-10 00:41:44 +00:00
|
|
|
<RoutedUICommand x:Key="FindPreviousCmd" Text="Find Previous">
|
|
|
|
<RoutedUICommand.InputGestures>
|
2019-10-17 19:45:10 +00:00
|
|
|
<KeyGesture>Shift+F3</KeyGesture>
|
2019-10-10 00:41:44 +00:00
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2019-07-14 20:50:15 +00:00
|
|
|
<RoutedUICommand x:Key="FormatAsWordCmd" Text="Format As Word">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Ctrl+W</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2019-09-15 20:37:38 +00:00
|
|
|
<RoutedUICommand x:Key="FormatAddressTableCmd" Text="Format Address Table..."/>
|
2019-07-07 21:28:35 +00:00
|
|
|
<RoutedUICommand x:Key="GotoCmd" Text="Go To...">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Ctrl+G</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2019-11-02 01:44:22 +00:00
|
|
|
<RoutedUICommand x:Key="GotoLastChangeCmd" Text="Go to Last Change"/>
|
2020-10-14 22:02:53 +00:00
|
|
|
<RoutedUICommand x:Key="TagAsCodeStartPointCmd" Text="Tag Address As Code Start Point"/>
|
|
|
|
<RoutedUICommand x:Key="TagAsCodeStopPointCmd" Text="Tag Address As Code Stop Point"/>
|
|
|
|
<RoutedUICommand x:Key="TagAsInlineDataCmd" Text="Tag Bytes As Inline Data"/>
|
2020-06-07 23:28:29 +00:00
|
|
|
<RoutedUICommand x:Key="JumpToOperandCmd" Text="Jump to Operand">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Ctrl+J</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2019-06-15 23:00:31 +00:00
|
|
|
<RoutedUICommand x:Key="NavigateBackwardCmd" Text="Nav Backward">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Alt+Left</KeyGesture>
|
|
|
|
<KeyGesture>Ctrl+Minus</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
|
|
|
<RoutedUICommand x:Key="NavigateForwardCmd" Text="Nav Forward">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Alt+Right</KeyGesture>
|
|
|
|
<KeyGesture>Ctrl+Shift+Minus</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2019-06-23 00:38:07 +00:00
|
|
|
<RoutedUICommand x:Key="NewProjectCmd" Text="New"/>
|
2019-06-21 23:27:58 +00:00
|
|
|
<RoutedUICommand x:Key="OpenCmd" Text="Open"/>
|
2019-05-28 21:23:17 +00:00
|
|
|
<RoutedUICommand x:Key="RecentProjectCmd"/>
|
2019-06-11 23:27:15 +00:00
|
|
|
<RoutedUICommand x:Key="RedoCmd" Text="Redo">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Ctrl+Y</KeyGesture>
|
|
|
|
<KeyGesture>Ctrl+Shift+Z</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2020-07-19 23:55:36 +00:00
|
|
|
<RoutedUICommand x:Key="ReloadExternalFilesCmd" Text="Reload External Files">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Ctrl+Shift+R</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2020-10-14 22:02:53 +00:00
|
|
|
<RoutedUICommand x:Key="RemoveAnalyzerTagsCmd" Text="Remove Analyzer Tags"/>
|
2021-10-12 18:16:50 +00:00
|
|
|
<RoutedUICommand x:Key="RemoveFormattingCmd" Text="Remove Formatting"/>
|
2019-05-28 21:23:17 +00:00
|
|
|
<RoutedUICommand x:Key="SelectAllCmd" Text="Select All">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Ctrl+A</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2019-12-29 01:14:29 +00:00
|
|
|
<RoutedUICommand x:Key="ShowFileHexDumpCmd" Text="File Hex Dump..."/>
|
2019-07-13 00:04:14 +00:00
|
|
|
<RoutedUICommand x:Key="ShowHexDumpCmd" Text="Show Hex Dump"/>
|
2019-12-30 01:59:35 +00:00
|
|
|
<RoutedUICommand x:Key="SliceFilesCmd" Text="Slice Files..."/>
|
2020-08-20 20:18:46 +00:00
|
|
|
<RoutedUICommand x:Key="ToggleApple2ScreenChartCmd" Text="Apple II Screen Chart"/>
|
2019-07-15 01:12:03 +00:00
|
|
|
<RoutedUICommand x:Key="ToggleAsciiChartCmd" Text="ASCII Chart"/>
|
2019-07-08 00:17:48 +00:00
|
|
|
<RoutedUICommand x:Key="ToggleDataScanCmd" Text="Toggle Data Scan">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Ctrl+D</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2019-12-30 01:59:35 +00:00
|
|
|
<RoutedUICommand x:Key="ToggleInstructionChartCmd" Text="65xx Instruction Chart"/>
|
2019-07-14 20:50:15 +00:00
|
|
|
<RoutedUICommand x:Key="ToggleSingleByteFormatCmd" Text="Toggle Single-Byte Format">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Ctrl+B</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
2019-06-11 23:27:15 +00:00
|
|
|
<RoutedUICommand x:Key="UndoCmd" Text="Undo">
|
|
|
|
<RoutedUICommand.InputGestures>
|
|
|
|
<KeyGesture>Ctrl+Z</KeyGesture>
|
|
|
|
</RoutedUICommand.InputGestures>
|
|
|
|
</RoutedUICommand>
|
ORG rework, part 5
Updated project file format to save the new map entries.
Tweaked appearance of .arend directives to show the .arstart address
in the operand field. This makes it easier to match them up on screen.
Also, add a synthetic comment on auto-generated .arstart entries.
Added .arstart/.arend to the things that respond to Jump to Operand
(Ctrl+J). Selecting one jumps to the other end. (Well, it jumps
to the code nearest the other, which will do for now.)
Added a menu item to display a text rendering of the address map.
Helpful when things get complicated.
Modified the linear map iterator to return .arend items with the offset
of the last byte in the region, rather than the first byte of the
following region. While the "exclusive end" approach is pretty
common, it caused problems when updating the line list, because it
meant that the .arend directives were outside the range of offsets
being updated (and, for directives at the end of the file, outside
the file itself). This was painful to deal with for partial updates.
Changing this required some relatively subtle changes and annoyed some
of the debug assertions, such as the one where all Line items have
offsets that match the start of a line, but it's the cleaner approach.
2021-09-28 00:02:18 +00:00
|
|
|
<RoutedUICommand x:Key="ViewAddressMapCmd" Text="View Address Map"/>
|
2019-06-12 21:17:24 +00:00
|
|
|
|
2019-10-24 00:49:59 +00:00
|
|
|
<RoutedUICommand x:Key="Debug_ApplesoftToHtmlCmd" Text="Applesoft to HTML..."/>
|
2020-04-14 00:33:34 +00:00
|
|
|
<RoutedUICommand x:Key="Debug_ApplyEditCommandsCmd" Text="Apply Edit Commands..."/>
|
2020-07-28 17:56:07 +00:00
|
|
|
<RoutedUICommand x:Key="Debug_ApplyExternalSymbolsCmd" Text="Apply External Symbols"/>
|
2020-07-15 23:18:02 +00:00
|
|
|
<RoutedUICommand x:Key="Debug_ExportEditCommandsCmd" Text="Export Edit Commands..."/>
|
2019-07-15 23:50:54 +00:00
|
|
|
<RoutedUICommand x:Key="Debug_ExtensionScriptInfoCmd" Text="Extension Script Info..."/>
|
Reboot sandbox when required
Another chapter in the never-ending AppDomain security saga.
If a computer goes to sleep while SourceGen is running with a project
open, life gets confusing when the system wakes up. The keep-alive
timer fires and a ping is sent to the remote AppDomain, successfully.
At the same time, the lease expires on the remote side, and the objects
are discarded (apparently without bothering to query the ILease object).
This failure mode is 100% repeatable.
Since we can't prevent sandbox objects from disappearing, we have to
detect and recover from the problem. Fortunately we don't keep any
necessary state on the plugin side, so we can just tear the whole
thing down and recreate it.
The various methods in ScriptManager now do a "health check" before
making calls into the plugin AppDomain. If the ping attempt fails,
the AppDomain is "rebooted" by destroying it and creating a new one,
reloading all plugins that were in there before. The plugin binaries
*should* still be in the PluginDllCache directory since the ping failure
was due to objects being discarded, not AppDomain shutdown, and Windows
doesn't let you mess with files that hold executable code.
A new "reboot security sandbox" option has been added to the DEBUG
menu to facilitate testing.
The PluginManager's Ping() method gets called more often, but not to
the extent that performance will be affected.
This change also adds a finalizer to DisasmProject, since we're relying
on it to shut down the ScriptManager, and it's relying on callers to
invoke its cleanup function. The finalizer throws an assertion if the
cleanup function doesn't get called.
(Issue #82)
2020-07-19 20:20:18 +00:00
|
|
|
<RoutedUICommand x:Key="Debug_RebootSecuritySandboxCmd" Text="Reboot Security Sandbox"/>
|
2019-07-16 00:18:28 +00:00
|
|
|
<RoutedUICommand x:Key="Debug_ShowAnalysisTimersCmd" Text="Show Analysis Timers"/>
|
|
|
|
<RoutedUICommand x:Key="Debug_ShowAnalyzerOutputCmd" Text="Show Analyzer Output"/>
|
|
|
|
<RoutedUICommand x:Key="Debug_ShowUndoRedoHistoryCmd" Text="Show Undo/Redo History"/>
|
|
|
|
<RoutedUICommand x:Key="Debug_SourceGenerationTestsCmd" Text="Source Generation Tests..."/>
|
2019-07-15 22:32:27 +00:00
|
|
|
<RoutedUICommand x:Key="Debug_ToggleCommentRulersCmd" Text="Show Comment Rulers"/>
|
2020-07-18 20:47:01 +00:00
|
|
|
<RoutedUICommand x:Key="Debug_ToggleKeepAliveHackCmd" Text="Disable Keep-Alive Hack"/>
|
|
|
|
<RoutedUICommand x:Key="Debug_ToggleSecuritySandboxCmd" Text="Disable Security Sandbox"/>
|
2019-07-15 22:32:27 +00:00
|
|
|
|
2019-06-12 21:17:24 +00:00
|
|
|
<CollectionViewSource x:Key="SymbolTableSource" Source="{Binding SymbolsList}"
|
|
|
|
Filter="SymbolsList_Filter"/>
|
2019-05-23 20:38:41 +00:00
|
|
|
</ResourceDictionary>
|
2019-04-29 23:34:09 +00:00
|
|
|
</Window.Resources>
|
|
|
|
|
|
|
|
<Window.CommandBindings>
|
2019-07-06 22:51:57 +00:00
|
|
|
<CommandBinding Command="{StaticResource AboutCmd}"
|
|
|
|
Executed="AboutCmd_Executed"/>
|
2019-06-07 21:03:34 +00:00
|
|
|
<CommandBinding Command="{StaticResource AssembleCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="AssembleCmd_Executed"/>
|
|
|
|
<CommandBinding Command="{StaticResource CloseCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="CloseCmd_Executed"/>
|
2019-12-29 01:14:29 +00:00
|
|
|
<CommandBinding Command="{StaticResource ConcatenateFilesCmd}"
|
|
|
|
Executed="ConcatenateFilesCmd_Executed"/>
|
2020-06-24 00:21:18 +00:00
|
|
|
<CommandBinding Command="{StaticResource ConvertOmfCmd}"
|
|
|
|
Executed="ConvertOmfCmd_Executed"/>
|
2019-09-19 22:53:23 +00:00
|
|
|
<CommandBinding Command="{StaticResource CreateLocalVariableTableCmd}"
|
|
|
|
CanExecute="CanCreateLocalVariableTable" Executed="CreateLocalVariableTableCmd_Executed"/>
|
2019-07-14 20:50:15 +00:00
|
|
|
<CommandBinding Command="{StaticResource DeleteMlcCmd}"
|
|
|
|
CanExecute="CanDeleteMlc" Executed="DeleteMlcCmd_Executed"/>
|
2019-07-15 23:50:54 +00:00
|
|
|
<CommandBinding Command="{StaticResource Debug_SourceGenerationTestsCmd}"
|
|
|
|
Executed="Debug_SourceGenerationTestsCmd_Executed"/>
|
2019-06-16 23:34:47 +00:00
|
|
|
<CommandBinding Command="{StaticResource EditAddressCmd}"
|
|
|
|
CanExecute="CanEditAddress" Executed="EditAddressCmd_Executed"/>
|
2019-09-19 22:53:23 +00:00
|
|
|
<CommandBinding Command="{StaticResource EditAppSettingsCmd}"
|
|
|
|
Executed="EditAppSettingsCmd_Executed"/>
|
2019-07-11 22:55:43 +00:00
|
|
|
<CommandBinding Command="{StaticResource EditCommentCmd}"
|
|
|
|
CanExecute="CanEditComment" Executed="EditCommentCmd_Executed"/>
|
2020-07-09 00:56:27 +00:00
|
|
|
<CommandBinding Command="{StaticResource EditDataBankCmd}"
|
|
|
|
CanExecute="CanEditDataBank" Executed="EditDataBankCmd_Executed"/>
|
2019-07-07 23:18:46 +00:00
|
|
|
<CommandBinding Command="{StaticResource EditHeaderCommentCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="EditHeaderCommentCmd_Executed"/>
|
2019-07-07 00:24:42 +00:00
|
|
|
<CommandBinding Command="{StaticResource EditLabelCmd}"
|
|
|
|
CanExecute="CanEditLabel" Executed="EditLabelCmd_Executed"/>
|
2019-08-25 21:14:44 +00:00
|
|
|
<CommandBinding Command="{StaticResource EditLocalVariableTableCmd}"
|
|
|
|
CanExecute="CanEditLocalVariableTable" Executed="EditLocalVariableTableCmd_Executed"/>
|
2019-07-07 23:18:46 +00:00
|
|
|
<CommandBinding Command="{StaticResource EditLongCommentCmd}"
|
|
|
|
CanExecute="CanEditLongComment" Executed="EditLongCommentCmd_Executed"/>
|
2019-07-14 00:04:47 +00:00
|
|
|
<CommandBinding Command="{StaticResource EditNoteCmd}"
|
|
|
|
CanExecute="CanEditNote" Executed="EditNoteCmd_Executed"/>
|
2019-07-08 22:40:30 +00:00
|
|
|
<CommandBinding Command="{StaticResource EditOperandCmd}"
|
|
|
|
CanExecute="CanEditOperand" Executed="EditOperandCmd_Executed"/>
|
2019-12-13 19:29:37 +00:00
|
|
|
<CommandBinding Command="{StaticResource EditProjectPropertiesSymbolsCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="EditProjectPropertiesSymbolsCmd_Executed"/>
|
2019-07-14 20:18:10 +00:00
|
|
|
<CommandBinding Command="{StaticResource EditProjectSymbolCmd}"
|
|
|
|
CanExecute="CanEditProjectSymbol" Executed="EditProjectSymbolCmd_Executed"/>
|
2019-06-22 20:20:31 +00:00
|
|
|
<CommandBinding Command="{StaticResource EditStatusFlagsCmd}"
|
|
|
|
CanExecute="CanEditStatusFlags" Executed="EditStatusFlagsCmd_Executed"/>
|
2019-11-23 04:45:57 +00:00
|
|
|
<CommandBinding Command="{StaticResource EditVisualizationSetCmd}"
|
|
|
|
CanExecute="CanEditVisualizationSet" Executed="EditVisualizationSetCmd_Executed"/>
|
2019-06-22 20:20:31 +00:00
|
|
|
<CommandBinding Command="{StaticResource ExitCmd}"
|
|
|
|
Executed="ExitCmd_Executed"/>
|
2019-09-11 00:43:31 +00:00
|
|
|
<CommandBinding Command="{StaticResource ExportCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="ExportCmd_Executed"/>
|
2019-07-07 20:28:45 +00:00
|
|
|
<CommandBinding Command="Find"
|
|
|
|
CanExecute="IsProjectOpen" Executed="FindCmd_Executed"/>
|
|
|
|
<CommandBinding Command="{StaticResource FindNextCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="FindNextCmd_Executed"/>
|
2019-10-10 00:41:44 +00:00
|
|
|
<CommandBinding Command="{StaticResource FindPreviousCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="FindPreviousCmd_Executed"/>
|
2019-07-14 20:50:15 +00:00
|
|
|
<CommandBinding Command="{StaticResource FormatAsWordCmd}"
|
|
|
|
CanExecute="CanFormatAsWord" Executed="FormatAsWordCmd_Executed"/>
|
2019-09-15 20:37:38 +00:00
|
|
|
<CommandBinding Command="{StaticResource FormatAddressTableCmd}"
|
|
|
|
CanExecute="CanFormatAddressTable" Executed="FormatAddressTableCmd_Executed"/>
|
2019-07-07 21:28:35 +00:00
|
|
|
<CommandBinding Command="{StaticResource GotoCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="GotoCmd_Executed"/>
|
2019-11-02 01:44:22 +00:00
|
|
|
<CommandBinding Command="{StaticResource GotoLastChangeCmd}"
|
|
|
|
CanExecute="CanUndo" Executed="GotoLastChangeCmd_Executed"/>
|
2019-06-11 23:27:15 +00:00
|
|
|
<CommandBinding Command="Help"
|
|
|
|
Executed="HelpCmd_Executed"/>
|
2020-10-14 22:02:53 +00:00
|
|
|
<CommandBinding Command="{StaticResource TagAsCodeStartPointCmd}"
|
|
|
|
CanExecute="CanTagAsCodeStartPoint" Executed="TagAsCodeStartPointCmd_Executed"/>
|
|
|
|
<CommandBinding Command="{StaticResource TagAsCodeStopPointCmd}"
|
|
|
|
CanExecute="CanTagAsCodeStopPoint" Executed="TagAsCodeStopPointCmd_Executed"/>
|
|
|
|
<CommandBinding Command="{StaticResource TagAsInlineDataCmd}"
|
|
|
|
CanExecute="CanTagAsInlineData" Executed="TagAsInlineDataCmd_Executed"/>
|
2020-06-07 23:28:29 +00:00
|
|
|
<CommandBinding Command="{StaticResource JumpToOperandCmd}"
|
|
|
|
CanExecute="CanJumpToOperand" Executed="JumpToOperandCmd_Executed"/>
|
2019-06-15 23:00:31 +00:00
|
|
|
<CommandBinding Command="{StaticResource NavigateBackwardCmd}"
|
|
|
|
CanExecute="CanNavigateBackward" Executed="NavigateBackwardCmd_Executed"/>
|
|
|
|
<CommandBinding Command="{StaticResource NavigateForwardCmd}"
|
|
|
|
CanExecute="CanNavigateForward" Executed="NavigateForwardCmd_Executed"/>
|
2019-06-23 00:38:07 +00:00
|
|
|
<CommandBinding Command="{StaticResource NewProjectCmd}"
|
|
|
|
Executed="NewProjectCmd_Executed"/>
|
2019-06-21 23:27:58 +00:00
|
|
|
<CommandBinding Command="{StaticResource OpenCmd}"
|
|
|
|
Executed="OpenCmd_Executed"/>
|
2019-07-01 21:07:30 +00:00
|
|
|
<CommandBinding Command="Properties"
|
2019-07-06 22:51:57 +00:00
|
|
|
CanExecute="IsProjectOpen" Executed="EditProjectPropertiesCmd_Executed"/>
|
2019-06-22 21:41:09 +00:00
|
|
|
<CommandBinding Command="{StaticResource RecentProjectCmd}" x:Name="recentProjectCmd"
|
2019-06-21 23:27:58 +00:00
|
|
|
Executed="RecentProjectCmd_Executed"/>
|
2019-06-11 23:27:15 +00:00
|
|
|
<CommandBinding Command="{StaticResource RedoCmd}"
|
|
|
|
CanExecute="CanRedo" Executed="RedoCmd_Executed"/>
|
2020-07-19 23:55:36 +00:00
|
|
|
<CommandBinding Command="{StaticResource ReloadExternalFilesCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="ReloadExternalFilesCmd_Executed"/>
|
2020-10-14 22:02:53 +00:00
|
|
|
<CommandBinding Command="{StaticResource RemoveAnalyzerTagsCmd}"
|
|
|
|
CanExecute="CanRemoveAnalyzerTags" Executed="RemoveAnalyzerTagsCmd_Executed"/>
|
2021-10-12 18:16:50 +00:00
|
|
|
<CommandBinding Command="{StaticResource RemoveFormattingCmd}"
|
|
|
|
CanExecute="CanRemoveFormatting" Executed="RemoveFormattingCmd_Executed"/>
|
2019-06-21 23:27:58 +00:00
|
|
|
<CommandBinding Command="Save"
|
2019-10-26 20:07:31 +00:00
|
|
|
CanExecute="CanSaveProject" Executed="SaveCmd_Executed"/>
|
2019-06-21 23:27:58 +00:00
|
|
|
<CommandBinding Command="SaveAs"
|
2019-10-26 20:07:31 +00:00
|
|
|
CanExecute="CanSaveProject" Executed="SaveAsCmd_Executed"/>
|
2019-06-11 23:27:15 +00:00
|
|
|
<!-- ListView has a built-in Ctrl+A handler; this only fires when codeListView is not in focus -->
|
2019-06-07 21:03:34 +00:00
|
|
|
<CommandBinding Command="{StaticResource SelectAllCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="SelectAllCmd_Executed"/>
|
2019-07-13 00:46:37 +00:00
|
|
|
<CommandBinding Command="{StaticResource ShowFileHexDumpCmd}"
|
|
|
|
Executed="ShowFileHexDumpCmd_Executed"/>
|
2019-07-13 00:04:14 +00:00
|
|
|
<CommandBinding Command="{StaticResource ShowHexDumpCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="ShowHexDumpCmd_Executed"/>
|
2019-12-30 01:59:35 +00:00
|
|
|
<CommandBinding Command="{StaticResource SliceFilesCmd}"
|
|
|
|
Executed="SliceFilesCmd_Executed"/>
|
2020-08-20 20:18:46 +00:00
|
|
|
<CommandBinding Command="{StaticResource ToggleApple2ScreenChartCmd}"
|
|
|
|
Executed="ToggleApple2ScreenChartCmd_Executed"/>
|
2019-07-15 01:12:03 +00:00
|
|
|
<CommandBinding Command="{StaticResource ToggleAsciiChartCmd}"
|
|
|
|
Executed="ToggleAsciiChartCmd_Executed"/>
|
2019-07-08 00:17:48 +00:00
|
|
|
<CommandBinding Command="{StaticResource ToggleDataScanCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="ToggleDataScanCmd_Executed"/>
|
2019-10-21 22:15:09 +00:00
|
|
|
<CommandBinding Command="{StaticResource ToggleInstructionChartCmd}"
|
|
|
|
Executed="ToggleInstructionChartCmd_Executed"/>
|
2019-07-14 20:50:15 +00:00
|
|
|
<CommandBinding Command="{StaticResource ToggleSingleByteFormatCmd}"
|
|
|
|
CanExecute="CanToggleSingleByteFormat" Executed="ToggleSingleByteFormatCmd_Executed"/>
|
2019-06-11 23:27:15 +00:00
|
|
|
<CommandBinding Command="{StaticResource UndoCmd}"
|
|
|
|
CanExecute="CanUndo" Executed="UndoCmd_Executed"/>
|
ORG rework, part 5
Updated project file format to save the new map entries.
Tweaked appearance of .arend directives to show the .arstart address
in the operand field. This makes it easier to match them up on screen.
Also, add a synthetic comment on auto-generated .arstart entries.
Added .arstart/.arend to the things that respond to Jump to Operand
(Ctrl+J). Selecting one jumps to the other end. (Well, it jumps
to the code nearest the other, which will do for now.)
Added a menu item to display a text rendering of the address map.
Helpful when things get complicated.
Modified the linear map iterator to return .arend items with the offset
of the last byte in the region, rather than the first byte of the
following region. While the "exclusive end" approach is pretty
common, it caused problems when updating the line list, because it
meant that the .arend directives were outside the range of offsets
being updated (and, for directives at the end of the file, outside
the file itself). This was painful to deal with for partial updates.
Changing this required some relatively subtle changes and annoyed some
of the debug assertions, such as the one where all Line items have
offsets that match the start of a line, but it's the cleaner approach.
2021-09-28 00:02:18 +00:00
|
|
|
<CommandBinding Command="{StaticResource ViewAddressMapCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="ViewAddressMapCmd_Executed"/>
|
2019-07-15 22:32:27 +00:00
|
|
|
|
2020-10-15 21:03:32 +00:00
|
|
|
<!-- must come after analyzer tag Ctrl+H Ctrl+C def -->
|
2019-07-21 22:24:39 +00:00
|
|
|
<CommandBinding Command="Copy"
|
|
|
|
CanExecute="IsProjectOpen" Executed="CopyCmd_Executed"/>
|
|
|
|
|
2019-07-15 22:32:27 +00:00
|
|
|
<CommandBinding Command="Refresh"
|
|
|
|
CanExecute="IsProjectOpen" Executed="Debug_RefreshCmd_Executed"/>
|
2019-10-24 00:49:59 +00:00
|
|
|
<CommandBinding Command="{StaticResource Debug_ApplesoftToHtmlCmd}"
|
|
|
|
Executed="Debug_ApplesoftToHtmlCmd_Executed"/>
|
2020-04-14 00:33:34 +00:00
|
|
|
<CommandBinding Command="{StaticResource Debug_ApplyEditCommandsCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="Debug_ApplyEditCommandsCmd_Executed"/>
|
2020-07-28 17:56:07 +00:00
|
|
|
<CommandBinding Command="{StaticResource Debug_ApplyExternalSymbolsCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="Debug_ApplyExternalSymbolsCmd_Executed"/>
|
2020-07-15 23:18:02 +00:00
|
|
|
<CommandBinding Command="{StaticResource Debug_ExportEditCommandsCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="Debug_ExportEditCommandsCmd_Executed"/>
|
2019-07-15 23:50:54 +00:00
|
|
|
<CommandBinding Command="{StaticResource Debug_ExtensionScriptInfoCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="Debug_ExtensionScriptInfoCmd_Executed"/>
|
Reboot sandbox when required
Another chapter in the never-ending AppDomain security saga.
If a computer goes to sleep while SourceGen is running with a project
open, life gets confusing when the system wakes up. The keep-alive
timer fires and a ping is sent to the remote AppDomain, successfully.
At the same time, the lease expires on the remote side, and the objects
are discarded (apparently without bothering to query the ILease object).
This failure mode is 100% repeatable.
Since we can't prevent sandbox objects from disappearing, we have to
detect and recover from the problem. Fortunately we don't keep any
necessary state on the plugin side, so we can just tear the whole
thing down and recreate it.
The various methods in ScriptManager now do a "health check" before
making calls into the plugin AppDomain. If the ping attempt fails,
the AppDomain is "rebooted" by destroying it and creating a new one,
reloading all plugins that were in there before. The plugin binaries
*should* still be in the PluginDllCache directory since the ping failure
was due to objects being discarded, not AppDomain shutdown, and Windows
doesn't let you mess with files that hold executable code.
A new "reboot security sandbox" option has been added to the DEBUG
menu to facilitate testing.
The PluginManager's Ping() method gets called more often, but not to
the extent that performance will be affected.
This change also adds a finalizer to DisasmProject, since we're relying
on it to shut down the ScriptManager, and it's relying on callers to
invoke its cleanup function. The finalizer throws an assertion if the
cleanup function doesn't get called.
(Issue #82)
2020-07-19 20:20:18 +00:00
|
|
|
<CommandBinding Command="{StaticResource Debug_RebootSecuritySandboxCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="Debug_RebootSecuritySandboxCmd_Executed"/>
|
2019-07-16 00:18:28 +00:00
|
|
|
<CommandBinding Command="{StaticResource Debug_ShowAnalysisTimersCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="Debug_ShowAnalysisTimersCmd_Executed"/>
|
|
|
|
<CommandBinding Command="{StaticResource Debug_ShowAnalyzerOutputCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="Debug_ShowAnalyzerOutputCmd_Executed"/>
|
|
|
|
<CommandBinding Command="{StaticResource Debug_ShowUndoRedoHistoryCmd}"
|
|
|
|
CanExecute="IsProjectOpen" Executed="Debug_ShowUndoRedoHistoryCmd_Executed"/>
|
2019-07-15 22:32:27 +00:00
|
|
|
<CommandBinding Command="{StaticResource Debug_ToggleCommentRulersCmd}"
|
|
|
|
Executed="Debug_ToggleCommentRulersCmd_Executed"/>
|
|
|
|
<CommandBinding Command="{StaticResource Debug_ToggleKeepAliveHackCmd}"
|
|
|
|
Executed="Debug_ToggleKeepAliveHackCmd_Executed"/>
|
2020-07-18 20:47:01 +00:00
|
|
|
<CommandBinding Command="{StaticResource Debug_ToggleSecuritySandboxCmd}"
|
|
|
|
Executed="Debug_ToggleSecuritySandboxCmd_Executed"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
</Window.CommandBindings>
|
|
|
|
|
|
|
|
<DockPanel>
|
2019-05-28 01:46:09 +00:00
|
|
|
<Menu Name="appMenu" DockPanel.Dock="Top">
|
2019-04-29 23:34:09 +00:00
|
|
|
<MenuItem Header="_File">
|
2019-06-23 00:38:07 +00:00
|
|
|
<MenuItem Command="{StaticResource NewProjectCmd}"/>
|
2019-06-21 23:27:58 +00:00
|
|
|
<MenuItem Command="{StaticResource OpenCmd}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<MenuItem Command="Save"/>
|
|
|
|
<MenuItem Command="SaveAs"/>
|
2019-06-07 21:03:34 +00:00
|
|
|
<MenuItem Command="{StaticResource CloseCmd}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<Separator/>
|
2020-07-19 23:55:36 +00:00
|
|
|
<MenuItem Name="recentProjectsMenu" Header="Recent Projects" SubmenuOpened="RecentProjectsMenu_SubmenuOpened">
|
|
|
|
<MenuItem Header="(none)"/>
|
|
|
|
</MenuItem>
|
|
|
|
<Separator/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<MenuItem Command="{StaticResource AssembleCmd}"/>
|
2019-09-11 00:43:31 +00:00
|
|
|
<!--<MenuItem Command="Print"/>-->
|
|
|
|
<MenuItem Command="{StaticResource ExportCmd}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<Separator/>
|
2020-07-19 23:55:36 +00:00
|
|
|
<MenuItem Command="{StaticResource ReloadExternalFilesCmd}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<Separator/>
|
2019-06-22 20:20:31 +00:00
|
|
|
<MenuItem Command="{StaticResource ExitCmd}" InputGestureText="Alt+F4"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
</MenuItem>
|
2019-07-08 00:17:48 +00:00
|
|
|
<MenuItem Header="_Edit" SubmenuOpened="EditMenu_SubmenuOpened">
|
2019-06-11 23:27:15 +00:00
|
|
|
<MenuItem Command="{StaticResource UndoCmd}"/>
|
|
|
|
<MenuItem Command="{StaticResource RedoCmd}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<Separator/>
|
|
|
|
<MenuItem Command="Copy"/>
|
2019-05-28 21:23:17 +00:00
|
|
|
<MenuItem Command="{StaticResource SelectAllCmd}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<Separator/>
|
2019-07-07 23:18:46 +00:00
|
|
|
<MenuItem Command="{StaticResource EditHeaderCommentCmd}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<MenuItem Command="Properties" Header="Project Properties..."/>
|
2019-12-13 19:29:37 +00:00
|
|
|
<!-- IsChecked is set when the menu is opened -->
|
2019-07-08 00:17:48 +00:00
|
|
|
<MenuItem Name="toggleDataScanMenuItem"
|
|
|
|
Command="{StaticResource ToggleDataScanCmd}" IsCheckable="True"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<Separator/>
|
2019-07-06 22:51:57 +00:00
|
|
|
<MenuItem Command="{StaticResource EditAppSettingsCmd}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
</MenuItem>
|
2019-10-20 00:46:40 +00:00
|
|
|
<MenuItem Header="_Navigate">
|
|
|
|
<MenuItem Command="{StaticResource NavigateForwardCmd}"/>
|
|
|
|
<MenuItem Command="{StaticResource NavigateBackwardCmd}"/>
|
|
|
|
<MenuItem Command="{StaticResource GotoCmd}"/>
|
2019-11-02 01:44:22 +00:00
|
|
|
<MenuItem Command="{StaticResource GotoLastChangeCmd}"/>
|
2020-06-07 23:28:29 +00:00
|
|
|
<MenuItem Command="{StaticResource JumpToOperandCmd}"/>
|
2019-10-20 00:46:40 +00:00
|
|
|
<Separator/>
|
|
|
|
<MenuItem Command="Find"/>
|
|
|
|
<MenuItem Command="{StaticResource FindNextCmd}"/>
|
|
|
|
<MenuItem Command="{StaticResource FindPreviousCmd}"/>
|
ORG rework, part 5
Updated project file format to save the new map entries.
Tweaked appearance of .arend directives to show the .arstart address
in the operand field. This makes it easier to match them up on screen.
Also, add a synthetic comment on auto-generated .arstart entries.
Added .arstart/.arend to the things that respond to Jump to Operand
(Ctrl+J). Selecting one jumps to the other end. (Well, it jumps
to the code nearest the other, which will do for now.)
Added a menu item to display a text rendering of the address map.
Helpful when things get complicated.
Modified the linear map iterator to return .arend items with the offset
of the last byte in the region, rather than the first byte of the
following region. While the "exclusive end" approach is pretty
common, it caused problems when updating the line list, because it
meant that the .arend directives were outside the range of offsets
being updated (and, for directives at the end of the file, outside
the file itself). This was painful to deal with for partial updates.
Changing this required some relatively subtle changes and annoyed some
of the debug assertions, such as the one where all Line items have
offsets that match the start of a line, but it's the cleaner approach.
2021-09-28 00:02:18 +00:00
|
|
|
<Separator/>
|
|
|
|
<MenuItem Command="{StaticResource ViewAddressMapCmd}"/>
|
2019-10-20 00:46:40 +00:00
|
|
|
</MenuItem>
|
2019-06-22 21:41:09 +00:00
|
|
|
<MenuItem Name="actionsMenu" Header="_Actions">
|
2019-07-08 22:40:30 +00:00
|
|
|
<MenuItem Command="{StaticResource EditOperandCmd}"/>
|
2021-10-02 20:47:05 +00:00
|
|
|
<MenuItem Command="{StaticResource EditLabelCmd}"/>
|
2019-07-11 22:55:43 +00:00
|
|
|
<MenuItem Command="{StaticResource EditCommentCmd}" InputGestureText="Ctrl+;"/>
|
2019-07-07 23:18:46 +00:00
|
|
|
<MenuItem Command="{StaticResource EditLongCommentCmd}"/>
|
2021-10-12 18:16:50 +00:00
|
|
|
<MenuItem Command="{StaticResource EditNoteCmd}"/>
|
2021-10-02 20:47:05 +00:00
|
|
|
<MenuItem Command="{StaticResource EditAddressCmd}"/>
|
|
|
|
<MenuItem Command="{StaticResource EditStatusFlagsCmd}"/>
|
2020-07-09 00:56:27 +00:00
|
|
|
<MenuItem Command="{StaticResource EditDataBankCmd}"/>
|
2019-07-14 20:18:10 +00:00
|
|
|
<MenuItem Command="{StaticResource EditProjectSymbolCmd}"/>
|
2019-09-19 22:53:23 +00:00
|
|
|
<MenuItem Command="{StaticResource CreateLocalVariableTableCmd}"/>
|
2019-08-25 21:14:44 +00:00
|
|
|
<MenuItem Command="{StaticResource EditLocalVariableTableCmd}"/>
|
2019-11-23 04:45:57 +00:00
|
|
|
<MenuItem Command="{StaticResource EditVisualizationSetCmd}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<Separator/>
|
2020-10-14 22:02:53 +00:00
|
|
|
<MenuItem Command="{StaticResource TagAsCodeStartPointCmd}" InputGestureText="Ctrl+H, Ctrl+C"/>
|
|
|
|
<MenuItem Command="{StaticResource TagAsCodeStopPointCmd}" InputGestureText="Ctrl+H, Ctrl+D"/>
|
|
|
|
<MenuItem Command="{StaticResource TagAsInlineDataCmd}" InputGestureText="Ctrl+H, Ctrl+I"/>
|
|
|
|
<MenuItem Command="{StaticResource RemoveAnalyzerTagsCmd}" InputGestureText="Ctrl+H, Ctrl+R"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<Separator/>
|
2019-09-15 20:37:38 +00:00
|
|
|
<MenuItem Command="{StaticResource FormatAddressTableCmd}"/>
|
2019-07-14 20:50:15 +00:00
|
|
|
<MenuItem Command="{StaticResource ToggleSingleByteFormatCmd}"/>
|
|
|
|
<MenuItem Command="{StaticResource FormatAsWordCmd}"/>
|
2021-10-12 18:16:50 +00:00
|
|
|
<MenuItem Command="{StaticResource RemoveFormattingCmd}"/>
|
2019-07-14 20:50:15 +00:00
|
|
|
<MenuItem Command="{StaticResource DeleteMlcCmd}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<Separator/>
|
2019-07-13 00:04:14 +00:00
|
|
|
<MenuItem Command="{StaticResource ShowHexDumpCmd}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
</MenuItem>
|
2019-07-15 01:12:03 +00:00
|
|
|
<MenuItem Header="_Tools" SubmenuOpened="ToolsMenu_SubmenuOpened">
|
2019-10-21 22:15:09 +00:00
|
|
|
<MenuItem Name="toggleInstructionChartMenuItem"
|
|
|
|
Command="{StaticResource ToggleInstructionChartCmd}" IsCheckable="True"/>
|
2019-12-29 01:14:29 +00:00
|
|
|
<MenuItem Name="toggleAsciiChartMenuItem"
|
|
|
|
Command="{StaticResource ToggleAsciiChartCmd}" IsCheckable="True"/>
|
2020-08-20 20:18:46 +00:00
|
|
|
<MenuItem Name="toggleApple2ScreenChartMenuItem"
|
|
|
|
Command="{StaticResource ToggleApple2ScreenChartCmd}" IsCheckable="True"/>
|
2019-12-30 01:59:35 +00:00
|
|
|
<Separator/>
|
2019-12-29 01:14:29 +00:00
|
|
|
<MenuItem Command="{StaticResource ShowFileHexDumpCmd}"/>
|
|
|
|
<MenuItem Command="{StaticResource ConcatenateFilesCmd}"/>
|
2019-12-30 01:59:35 +00:00
|
|
|
<MenuItem Command="{StaticResource SliceFilesCmd}"/>
|
2020-06-24 00:21:18 +00:00
|
|
|
<MenuItem Command="{StaticResource ConvertOmfCmd}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
</MenuItem>
|
|
|
|
<MenuItem Header="_Help">
|
|
|
|
<MenuItem Command="Help"/>
|
2019-07-06 22:51:57 +00:00
|
|
|
<MenuItem Command="{StaticResource AboutCmd}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
</MenuItem>
|
2019-07-15 22:32:27 +00:00
|
|
|
<MenuItem Header="_DEBUG" Name="DebugMenu" SubmenuOpened="DebugMenu_SubmenuOpened"
|
|
|
|
Visibility="{Binding ShowDebugMenu, Converter={StaticResource BoolToVis}}">
|
2019-04-29 23:34:09 +00:00
|
|
|
<MenuItem Command="Refresh" Header="Re-analyze"/>
|
2019-10-24 00:49:59 +00:00
|
|
|
<MenuItem Command="{StaticResource Debug_SourceGenerationTestsCmd}"/>
|
|
|
|
<Separator/>
|
2019-07-16 00:18:28 +00:00
|
|
|
<MenuItem Name="debugAnalyzerOutputMenuItem"
|
|
|
|
Command="{StaticResource Debug_ShowAnalyzerOutputCmd}" IsCheckable="True"/>
|
|
|
|
<MenuItem Name="debugAnalysisTimersMenuItem"
|
|
|
|
Command="{StaticResource Debug_ShowAnalysisTimersCmd}" IsCheckable="True"/>
|
2019-10-24 00:49:59 +00:00
|
|
|
<MenuItem Name ="debugUndoRedoHistoryMenuItem"
|
|
|
|
Command="{StaticResource Debug_ShowUndoRedoHistoryCmd}" IsCheckable="True"/>
|
2019-07-15 23:50:54 +00:00
|
|
|
<MenuItem Command="{StaticResource Debug_ExtensionScriptInfoCmd}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<Separator/>
|
2019-07-15 22:32:27 +00:00
|
|
|
<MenuItem Name="debugCommentRulersMenuItem"
|
|
|
|
Command="{StaticResource Debug_ToggleCommentRulersCmd}" IsCheckable="True"/>
|
2020-07-18 20:47:01 +00:00
|
|
|
<Separator/>
|
|
|
|
<MenuItem Name="debugSecuritySandboxMenuItem"
|
|
|
|
Command="{StaticResource Debug_ToggleSecuritySandboxCmd}" IsCheckable="True"/>
|
2019-07-15 22:32:27 +00:00
|
|
|
<MenuItem Name="debugKeepAliveHackMenuItem"
|
|
|
|
Command="{StaticResource Debug_ToggleKeepAliveHackCmd}" IsCheckable="True"/>
|
Reboot sandbox when required
Another chapter in the never-ending AppDomain security saga.
If a computer goes to sleep while SourceGen is running with a project
open, life gets confusing when the system wakes up. The keep-alive
timer fires and a ping is sent to the remote AppDomain, successfully.
At the same time, the lease expires on the remote side, and the objects
are discarded (apparently without bothering to query the ILease object).
This failure mode is 100% repeatable.
Since we can't prevent sandbox objects from disappearing, we have to
detect and recover from the problem. Fortunately we don't keep any
necessary state on the plugin side, so we can just tear the whole
thing down and recreate it.
The various methods in ScriptManager now do a "health check" before
making calls into the plugin AppDomain. If the ping attempt fails,
the AppDomain is "rebooted" by destroying it and creating a new one,
reloading all plugins that were in there before. The plugin binaries
*should* still be in the PluginDllCache directory since the ping failure
was due to objects being discarded, not AppDomain shutdown, and Windows
doesn't let you mess with files that hold executable code.
A new "reboot security sandbox" option has been added to the DEBUG
menu to facilitate testing.
The PluginManager's Ping() method gets called more often, but not to
the extent that performance will be affected.
This change also adds a finalizer to DisasmProject, since we're relying
on it to shut down the ScriptManager, and it's relying on callers to
invoke its cleanup function. The finalizer throws an assertion if the
cleanup function doesn't get called.
(Issue #82)
2020-07-19 20:20:18 +00:00
|
|
|
<MenuItem Command="{StaticResource Debug_RebootSecuritySandboxCmd}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<Separator/>
|
2019-10-24 00:49:59 +00:00
|
|
|
<MenuItem Command="{StaticResource Debug_ApplesoftToHtmlCmd}"/>
|
2020-07-15 23:18:02 +00:00
|
|
|
<MenuItem Command="{StaticResource Debug_ExportEditCommandsCmd}"/>
|
2020-04-14 00:33:34 +00:00
|
|
|
<MenuItem Command="{StaticResource Debug_ApplyEditCommandsCmd}"/>
|
2020-07-28 17:56:07 +00:00
|
|
|
<MenuItem Command="{StaticResource Debug_ApplyExternalSymbolsCmd}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
</MenuItem>
|
|
|
|
</Menu>
|
|
|
|
|
2019-06-11 21:36:38 +00:00
|
|
|
<ToolBarTray DockPanel.Dock="Top">
|
|
|
|
<ToolBar RenderOptions.BitmapScalingMode="NearestNeighbor">
|
2019-07-11 18:36:07 +00:00
|
|
|
<Button Command="{StaticResource NavigateBackwardCmd}"
|
|
|
|
ToolTip="Navigate backward (Alt+Left, Ctrl+Minus, or back button on mouse)">
|
2019-06-11 21:36:38 +00:00
|
|
|
<ContentControl Template="{StaticResource icon_StepBackwards}"/>
|
|
|
|
</Button>
|
2019-07-11 18:36:07 +00:00
|
|
|
<Button Command="{StaticResource NavigateForwardCmd}"
|
|
|
|
ToolTip="Navigate forward (Alt+Right or Ctrl+Shift+Minus)">
|
2019-06-11 21:36:38 +00:00
|
|
|
<ContentControl Template="{StaticResource icon_StepForward}"/>
|
|
|
|
</Button>
|
2019-11-04 21:34:49 +00:00
|
|
|
<Button Command="{StaticResource GotoLastChangeCmd}"
|
|
|
|
ToolTip="Go to Last Change">
|
|
|
|
<ContentControl Template="{StaticResource icon_DebugHistorySeekToFrame}"/>
|
|
|
|
</Button>
|
2019-06-11 21:36:38 +00:00
|
|
|
<Separator/>
|
2019-07-11 18:36:07 +00:00
|
|
|
<Button Command="{StaticResource NewProjectCmd}" ToolTip="Create new project">
|
2019-06-11 21:36:38 +00:00
|
|
|
<ContentControl Template="{StaticResource icon_NewFile}"/>
|
|
|
|
</Button>
|
2019-07-11 18:36:07 +00:00
|
|
|
<Button Command="{StaticResource OpenCmd}" ToolTip="Open project">
|
2019-06-11 21:36:38 +00:00
|
|
|
<ContentControl Template="{StaticResource icon_OpenFile}"/>
|
|
|
|
</Button>
|
2019-07-11 18:36:07 +00:00
|
|
|
<Button Command="Save" ToolTip="Save project (Ctrl+S)">
|
2019-06-11 21:36:38 +00:00
|
|
|
<ContentControl Template="{StaticResource icon_SaveFile}"/>
|
|
|
|
</Button>
|
|
|
|
<Separator/>
|
2019-07-11 18:36:07 +00:00
|
|
|
<Button Command="Copy" ToolTip="Copy to clipboard (Ctrl+C)">
|
2019-06-11 21:36:38 +00:00
|
|
|
<ContentControl Template="{StaticResource icon_CopyToClipboard}"/>
|
|
|
|
</Button>
|
2020-09-05 00:49:28 +00:00
|
|
|
<CheckBox IsChecked="{Binding DoShowCycleCounts}" ToolTip="Toggle display of cycle counts">
|
|
|
|
<ContentControl Template="{StaticResource icon_DomainType}"/>
|
|
|
|
</CheckBox>
|
2019-06-11 21:36:38 +00:00
|
|
|
<Separator/>
|
2019-07-11 18:36:07 +00:00
|
|
|
<Button Command="Help" ToolTip="Help - open manual in browser (F1)">
|
2019-06-11 21:36:38 +00:00
|
|
|
<ContentControl Template="{StaticResource icon_F1Help}"/>
|
|
|
|
</Button>
|
|
|
|
</ToolBar>
|
|
|
|
</ToolBarTray>
|
2019-04-29 23:34:09 +00:00
|
|
|
|
2019-05-28 01:46:09 +00:00
|
|
|
<StatusBar Name="mainStatusBar" DockPanel.Dock="Bottom">
|
2019-11-20 02:18:41 +00:00
|
|
|
<Grid Width="{Binding ActualWidth, RelativeSource={RelativeSource FindAncestor,
|
|
|
|
AncestorType={x:Type StatusBar}}}">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Grid.Column="0" Text="{Binding StatusBarText, FallbackValue=Ready}"/>
|
|
|
|
<TextBlock Grid.Column="1" HorizontalAlignment="Center"
|
2020-03-02 02:18:31 +00:00
|
|
|
Text="{Binding ByteCountText, FallbackValue=100KB: 30.0% code; 60.0% data; 10.0% junk}"/>
|
2019-12-11 01:41:00 +00:00
|
|
|
<Button Grid.Column="2" Margin="4,0,20,0" Padding="4,0,4,0"
|
2019-10-21 01:02:23 +00:00
|
|
|
Content="{Binding MessageStatusText, FallbackValue=3 messages (1 warning/error)}"
|
|
|
|
Visibility="{Binding Path=CodeListVisibility}"
|
|
|
|
Click="MessageStatusButton_Click"/>
|
2019-11-20 02:18:41 +00:00
|
|
|
</Grid>
|
2019-04-29 23:34:09 +00:00
|
|
|
</StatusBar>
|
|
|
|
|
|
|
|
<!-- Main part of the window. Three side-by-side panels, only the middle of which changes
|
2019-06-11 21:36:38 +00:00
|
|
|
size when the window is resized. This needs to be the last thing defined in the
|
|
|
|
DockPanel, so that LastChildFill will expand this to fill all available space. -->
|
2019-05-28 01:46:09 +00:00
|
|
|
<Grid Name="triptychGrid" DockPanel.Dock="Top">
|
2019-04-29 23:34:09 +00:00
|
|
|
<Grid.ColumnDefinitions>
|
2019-10-23 04:27:49 +00:00
|
|
|
<ColumnDefinition Width="*" MinWidth="100"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="*" MinWidth="150"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
2019-10-23 04:27:49 +00:00
|
|
|
<ColumnDefinition Width="*" MinWidth="100"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
2019-11-01 18:05:22 +00:00
|
|
|
|
2021-08-09 00:39:21 +00:00
|
|
|
<GridSplitter Grid.Column="1" Width="4" HorizontalAlignment="Left"/>
|
|
|
|
<GridSplitter Grid.Column="3" Width="4" HorizontalAlignment="Center"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
|
2019-05-28 01:46:09 +00:00
|
|
|
<Grid Name="leftPanel" Grid.Column="0">
|
2019-04-29 23:34:09 +00:00
|
|
|
<Grid.RowDefinitions>
|
2019-06-19 23:31:56 +00:00
|
|
|
<RowDefinition Height="2*" MinHeight="100"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="*" MinHeight="100"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<GroupBox Grid.Row="0" Header="References">
|
2019-06-15 23:00:31 +00:00
|
|
|
<DataGrid Name="referencesGrid" IsReadOnly="True"
|
2019-06-10 22:46:35 +00:00
|
|
|
ItemsSource="{Binding ReferencesList}"
|
2019-06-10 01:09:00 +00:00
|
|
|
FontFamily="{StaticResource GeneralMonoFont}"
|
|
|
|
SnapsToDevicePixels="True"
|
2019-06-10 22:46:35 +00:00
|
|
|
GridLinesVisibility="Vertical"
|
|
|
|
VerticalGridLinesBrush="#FF7F7F7F"
|
2019-06-10 01:09:00 +00:00
|
|
|
AutoGenerateColumns="False"
|
2019-06-10 22:46:35 +00:00
|
|
|
HeadersVisibility="Column"
|
|
|
|
CanUserReorderColumns="False"
|
2019-06-15 23:00:31 +00:00
|
|
|
SelectionMode="Single"
|
|
|
|
MouseDoubleClick="ReferencesList_MouseDoubleClick">
|
2019-04-29 23:34:09 +00:00
|
|
|
<DataGrid.Columns>
|
2019-06-20 22:10:35 +00:00
|
|
|
<DataGridTextColumn Header="Offset" Width="53" Binding="{Binding Offset}"/>
|
|
|
|
<DataGridTextColumn Header="Addr" Width="53" Binding="{Binding Addr}"/>
|
|
|
|
<DataGridTextColumn Header="Type" Width="119" Binding="{Binding Type}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
|
|
|
</GroupBox>
|
|
|
|
|
|
|
|
<GroupBox Grid.Row="2" Header="Notes">
|
2019-10-02 01:20:51 +00:00
|
|
|
<DataGrid Name="notesGrid"
|
2019-06-12 22:54:22 +00:00
|
|
|
ItemsSource="{Binding NotesList}"
|
2019-10-02 01:20:51 +00:00
|
|
|
IsReadOnly="True"
|
2019-06-12 22:54:22 +00:00
|
|
|
FontFamily="{StaticResource GeneralMonoFont}"
|
|
|
|
SnapsToDevicePixels="True"
|
|
|
|
GridLinesVisibility="Vertical"
|
|
|
|
VerticalGridLinesBrush="#FF7F7F7F"
|
|
|
|
AutoGenerateColumns="False"
|
|
|
|
HeadersVisibility="Column"
|
|
|
|
CanUserReorderColumns="False"
|
2019-06-15 23:00:31 +00:00
|
|
|
SelectionMode="Single"
|
|
|
|
MouseDoubleClick="NotesList_MouseDoubleClick">
|
2019-04-29 23:34:09 +00:00
|
|
|
<DataGrid.Columns>
|
2019-06-20 22:10:35 +00:00
|
|
|
<DataGridTextColumn Header="Offset" Width="53" Binding="{Binding Offset}"/>
|
|
|
|
<DataGridTextColumn Header="Note" Width="400" Binding="{Binding Note}">
|
2019-06-12 22:54:22 +00:00
|
|
|
<DataGridTextColumn.ElementStyle>
|
|
|
|
<Style TargetType="{x:Type TextBlock}">
|
2019-06-15 23:00:31 +00:00
|
|
|
<!-- The default highlight uses dark blue background with
|
|
|
|
white text, but our highlight colors are meant to work
|
2019-10-09 18:06:45 +00:00
|
|
|
with black text. So override Foreground as well. For
|
|
|
|
non-highlighted entries we have to force (in code) the
|
|
|
|
color to white to keep things consistent. -->
|
2019-06-12 22:54:22 +00:00
|
|
|
<Setter Property="Background" Value="{Binding BackBrush}"/>
|
2019-06-15 23:00:31 +00:00
|
|
|
<Setter Property="Foreground" Value="Black"/>
|
2019-10-09 18:06:45 +00:00
|
|
|
<!--<Setter Property="Foreground"
|
|
|
|
Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>-->
|
2019-06-12 22:54:22 +00:00
|
|
|
</Style>
|
|
|
|
</DataGridTextColumn.ElementStyle>
|
|
|
|
</DataGridTextColumn>
|
2019-04-29 23:34:09 +00:00
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
|
|
|
</GroupBox>
|
|
|
|
|
|
|
|
<GridSplitter Height="4" Grid.Row="1"
|
|
|
|
HorizontalAlignment="Stretch" VerticalAlignment="Center"/>
|
|
|
|
</Grid>
|
|
|
|
|
2019-10-20 21:40:32 +00:00
|
|
|
<!-- Launch panel. Either this or the code list panel will be visible. -->
|
2019-10-23 05:23:22 +00:00
|
|
|
<Grid Grid.Column="2" Name="launchPanel" Visibility="{Binding Path=LaunchPanelVisibility}"
|
|
|
|
d:IsHidden="True">
|
2019-04-29 23:34:09 +00:00
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
2019-07-20 20:28:10 +00:00
|
|
|
<Image Source="/SourceGen;component/Res/Logo.png" Height="100"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<Grid Margin="8">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition/>
|
|
|
|
<RowDefinition/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="0" VerticalAlignment="Center"
|
|
|
|
Text="6502bench SourceGen" FontSize="36"/>
|
|
|
|
<TextBlock Grid.Row="1" VerticalAlignment="Center"
|
2019-05-03 22:43:16 +00:00
|
|
|
Text="{Binding ProgramVersionString, StringFormat={}Version {0},
|
|
|
|
RelativeSource={RelativeSource FindAncestor, AncestorType=Window},
|
|
|
|
FallbackValue=Version X.Y.Z-alpha1}"
|
|
|
|
FontSize="24"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
</Grid>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<StackPanel Grid.Row="1" HorizontalAlignment="Left">
|
2019-06-23 00:38:07 +00:00
|
|
|
<Button Content="Start new project" Width="240" Height="50" Margin="10,30,10,10"
|
|
|
|
Command="{StaticResource NewProjectCmd}"/>
|
2019-06-22 21:41:09 +00:00
|
|
|
<Button Content="Open existing project" Width="240" Height="50" Margin="10"
|
|
|
|
Command="{StaticResource OpenCmd}"/>
|
2019-12-07 21:55:11 +00:00
|
|
|
<Button Width="240" Height="50" Margin="10" Visibility="{Binding RecentProjectVisibility1}"
|
|
|
|
ToolTip="{Binding RecentProjectPath1}" ToolTipService.InitialShowDelay="1000"
|
2019-06-22 21:41:09 +00:00
|
|
|
Command="{DynamicResource RecentProjectCmd}" CommandParameter="0">
|
|
|
|
<Button.Content>
|
|
|
|
<StackPanel>
|
|
|
|
<TextBlock HorizontalAlignment="Center">Recent project #1</TextBlock>
|
2019-12-07 21:55:11 +00:00
|
|
|
<TextBlock Text="{Binding RecentProjectName1, FallbackValue=RECENT 1}" HorizontalAlignment="Center"/>
|
2019-06-22 21:41:09 +00:00
|
|
|
</StackPanel>
|
|
|
|
</Button.Content>
|
|
|
|
</Button>
|
2019-12-07 21:55:11 +00:00
|
|
|
<Button Width="240" Height="50" Margin="10" Visibility="{Binding RecentProjectVisibility2}"
|
|
|
|
ToolTip="{Binding RecentProjectPath2}" ToolTipService.InitialShowDelay="1000"
|
2019-06-22 21:41:09 +00:00
|
|
|
Command="{DynamicResource RecentProjectCmd}" CommandParameter="1">
|
|
|
|
<Button.Content>
|
|
|
|
<StackPanel>
|
|
|
|
<TextBlock HorizontalAlignment="Center">Recent project #2</TextBlock>
|
2019-12-07 21:55:11 +00:00
|
|
|
<TextBlock Text="{Binding RecentProjectName2, FallbackValue=RECENT 1}" HorizontalAlignment="Center"/>
|
2019-06-22 21:41:09 +00:00
|
|
|
</StackPanel>
|
|
|
|
</Button.Content>
|
|
|
|
</Button>
|
2019-04-29 23:34:09 +00:00
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
|
2019-10-20 21:40:32 +00:00
|
|
|
<!-- Code list panel. Either this or the Launch panel will be visible. -->
|
|
|
|
<Grid Grid.Column="2" Name="codeListGrid" Visibility="{Binding Path=CodeListVisibility}">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
2019-10-23 04:27:49 +00:00
|
|
|
<ListView Name="codeListView"
|
2019-10-20 21:40:32 +00:00
|
|
|
Style="{StaticResource codeListStyle}"
|
|
|
|
FontFamily="{StaticResource GeneralMonoFont}"
|
|
|
|
VirtualizingStackPanel.VirtualizationMode="Recycling"
|
|
|
|
ItemContainerStyle="{StaticResource codeListItemStyle}"
|
|
|
|
SelectionChanged="CodeListView_SelectionChanged"
|
|
|
|
MouseDoubleClick="CodeListView_MouseDoubleClick">
|
|
|
|
<ListView.Resources>
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
|
|
|
|
<!-- <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=Text }" /> -->
|
|
|
|
</Style>
|
|
|
|
</ListView.Resources>
|
|
|
|
<ListView.View>
|
|
|
|
<GridView AllowsColumnReorder="False">
|
|
|
|
<GridViewColumn Header="Offset" Width="60"
|
|
|
|
DisplayMemberBinding="{Binding Offset}"/>
|
|
|
|
<GridViewColumn Header="Addr" Width="60"
|
|
|
|
CellTemplate="{StaticResource addrHighlightTemplate}"/>
|
|
|
|
<GridViewColumn Header="Bytes" Width="93"
|
|
|
|
DisplayMemberBinding="{Binding Bytes}"/>
|
|
|
|
<GridViewColumn Header="Flags" Width="80"
|
|
|
|
CellTemplate="{StaticResource flagsHighlightTemplate}"/>
|
|
|
|
<GridViewColumn Header="Attr" Width="54"
|
|
|
|
DisplayMemberBinding="{Binding Attr}"/>
|
|
|
|
<GridViewColumn Header="Label" Width="73"
|
|
|
|
CellTemplate="{StaticResource labelHighlightTemplate}"/>
|
|
|
|
<GridViewColumn Header="Opcode" Width="60"
|
|
|
|
DisplayMemberBinding="{Binding Opcode}"/>
|
|
|
|
<GridViewColumn Header="Operand" Width="100"
|
|
|
|
DisplayMemberBinding="{Binding Operand}"/>
|
|
|
|
<GridViewColumn Header="Comment" Width="344"
|
|
|
|
DisplayMemberBinding="{Binding Comment}"/>
|
|
|
|
</GridView>
|
|
|
|
</ListView.View>
|
|
|
|
|
|
|
|
<ListView.ContextMenu>
|
|
|
|
<!-- this is populated as a clone of the Actions menu during init -->
|
|
|
|
<ContextMenu/>
|
|
|
|
</ListView.ContextMenu>
|
|
|
|
</ListView>
|
|
|
|
|
|
|
|
<!-- A GridSplitter would be nice to make the height adjustable, but I had
|
|
|
|
trouble making everything disappear cleanly, particularly w.r.t. the splitter
|
2019-10-23 05:23:22 +00:00
|
|
|
working correctly after hide + re-show. (This might have been due to issue #52...
|
|
|
|
should revisit this someday.) See
|
2019-10-20 21:40:32 +00:00
|
|
|
https://stackoverflow.com/q/2502178/294248 for suggestions. -->
|
|
|
|
<!--<GridSplitter Name="messageLogSplitter" Grid.Row="1" Height="4"
|
|
|
|
HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
|
|
|
Visibility="{Binding MessageListVisibility}"/>-->
|
|
|
|
|
|
|
|
<DockPanel Grid.Row="1" Visibility="{Binding MessageListVisibility}">
|
|
|
|
<Button DockPanel.Dock="Left" Content="Hide" Width="50" Margin="4,0,4,0"
|
2019-10-21 01:02:23 +00:00
|
|
|
VerticalAlignment="Bottom"
|
|
|
|
Click="HideMessageList_Click">
|
2019-10-20 21:40:32 +00:00
|
|
|
<Button.LayoutTransform>
|
|
|
|
<RotateTransform Angle="270"/>
|
|
|
|
</Button.LayoutTransform>
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
<DataGrid DockPanel.Dock="Top" Name="messageGrid"
|
|
|
|
Height="100"
|
|
|
|
IsReadOnly="True"
|
|
|
|
ItemsSource="{Binding FormattedMessages}"
|
|
|
|
FontFamily="{StaticResource GeneralMonoFont}"
|
|
|
|
SnapsToDevicePixels="True"
|
|
|
|
GridLinesVisibility="Vertical"
|
|
|
|
VerticalGridLinesBrush="#FF7F7F7F"
|
|
|
|
AutoGenerateColumns="False"
|
|
|
|
HeadersVisibility="Column"
|
|
|
|
CanUserReorderColumns="False"
|
|
|
|
SelectionMode="Single"
|
2019-10-21 01:02:23 +00:00
|
|
|
VerticalScrollBarVisibility="Visible"
|
|
|
|
MouseDoubleClick="MessageGrid_MouseDoubleClick">
|
2019-10-20 21:40:32 +00:00
|
|
|
<!-- 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="160" Binding="{Binding Type}"/>
|
|
|
|
<DataGridTextColumn Header="Context" Width="380" Binding="{Binding Context}"/>
|
|
|
|
<DataGridTextColumn Header="Resolution" Width="250" Binding="{Binding Resolution}"/>
|
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
|
|
|
</DockPanel>
|
|
|
|
</Grid>
|
2019-05-09 23:13:20 +00:00
|
|
|
|
2019-05-28 01:46:09 +00:00
|
|
|
<Grid Name="rightPanel" Grid.Column="4">
|
2019-04-29 23:34:09 +00:00
|
|
|
<Grid.RowDefinitions>
|
2019-06-19 23:31:56 +00:00
|
|
|
<RowDefinition Height="2*" MinHeight="100"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
<RowDefinition Height="Auto"/>
|
2019-10-23 04:27:49 +00:00
|
|
|
<RowDefinition Height="*" MinHeight="50"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
Label rework, part 6
Correct handling of local variables. We now correctly uniquify them
with regard to non-unique labels. Because local vars can effectively
have global scope we mostly want to treat them as global, but they're
uniquified relative to other globals very late in the process, so we
can't just throw them in the symbol table and be done. Fortunately
local variables exist in a separate namespace, so we just need to
uniquify the variables relative to the post-localization symbol table.
In other words, we take the symbol table, apply the label map, and
rename any variable that clashes.
This also fixes an older problem where we weren't masking the
leading '_' on variable labels when generating 64tass output.
The code list now makes non-unique labels obvious, but you can't tell
the difference between unique global and unique local. What's more,
the default type value in Edit Label is now adjusted to Global for
unique locals that were auto-generated. To make it a bit easier to
figure out what's what, the Info panel now has a "label type" line
that reports the type.
The 2023-non-unique-labels test had some additional tests added to
exercise conflicts with local variables. The 2019-local-variables
test output changed slightly because the de-duplicated variable
naming convention was simplified.
2019-11-18 21:26:03 +00:00
|
|
|
<!-- symbols panel -->
|
2019-04-29 23:34:09 +00:00
|
|
|
<GroupBox Grid.Row="0" Header="Symbols">
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<WrapPanel Grid.Row="0">
|
2019-07-16 21:52:08 +00:00
|
|
|
<ToggleButton Content="User" Width="40" Margin="2,2"
|
|
|
|
IsChecked="{Binding SymFilterUserLabels}"/>
|
2019-11-16 04:40:14 +00:00
|
|
|
<ToggleButton Content="NonU" Width="40" Margin="2,2"
|
|
|
|
IsChecked="{Binding SymFilterNonUniqueLabels}"/>
|
2019-07-16 21:52:08 +00:00
|
|
|
<ToggleButton Content="Proj" Width="40" Margin="2,2"
|
|
|
|
IsChecked="{Binding SymFilterProjectSymbols}"/>
|
|
|
|
<ToggleButton Content="Plat" Width="40" Margin="2,2"
|
|
|
|
IsChecked="{Binding SymFilterPlatformSymbols}"/>
|
2021-10-05 03:41:19 +00:00
|
|
|
<ToggleButton Content="PreL" Width="40" Margin="2,2"
|
|
|
|
IsChecked="{Binding SymFilterAddrPreLabels}"/>
|
2019-07-16 21:52:08 +00:00
|
|
|
<ToggleButton Content="Auto" Width="40" Margin="2,2"
|
|
|
|
IsChecked="{Binding SymFilterAutoLabels}"/>
|
|
|
|
<ToggleButton Content="Addr" Width="40" Margin="2,2"
|
|
|
|
IsChecked="{Binding SymFilterAddresses}"/>
|
|
|
|
<ToggleButton Content="Cnst" Width="40" Margin="2,2"
|
|
|
|
IsChecked="{Binding SymFilterConstants}"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
</WrapPanel>
|
|
|
|
|
2019-06-15 23:00:31 +00:00
|
|
|
<DataGrid Grid.Row="1" Name="symbolsGrid"
|
2019-06-12 21:17:24 +00:00
|
|
|
IsReadOnly="True"
|
|
|
|
ItemsSource="{Binding Source={StaticResource SymbolTableSource}}"
|
|
|
|
FontFamily="{StaticResource GeneralMonoFont}"
|
|
|
|
SnapsToDevicePixels="True"
|
|
|
|
GridLinesVisibility="Vertical"
|
|
|
|
VerticalGridLinesBrush="#FF7F7F7F"
|
|
|
|
AutoGenerateColumns="False"
|
|
|
|
HeadersVisibility="Column"
|
|
|
|
CanUserReorderColumns="False"
|
|
|
|
SelectionMode="Single"
|
2019-06-15 23:00:31 +00:00
|
|
|
Sorting="SymbolsList_Sorting"
|
|
|
|
MouseDoubleClick="SymbolsList_MouseDoubleClick">
|
2019-06-12 21:17:24 +00:00
|
|
|
<DataGrid.Columns>
|
2019-06-20 22:10:35 +00:00
|
|
|
<DataGridTextColumn Header="Type" Width="36" Binding="{Binding Type}"/>
|
|
|
|
<DataGridTextColumn Header="Value" Width="66" Binding="{Binding Value}"/>
|
|
|
|
<DataGridTextColumn Header="Name" Width="120" Binding="{Binding Name}"/>
|
2019-06-12 21:17:24 +00:00
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
2019-04-29 23:34:09 +00:00
|
|
|
</Grid>
|
|
|
|
</GroupBox>
|
|
|
|
|
Label rework, part 6
Correct handling of local variables. We now correctly uniquify them
with regard to non-unique labels. Because local vars can effectively
have global scope we mostly want to treat them as global, but they're
uniquified relative to other globals very late in the process, so we
can't just throw them in the symbol table and be done. Fortunately
local variables exist in a separate namespace, so we just need to
uniquify the variables relative to the post-localization symbol table.
In other words, we take the symbol table, apply the label map, and
rename any variable that clashes.
This also fixes an older problem where we weren't masking the
leading '_' on variable labels when generating 64tass output.
The code list now makes non-unique labels obvious, but you can't tell
the difference between unique global and unique local. What's more,
the default type value in Edit Label is now adjusted to Global for
unique locals that were auto-generated. To make it a bit easier to
figure out what's what, the Info panel now has a "label type" line
that reports the type.
The 2023-non-unique-labels test had some additional tests added to
exercise conflicts with local variables. The 2019-local-variables
test output changed slightly because the de-duplicated variable
naming convention was simplified.
2019-11-18 21:26:03 +00:00
|
|
|
<!-- info panel -->
|
2019-04-29 23:34:09 +00:00
|
|
|
<GroupBox Grid.Row="2" Header="Info">
|
2019-10-23 04:27:49 +00:00
|
|
|
<ScrollViewer>
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
Label rework, part 6
Correct handling of local variables. We now correctly uniquify them
with regard to non-unique labels. Because local vars can effectively
have global scope we mostly want to treat them as global, but they're
uniquified relative to other globals very late in the process, so we
can't just throw them in the symbol table and be done. Fortunately
local variables exist in a separate namespace, so we just need to
uniquify the variables relative to the post-localization symbol table.
In other words, we take the symbol table, apply the label map, and
rename any variable that clashes.
This also fixes an older problem where we weren't masking the
leading '_' on variable labels when generating 64tass output.
The code list now makes non-unique labels obvious, but you can't tell
the difference between unique global and unique local. What's more,
the default type value in Edit Label is now adjusted to Global for
unique locals that were auto-generated. To make it a bit easier to
figure out what's what, the Info panel now has a "label type" line
that reports the type.
The 2023-non-unique-labels test had some additional tests added to
exercise conflicts with local variables. The 2019-local-variables
test output changed slightly because the de-duplicated variable
naming convention was simplified.
2019-11-18 21:26:03 +00:00
|
|
|
<RowDefinition Height="Auto"/>
|
2019-10-23 04:27:49 +00:00
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<TextBlock Grid.Row="0" TextWrapping="Wrap"
|
|
|
|
Text="{Binding InfoLineDescrText, FallbackValue=Line #1234: N bytes of data}"/>
|
|
|
|
<TextBlock Grid.Row="1" TextWrapping="Wrap" Foreground="DarkGray"
|
2019-10-30 21:30:03 +00:00
|
|
|
Text="{Binding InfoOffsetText, FallbackValue=[offset: +123456]}"
|
|
|
|
Visibility="{Binding InfoShowDebug, Converter={StaticResource BoolToVis}}"/>
|
Label rework, part 6
Correct handling of local variables. We now correctly uniquify them
with regard to non-unique labels. Because local vars can effectively
have global scope we mostly want to treat them as global, but they're
uniquified relative to other globals very late in the process, so we
can't just throw them in the symbol table and be done. Fortunately
local variables exist in a separate namespace, so we just need to
uniquify the variables relative to the post-localization symbol table.
In other words, we take the symbol table, apply the label map, and
rename any variable that clashes.
This also fixes an older problem where we weren't masking the
leading '_' on variable labels when generating 64tass output.
The code list now makes non-unique labels obvious, but you can't tell
the difference between unique global and unique local. What's more,
the default type value in Edit Label is now adjusted to Global for
unique locals that were auto-generated. To make it a bit easier to
figure out what's what, the Info panel now has a "label type" line
that reports the type.
The 2023-non-unique-labels test had some additional tests added to
exercise conflicts with local variables. The 2019-local-variables
test output changed slightly because the de-duplicated variable
naming convention was simplified.
2019-11-18 21:26:03 +00:00
|
|
|
<TextBlock Grid.Row="2" TextWrapping="Wrap"
|
|
|
|
Text="{Binding InfoLabelDescrText, FallbackValue=Label FUBAR (local)}"/>
|
2019-10-23 04:27:49 +00:00
|
|
|
|
Label rework, part 6
Correct handling of local variables. We now correctly uniquify them
with regard to non-unique labels. Because local vars can effectively
have global scope we mostly want to treat them as global, but they're
uniquified relative to other globals very late in the process, so we
can't just throw them in the symbol table and be done. Fortunately
local variables exist in a separate namespace, so we just need to
uniquify the variables relative to the post-localization symbol table.
In other words, we take the symbol table, apply the label map, and
rename any variable that clashes.
This also fixes an older problem where we weren't masking the
leading '_' on variable labels when generating 64tass output.
The code list now makes non-unique labels obvious, but you can't tell
the difference between unique global and unique local. What's more,
the default type value in Edit Label is now adjusted to Global for
unique locals that were auto-generated. To make it a bit easier to
figure out what's what, the Info panel now has a "label type" line
that reports the type.
The 2023-non-unique-labels test had some additional tests added to
exercise conflicts with local variables. The 2019-local-variables
test output changed slightly because the de-duplicated variable
naming convention was simplified.
2019-11-18 21:26:03 +00:00
|
|
|
<StackPanel Grid.Row="3"
|
2019-10-23 04:27:49 +00:00
|
|
|
Visibility="{Binding InfoFormatShowDashes, Converter={StaticResource BoolToVis}}">
|
|
|
|
<!-- For some reason putting the Visibility on the Border causes the
|
|
|
|
border to disappear even when it's supposed to be Visible. So I'm
|
|
|
|
using a panel to contain it. -->
|
|
|
|
<Border BorderThickness="1" Padding="1" Margin="0,2">
|
|
|
|
<!-- https://stackoverflow.com/a/47300149/294248 -->
|
|
|
|
<Border.BorderBrush>
|
|
|
|
<VisualBrush>
|
|
|
|
<VisualBrush.Visual>
|
|
|
|
<Rectangle StrokeDashArray="4 2" Stroke="{Binding InfoFormatBoxBrush}" StrokeThickness="1"
|
|
|
|
Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
|
|
|
|
Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}"/>
|
|
|
|
</VisualBrush.Visual>
|
|
|
|
</VisualBrush>
|
|
|
|
</Border.BorderBrush>
|
|
|
|
<TextBlock TextWrapping="Wrap"
|
|
|
|
Text="{Binding InfoFormatText, FallbackValue=Format: good stuff}"/>
|
|
|
|
</Border>
|
|
|
|
</StackPanel>
|
Label rework, part 6
Correct handling of local variables. We now correctly uniquify them
with regard to non-unique labels. Because local vars can effectively
have global scope we mostly want to treat them as global, but they're
uniquified relative to other globals very late in the process, so we
can't just throw them in the symbol table and be done. Fortunately
local variables exist in a separate namespace, so we just need to
uniquify the variables relative to the post-localization symbol table.
In other words, we take the symbol table, apply the label map, and
rename any variable that clashes.
This also fixes an older problem where we weren't masking the
leading '_' on variable labels when generating 64tass output.
The code list now makes non-unique labels obvious, but you can't tell
the difference between unique global and unique local. What's more,
the default type value in Edit Label is now adjusted to Global for
unique locals that were auto-generated. To make it a bit easier to
figure out what's what, the Info panel now has a "label type" line
that reports the type.
The 2023-non-unique-labels test had some additional tests added to
exercise conflicts with local variables. The 2019-local-variables
test output changed slightly because the de-duplicated variable
naming convention was simplified.
2019-11-18 21:26:03 +00:00
|
|
|
<Border Grid.Row="3" BorderThickness="1" Padding="1" Margin="0,2"
|
2019-10-23 04:27:49 +00:00
|
|
|
BorderBrush="{Binding InfoFormatBoxBrush}"
|
|
|
|
Visibility="{Binding InfoFormatShowSolid, Converter={StaticResource BoolToVis}}">
|
|
|
|
<TextBlock TextWrapping="Wrap" Text="{Binding InfoFormatText}"/>
|
|
|
|
</Border>
|
|
|
|
|
Label rework, part 6
Correct handling of local variables. We now correctly uniquify them
with regard to non-unique labels. Because local vars can effectively
have global scope we mostly want to treat them as global, but they're
uniquified relative to other globals very late in the process, so we
can't just throw them in the symbol table and be done. Fortunately
local variables exist in a separate namespace, so we just need to
uniquify the variables relative to the post-localization symbol table.
In other words, we take the symbol table, apply the label map, and
rename any variable that clashes.
This also fixes an older problem where we weren't masking the
leading '_' on variable labels when generating 64tass output.
The code list now makes non-unique labels obvious, but you can't tell
the difference between unique global and unique local. What's more,
the default type value in Edit Label is now adjusted to Global for
unique locals that were auto-generated. To make it a bit easier to
figure out what's what, the Info panel now has a "label type" line
that reports the type.
The 2023-non-unique-labels test had some additional tests added to
exercise conflicts with local variables. The 2019-local-variables
test output changed slightly because the de-duplicated variable
naming convention was simplified.
2019-11-18 21:26:03 +00:00
|
|
|
<TextBox Grid.Row="4" Text="{Binding InfoPanelDetail1}" IsReadOnly="True"
|
2019-10-23 04:27:49 +00:00
|
|
|
TextWrapping="Wrap" BorderThickness="0"/>
|
|
|
|
|
Label rework, part 6
Correct handling of local variables. We now correctly uniquify them
with regard to non-unique labels. Because local vars can effectively
have global scope we mostly want to treat them as global, but they're
uniquified relative to other globals very late in the process, so we
can't just throw them in the symbol table and be done. Fortunately
local variables exist in a separate namespace, so we just need to
uniquify the variables relative to the post-localization symbol table.
In other words, we take the symbol table, apply the label map, and
rename any variable that clashes.
This also fixes an older problem where we weren't masking the
leading '_' on variable labels when generating 64tass output.
The code list now makes non-unique labels obvious, but you can't tell
the difference between unique global and unique local. What's more,
the default type value in Edit Label is now adjusted to Global for
unique locals that were auto-generated. To make it a bit easier to
figure out what's what, the Info panel now has a "label type" line
that reports the type.
The 2023-non-unique-labels test had some additional tests added to
exercise conflicts with local variables. The 2019-local-variables
test output changed slightly because the de-duplicated variable
naming convention was simplified.
2019-11-18 21:26:03 +00:00
|
|
|
<!--<TextBox Grid.Row="5" Text="{Binding InfoPanelMonoContents}" IsReadOnly="True"
|
2019-10-23 04:27:49 +00:00
|
|
|
FontFamily="{StaticResource GeneralMonoFont}"
|
|
|
|
TextWrapping="Wrap" BorderThickness="0"/>-->
|
|
|
|
</Grid>
|
|
|
|
</ScrollViewer>
|
2019-04-29 23:34:09 +00:00
|
|
|
</GroupBox>
|
|
|
|
|
|
|
|
<GridSplitter Height="4" Grid.Row="1"
|
2019-06-19 23:31:56 +00:00
|
|
|
HorizontalAlignment="Stretch" VerticalAlignment="Center"/>
|
2019-04-29 23:34:09 +00:00
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</DockPanel>
|
|
|
|
</Window>
|