diff options
author | Tobias Hunger <tobias.hunger@digia.com> | 2014-09-18 15:43:32 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2014-09-30 15:14:29 +0200 |
commit | 989ed95c1fc29c98a0f965fd42e4d17a44c326e1 (patch) | |
tree | 044e80a255d77411a8c7a48e51a8402b8756ff9d /share/qtcreator/templates | |
parent | 335e625bdc81432cd4027dc41b6243246872c3e0 (diff) | |
download | qt-creator-989ed95c1fc29c98a0f965fd42e4d17a44c326e1.tar.gz |
CppEditor: Replace CppFileWizard with two JsonWizards
Change-Id: If39ed6d2711fa4cc144d1b1f9738acf3d04ac225
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Diffstat (limited to 'share/qtcreator/templates')
4 files changed, 80 insertions, 0 deletions
diff --git a/share/qtcreator/templates/wizards/files/cppheader/file.h b/share/qtcreator/templates/wizards/files/cppheader/file.h new file mode 100644 index 0000000000..c8861f8c52 --- /dev/null +++ b/share/qtcreator/templates/wizards/files/cppheader/file.h @@ -0,0 +1,5 @@ +%{Cpp:LicenseTemplate} +#ifndef %{JS: Cpp.headerGuard('%{FileName}')} +#define %{JS: Cpp.headerGuard('%{FileName}')} + +#endif // %{JS: Cpp.headerGuard('%{FileName}')} diff --git a/share/qtcreator/templates/wizards/files/cppheader/wizard.json b/share/qtcreator/templates/wizards/files/cppheader/wizard.json new file mode 100644 index 0000000000..a46c2c153b --- /dev/null +++ b/share/qtcreator/templates/wizards/files/cppheader/wizard.json @@ -0,0 +1,37 @@ +{ + "version": 1, + "kind": "file", + "id": "C.Header", + "category": "O.C++", + "trDescription": "Creates a C++ header file that you can add to a C++ project.", + "trDisplayName": "C++ Header File", + "trDisplayCategory": "C++", + "icon": "../../global/genericfilewizard.png", + "featuresRequired": [ "Plugin.CppEditor" ], + + "pages" : + [ + { + "trDisplayName": "Location", + "trShortTitle": "Location", + "typeId": "File" + }, + { + "trDisplayName": "Project Management", + "trShortTitle": "Summary", + "typeId": "Summary" + } + ], + "generators" : + [ + { + "typeId": "File", + "data": + { + "source": "file.h", + "target": "%{JS: Cpp.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}", + "openInEditor": true + } + } + ] +} diff --git a/share/qtcreator/templates/wizards/files/cppsource/file.cpp b/share/qtcreator/templates/wizards/files/cppsource/file.cpp new file mode 100644 index 0000000000..d6b739152f --- /dev/null +++ b/share/qtcreator/templates/wizards/files/cppsource/file.cpp @@ -0,0 +1 @@ +%{Cpp:LicenseTemplate} diff --git a/share/qtcreator/templates/wizards/files/cppsource/wizard.json b/share/qtcreator/templates/wizards/files/cppsource/wizard.json new file mode 100644 index 0000000000..8d98e97e4e --- /dev/null +++ b/share/qtcreator/templates/wizards/files/cppsource/wizard.json @@ -0,0 +1,37 @@ +{ + "version": 1, + "kind": "file", + "id": "B.Source", + "category": "O.C++", + "trDescription": "Creates a C++ source file that you can add to a C++ project.", + "trDisplayName": "C++ Source File", + "trDisplayCategory": "C++", + "icon": "../../global/genericfilewizard.png", + "featuresRequired": [ "Plugin.CppEditor" ], + + "pages" : + [ + { + "trDisplayName": "Location", + "trShortTitle": "Location", + "typeId": "File" + }, + { + "trDisplayName": "Project Management", + "trShortTitle": "Summary", + "typeId": "Summary" + } + ], + "generators" : + [ + { + "typeId": "File", + "data": + { + "source": "file.cpp", + "target": "%{JS: Cpp.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('text/x-c++src')}')}", + "openInEditor": true + } + } + ] +} |