You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.6 KiB
31 lines
1.6 KiB
/** \file HowToAddFileTemplates.dox
|
|
* \brief How to add file templates to the file create part
|
|
*/
|
|
/** \page howToAddFileTemplates How to add file templates to the file create part
|
|
|
|
File templates provide the developer with a basic file. They are prototypes for both source files of
|
|
the project's language, and for other files that may be useful in the project. For example, a C++
|
|
project may have templates for both .cpp and .h files, plus QT Designer .ui files, and supporting
|
|
files such as XML.
|
|
|
|
These prototypes are placed in <code>parts/filecreate/file-templates</code> dir or
|
|
<code>languages/YOURLANGUAGE/file_templates</code> and have names equal to the extensions of language
|
|
source files.
|
|
|
|
Sometimes, different 'flavours' of template are required for a particular file type. In these
|
|
instances, 'subtypes' can be defined to allow several different templates for a file type. An example
|
|
of this are QT designer '.ui' files. TDevelop supplies several different templates for .ui
|
|
files. Subtypes are named by the file type extension followed by a hyphen followed by an identifier
|
|
for the subtype. E.g. ui-widget, ui-dialog
|
|
|
|
The description of the prototypes is placed in <code>parts/filecreate/template-info.xml</code>. This
|
|
file is fairly self-explanatory if you take a look at it.
|
|
|
|
Note that templates and templates information can be edited within TDevelop itself. The global
|
|
templates that can be made available to any project can be changed in Settings / Configure TDevelop... / New File
|
|
Wizard; and project related settings can be changed in Project / Project Options / New File Wizard.
|
|
|
|
That's all! :)
|
|
|
|
*/
|