Commit Graph

19 Commits

Author SHA1 Message Date
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Tobias Hunger
56a9b93a28 JsonWizard: Add option to put evaluated expressions into options
This is necessary to allow for constants that are not re-evaluated all
the time.

Change-Id: I4aec9d71aeae1a25ffa97eac177dd9c6fc6a90ca
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-12-14 14:26:24 +00:00
Tobias Hunger
480f40c038 JSONWizard: Unify "options" handling
Code was duplicated between the factory of the wizard and the file
generator.

Change-Id: Ied2ba99218a5f06e8a0dce0fbc12f277195de8ad
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-12-14 14:26:17 +00:00
Tim Jenssen
db16798e0d JsonWizard: Enable directories as file source in file generator
Change-Id: I303f31311a619a86c5669ec7b15c341ab77a2c48
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-11-16 14:05:37 +00:00
Tobias Hunger
95b0dc9120 Utils: Move template file processing from projectexplorer to utils
I want to use it e.g. for snippets and the TextEditor plugin may
not depend on the ProjectExplorer, so the code has to move.

This adds a dependency on QtQml to Utils, but that does not really
matter since that is loaded into QtCreator anyway.

Change-Id: Iada9f40b2966a1fc41631ab33da09812ad67d967
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-10-12 11:53:01 +00:00
Tobias Hunger
cb0128846b JsonWizard: Make template processing more widely available
Change-Id: I2c6eecc5d2a3c5429ce3a6a564d65f24ae3d23eb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-09-28 08:32:22 +00:00
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