The
Apply all default quick fix proposals tool can
be used to apply quick fix proposals for all reported validation errors in one or more
documents when one or more quick fix proposals have been detected for reported validation
errors. If multiple quick fixes are available for the same validation error, the default quick
fix defined in the Schematron validation schema using the
sqf:default-fix
attribute is automatically selected to be applied. If no default quick fix is explicitly
specified, the first quick fix proposal in the list is considered. All quick fix proposals are
then automatically executed in bulk, one after the other.
Important Notes to Consider:
- To maintain the accuracy of the initially calculated error
validation ranges, the quick fix proposals are applied in the reverse order of their
selection.
- If two or more quick fixes act on the same "area" within the
document, only one is applied (no changes can be made to changes already made).
- Quick fixes that involve "user-entered values" that normally
present a dialog box to facilitate data entry will not be executed (the automatic
process of applying all selected quick fixes cannot be interrupted by the presence of
the respective dialog boxes).
The
Apply all default quick fix proposals tool can
be accessed from the following interface locations:
- [Single Document] The contextual menu when you right-click
anywhere in Text mode or Author mode when
there is a detected quick fix proposal in the current document.
- [One or More Documents] The Tools
menu.
- [One or More Documents] The
Refactoring submenu when you right-click one or more files in the
Project
view.
- [One or More
Documents] The Refactoring submenu when you right-click one
or more files in the DITA Maps
Manager view.
Invoking the tool opens the Apply all default quick fix
proposals dialog box where you can choose the scope for the operation and
optionally specify a filter to narrow the scope.
Figure 1. Apply All Default Quick Fix Proposals Dialog Box
The Scope section allows you to choose from the
following scopes:
- Current File - The quick fix proposals are
applied on the current file only.
- Project - The quick fix proposals are applied
on the current project.
- Selected project resources - The quick fix
proposals are applied on the selected files from the current project.
- All opened files - The quick fix proposals are
applied on all opened files.
- Current DITA map hierarchy (for DITA documents)
- The quick fix proposals are applied on current DITA map along with all of its referenced
topics and submaps (and topics referenced in those submaps).
- Working sets - The quick fix proposals are
applied on a user-defined set of resources, referred to as a working set.
The Include files option in the
Filters section can be used to narrow the scope of the operation by
filtering the selected resources using a file pattern. For example, to restrict the operation
to only parse and update XML documents from the selected files, you could use
{*}.xml for the file pattern.
You can click the Preview button to see a
comparison preview that provides an overview of the content changes that will be made,
according to the quick fixes that will be applied. You can preview the changes in
Text or Author mode. The comparison
panel also informs you of any problems encountered. While previewing the changes, you can also
choose to exclude certain files from having the quick fixes be applied if you do not agree
with the changes for the particular files. If you agree with the changes presented, click
Apply to trigger the quick fixes and update the content.
Troubleshooting: If a quick fix did not apply, a notification with
some information about the error will be displayed in the Results view
at the bottom of the application.
Tip: If the operation takes longer than expected, you can use
the Stop button in the progress bar to cancel the operation.