Author Topic: Suggestion for new function/ feature/ plug-ing  (Read 4854 times)

vincentleest

  • Guest
Suggestion for new function/ feature/ plug-ing
« on: June 16, 2010, 05:37:53 pm »
-----Opps, I posted this in the wrong board, would the admins please transfer it to the right place for me? -----

Hi all ,

I am new to this forum and programming ( i only took one elementry programming course in Uni, so forgive me for using wrong terms). The reason i joined this forum is i have a sugestion for Code blocks::.

So here it is, i remember reading a post/ article somewhere, saying that programmers should write program that write programs for you (to increase efficiency in program development).

And this is my idea:
Make the IDE understand what you are trying to write and it will write the rest of the program for you.

I know it sound confusing, reading the example below will clear things up.

For example:

What you want to write:
printf(" the number you have just typed is %d ", number);

What you are typing into the IDE:
printf(" |      

What the IDE does:
complete the formating for you:
printf("|");
         ^ cursor
then you can continue writing your program

I know this is a simple idea, but this can save programmers' time for formating and allow programmers to focus on the logic part of the program.

this is only one of the examples i have thought of, and i believe this can save much programming time if this "pulg-in/ feature" is capable of understanding/ predicting more syntaxs / formats.

This is my idea. I hope most of you will like it. As i have said i am a noob in programming, i don't think i can contribute anything(in terms of codes) but i would love be involved in the development of this feature/plug-in as a chance of learning.

PS. Please forgive me for my grammatical mistakes/ typos.
« Last Edit: June 16, 2010, 05:59:42 pm by vincentleest »

Offline reckless

  • Regular
  • ***
  • Posts: 353
Re: Suggestion for new function/ feature/ plug-ing
« Reply #1 on: June 16, 2010, 08:55:40 pm »
hmm what i think your refering to is code completion c::b allready has that allthough not sure to what degree.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Suggestion for new function/ feature/ plug-ing
« Reply #2 on: June 17, 2010, 01:31:28 am »
Quote
What you want to write:
printf(" the number you have just typed is %d ", number);

What you are typing into the IDE:
printf(" |     

What the IDE does:
complete the formating for you:
printf("|");
         ^ cursor
then you can continue writing your program
This function has already exist in the CC_BRANCH.( in the codeblocks svn repostity, branch folder)
You can test it your self  :D
And finally it will merge to trunk some day :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Suggestion for new function/ feature/ plug-ing
« Reply #3 on: June 17, 2010, 08:00:54 am »
It is in trunk, if you turn on "Settings -> Editor... -> General settings -> Indent options -> Brace completion" .