Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Moving cursor while iterating over reference list

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
andre.horst Posted - Oct 05 2009 : 05:01:16 AM
VAX 1738, VC6, WinXP SP3. Every highlighting is enabled.

I used "Find References" to get a list of references to a symbol (actually a macro). Then i clicked through the reference list and made some changes in each code line (changed some parameters of the macro). After editing a while i start to notice that VAX always jumps back to the symbol and removes my cursor position where i had clicked. Therefor I always "overwrite" the symbol and do not add/change text where i previously had clicked and moved the cursor to.

This is not a new bug, but actually it is pretty anoying. Maybe it has something to do with the highlighting, especially the new hide symbol under cursor.
18   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Sep 16 2010 : 11:36:59 AM
I have the log files, many thanks for these:

case=49933
andre.horst Posted - Aug 20 2010 : 04:58:19 AM
I just sent the logs. Hope they will help.
feline Posted - Aug 17 2010 : 11:45:35 AM
VA highlighting of text should never move the cursor, and I have never seen any sort of cursor jumping problem related to highlighting.

I have seen some "odd" cursor movements when word wrap is turned on in the IDE, but that is simply because long code lines behave slightly differently when word wrapped.

So far we don't have any good theories to explain what you are seeing. Some form of "extra" mouse or keyboard event being send to the Find References Results window, telling VA to jump to the last result a second time would explain what you are seeing, but we don't know where such a mouse or keyboard event would come from.
andre.horst Posted - Aug 16 2010 : 02:44:53 AM
I have key-binds for find reference in solution and in only the actual file.
I do not think it is file-specific. Sometimes i have "cursor-jumping" also in normal navigation or selection with double or triple clicking symbols - than my "edit->copy/paste" via ctrl+c/v fails. I expect the errors to rely on the cursor positioning including the highlighting. Maybe while VAX highlights some text the cursor moves around. It seems that the cursor-jumping only apears after a while i edited files and did not saved them. The files are normally edited the way i already described.
Actually i cannot reproduce the problem as well. I am sure I need to do more editing. If it apears again, i'll keep an eye on cursor-movement. I will record the logs too.
feline Posted - Aug 13 2010 : 2:02:45 PM
Apologies for the delay in getting back to you about this. I have been trying to reproduce the problem here, using various test files, but so far I not been able to.

Do you have any key bindings for Find References Results navigation, or window focus? Is this problem file specific, or do you sometimes see it in smaller, less complex files as well?

You describe using the mouse to select the next result in the Find References Results list to jump to. If you use the keyboard, and press Enter on the result to jump to it instead, do you still see this problem?

If none of this helps, can you please turn on VA logging, reproduce the problem, and then turn off VA logging, to stop the log files getting to large, and send me the log files? Hopefully they will offer some clues.

Please see this FAQ for details of turning on VA's logging, and sending us the log files

http://docs.wholetomato.com?W305
andre.horst Posted - Jul 26 2010 : 08:27:22 AM
Sorry, I cannot provide the source file. But I still hope you can reproduce it somehow. Maybe you can create some template-classes with the quick-macro function in only one file, rename them and use them somewhere in the code in overloaded methods, that also can multiplied by copy-paste or something. I actually disabled the deep-macro-parsing and i'll keep it in mind if i refactor something in the discribed way.
feline Posted - Jul 20 2010 : 10:39:40 AM
So far I am still unable to reproduce this problem. I am occasionally seeing hints of something, but it seems my test files are simply not large enough and complex enough to cause the slow parsing that you are seeing.

Is there any chance of getting a copy of this single large file for testing purposes? I understand this is often not possible, but it is worth asking on the off chance.

If it is possible please submit the files via the form:

http://www.wholetomato.com/support/contact.asp

including this thread ID or URL in the description, so we can match it up.
andre.horst Posted - Jul 20 2010 : 03:49:39 AM
952 Files. The file where i had the problems after i changed code around the referenced symbol has about 15000 loc, lots of overloaded methods, template methods, uses complex template classes (VAX generated the templates for 20 secs or something) and the symbol i worked on was a class-method that was referenced about 50 times. I do not edit randomly, i edit top down and i think VAX reparses the code to jump to the correct line (i added and removed some lines). Maybe you should add some real code instead of empty lines. Btw: i also changed the signature of the class-method while i edit the top down reference-list.
I meant in my "btw" comment: after i clicked the symbol in the reference-list, the cursor jumped to the symbol in the code, i click on a other place and then suddenly the cursor jumps back to the symbol after 3 seconds.
I also tried to disable auto highlight and several other options, but it didnt really helped. In the meantime i used the good old search-function of VS.
feline Posted - Jul 16 2010 : 4:17:28 PM
How many files do you have in your solution?

If you open VA's Open File in Solution dialog (Alt-Shift-O) the title bar contains two numbers. The first number is the number of files currently listed, which changes as you filter the list. The second number is the total number of files in the list, which is normally the number of files in your solution. What is this second number?

