Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Problem with code style/indentation
Problem with code style/indentation [message #743192] Fri, 21 October 2011 03:58
Eclipse UserFriend
Hello,

we have problems with the automatic indentation of the source code
in the CDT plugin.

Following an example:

Current situation after press Ctrl+I (Correct Indentation):

{
   ....
   cout << "ddd" << endl;
   for(int gggg = 0;
      gggg < 5;
      gggg ++)
   {
      ....
   }

   if(ffff < 4)
   {
   }
   else if(gggg < 7 &&
      gggg > 6 )
   {
      ....
   }
} 

Expected format:
{
   ....
   cout << "ddd" << endl;
   for(int gggg = 0;
       gggg < 5;
       gggg ++)
   {
      ....
   }

   if(ffff < 4)
   {
   }
   else if(gggg < 7 &&
           gggg > 6 )
   {
      ....
   }
}

CDT has in my point of view a problem with the indentation of braces type "()"
and I not found any settings in the code style to change the behavior.

Have anyone a solution of this problem?

BR
Stefan


Previous Topic:Building for distribution?
Next Topic:CDT cannot resolve functions from std::chrono?
Goto Forum:
  


Current Time: Tue Jul 15 00:49:37 EDT 2025

Powered by FUDForum. Page generated in 0.51463 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top