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

From KDE UserBase Wiki
(Importing a new version from external source)
 
(No difference)

Latest revision as of 08:03, 16 September 2017

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.

Звичайно ж, якщо потребам вашого проекту не відповідає жоден шаблон, ви можете створити новий. Ймовірно, найпростішим способом буде копіювання вже створеного шаблона з наступним внесенням до нього змін. Вам можуть допомогти короткі настанови та розгорнутий довідковий документ. Щоб скопіювати встановлений шаблон, відкрийте вікно керування шаблонами за допомогою пункту меню Параметри -> Налаштувати KDevelop... -> Шаблони, виберіть шаблон, який слід скопіювати, потім натисніть кнопку Видобути шаблон. Виберіть теку призначення, потім натисніть кнопку Гаразд. Вміст шаблона буде видобуде до вказаної вами теки. Тепер ви можете почати редагування шаблона: відкривати і змінювати видобуті файли. Щойно потрібні зміни буде внесено, ви можете імпортувати ваш новий шаблон до &kdevelop;: відкрийте засіб керування шаблонами, перейдіть на відповідну вкладку (Шаблони проектів або Шаблони файлі) і натисніть кнопку Завантажити шаблон. Відкрийте файл опису шаблона, тобто файл з суфіксом назви .kdevtemplate або .desktop. KDevelop стисне всі файли до архіву шаблона і імпортує його дані.