Translations:KDevelop5/Manual/Code generation with templates/49/en: Difference between revisions

From KDE UserBase Wiki
(Importing a new version from external source)
 
(Importing a new version from external source)
Line 1: Line 1:
Of course, if none of the available template suit your project, you can always create new ones. The easiest way is probably to copy and modify an existing template, while a short [http://techbase.kde.org/Development/Tutorials/KDevelop/Creating_a_class_template tutorial] and a longer [http://techbase.kde.org/Projects/KDevelop5/File_template_specification specification document] are there to help you. To copy an installed template, open the template manager by clicking <menuchoice>Settings -> Configure KDevelop... -> Templates</menuchoice>, select the template you wish to copy, then click the <menuchoice>Extract Template</menuchoice> button. Select a destination folder, then click <menuchoice>OK</menuchoice>, and the contents of the template will be extracted into the selected folder. Now you can edit the template by opening the extracted files and modifying them. After you are done, you can import your new template into '''KDevelop''' by opening the template manager, activating the appropriate tab (either <menuchoice>Project Templates</menuchoice> or <menuchoice>File Templates</menuchoice>) and clicking <menuchoice>Load Template</menuchoice>. Open the template description file, which is the one with the suffix either <code>.kdevtemplate</code> or <code>.desktop</code>. '''KDevelop''' will compress the files into a template archive and import the template.
Of course, if none of the available templates suit your project, you can always create new ones. The easiest way is probably to copy and modify an existing template, while a short [http://techbase.kde.org/Development/Tutorials/KDevelop/Creating_a_class_template tutorial] and a longer [http://techbase.kde.org/Projects/KDevelop5/File_template_specification specification document] are there to help you. To copy an installed template, open the template manager by clicking <menuchoice>Settings -> Configure KDevelop... -> Templates</menuchoice>, select the template you wish to copy, then click the <menuchoice>Extract Template</menuchoice> button. Select a destination folder, then click <menuchoice>OK</menuchoice>, and the contents of the template will be extracted into the selected folder. Now you can edit the template by opening the extracted files and modifying them. After you are done, you can import your new template into '''KDevelop''' by opening the template manager, activating the appropriate tab (either <menuchoice>Project Templates</menuchoice> or <menuchoice>File Templates</menuchoice>) and clicking <menuchoice>Load Template</menuchoice>. Open the template description file, which is the one with the suffix either <code>.kdevtemplate</code> or <code>.desktop</code>. '''KDevelop''' will compress the files into a template archive and import the template.

Revision as of 15:19, 18 March 2020

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (KDevelop5/Manual/Code generation with templates)
Of course, if none of the available templates suit your project, you can always create new ones. The easiest way is probably to copy and modify an existing template, while a short [http://techbase.kde.org/Development/Tutorials/KDevelop/Creating_a_class_template tutorial] and a longer [http://techbase.kde.org/Projects/KDevelop5/File_template_specification specification document] are there to help you. To copy an installed template, open the template manager by clicking <menuchoice>Settings -> Configure KDevelop... -> Templates</menuchoice>, select the template you wish to copy, then click the <menuchoice>Extract Template</menuchoice> button. Select a destination folder, then click <menuchoice>OK</menuchoice>, and the contents of the template will be extracted into the selected folder. Now you can edit the template by opening the extracted files and modifying them. After you are done, you can import your new template into '''KDevelop''' by opening the template manager, activating the appropriate tab (either <menuchoice>Project Templates</menuchoice> or <menuchoice>File Templates</menuchoice>) and clicking <menuchoice>Load Template</menuchoice>. Open the template description file, which is the one with the suffix either <code>.kdevtemplate</code> or <code>.desktop</code>. '''KDevelop''' will compress the files into a template archive and import the template.

Of course, if none of the available templates suit your project, you can always create new ones. The easiest way is probably to copy and modify an existing template, while a short tutorial and a longer specification document are there to help you. To copy an installed template, open the template manager by clicking Settings -> Configure KDevelop... -> Templates, select the template you wish to copy, then click the Extract Template button. Select a destination folder, then click OK, and the contents of the template will be extracted into the selected folder. Now you can edit the template by opening the extracted files and modifying them. After you are done, you can import your new template into KDevelop by opening the template manager, activating the appropriate tab (either Project Templates or File Templates) and clicking Load Template. Open the template description file, which is the one with the suffix either .kdevtemplate or .desktop. KDevelop will compress the files into a template archive and import the template.