Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
[Solved] Distracting SymbolBrowser Behaviour
tigerbeard:
A couple of days ago I had updated to trunk rev13403 and noted a different behaviour of the Symbol Browser. The last version I used one was about a year older (can't recall the svn). The test was in Ububtu 22.04.
its about how the symbol tree updates. I use the setting "own parser per project". The tree is rebuild after slight code changes. I can reproduce it by adding a space to a header file and saving it. The tree disappears for about half a second and then is reset to fully closed. The problem I have is that my last tree position & open state is lost.
My old version did do that too, but a lot less often. On the other hand I had situations where a wrong click to the tree would crash code blocks. That happened about once or twice a day, but I never lost code (CB is very good keeping disk files up to date ;D ) and it was rather predictable so I would re-scan manually.
Now subjectively every few minutes I have to reclick through the tree (I use hierarchical namespaces a lot) and would like to do something about it. For me the crashing version was more productive.
Also I noted that with the setting "use one parser for the whole workspace" the tree closes when I double click on a class in a file not yet open in the editor. This was with only 1 project open. I think this makes the symbol tree extremly hard to work with.
Can someone confirm this behaviour?
If that is intended behaviour, I would like to try to implement something to get the tree into the same open position as before. As I do not know much about CodeCompletion I would be glad if someone can tell me in which function this tree rebuild is triggered. Maybe there is a way to find the first open tree leaf, save it and after the tree update search it and re-open it if found there.
Pecan:
Which code completion plugin are you using?
The legacy CodeCompletion or the Clangd_client?
Could you post a copy of the Code::Blocks log. It shows a list of plugins activated just after startup. Right click on the tab titled "Code::Blocks" and copy it to the clipboard then paste it here within code tags (the # icon above a reply box).
tigerbeard:
--- Quote from: Pecan on January 02, 2024, 06:41:35 pm ---Which code completion plugin are you using?
The legacy CodeCompletion or the Clangd_client?
--- End quote ---
No I am not using clangd nor have I configured it (ManagePlugins shows it as disabled). The CodeCompletion is Version 1.0 and enabled.
Here is it in the log.
--- Code: ---...
BrowseTracker
ToolsPlus
SpellChecker
CodeCompletion
cbDragScroll
EditorConfig
SmartIndentHDL
...
--- End code ---
Pecan:
--- Quote from: tigerbeard on January 02, 2024, 08:44:55 pm ---
--- Quote from: Pecan on January 02, 2024, 06:41:35 pm ---Which code completion plugin are you using?
The legacy CodeCompletion or the Clangd_client?
--- End quote ---
No I am not using clangd nor have I configured it (ManagePlugins shows it as disabled). The CodeCompletion is Version 1.0 and enabled.
Here is it in the log.
--- Code: ---...
BrowseTracker
ToolsPlus
SpellChecker
CodeCompletion
cbDragScroll
EditorConfig
SmartIndentHDL
...
--- End code ---
--- End quote ---
Thanks, I'll see if I can recreate the situation and figure it out.
If you have any hints about how to recreate the problem, I'd appreciate it.
tigerbeard:
Thats very kind, thanks.
I have a test using the workspace trunk/src/CodeBlocks_wx30-unix.workspace
First Test
* Set Settings/Editor/CC/CCParser/UseOneParserForWholeWorkspace
* Set Symbol Browser to "Current Projects Symbols"
* Make sure no files are open in the editor
* Activate Project wxSmith/ContribItems
* Switch to symbol Browser
* Open a class in the tree, e.g. wxsAxis and double clikc on the constructor
* Obvservation: The file is opened, and the tree is refeshed and closed
Expected: The file is opened, and the tree remains open and wxAxis ctor is selected.
Navigation
[0] Message Index
[#] Next page
Go to full version