Package uk.ac.starlink.ttools.plot2.task
Class PlotCommandFormatter
java.lang.Object
uk.ac.starlink.ttools.task.CommandFormatter
uk.ac.starlink.ttools.plot2.task.PlotCommandFormatter
Handles export of PlotStiltsCommand objects to external
serialization formats.
- Since:
- 15 Sep 2017
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionPlotCommandFormatter
(CredibleString invocation, boolean includeDflts, LineEnder lineEnder, int levelIndent, int cwidth) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected String[]
stripExpectedUnused
(uk.ac.starlink.task.Task task, String[] words) Remove words from the list of unused words that are harmless.Methods inherited from class uk.ac.starlink.ttools.task.CommandFormatter
createBasicDocument, createExecutable, createShellDocument, getInvocation, populateEnvironment, setForceError
-
Constructor Details
-
PlotCommandFormatter
public PlotCommandFormatter(CredibleString invocation, boolean includeDflts, LineEnder lineEnder, int levelIndent, int cwidth) Constructor.- Parameters:
invocation
- display text to introduce the STILTS commandincludeDflts
- if true, all parameters are included; if false, only those with non-default valueslineEnder
- line end presentation policylevelIndent
- number of spaces per indentation levelcwidth
- nominal formatting width in characters; this affects line wrapping, but actual wrapping may depend on other factors too
-
-
Method Details
-
stripExpectedUnused
Description copied from class:CommandFormatter
Remove words from the list of unused words that are harmless.This is a hook for a hack. Some of the parameter settings can be unused when object values for other parameter settings are used. If that happens, it looks like there is a problem because settings have not been used. This routine can pull them out so the warning goes away.
- Overrides:
stripExpectedUnused
in classCommandFormatter
- Parameters:
task
- taskwords
- input command word list- Returns:
- list apart from any words that shouldn't be there
-