From: <td...@us...> - 2003-11-18 11:27:26
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1:/tmp/cvs-serv19491 Modified Files: AnyEdit.dsp AnyEdit.dsw AnyEdit.h AnyEdit.rc AnyEditView.cpp BCGCB473.lib BCGCB473D.lib ChangeLog.txt ClassView.cpp ClassView.h TagList.cpp TagParser.cpp Log Message: - Changed BCG Libraries - Changed class view handling to display more information Index: AnyEdit.dsp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.dsp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** AnyEdit.dsp 12 Aug 2003 13:26:35 -0000 1.22 --- AnyEdit.dsp 18 Nov 2003 11:27:21 -0000 1.23 *************** *** 24,29 **** # Begin Project # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "" ! # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe --- 24,29 ---- # Begin Project # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "AnyEdit" ! # PROP Scc_LocalPath "." CPP=cl.exe MTL=midl.exe Index: AnyEdit.dsw =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.dsw,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AnyEdit.dsw 29 Sep 2002 19:19:42 -0000 1.2 --- AnyEdit.dsw 18 Nov 2003 11:27:21 -0000 1.3 *************** *** 8,11 **** --- 8,15 ---- Package=<5> {{{ + begin source code control + AnyEdit + . + end source code control }}} Index: AnyEdit.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** AnyEdit.h 11 Aug 2003 04:03:19 -0000 1.25 --- AnyEdit.h 18 Nov 2003 11:27:21 -0000 1.26 *************** *** 102,105 **** --- 102,109 ---- void UnloadPlugins(); void PluginMenuClicked(UINT id); + void SetModification(BOOL modval) + { + check_modification = modval; + } BOOL CheckModification() { Index: AnyEdit.rc =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.rc,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** AnyEdit.rc 11 Aug 2003 04:03:19 -0000 1.26 --- AnyEdit.rc 18 Nov 2003 11:27:21 -0000 1.27 *************** *** 1778,1784 **** BS_AUTOCHECKBOX | WS_TABSTOP,7,49,88,10 CONTROL "Match case",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,7,64,87,9 CONTROL "&Regular expression",IDC_CHECK3,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,7,78,74,10 CONTROL "Up",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,115,59,68,10 CONTROL "Down",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,115,72,43, --- 1778,1784 ---- BS_AUTOCHECKBOX | WS_TABSTOP,7,49,88,10 CONTROL "Match case",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,7,61,87,9 CONTROL "&Regular expression",IDC_CHECK3,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,7,72,74,10 CONTROL "Up",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,115,59,68,10 CONTROL "Down",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,115,72,43, *************** *** 1790,1795 **** PUSHBUTTON "&Cancel",IDCANCEL,200,76,52,13 LTEXT "Find what",IDC_STATIC,7,10,42,10 ! GROUPBOX "Direction",IDC_STATIC,105,45,84,43 LTEXT "Relace with",IDC_STATIC,7,27,42,10 END --- 1790,1797 ---- PUSHBUTTON "&Cancel",IDCANCEL,200,76,52,13 LTEXT "Find what",IDC_STATIC,7,10,42,10 ! GROUPBOX "Direction",IDC_STATIC,105,50,84,33 LTEXT "Relace with",IDC_STATIC,7,27,42,10 + CONTROL "&Transform backslash expressions",IDC_CHECK4,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,84,118,10 END Index: AnyEditView.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditView.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** AnyEditView.cpp 27 Aug 2003 06:32:42 -0000 1.32 --- AnyEditView.cpp 18 Nov 2003 11:27:22 -0000 1.33 *************** *** 1163,1185 **** CFile file; CFileStatus status; ! file.GetStatus(str,status); ! if(status.m_mtime != last_access_time) ! { ! last_access_time = status.m_mtime; ! CString msg = "'"; ! msg+= str; ! msg+= "'\nFile has been modified outside AnyEdit!\nDo you want to reload it ?"; ! ! if(AfxMessageBox(msg,MB_YESNO)==IDYES) ! { ! m_Scintilla.SetFocus(); ! m_Scintilla.OpenFile(str); ! } ! else ! { ! last_access_time = NULL; ! } ! } } --- 1163,1213 ---- CFile file; CFileStatus status; ! if(!file.GetStatus(str,status)) ! { ! //Find out how to close a view from inside the view ! /* ! CString msg = "'"; ! msg+= str; ! msg+= "'\nFile has been deleted outside AnyEdit!\nDo you want to close the window ?"; ! theApp.SetModification(FALSE); ! if(AfxMessageBox(msg,MB_YESNO)==IDYES) ! { ! if(this) ! { ! last_access_time = NULL; ! this->GetParentFrame()->PostMessage(WM_CLOSE); ! theApp.SetModification(TRUE); ! } ! } ! else ! { ! last_access_time = NULL; ! theApp.SetModification(TRUE); ! }*/ ! ! } ! else ! { ! if(status.m_mtime != last_access_time) ! { ! last_access_time = status.m_mtime; ! CString msg = "'"; ! msg+= str; ! msg+= "'\nFile has been modified outside AnyEdit!\nDo you want to reload it ?"; ! theApp.SetModification(FALSE); ! if(AfxMessageBox(msg,MB_YESNO)==IDYES) ! { ! m_Scintilla.SetFocus(); ! m_Scintilla.OpenFile(str); ! } ! else ! { ! m_Scintilla.SetFocus(); ! last_access_time = NULL; ! } ! theApp.SetModification(TRUE); ! } ! } } Index: BCGCB473.lib =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/BCGCB473.lib,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvshpHiP0 and /tmp/cvskGW0rY differ Index: BCGCB473D.lib =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/BCGCB473D.lib,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsuDHQ3a and /tmp/cvsgZXf4i differ Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ChangeLog.txt,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** ChangeLog.txt 18 Nov 2003 04:09:50 -0000 1.29 --- ChangeLog.txt 18 Nov 2003 11:27:22 -0000 1.30 *************** *** 35,38 **** --- 35,39 ---- 28) Fixed regular expression in replace patterns [#798478] 29) Added option in replace to remove transform backslash expressions. + 30) Class view display now shows more information [enums, macros, fields] etc., Beta 1.0 Index: ClassView.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ClassView.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** ClassView.cpp 12 Aug 2003 13:26:35 -0000 1.19 --- ClassView.cpp 18 Nov 2003 11:27:22 -0000 1.20 *************** *** 37,40 **** --- 37,46 ---- #endif + #define GETPARENTCATEGORY(par) if( (retitem= GetItemFromClassName(par,GetRootItem())) == NULL )\ + {\ + retitem = InsertCategory(par);\ + }\ + return retitem; + ///////////////////////////////////////////////////////////////////////////// // CClassView *************** *** 50,55 **** CClassView::~CClassView() { - if(m_SingleLock) - delete m_SingleLock; // to avoid memory leaks when closing the AnyEdit app, CTagEntry classes (that are pointed to by GetItemData // are deleted on WM_DESTROY (OnDestoy function); --- 56,59 ---- *************** *** 98,103 **** char file_ext[_MAX_EXT]; CString targetName,targetExt; ! _splitpath(((CTagEntry ! *)dwData)->filename,file_drive,file_path,file_name,file_ext); targetName=file_name; targetExt=file_ext; --- 102,106 ---- char file_ext[_MAX_EXT]; CString targetName,targetExt; ! _splitpath(((CTagEntry *)dwData)->filename,file_drive,file_path,file_name,file_ext); targetName=file_name; targetExt=file_ext; *************** *** 116,124 **** if(!realpath.IsEmpty()) ! theApp.GotoFileAndLine(((CTagEntry ! *)dwData)->lineno,realpath); else ! theApp.SetSelectedLine(((CTagEntry ! *)dwData)->lineno-1); } } --- 119,125 ---- if(!realpath.IsEmpty()) ! theApp.GotoFileAndLine(((CTagEntry *)dwData)->lineno,realpath); else ! theApp.SetSelectedLine(((CTagEntry *)dwData)->lineno-1); } } *************** *** 183,188 **** { CTagEntry ! * ent = (CTagEntry ! *)functionlist->GetNext(pos); if(ent->deleted==FALSE) InsertFunction(ent); --- 184,188 ---- { CTagEntry ! * ent = (CTagEntry *)functionlist->GetNext(pos); if(ent->deleted==FALSE) InsertFunction(ent); *************** *** 213,218 **** { CTagEntry ! * ent = (CTagEntry ! *)classlist->GetNext(pos); InsertClass(ent); } --- 213,217 ---- { CTagEntry ! * ent = (CTagEntry*)classlist->GetNext(pos); InsertClass(ent); } *************** *** 231,236 **** } ! void CClassView::InsertClass(CTagEntry ! *ent) { HTREEITEM paritem; --- 230,234 ---- } ! void CClassView::InsertClass(CTagEntry*ent) { HTREEITEM paritem; *************** *** 251,260 **** HTREEITEM afterItem=TVI_FIRST; if(paritem==GetRootItem()) afterItem=TVI_LAST; HTREEITEM hItem = InsertItem(ent->tagname,0,0,paritem,afterItem); //SetItemData(hItem,ent->lineno); ! SetItemData(hItem,(DWORD)new CTagEntry ! (ent)); } --- 249,259 ---- HTREEITEM afterItem=TVI_FIRST; if(paritem==GetRootItem()) + { afterItem=TVI_LAST; + } HTREEITEM hItem = InsertItem(ent->tagname,0,0,paritem,afterItem); //SetItemData(hItem,ent->lineno); ! SetItemData(hItem,(DWORD)new CTagEntry(ent)); } *************** *** 286,307 **** } ! CTagEntry ! * CClassView::InsertFunctionByAlphabet(CTagEntry ! * ent) { CString funcname = ent->tagname; CString clPar= ent->classname; - HTREEITEM parItem; - if(clPar==_T("")) - parItem = GetRootItem(); - else - { - int rev = clPar.ReverseFind('.'); - if(rev!=-1) - clPar = clPar.Right(clPar.GetLength()-rev-1); - parItem = GetItemFromClassName(clPar,GetRootItem()); - } - HTREEITEM tempItem = GetChildItem(parItem); BOOL first=TRUE; --- 285,293 ---- } ! CTagEntry* CClassView::InsertFunctionByAlphabet(HTREEITEM parItem,CTagEntry * ent) { CString funcname = ent->tagname; CString clPar= ent->classname; HTREEITEM tempItem = GetChildItem(parItem); BOOL first=TRUE; *************** *** 309,315 **** while(tempItem != NULL) { ! CTagEntry ! * entold = (CTagEntry ! *)GetItemData(tempItem); if(!entold) break; --- 295,299 ---- while(tempItem != NULL) { ! CTagEntry* entold = (CTagEntry*)GetItemData(tempItem); if(!entold) break; *************** *** 337,368 **** HTREEITEM newItem = InsertItem(ent->tagname,imnum,imnum,parItem,ttempItem); ! CTagEntry ! * tempentry ! = new CTagEntry ! (ent); ! SetItemData(newItem,(DWORD)tempentry ! ); ! return tempentry ! ; } ! CTagEntry ! * CClassView::InsertFunctionByLine(CTagEntry ! *ent) { int llineNo = ent->lineno; CString clPar= ent->classname; - HTREEITEM parItem; - if(clPar==_T("")) - parItem = GetRootItem(); - else - { - int rev = clPar.ReverseFind('.'); - if(rev!=-1) - clPar = clPar.Right(clPar.GetLength()-rev-1); - parItem = GetItemFromClassName(clPar,GetRootItem()); - } - HTREEITEM tempItem = GetChildItem(parItem); BOOL first=TRUE; --- 321,334 ---- HTREEITEM newItem = InsertItem(ent->tagname,imnum,imnum,parItem,ttempItem); ! CTagEntry* tempentry = new CTagEntry(ent); ! SetItemData(newItem,(DWORD)tempentry); ! return tempentry; } ! CTagEntry* CClassView::InsertFunctionByLine(HTREEITEM parItem,CTagEntry *ent) { int llineNo = ent->lineno; CString clPar= ent->classname; HTREEITEM tempItem = GetChildItem(parItem); BOOL first=TRUE; *************** *** 370,376 **** while(tempItem != NULL) { ! CTagEntry ! * entold = (CTagEntry ! *)GetItemData(tempItem); if(!entold) break; --- 336,340 ---- while(tempItem != NULL) { ! CTagEntry * entold = (CTagEntry*)GetItemData(tempItem); if(!entold) break; *************** *** 398,429 **** HTREEITEM newItem = InsertItem(ent->tagname,imnum,imnum,parItem,ttempItem); ! CTagEntry ! * tempentry ! = new CTagEntry ! (ent); ! SetItemData(newItem,(DWORD)tempentry ! ); ! return tempentry ! ; } ! void CClassView::InsertFunction(CTagEntry ! *ent) { ! CTagEntry ! * tempentry ! ; if(theApp.GetAlphabetic()) { ! tempentry ! = InsertFunctionByAlphabet(ent); } else { ! tempentry ! =InsertFunctionByLine(ent); } --- 362,385 ---- HTREEITEM newItem = InsertItem(ent->tagname,imnum,imnum,parItem,ttempItem); ! CTagEntry* tempentry= new CTagEntry(ent); ! SetItemData(newItem,(DWORD)tempentry); ! return tempentry; } ! void CClassView::InsertFunction(CTagEntry *ent) { ! CTagEntry* tempentry; ! ! HTREEITEM parItem = GetParentItemForEntry(ent); if(theApp.GetAlphabetic()) { ! tempentry = InsertFunctionByAlphabet(parItem,ent); } else { ! tempentry =InsertFunctionByLine(parItem,ent); } *************** *** 435,445 **** for(i=0;i<imnum;i++) { ! if(((CTagEntry ! *)fbox->GetItemData(i))->lineno > ent->lineno) break; } int itno = fbox->InsertString(i,ent->tagname); ! fbox->SetItemData(itno,(DWORD)tempentry ! ); } } --- 391,399 ---- for(i=0;i<imnum;i++) { ! if(((CTagEntry*)fbox->GetItemData(i))->lineno > ent->lineno) break; } int itno = fbox->InsertString(i,ent->tagname); ! fbox->SetItemData(itno,(DWORD)tempentry); } } *************** *** 470,474 **** int imgNo=0; GetItemImage(hItem,imgNo,imgNo); ! if((imgNo==6)|(imgNo==7)) return; if(imgNo==0) --- 424,428 ---- int imgNo=0; GetItemImage(hItem,imgNo,imgNo); ! if((imgNo==6)||(imgNo==7)||(imgNo==12)) return; if(imgNo==0) *************** *** 495,500 **** POSITION pos = clist->GetHeadPosition(); POSITION posold; ! CTagEntry ! * ent; BOOL removeme = FALSE; --- 449,453 ---- POSITION pos = clist->GetHeadPosition(); POSITION posold; ! CTagEntry* ent; BOOL removeme = FALSE; *************** *** 502,507 **** { posold = pos; ! ent = (CTagEntry ! *) clist->GetNext(pos); if(ent->tagname==clname) { --- 455,459 ---- { posold = pos; ! ent = (CTagEntry*) clist->GetNext(pos); if(ent->tagname==clname) { *************** *** 511,521 **** if (dwData!=0) { ! ((CTagEntry ! *)dwData)->lineno=ent->lineno; } else { ! SetItemData(hItem,(DWORD)new CTagEntry ! (ent)); }; //SetItemData(hItem,ent->lineno); --- 463,471 ---- if (dwData!=0) { ! ((CTagEntry*)dwData)->lineno=ent->lineno; } else { ! SetItemData(hItem,(DWORD)new CTagEntry(ent)); }; //SetItemData(hItem,ent->lineno); *************** *** 544,548 **** HTREEITEM parItem = GetParentItem(hItem); CString par = GetItemText(parItem); ! if(parItem==GetRootItem()) par=""; --- 494,505 ---- HTREEITEM parItem = GetParentItem(hItem); CString par = GetItemText(parItem); ! BOOL iscategory=FALSE; ! DWORD dwda=GetItemData(parItem); ! if (dwda!=0) ! { ! if(((CTagEntry*)dwda)->type == 'z') iscategory=TRUE; ! } ! ! if( (parItem==GetRootItem()) || ( iscategory )) par=""; *************** *** 551,562 **** POSITION pos = funclist->GetHeadPosition(); POSITION posold; ! CTagEntry ! * ent; BOOL removeme = FALSE; while(pos != NULL) { posold = pos; ! ent = (CTagEntry ! *)funclist->GetNext(pos); if(ent==NULL) break; --- 508,517 ---- POSITION pos = funclist->GetHeadPosition(); POSITION posold; ! CTagEntry* ent; BOOL removeme = FALSE; while(pos != NULL) { posold = pos; ! ent = (CTagEntry*)funclist->GetNext(pos); if(ent==NULL) break; *************** *** 569,578 **** if (dwData!=0) { ! ((CTagEntry ! *)dwData)->lineno=ent->lineno; ! ((CTagEntry ! *)dwData)->tagDefinition = ent->tagDefinition; ! ((CTagEntry ! *)dwData)->filename = ent->filename; } --- 524,533 ---- if (dwData!=0) { ! if(((CTagEntry*)dwData)->type == ent->type) ! { ! ((CTagEntry*)dwData)->lineno=ent->lineno; ! ((CTagEntry*)dwData)->tagDefinition = ent->tagDefinition; ! ((CTagEntry*)dwData)->filename = ent->filename; ! } } *************** *** 582,595 **** (ent)); }; ! //SetItemData(hItem,ent->lineno); ! int imnum = GetImageForAccess(ent); ! int oldnum=0; ! int oldselnum=0; ! GetItemImage(hItem,oldnum,oldselnum); ! if(oldnum != imnum) ! SetItemImage(hItem,imnum,imnum); ! ent->deleted=TRUE; ! removeme = TRUE; ! break; } --- 537,553 ---- (ent)); }; ! ! if(((CTagEntry*)dwData)->type == ent->type) ! { ! int imnum = GetImageForAccess(ent); ! int oldnum=0; ! int oldselnum=0; ! GetItemImage(hItem,oldnum,oldselnum); ! if(oldnum != imnum) ! SetItemImage(hItem,imnum,imnum); ! ent->deleted=TRUE; ! removeme = TRUE; ! break; ! } } *************** *** 637,641 **** case 'v': - case 'm': { switch(acc->access) --- 595,598 ---- *************** *** 655,658 **** --- 612,619 ---- } break; + + case 'm': + return 13; + break; } *************** *** 749,754 **** if (dwData!=0) { ! delete (CTagEntry ! *)dwData; SetItemData(hItem,0); }; --- 710,714 ---- if (dwData!=0) { ! delete (CTagEntry*)dwData; SetItemData(hItem,0); }; *************** *** 775,780 **** if (dwData!=0) { ! delete (CTagEntry ! *)dwData; SetItemData(startFrom,0); }; --- 735,739 ---- if (dwData!=0) { ! delete (CTagEntry*)dwData; SetItemData(startFrom,0); }; *************** *** 798,802 **** int imselnum; GetItemImage(hitem,imnum,imselnum); ! if(imnum==0) return TRUE; else --- 757,761 ---- int imselnum; GetItemImage(hitem,imnum,imselnum); ! if((imnum==0) || (imnum==12)) return TRUE; else *************** *** 819,849 **** } - /* Instead of Adding new tag entries alone in the Tag List.. do not clear the project - tag list and append only changes to it and then do the usual fill taglist.,, - void CClassView::AddTagList(CTagList *taglist) - { - proarr.RemoveAll(); - theApp.GetCurrentProjectFiles(proarr); - CheckTagList(GetRootItem(),taglist); - - CObList * classlist = taglist->GetClassList(); - - POSITION pos = classlist->GetHeadPosition(); - while(pos != NULL) - { - CTagEntry * ent = (CTagEntry *)classlist->GetNext(pos); - InsertClass(ent); - } - - CObList * functionlist = taglist->GetFunctionList(); - - pos = functionlist->GetHeadPosition(); - while(pos != NULL) - { - CTagEntry * ent = (CTagEntry *)functionlist->GetNext(pos); - InsertFunction(ent); - } - } - */ void CClassView::PreSubclassWindow() --- 778,781 ---- *************** *** 906,918 **** if (!hItem) return FALSE; ! CTagEntry ! * tagEntry ! = (CTagEntry ! *) GetItemData(hItem); ! if (tagEntry ! !=NULL) { ! strTipText=tagEntry ! ->tagDefinition; } --- 838,845 ---- if (!hItem) return FALSE; ! CTagEntry * tagEntry= (CTagEntry*) GetItemData(hItem); ! if (tagEntry!=NULL) { ! strTipText=tagEntry->tagDefinition; } *************** *** 938,979 **** return TRUE; // message was handled ! /* TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)pNMHDR; ! TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR; ! CString strTipText; ! UINT nID = pNMHDR->idFrom; ! // Do not process the msg from built in tooltip ! if( nID == (UINT)m_hWnd && (( pNMHDR->code == TTN_NEEDTEXTA && pTTTA->uFlags & TTF_IDISHWND ) ! || ( pNMHDR->code == TTN_NEEDTEXTW && pTTTW->uFlags & TTF_IDISHWND ) ) ) ! return FALSE; ! // Get the mouse position ! const MSG* pMessage; ! CPoint pt; ! pMessage = GetCurrentMessage(); // get mouse pos ! ASSERT ( pMessage ); ! pt = pMessage->pt; ! ScreenToClient( &pt ); ! UINT nFlags; ! HTREEITEM hItem = HitTest( pt, &nFlags ); //Get item pointed by mouse ! ! CTagEntry* tagEntry = (CTagEntry*) GetItemData(hItem); ! if (tagEntry!=NULL) ! { ! strTipText=tagEntry->tagDefinition; ! } ! #ifndef _UNICODE ! if (pNMHDR->code == TTN_NEEDTEXTA) ! lstrcpyn(pTTTA->szText, strTipText, 80); ! else ! _mbstowcsz(pTTTW->szText, strTipText, 80); ! #else ! if (pNMHDR->code == TTN_NEEDTEXTA) ! _wcstombsz(pTTTA->szText, strTipText, 80); ! else ! lstrcpyn(pTTTW->szText, strTipText, 80); ! #endif ! *pResult = 0; ! ! return TRUE; // message was handled ! */ } --- 865,958 ---- return TRUE; // message was handled + } ! HTREEITEM CClassView::InsertCategory(const char * catname) ! { ! ! CTagEntry ent; ! ent.tagname = catname; ! ent.lineno=0; ! ent.type = 'z'; ! ! HTREEITEM paritem = GetRootItem(); ! HTREEITEM afterItem=TVI_FIRST; ! ! HTREEITEM hItem = InsertItem(ent.tagname,12,12,paritem,afterItem); ! //SetItemData(hItem,ent->lineno); ! SetItemData(hItem,(DWORD)new CTagEntry(&ent)); ! return hItem; ! } ! ! ! HTREEITEM CClassView::GetParentItemForEntry(CTagEntry *ent) ! { ! CString funcname = ent->tagname; ! CString clPar= ent->classname; ! ! HTREEITEM parItem = GetRootItem(); ! int rev = clPar.ReverseFind('.'); ! if(rev!=-1) ! { ! clPar = clPar.Right(clPar.GetLength()-rev-1); ! } ! parItem = GetItemFromClassName(clPar,GetRootItem()); ! if(parItem!=NULL) ! return parItem; ! ! switch(ent->filetype) ! { ! case FT_C: //In case of C,CPP files ! return GetParentC(ent); ! case FT_JAVA: ! return GetParentJava(ent); ! break; ! } ! ! return parItem; ! } ! ! HTREEITEM CClassView::GetParentC(CTagEntry *ent) ! { ! HTREEITEM retitem; ! switch(ent->type) ! { ! case 'v': ! GETPARENTCATEGORY("Variables"); ! case 'g': ! GETPARENTCATEGORY("Enumerations"); ! case 'd': ! GETPARENTCATEGORY("Macros"); ! case 'm': ! GETPARENTCATEGORY("Members"); ! case 's': ! GETPARENTCATEGORY("Structures"); ! case 't': ! GETPARENTCATEGORY("Typedefs"); ! case 'x': ! GETPARENTCATEGORY("Externs"); ! case 'u': ! GETPARENTCATEGORY("Unions"); ! case 'n': ! GETPARENTCATEGORY("Namespaces"); ! case 'p': ! GETPARENTCATEGORY("Prototypes"); ! break; ! } ! return GetRootItem(); ! } ! ! HTREEITEM CClassView::GetParentJava(CTagEntry *ent) ! { ! HTREEITEM retitem; ! switch(ent->type) ! { ! case 'f': ! GETPARENTCATEGORY("Fields"); ! case 'i': ! GETPARENTCATEGORY("Interfaces"); ! case 'p': ! GETPARENTCATEGORY("Packages"); ! break; ! } ! return GetRootItem(); } Index: ClassView.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ClassView.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ClassView.h 12 Aug 2003 13:26:35 -0000 1.15 --- ClassView.h 18 Nov 2003 11:27:22 -0000 1.16 *************** *** 42,46 **** // Implementation public: ! //void AddTagList(CTagList* taglist); int GetFunctionBoxPosition(LPCSTR data); BOOL DeleteItem(HTREEITEM hItem); --- 42,46 ---- // Implementation public: ! //void AddTagList(CTagList* taglist); int GetFunctionBoxPosition(LPCSTR data); BOOL DeleteItem(HTREEITEM hItem); *************** *** 54,57 **** --- 54,60 ---- // Generated message map functions protected: + HTREEITEM GetParentJava(CTagEntry * ent); + HTREEITEM GetParentC(CTagEntry * ent); + HTREEITEM GetParentItemForEntry(CTagEntry * ent); int OnToolHitTest(CPoint point, TOOLINFO * pTI) const; BOOL OnToolTipText( UINT id, NMHDR * pNMHDR, LRESULT * pResult ); *************** *** 64,69 **** void CheckTagList(HTREEITEM hItem,CTagList * taglist); void InsertFunction(CTagEntry * ent); ! CTagEntry* InsertFunctionByLine(CTagEntry * ent); ! CTagEntry* InsertFunctionByAlphabet(CTagEntry* ent); int GetImageFTC(CTagEntry * ent); int GetImageFTJAVA(CTagEntry * ent); --- 67,72 ---- void CheckTagList(HTREEITEM hItem,CTagList * taglist); void InsertFunction(CTagEntry * ent); ! CTagEntry* InsertFunctionByLine(HTREEITEM parItem, CTagEntry * ent); ! CTagEntry* InsertFunctionByAlphabet(HTREEITEM parItem,CTagEntry* ent); int GetImageFTC(CTagEntry * ent); int GetImageFTJAVA(CTagEntry * ent); *************** *** 73,76 **** --- 76,80 ---- HTREEITEM GetItemFromClassName(LPCSTR clName, HTREEITEM hItem); + HTREEITEM InsertCategory(const char * category); void InsertClass(CTagEntry * ent); Index: TagList.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/TagList.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TagList.cpp 12 Aug 2003 13:26:35 -0000 1.8 --- TagList.cpp 18 Nov 2003 11:27:22 -0000 1.9 *************** *** 65,75 **** switch (ent->type) { case 'c': classlist.AddTail(ent); break; ! case 'f': case 'v': case 'm': ! functionlist.AddTail(ent); break; default: --- 65,86 ---- switch (ent->type) { + case 's': case 'c': classlist.AddTail(ent); break; ! case 'e': ! break; ! case 'f': case 'v': + case 'g': + case 'd': case 'm': ! case 't': ! case 'x': ! case 'u': ! case 'n': ! case 'i': ! case 'p': ! functionlist.AddTail(ent); break; default: Index: TagParser.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/TagParser.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TagParser.cpp 12 Aug 2003 13:26:35 -0000 1.9 --- TagParser.cpp 18 Nov 2003 11:27:22 -0000 1.10 *************** *** 208,211 **** --- 208,217 ---- list->CheckForClass(line,ent->filename); } + else if(line.Left(7)=="struct:") + { + line = line.Right(line.GetLength()-7); + ent->classname = line; + list->CheckForClass(line,ent->filename); + } else if(line.Left(7)=="access:") { |