Commit Graph

13 Commits

Author SHA1 Message Date
Tobias Hunger
61e590a971 JsonWizard: Expand repeatedly when filling out templates
This makes macros work that expand to more macros.

Change-Id: I44770fb59cec6cd80606cd341a92938c50e9e1fd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-09-22 09:16:11 +00:00
Tobias Hunger
ed74b03d1a JsonWizard: Allow to set file-specific replacement
Using options: [ { "key": "a", "value": "b", "condition": "true" } ]

Change-Id: I36692d4e8506c02759674922ee05197de3a5c4c1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-09-22 09:14:37 +00:00
Tobias Hunger
905e5ea847 JsonWizard: Allow Generated files without a source
These are expected to be found in the target location. They will
have the KeepExisting attribute set and their contents will not
be touched.

Having this is useful to specify which files to open.

Change-Id: I958f271405ca780e0052f069e0df89bd402da6c4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-06-15 08:35:26 +00:00
Tobias Hunger
f5e4b8e8cb JsonWizard: Add default implementation
Add default implementations for some generator methods

Change-Id: Id7c2dc76bd3f96bc9f2560e835981fcdad167f92
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-12 06:09:13 +00:00
Tobias Hunger
162c36dbdf JsonWizard: Move code for opening files into JsonWizard
Move code opening files and projects directly into the JsonWizard.
It makes no sense to keep reimplementing this functionality in
generators.

Change-Id: Ib4686a262fa9b2c78028146d138c5bba5d5b604a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-12 06:09:00 +00:00
Tobias Hunger
35aafdcdd9 JsonWizard: Add a polish phase
Add a signal/method to polish the generated files: This phase happens after all files
are written to disk and are ready. It is intended for tasks not directly related to
the project setup: E.g. generation of config files, etc.

Use this to generate our config files.

Change-Id: I9bb5d296bec19f163b70c5ec8d43d5b8e3a52d79
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-23 15:51:33 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
hjk
ef563d8085 MacroExpander: Fall back to global expander
... and use that all over the place.

Change-Id: Ie6e0ed0f0d9eaba9b4466761e6b455f33a905086
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2014-10-16 16:32:58 +02:00
Tobias Hunger
89602419c4 JsonWizard: Make sure to open files as the last thing
Make sure to open files only after last touches were applied by
the wizard.

Change-Id: I0da8b49ebe58b0516fa44ef7b0472cce20a5936f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-10-16 16:23:01 +02:00
Tobias Hunger
869c7770d5 JsonWizard: Allow for more control of line layout in templates
Expand "\n", "\\" and "\t" in the templates to a linebreak/single '\'
character/tab respectively. Also enable line continuation with a '\'
character followed by a line break.

This allows for nicer output from the templates, avoiding spurious
blank lines in places.

Change-Id: I224b49e799f306dcb8fb8aa8ab2ea52733aecfa4
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2014-10-16 12:06:07 +02:00
Eike Ziller
9c7019f0b2 License update.
Change-Id: I0acde2c3b995693de682679471f03af85bdd0a61
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-15 15:19:55 +02:00
Tobias Hunger
b1cc98f79b JsonWizard: Support formatting of sources after creating contents
Change-Id: Ia0fbae6a1d1b2f3dd00c578a8d1ac60e0482fba9
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-09-30 15:14:45 +02:00
Tobias Hunger
2b8e81893a JsonWizard: Add FileGenerator
Add a generator that takes template files and turns them into the
real thing.

Change-Id: I565d6aabdcd391adc34886f4741e0dbbad5e13ec
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-09-24 17:08:58 +02:00