Search code examples
eclipsetemplateseclipse-plugineclipse-cdt

How to use uppercase projectname in CDT template source file?


I have a working CDT template and it adds a file main_file.c to the source directory. Now I need to show project name in capital in the main_file.c, so I tried with its contents as:

//This is $(projectName) project name in capital.
#include<stdio.h>
int main(){
    printf("Sample");
    return 0;
}

However, this code (as expected) shows project name as it was entered. But I want the project name to be displayed in Capitals, like if user gives test, the file should display TEST.
How can I achieve this?


Solution

  • I found no corresponding eclipse variables for this.

    The closest solution would be

    • While creating project use UPPER CASE.

    OR

    • After inserting the template(which used $(projectName) variable ) select the project name which is in lower case the press Ctrl + Shift + X