Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Several improvements to Code Completion plugin
ollydbg:
@Huki, very good work, thanks.
I will apply the patch, and test it. It is better have a patch serials not a big one. :) As OBF said, git can splite a big patch and generate such patch serials.
About the parsing strategy, my concern is that recursive expanding include files in a cpp file will parse a lot of same header files for many times.
Alpha:
I have not had a chance to look through your work (my priority is currently on CC API), but the features sound useful. The pure parsing related parts, *should* have no conflicts with my modifications, I believe.
Huki:
I decided to split the patch file manually with a text editor this time, I think it should work. I've attached the patches set below. I'll try out git hopefully tomorrow or next week, and sync my changes with the github repo.
--- Quote from: ollydbg ---About the parsing strategy, my concern is that recursive expanding include files in a cpp file will parse a lot of same header files for many times.
--- End quote ---
Till now I had not checked this part in detail (i.e., whether already parsed files are parsed again and again, or not), but now I can confirm: already parsed headers actually get skipped. In fact it's not going to make a difference even if we change this behavior, because tokens are not managed per-file but project wide. In this case it only matters for us to ensure tokens are collected in the correct order. If they are already collected, we don't achieve anything by reparsing the file. So the accuracy is good enough to avoid the use of priority headers, while having almost no impact on performance (because we are still parsing the same number of files - in fact lesser as we don't have a separate headers parsing phase).
oBFusCATed:
Hm...
Can you post thorough descriptions for the problems you try to solve with every patch?
Steps to reproduce will be useful, too.
I'm particularly interested in the two debugger patches and the thread search one.
Huki:
I'll quickly explain the patches you asked for, rest I'll try to do later (please let me know if there is anything else specifically).
debugger_tooltip:
- Updated the code for detecting whether the mouse pointer is over a selected text. The original code was just a simple approximation, this one does a proper test.
- Placed the tooltip below the mouse pointer, rather than directly on it. This makes it possible to select text (in the editor) even if the tooltip was triggered. In addition, the user must be able to move the mouse pointer into the tooltip (mainly to expand items in the tooltip), so we should not dismiss the tooltip as soon as the mouse is moved (give a safe area outside the tooltip where the mouse can move without accidentally dismissing the tooltip).
- Fixed both code completion tooltip and debugger tooltips appearing at the same time (it happens if debugger tooltip takes some time to compute and display). Several tests are done before displaying the debugger tooltip, one of which is supposed to avoid this bug from occuring. I've fixed the order in which those tests are done.
- Do not show the debugger tooltip when Ctrl key is pressed (i.e., if "Only show tooltip when Ctrl key is pressed" option is turned off - the default, we now do the opposite).
debugger_fixes:
- Debugger stalls when trying to step into unknown code (or even a return statement). See this thread.
- Setting the working directory for debugger fails for me, tracked it down to wxSetWorkingDirectory() which fails if the path is converted to GDB format. Removing the ConvertToGDBDirectory(path); fixes it.
thread_search:
- Do not automatically prepend the tilde sign if found. Users can still select the text including the ~ if they wish to include it in the search text. I have seen several cases where the tilde is used as the bitwise NOT operator, so shouldn't always assume for C++ destructor. I've also done similar fixes in Code Completion plugin.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version