summaryrefslogtreecommitdiffstats
path: root/doc/api/HowToAddFileTemplates.dox
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch)
treeacaf47eb0fa12142d3896416a69e74cbf5a72242 /doc/api/HowToAddFileTemplates.dox
downloadtdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz
tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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! :)
+
+*/