Author Topic: push/pop-tag and reference problems  (Read 4232 times)

todd_s02

  • Community Member
  • Posts: 9
  • Hero Points: 0
push/pop-tag and reference problems
« on: May 09, 2007, 11:59:01 pm »
We recently upgraded to SE2007/v12 from V11, under Windows XP.  Aside from the slow responsiveness that many have mentioned, I'm noticing that tagging no longer works right.

The project has 6513 files, mostly C, some C++, a little ASM. I'm seeing two different problems:

First, I can get the tag bookmark stack messed up.  I can tag into a function (ctrl-.), tag into another, and tagging back (ctrl-,) will take me to the FIRST one - leaving a little blue triangle by the place I tagged into in the second file.  Restarting SE seems to correct this for a short time.  Not sure what I'm doing to get it into that state.

Second, I've got an enum that contains members used as signals to various state machines.  The enum sits in a .h file.  Each state machine sits in a .cpp file, and has multiple static class member functions that use the identifier. ie, something like this (I haven't tried this exact code SE.. wonder if it works..?)

Code: [Select]
enum signal
{
    SIGNAL1,
    SIGNAL2
}

-----
sm.h:

class A
{
  static void State1Handler(signal s);
  static void State2Handler(signal s);
}

---
sm.cpp:

void A::State1Handler(signal s);
{
   switch (s)
   {
      case SIGNAL1:
        break;

      case SIGNAL2:
        break;
   }
}

void A::State2Handler(signal s);
{
   switch (s)
   {
      case SIGNAL1:
        break;

      case SIGNAL2:
        break;
   }
}



If I do references (ctrl-/) on SIGNAL1, then SE will show only one instance of SIGNAL1 being used in the sm.cpp file.  I didn't change any settings from SE version 11, and I don't see any option to set the maximum number of references returned per file.  The "find references incrementally" option is unchecked.  Checking it has no effect.

I'm pretty disappointed in version 12 so far.  It's slow and won't navigate the code reliably, two things an editor needs to excel at.  My company has been good enough to upgrade us to every new version since v5 or 6, and this is the first time I'm seriously thinking about going back a revision!

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2501
  • Hero Points: 364
Re: push/pop-tag and reference problems
« Reply #1 on: May 11, 2007, 04:18:01 pm »
I tried to reproduce this issue with SlickEdit 2007 (v12), and it worked fine.  Did you actually verify that the example reproduces the problem?

koro

  • Community Member
  • Posts: 13
  • Hero Points: 0
Re: push/pop-tag and reference problems
« Reply #2 on: May 11, 2007, 05:59:39 pm »
I haven't encountered the second issue but I can confirm my Slickedit 2007 is definitely messing up its tag bookmarks when I navigate with CTRL-. and CTRL-,.   Occasionally CTRL-, is not returning me to where I originally pressed CTRL-.   

I will keep my eye out for any patterns I observe when experiencing this.

todd_s02

  • Community Member
  • Posts: 9
  • Hero Points: 0
Re: push/pop-tag and reference problems
« Reply #3 on: May 15, 2007, 06:21:54 pm »
I didn't try the sample, but I'm not too surprised that it didn't recreate the problem.  I can't send the actual source code, of course =/

I can't figure out why it's not working.  After poking around more, references DO work elsewhere as expected.  It turns out the ones in question are signal/event values defined and used in state machines implemented in Quantum Framework (http://www.quantum-leaps.com/products/qf.htm).  I tagged the sample code provided with QF, and it works fine, so something else is confusing slickedit.

Is there some sort of limit to references?  One thing about the QF implementation is every state machine gets a Q_ENTRY and Q_EXIT signal, and these tend to get duplicated for every state machine - each has its own list of signals/events, with those being the first two. 

The only other thing I can figure is that the code that works is in C, the code that doesn't is C++, but I don't think that would make a difference.

evanratt

  • Senior Community Member
  • Posts: 300
  • Hero Points: 23
Re: push/pop-tag and reference problems
« Reply #4 on: May 31, 2007, 09:59:44 pm »
Wondering if this has been found yet. I upgraded to 12.0.1 this past week and am now seeing my bookmark stack also getting messed up. It happens exactly as described before - if I jump to one function's definition, and then to a second definition, and then pop, it goes back to where I was when I jumped to the first definition. I've found that issuing a pop-all-bookmarks fixes it for a time, but then it starts happening again. Is there a limit to the number of bookmarks in the stack, that may have changed with the 12.0.1 release? (I didn't notice this happening in 12.0.0). I'm working in C++, if that makes any difference.

I'm also experiencing an issue with the tagging engine not going to the correct structure definition in some cases. For instance, in file1.cpp I may have
Code: [Select]
#define pd
and file2.cpp has
Code: [Select]
struct Foo {
    int x;
};

Foo *get_foo();

void function() {
    if (Foo *pd = get_foo()) {
        pd->x = 2;
    }
}

When I try to go to the declaration of pd from the assignment in file2.cpp, rather than jump to the if() line in the same function in the same file (file2.cpp), it jumps to the #define in file1.cpp.