Translations:KDevelop5/Manual/Code generation with templates/45/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)
While classes and unit tests receive special attention when generating code from templates, the same method can be used for any kind of source code files. For example, one could use a template for a CMake Find module or a .desktop file. This can be done by choosing <menuchoice>Create from Template...</menuchoice>, and selecting the wanted category and template. If the selected category is neither <tt>Class</tt> nor <tt>Test</tt>, you will only have the option of choosing the license, any custom options specified by the template, and the output file locations. As with classes and tests, finishing the assistant will generate the files and open them in the editor.

Хоча роботу засобів створення коду на основі шаблонів акцентовано на створенні класів та тестів модулів, подібну методику можна застосувати для створення будь-яких фрагментів файлів коду. Наприклад, можна скористатися шаблонами для модулів пошуку CMake або файлів .desktop. Для цього просто виберіть пункт Створити з шаблона, а потім позначте відповідну категорію і шаблон. Якщо шаблон не належить до категорій Клас або Перевірка, вам достатньо буде вибрати умови ліцензування, значення додаткових параметрів шаблона та розташування файлів результату. Як і для класів з тестами, на завершення роботи допоміжної програми буде створено відповідні файли і відкрито їх у вікні редактора.