Search code examples
eclipsecoding-style

Eclipse : using C coding style for new extensions


I have an Eclipse project with special files extension .m4 which are but C files. how can I open them on Eclipse but using C code style just like choosing langage in notepad ++ ?.


Solution

  • If using Eclipse CDT (Eclipse IDE for C/C++ Developers):

    1. In Window > Preferences: C/C++ > File Types click New...
    2. In the C/C++ File Type dialog enter *.m4 as pattern and choose C Source File as type
    3. Click OK and Apply and Close to close both dialogs