Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Qnx IDE: Tip of the Day #7: Template Proposals: (1 Item)
   
Qnx IDE: Tip of the Day #7: Template Proposals  
How many times in your developer's life you typed fprintf(stderr,"here\n");
or for(i=0;i<n;i++) {}?
IDE offers a way not to type common patterns over and over, by using only a keyword describing the pattern. For example 
you can type
stderr<Ctrl-Space>
in your C editor and it should automatically expand to "fprintf(stderr, I);" where I is a cursor position,
which saved you typing extra 10 symbols. You can go further and modify "stderr" template to include string and \n into 
it, to have this result: fprintf(stderr, "I\n");
To do that open Window->Preferences->C/C++->Editor->Context Assist->Templates.
Find and select stderr template, click Edit... and change to fprintf(stderr, "${cursor}\n");
This also gives you a list of possible template you can use as well.

If <Ctrl-Space> does not show you templates it may be disabled, to configure what is show on first and second keystroke 
see Window->Preferences->C/C++->Editor->Context Assist->Advanced.