Using VS2008 and VA 1827 I am testing in a solution of 8,891 files. The largest file in the solution has 15,300 lines.

I have done a Find References in File for the keyword "static" and VA found 458 references.

I used the Find References Results list to jump to 10 different results, at random, and I added code either before or after each of these references. Sometimes I added code on the line, sometimes I added two or three lines above or below. I never saw any sign of any jumping at any point.

Am I missing something here, or does it sound like I am doing a good test?

I don't understand your "BTW" comment. Do you mean it is taking 3 seconds to select and highlight code in the editor, or is it taking 3 seconds to jump to a line of code after double clicking in the Find References Results window?
andre.horst Posted - Jul 15 2010 : 08:46:55 AM
BTW: I just select the code via double click in the VAX window and after a (up to) 3 secs and the symbol gets selected and highlighted.
andre.horst Posted - Jul 15 2010 : 08:40:28 AM
I am still get this annoying behavior. I actually did the same as described before. I have a quite big reference list, change the code around of the referenced symbols and the more I changed, the cursor jumps back to the symbol after i double clicked the reference-line in the VAX window and already started editing. This really breaks my work flow. I also have the highlighting of the brackets on. The symbol is a method call. I change code around this symbol, also insert new lines.
As far as i can see the cursor moves at the same time as the highlighting of the symbol is done while i edit the file. I actually use VS2008 and lates VAX and this bug is still present. Hope you can find something. Try a big file, lots of references, change the code around the referenced symbol directly by double click the referenced line, move cursor up and write or select and overwrite code.
andre.horst Posted - Oct 23 2009 : 03:39:54 AM
I saw this anyoing behavior just yesterday while i was changing some code near a referenced symbol.
Maybe you have to repeat this steps in several found references that causes VAX to reparse the file continiously. If i just selected another line within a block or method after doubleklicking the reference-list-entry the cursor jumps back to the referenced symbol and selects it. I have the highlighting of symbols under cursor turned on. The file and of course the whole project is quite complex, lot of templates and overloads, especially in this large file i have 3 times round about 20-30 overloads and several template methods and lots of macros (deep-parsing turned on).

feline Posted - Oct 22 2009 : 12:14:25 PM
So far I cannot reproduce this problem. I am using VC6, VA 1738, winXP SP3 and a 23,000 line .cpp file.

I have a small test class at the bottom of the file, containing a constructor and a destructor. I have run Find References on the class name, and then I am double clicking on a result in the Find References Results list.

After jumping to the first result I am adding a comment to the end of the line, then I am jumping to the next result by double clicking on it with the house, and then doing nothing, since this result (class name) is highlighted when I jump to it. I have also tried selecting some different text with the mouse.

Since this is a large file VA waits 3 seconds after you finish editing it before reparsing it, to make sure system performance is not to bad. Yet my selection never jumps.

Am I missing some key step here?

In this simple test code all of the references fit onto the screen, no scrolling is required. Might this be a factor?
andre.horst Posted - Oct 22 2009 : 02:24:25 AM
In a large file i can reproduce this pretty easily and every time.

If I wait a few seconds i can see the selection flickering and if i start then selecting and editing it works fine.

I select the text with the mouse. I click on the list entry, move the mouse to a specific symbol in the code line, mostly double click the symbol and start typing - then the cursor jumps back. But it is NOT a matter of typing, it seems to be a timing problem.
feline Posted - Oct 21 2009 : 12:40:44 PM
How easily can you reproduce this effect? Sometimes? Every time?

If you wait a few seconds after the jump before selecting any text, does this make any difference?
How, exactly, are you selecting the text? With the mouse? The keyboard? A combination of both?
andre.horst Posted - Oct 20 2009 : 05:14:23 AM
NO, the problem is not that the view is not up to date. The main problem here is, that i select the reference by double clicking in the list, then the cursor moves to the corresponding position in the source window at the position of the symbol. After THIS jump to the referenced code line i directly start to select and modify other code in this line. Then suddenly the cursors jumps back to the symbol position and I overwrite the symbol instead of my selected code. Maybe this just happens on large files (>10000 loc) that slows down VAX and only then you can see a slower movement to the symbol or a slight delay.
sean Posted - Oct 09 2009 : 6:59:19 PM
The problem here is that the file is being modified and the find references results list is more static than dynamic. VA definitely needs some work on keeping reference results up to date while the files are being modified. But it is a balancing act - if you delete the declaration to a symbol, that could invalidate all of the reference results before you've gotten to them if we are too diligent in making the results reflect edits made after the command was run...
feline Posted - Oct 09 2009 : 5:16:54 PM
I don't understand. When you double click on a line in the Find References Results list then your caret is moved to this reference. This is what is supposed to happen, since you are telling VA to move to this specific reference.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000