Compost4 AutoFixers

Overview
Auto Fixers are a new feature feature in the Error Messages window for Compost4. They provide utilities to help post developers fix common post processor errors.
Purpose
Auto Fixers were developed to help post developers upgrade legacy PST files into modern POST files for the GibbsCAM 2015 (V11) release.
Error List
Auto Fixers are integrated into the Compiler Error List, as the Auto-Fixer pane. This pane is part of the error list and is always docked to it's right hand side. [[Image::C4_ErrorList_AutoFix.png|right]]
When an error that has an fix is selected, the Auto-Fixer pane will show extended details about the error, it's most common cause, and one or more fix candidates.
Clicking the FIX button will apply the selected fix to the current error.
In the case above, the fix for the selected error is to remove the call to CalcSCAng, and the fix button will make that change. When the fix is applied, it removes the associated error from the list and marks the file as dirty. The fixes all use the standard editing system, so UNDO works just as if the change had been typed the fix in manually. If a fix fails, the system will generate an error and stop.
Fix All
If there are fixes that are considered “safe” in the error list, the Fix All button will be available. This will attempt to fix as many errors as possible automatically. A fix is considered safe if there is only one way to fix it and the results are known to work correctly. When the FixAll is finished, the system will automatically rebuild the post.
Current Auto Fixes
- Removal of Accelerate/Decelerate commands
- Fixing the empty ELSE IF END that exists in many MTM posts.
- Removing CalcSCAng/CalcCAng inside of math
- Adding ReturnNum to subs that end in #
Planned auto-fixes
Fixing cases where a prog sub has the same name as a command (will have 2 fix types, Use Subs, Use Commands).