Author Topic: Make code completion to show user defined function message  (Read 5367 times)

davidlee62

  • Community Member
  • Posts: 35
  • Hero Points: 1
Make code completion to show user defined function message
« on: January 07, 2007, 08:47:40 AM »
Hello,

Where can I set so that make the code completion to show my own function defines? Thanks.


David

skywise

  • Senior Community Member
  • Posts: 331
  • Hero Points: 10
Re: Make code completion to show user defined function message
« Reply #1 on: January 09, 2007, 03:56:45 PM »
If you're referring to having your function descriptions appear on a tooltip during code completion, use javadoc for your function comments.  Slickedit will even auto-highlight the variables for you too.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Make code completion to show user defined function message
« Reply #2 on: January 09, 2007, 04:12:08 PM »
Or do you refer to the coding style (e.g. if-else / for () code templates) of the offered completions ?
Good question ...

HS2

davidlee62

  • Community Member
  • Posts: 35
  • Hero Points: 1
Re: Make code completion to show user defined function message
« Reply #3 on: January 11, 2007, 03:17:46 AM »
Yes, I have referred the coding style. I don't understand JAVADOC, just hope SE can support  the function, e.g., if there is a function define : "int show_window(int item, char str)" in my head file, I hope that when typing the function name, SE can complete it and show the prototype automatically. Please advise a detail of how to set this. Thanks.


David

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Make code completion to show user defined function message
« Reply #4 on: January 11, 2007, 11:20:50 AM »
Symbol and parameter completion etc. can be configured in 'Tools->Options->File Extension setup -> Auto-complete / Tagging Tabs'.
It's also documented in the 'Slick Help' (see attachment).

HS2

Dennis

  • Senior Community Member
  • Posts: 3960
  • Hero Points: 517
Re: Make code completion to show user defined function message
« Reply #5 on: January 12, 2007, 06:07:28 PM »
Is the header file that the function is defined in in your project or workspace?  The file has to be either in your workspace or in an extension specific tag file to be picked up.

Is the header file clean, or littered with preprocessing?  Frequently preprocessing macros, such as "MY_BEGIN_NAMESPACE(x)" trip up the parser enough that subsequent declarations will be missed.  Fix the preprocessing issues by going to Tools > Options > File Extension Setup..., select Options, then click on the "C Preprocessing..." button to define your user-defined #defines so SlickEdit knows what to do with them.

A quick way to know the function is picked up by tagging is to attempt to jump to the tag (push-tag, Ctrl+Dot in CUA).

Another quick way to dig deeper is to open the header file that the function is declared in and look at the "Defs" tab.  Does it show up correctly?  Do other symbols defined in the header file show up correctly?  If not, look for more preprocessing, or look for the place in the code where symbols stop being recognized.