Author Topic: Make code completion to show user defined function message  (Read 3854 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: 2737
  • Hero Points: 288
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: 2737
  • Hero Points: 288
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

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2775
  • Hero Points: 421
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.