Author Topic: tagging and namespace macros  (Read 2520 times)

DaveyC

  • Senior Community Member
  • Posts: 145
  • Hero Points: 9
tagging and namespace macros
« on: November 28, 2006, 02:19:04 pm »
I'll run this one here before opening a defect report. I've been using the xereces-c XML toolkit which uses #define for defining namespaces.  I don't have a problem with this, SlickEdit forces indentation for namespace scopes which I don't particularly want. Anyway, the following code snippet shows the problem, the base class member functions are not listed.

Code: [Select]
#define NAMESPACE_BEGIN namespace ns {
#define NAMESPACE_END   };
#define USING_NAMESPACE using namespace ns;

NAMESPACE_BEGIN

class bs
{
public:
    void read() {};
};

class dr : public bs
{
public:
    void write() {};
};

NAMESPACE_END

USING_NAMESPACE

int main (int argc, char *argv[])
{
    ns::dr t;

    t.
}



DaveyC

  • Senior Community Member
  • Posts: 145
  • Hero Points: 9
Re: tagging and namespace macros
« Reply #1 on: November 28, 2006, 02:25:04 pm »
Sorry, forget to mention this is 11.0.2.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2107
  • Hero Points: 263
Re: tagging and namespace macros
« Reply #2 on: November 29, 2006, 11:14:36 pm »
This is a common problem people have with tagging because they have not configured preprocessing so SlickEdit knows nothing about their local macros.  To configure things, do the following:

1. Go to Tools > Options > File Extension Setup...
2. Select the "c" extension
3. Click on Options...
4. Select the Other tab
5. Click on C Preprocessing
6. Define your NAMESPACE_* macros so that our parser knows what to do with them.
7. Rebuild your workspace tag file.

Several other threads on this forum go into more detail about why it has to be the way it is.

DaveyC

  • Senior Community Member
  • Posts: 145
  • Hero Points: 9
Re: tagging and namespace macros
« Reply #3 on: December 01, 2006, 10:46:12 am »
Thanks for the tip Dennis, works like a treat.