Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Code Formating utility
Code Formating utility [message #9162] Thu, 19 April 2007 17:21 Go to next message
yeus is currently offline  yeus
Messages: 19
Registered: October 2006
Promising Member
Well.. like they have it in Code::Blocks...

I would really LOVE to have that feature in UPP, too Smile
I there anyone already working on it? If not.. It would be cool to have one working on it, because I myself don't have enough time right now, to do it....(I mean From what I undestand there already exists a Code Parser and such stuff...). (maybe you could even just copy the Sourcecode from Code::Blocks to UPP Smile.


Gerrtings, Tom.
Re: Code Formating utility [message #9167 is a reply to message #9162] Thu, 19 April 2007 21:38 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
What it can do?

Mirek
Re: Code Formating utility [message #9180 is a reply to message #9167] Fri, 20 April 2007 01:18 Go to previous messageGo to next message
yeus is currently offline  yeus
Messages: 19
Registered: October 2006
Promising Member
Well...

With the code-formating utility you can format your code according to different standarts. It handles indendation of blocks, paragraphs, right placement for commentaries, whether curly brackets are placed directly behind a function declaration, or in the next line.
Spaces between variables in formulas and around operators. You can choose between tabs/spaces for indendation, and once I even saw the option for alphabetical ordering of classmembers, within a class declaration.

That feature came into my mind today, when I copy& pasted some code from another project into TheIDE. Because that other project used spaces and no tabs for indendation, TheIDE was not able to recognize the Blocks correctly, and messed something up with the colors. After I converted all the spaces into tabs, everything was alright. It was a lot of work though... And I like to have some "standardized" Form of Code.
I also used to work with another guy together on a project who had a complete different formating style in his code. The code formating thing helped us a lot in that situation, because everyone of us would just reformat the code the way he liked it with just two mouseclicks. Smile

Greetings, Tom
Re: Code Formating utility [message #9199 is a reply to message #9180] Fri, 20 April 2007 19:36 Go to previous messageGo to next message
ebojd is currently offline  ebojd
Messages: 225
Registered: January 2007
Location: USA
Experienced Member
It has been years since I used an automatic reformatter or beautifyer, but they can be useful Wink

One potential option is to either write an interface or wrapper for one of them and set up the formatter as an auxiliary service. I took a moment and poked around a little and found the following LGPL projet on sourceforge that might do the trick:

http://astyle.sourceforge.net/

Many do not want to use GPL projects, but a wrapper that externally spawns or calls a reformatter should not interfere with the U++ license. On the other hand, there is likely one that has a more compatible licensing.

EBo --
Re: Code Formating utility [message #9218 is a reply to message #9199] Sun, 22 April 2007 09:28 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Come on, we can *parse* C++ code, reformatting is much lesser task.... Smile

Mirek
Re: Code Formating utility [message #9230 is a reply to message #9218] Sun, 22 April 2007 18:53 Go to previous messageGo to next message
yeus is currently offline  yeus
Messages: 19
Registered: October 2006
Promising Member
does that sound like a public incitement Razz ?

I'd actually be willing to do it, if you pointed me to the right classes Smile (the C-parser related stuff, is there any documentation about the c-parser?). I guess i would just start a stand-alone project and after that you could integrate it somehow into theIDE (Shouldn't be too difficult since i'm thinkiing about doing it in its own dialog, maybe you could give me some restricitons, to make the integration easier.).

Greetings, Tom
Re: Code Formating utility [message #9231 is a reply to message #9230] Sun, 22 April 2007 20:17 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
http://www.ultimatepp.org/src$Core$CParser$en-us.html

Mirek
Re: Code Formating utility [message #9240 is a reply to message #9230] Mon, 23 April 2007 16:54 Go to previous message
ebojd is currently offline  ebojd
Messages: 225
Registered: January 2007
Location: USA
Experienced Member
yeus wrote on Sun, 22 April 2007 11:53

does that sound like a public incitement Razz ?

I'd actually be willing to do it, if you pointed me to the right classes Smile


I'd say that sounds like a gauntlet being thrown down in the public square Wink Tom, glad you have the time and energy to accept the challenge!

EBo --
Previous Topic: uldar
Next Topic: Support for non american characters
Goto Forum:
  


Current Time: Sat Apr 20 04:11:24 CEST 2024

Total time taken to generate the page: 0.04167 seconds