Menu

Importing FORTE Coding Style to Eclipse CDT

Developers
G. Sfiris
2014-07-17
2014-07-28
  • G. Sfiris

    G. Sfiris - 2014-07-17

    Hello all,

    I'm trying to import the fortestyle.xml to Eclipse CDT Juno. There I go to Project -> Properties -> C/C++ General -> Code Analysis -> Formatter and import the file. The problem is I don't think it is quite correct. For example the indention is 4 spaces and not 2 as FORTE Coding Rules suggest. Am I doing something wrong or is the fortestyle.xml file not up to date?

    Best Regards,
    Giorgis Sfiris

     
  • Zoitl Alois

    Zoitl Alois - 2014-07-24

    Hi i recently used it and it worked for me. However I think you have to set replace tabs with spaces and the tab with to 2 in the general text editor properties.

     
  • G. Sfiris

    G. Sfiris - 2014-07-24

    Hello Alois,

    First, reading the Coding Rules, I just set these properties and it was O.K. But then reading about the fortestyle.xml I imported it finding out that it restored my tab properties. Isn't there a way to have these properties inside the fortestyle.xml? Or is this the only way? I mean to import the file and then set the tab properties?

    Best Regards,
    Giorgis

     
  • Zoitl Alois

    Zoitl Alois - 2014-07-25

    I think the problem is the eclipse text editor which is the basis for cdt editor. It sometimes overrules some settings. Will check it and let you know.

     
  • Zoitl Alois

    Zoitl Alois - 2014-07-28

    I did a quick check in my eclipse today. And it fortestyle.xml has the properties for replacing tabs and the tab with. But from my experiance it seems that these properties are mainly applied when hiting ctrl+shift+f (apply code formating) but not during typing.