Translations:KDevelop5/Manual/Working with source code/76/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:
* '''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: {{Input|1=<nowiki>if(vcs->isVersionControlled(source)) {
* '''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();
     }</nowiki>}}The code segment will look exactly like this every time you need to use such a segment of code &mdash; which would make it a good candidate for a snippet.
     </syntaxhighlight>The code segment will look exactly like this every time you need to use such a segment of code &mdash; which would make it a good candidate for a snippet.

Latest revision as of 08:38, 2 April 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/Working with source code)
* '''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);
   if(job) {
       return job->exec();
   </syntaxhighlight>The code segment will look exactly like this every time you need to use such a segment of code &mdash; which would make it a good candidate for a snippet.
  • 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:
    if(vcs->isVersionControlled(source)) {
        VcsJob* job=vcs->copy(source, target);
        if(job) {
            return job->exec();
    
    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.