Message-Id: <3.0.5.32.19990429113258.00803c00@200.252.238.1> X-Sender: thiagofga AT 200 DOT 252 DOT 238 DOT 1 (Unverified) X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.5 (32) Date: Thu, 29 Apr 1999 11:32:58 -0300 To: djgpp AT delorie DOT com From: "Thiago F.G. Albuquerque" Subject: Re: RHIDE: Sugestion: prototype completion In-Reply-To: <37275C2B.CEC5A114@unb.ca> References: <3 DOT 0 DOT 5 DOT 32 DOT 19990403081528 DOT 007e0690 AT 200 DOT 252 DOT 238 DOT 1> <3 DOT 0 DOT 5 DOT 32 DOT 19990428011527 DOT 009dcc10 AT 200 DOT 252 DOT 238 DOT 1> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > I was forced to use VB5 at work. I don't like BASIC, but the interface is >very nice. It uses a similar interface to VC++6. If you type the name of a class >object and a '.' (as well as "->" in C++) and it lists all of the public members >of the class. Also, if you type the name of a function it doesn't actually type >out the prototype, but prints the syntax just below the cursor in a small "Tool >tip" style window. You know, when the are compiler errors, and you press enter over an error message in MessageWindow... then the cursor goes to the line the error refered to. The line it highlighted and... the error message is displayed in the bottom line of the editor window! (That's where I wanted to get to) Since RHIDE doesn't have "ToolTips", we could use that line to display the prototype. >It also offers word-completion with Ctrl+Space (like the >macros in rhide/setedit) where if I typed "po" it would show a small drop down >list with >popen >pow >pow10 >pow2 >in it (these were the libc entries starting with "po"). You could then select one >and press enter, and it would finish the function name, then show the syntax. It >may be silly to use this for 3-5 character function names, but it would be very >nice for weird classes with long member names. But it would have to actually scan >the code for prototype definitions (so it could get the local functions/classes). I don't think scaning the code is a good idea. It is too complex, and probably too slow. (Have you ever used VC++'s WizardBar?) The only example of fast code scanning I've ever seen is RHIDE's "Goto to Function". I don't know how SET implemented that, but the result is just perfect. The docs mention some "heuristic"... VC++ probably uses some brute force algorithm, I guess; that's why it is too slow. My idea was RHIDE to keep a list of header files in which to search for the matching prototypes. For instance, my list would have all the libc headers (or I could merge them in one file) and allegro.h. Then if you wanted your own functions to "join the game", you could add your headers to the list. It's just like running grep on the list of header files. >I thought it would be such a valuable addition that I was planning on attempting >to impliment it and submit it for SetEdit/Rhide, but I realized it was a large >task and required lots of knowledge of compiler design which I don't have. It >would need to do all of the proprocessing which could be passed on to "gcc -E", I don't see what does it have to do with preprocessing. You're just inserting text into your code. The next time you compile, the compiler deals with it.