Author Topic: Intellisense in Macros  (Read 4857 times)

pvonkaenel

  • Senior Community Member
  • Posts: 211
  • Hero Points: 6
Intellisense in Macros
« on: December 20, 2010, 01:53:27 PM »
Hi all,

I love Slickedit's intellisense for listing class members once the "." has been added - it's kind of a staple now that I'm starting to expect from all code editors.  However, I've noticed that if I'm currently within a macro, the list does not show up.  For example if I type
ASSERT_TRUE(frc.

Where ASSERT_TRUE is a macro, and frc is a class instance, then I do not get a member listing.  Is there a setting I need to get the listing to work correctly?

Thanks,
Peter

pvonkaenel

  • Senior Community Member
  • Posts: 211
  • Hero Points: 6
Re: Intellisense in Macros
« Reply #1 on: January 06, 2011, 02:15:04 PM »
Is it possible to have this fixed in an upcoming hotfix?  I've been writing a lot of gtest's lately and this is driving me nuts.

Peter

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Intellisense in Macros
« Reply #2 on: January 06, 2011, 03:19:44 PM »
Try adding e.g. '#define ASSERT_TRUE(c)   c' to C/C++ Preprocessing configuration. Maybe adjust the macro params accordingly.
HS2

pvonkaenel

  • Senior Community Member
  • Posts: 211
  • Hero Points: 6
Re: Intellisense in Macros
« Reply #3 on: January 06, 2011, 06:07:17 PM »
I'm not sure how adding this will help - I tried it and then the macro was labeled as an unidentified symbol.  I just want the intellisense about class/structure members to show up when inside a macro call without having to press ESC first.

I'll keep messing with the preprocessor symbols in the options, but I hate to have to identify all macros just to get intellisense to work correctly.

Peter

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Intellisense in Macros
« Reply #4 on: January 06, 2011, 08:04:23 PM »
I know your intention. The assumption was that this macro definition is confusing the tagging engine, which was wrong.
I've verified that it's working with some of my code also using an ASSERT(c,s) macro.
Why do you need to press ESC and do you get something displayed with ALT-<comma> (function-argument-help) when editing the macro args ?
HS2

pvonkaenel

  • Senior Community Member
  • Posts: 211
  • Hero Points: 6
Re: Intellisense in Macros
« Reply #5 on: January 06, 2011, 09:32:46 PM »
When I place the opening "(" after the macro name, I do get function argument help.  That's fine.  However, while inside the macro with the macro help drop-down, when I enter a "." after a class instance, I do not get the method list which I'm use to.  I guess I gotten lazy and can no longer remember the spelling of the methods I want to use.  Curse this editor for making my life so easy I don't even have to remember exact method names!

In-any-case, the only way I can get the class method listing, is to press ESC before I enter the "." after the class instance.  This causes the macro function arg help to go away, and allows the methods to be listed.

Peter

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Intellisense in Macros
« Reply #6 on: January 07, 2011, 12:35:59 AM »
Ok - now things get clearer. So list-members is working inside the macro args.
This
Quote
I've noticed that if I'm currently within a macro, the list does not show up
was a bit misleading.
However, auto-list members works for me (v15.0.1.3 r15) even when (auto-)invoked while the function arg help is being displayed.
You could try to start SE with vanilla configuration (e.g. with 'vs -sc %TEMP%') to check if something is not properly configured in your curr. settings.

HS2
« Last Edit: January 07, 2011, 12:38:03 AM by hs2 »

pvonkaenel

  • Senior Community Member
  • Posts: 211
  • Hero Points: 6
Re: Intellisense in Macros
« Reply #7 on: January 10, 2011, 06:04:48 PM »
Thanks for the taking the time to help me with this, and it's nice to know that it should work.  As you suggest, I'll start with a fresh config and try to figure out why mine isn't working.

Thanks again,

Peter