diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-04-14 12:58:14 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-04-14 12:58:14 +0200 |
commit | fcdc8177b19a5fb3f9e7ab0e49a9142bca0d3b52 (patch) | |
tree | 1b2b18e7e5537dd059a667f53fe4a4ab8c9d0795 /src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.cpp | |
parent | dc3c156cac62262233ffc9f4aaa4b4a6245b66a6 (diff) | |
download | qt-creator-fcdc8177b19a5fb3f9e7ab0e49a9142bca0d3b52.tar.gz |
Documentation: Add ProjectExplorer plugin..
Reformat existing documentation to qdoc.
Diffstat (limited to 'src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.cpp')
-rw-r--r-- | src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.cpp | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.cpp b/src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.cpp index 889f08cfa9..9b3b4ee165 100644 --- a/src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.cpp +++ b/src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.cpp @@ -149,7 +149,13 @@ static bool return true; } -// Do a dry run of the generation script to get a list of files +/*! + \brief Custom wizard script generator function (Step1) - dry run. + + Do a dry run of the generation script to get a list of files + \sa runCustomWizardGeneratorScript, ProjectExplorer::CustomWizard +*/ + Core::GeneratedFiles dryRunCustomWizardGeneratorScript(const QString &targetPath, const QStringList &script, @@ -203,6 +209,37 @@ Core::GeneratedFiles return files; } +/*! + \brief Custom wizard script generator function (Step2) - actual file creation. + + In addition to the <file> elements + that define template files in which macros are replaced, it is possible to have + a custom wizard call a generation script (specified in the "generatorscript" + attribute of the <files> element) which actually creates files. + The command line of the script must follow the convention + \code + script [--dry-run] [options] + \endcode + + Options containing field placeholders are configured in the XML files + and will be passed with them replaced by their values. + + As Qt Creator needs to know the file names before actually creates them to + do overwrite checking etc., this is 2-step process: + \list + \o Determine file names and attributes: The script is called with the + \c --dry-run option and the field values. It then prints the relative path + names it intends to create followed by comma-separated attributes + matching those of the \c <file> element, for example: + \c myclass.cpp,openeditor + \o The script is called with the parameters only in the working directory + and then actually creates the files. If that involves directories, the script + should create those, too. + \endlist + + \sa dryRunCustomWizardGeneratorScript, ProjectExplorer::CustomWizard + */ + bool runCustomWizardGeneratorScript(const QString &targetPath, const QStringList &script, const QList<GeneratorScriptArgument> &arguments, |