Patch #3441 2013-03-14 22:49

p2rkw

CC class browser: partial & recursive search in top tree
Download
3441-CC_class_brows.patch (714 bytes)
Category
Plugin::Bugfix
Status
Open
Close date
 
Assigned to
 
Index: src/plugins/codecompletion/classbrowser.cpp
===================================================================
--- src/plugins/codecompletion/classbrowser.cpp    (wersja 8909)
+++ src/plugins/codecompletion/classbrowser.cpp    (kopia robocza)
@@ -841,7 +841,9 @@
         // now the actual token
         m_CCTreeCtrl->Expand(start);
         m_CCTreeCtrl->SelectItem(start);
-        wxTreeItemId res = FindChild(token->m_Name, m_CCTreeCtrl, start);
+        bool isBottomShown = m_CCTreeCtrlBottom->IsShown();
+        wxTreeItemId res = FindChild(token->m_Name, m_CCTreeCtrl, start, !isBottomShown, !isBottomShown);
+        
         if (res.IsOk())
             m_CCTreeCtrl->SelectItem(res);
         else
alpha0010 2013-04-13 22:51

What is the purpose of this?

p2rkw 2013-04-14 18:01

It enables recursive search in subnodes of top tree when bottom tree is hidden.

alpha0010 2013-04-29 20:30

Okay, I have tested this and traced through its code, however I cannot find any change compared to what the behaviour currently is.

Am I missing something? What steps should I follow to see this change?

p2rkw 2013-04-30 12:51

Firstly enable bottom tree and try to locate member variable or member function using search box on top of the class browser. Member in bottom tree should be highlighted now.

Secondly disable bottom tree and repeat search. Is member found (highlighted)? Or maybe only its parent?

Now do the same with patched version.

In my opinion searching in class browser should be reorganized:

1) Now when I have displayed only local file's members and try to locate symbol with search box almost always "Multiple matches" dialog box is displayed with symbols from entire project! It's not useful. I think that instead of displaying "multiple matches" dialog, only first found symbol should be highlighted, and when user search again for same text searching should be started from item next to currently selected - this approach allows to jump over all matches in tree.

2) Right click menu should contain only symbol related options: jump to definition/declaration, rename, find occurrences, fund functions calling/called by. Tree - related options could be displayed as icons or drop down list on top of tree.

alpha0010 2013-05-04 16:35

Hmm... maybe I am just not smart enough :/ to figure this out. I will let someone else pick up this patch.