Translations:KDevelop5/Manual/Working with source code/76/en: Difference between revisions
(Importing a new version from external source) |
(Importing a new version from external source) |
||
Line 1: | Line 1: | ||
* '''Snippets''': This provides sequences of text that one uses over and over and doesn't want to type repeatedly. For example, in the project from which the picture above was created, there is a frequent need to write code like: | * '''Snippets''': This provides sequences of text that one uses over and over and doesn't want to type repeatedly. For example, in the project from which the picture above was created, there is a frequent need to write code like: <syntaxhighlight lang="cpp" line>if(vcs->isVersionControlled(source)) { | ||
VcsJob* job=vcs->copy(source, target); | VcsJob* job=vcs->copy(source, target); | ||
if(job) { | if(job) { | ||
return job->exec(); | return job->exec(); | ||
</syntaxhighlight>The code segment will look exactly like this every time you need to use such a segment of code — which would make it a good candidate for a snippet. |
Latest revision as of 08:38, 2 April 2020
- Snippets: This provides sequences of text that one uses over and over and doesn't want to type repeatedly. For example, in the project from which the picture above was created, there is a frequent need to write code like: The code segment will look exactly like this every time you need to use such a segment of code — which would make it a good candidate for a snippet.
if(vcs->isVersionControlled(source)) { VcsJob* job=vcs->copy(source, target); if(job) { return job->exec();