summaryrefslogtreecommitdiffstats
path: root/doc/api/HowToAddFileTemplates.dox
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/HowToAddFileTemplates.dox')
-rw-r--r--doc/api/HowToAddFileTemplates.dox30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/api/HowToAddFileTemplates.dox b/doc/api/HowToAddFileTemplates.dox
new file mode 100644
index 00000000..fa6e630b
--- /dev/null
+++ b/doc/api/HowToAddFileTemplates.dox
@@ -0,0 +1,30 @@
+/** \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. KDevelop 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 KDevelop itself. The global
+templates that can be made available to any project can be changed in Settings / Configure KDevelop... / New File
+Wizard; and project related settings can be changed in Project / Project Options / New File Wizard.
+
+That's all! :)
+
+*/