FPDoc writers should handle their expected file extensions.better
Original Reporter info from Mantis: dodi
-
Reporter name: Hans-Peter Diettrich
Original Reporter info from Mantis: dodi
- Reporter name: Hans-Peter Diettrich
Description:
Currently the right extension is appended only to fully synthetic output files (i.e. Output=''). A user has to supply non-default filenames with the correct extension, which only can be guessed from the format (writer) name.
One solution would be to substitute all missing filename extensions by the writer specific extension.
Some writers have a class function FilenameExtension, which returns the expected extension of the created file. This method should be introduced in the base class already (TFPDocWriter), so that it is usable with every writer class.
Additional information:
The attached patch makes FilenameExtension a virtual public class method of TFPDocWriter. The returned string should be empty for non-linear writers, which create multiple files for every package, and expect an output directory name. Linear writers instead should return the default extension of the package file.
The intended use is the generation of an output name like this:
Output := MyDir + PackageName + WriterClass.FilenameExtension;
Mantis conversion info:
- Mantis ID: 21101
- Fixed in version: 3.0.0
- Fixed in revision: 20092 (#776fe528)
- Target version: 3.0.0