forked from qt-creator/qt-creator
Technically, almost any "new file" wizard could be used to create a C file, but conceptually, it makes the most sense to turn the "C++" category into "C/C++". Fixes: QTCREATORBUG-23621 Change-Id: I002365fa35cc6c9bf7c71039e122f72890f66b1a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
44 lines
1.2 KiB
JSON
44 lines
1.2 KiB
JSON
{
|
|
"version": 1,
|
|
"supportedProjectTypes": [ ],
|
|
"id": "B.Source",
|
|
"category": "O.C++",
|
|
"trDescription": "Creates a source file that you can add to a C/C++ project.",
|
|
"trDisplayName": "C/C++ Source File",
|
|
"trDisplayCategory": "C/C++",
|
|
"iconText": "cpp",
|
|
"enabled": "%{JS: value('Plugins').indexOf('CppEditor') >= 0}",
|
|
|
|
"options": [
|
|
{ "key": "FileName", "value": "%{JS: Util.fileName(value('TargetPath'), value('DefaultSuffix'))}" },
|
|
{ "key": "DefaultSuffix", "value": "%{JS: Util.preferredSuffix('text/x-c++src')}" }
|
|
],
|
|
|
|
"pages" :
|
|
[
|
|
{
|
|
"trDisplayName": "Location",
|
|
"trShortTitle": "Location",
|
|
"typeId": "File"
|
|
},
|
|
{
|
|
"trDisplayName": "Project Management",
|
|
"trShortTitle": "Summary",
|
|
"typeId": "Summary"
|
|
}
|
|
],
|
|
"generators" :
|
|
[
|
|
{
|
|
"typeId": "File",
|
|
"data":
|
|
{
|
|
"source": "file.cpp",
|
|
"target": "%{FileName}",
|
|
"openInEditor": true,
|
|
"options": { "key": "Cpp:License:FileName", "value": "%{JS: Util.fileName(value('FileName'))}" }
|
|
}
|
|
}
|
|
]
|
|
}
|