Changeset 81 in dev
- Timestamp:
- Mar 26, 2007, 7:33:18 AM (18 years ago)
- Location:
- ProjectEditor
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
ProjectEditor/CClassInfo.cpp
r3 r81 84 84 } 85 85 86 // Static/Constを飛ばす 87 if( memicmp(pBuf+i,"Static",6)==0 ){ 88 // Static 89 i+=6; 90 while(pBuf[i]==' '||pBuf[i]=='\t') i++; 91 } 92 if(pBuf[i]=='c'||pBuf[i]=='C'){ 93 // Const 94 i+=5; 95 while(pBuf[i]==' '||pBuf[i]=='\t') i++; 96 } 97 86 98 DWORD dwProc; 87 99 if(memicmp(pBuf+i,"Abstract",8)==0&&(pBuf[i+8]==' '||pBuf[i+8]=='\t')|| … … 91 103 memicmp(pBuf+i,"Sub",3)==0&&(pBuf[i+3]==' '||pBuf[i+3]=='\t')){ 92 104 //メンバ関数のとき 105 93 106 if(pBuf[i]=='a'||pBuf[i]=='A'){ 94 107 i+=9; -
ProjectEditor/ClassTree.cpp
r24 r81 315 315 316 316 317 318 void SetClassTreeFromOneFile(char *lpszFilePath,int iFileNum){ 319 extern PROJECTINFO ProjectInfo; 320 extern MDIINFO MdiInfo[MAX_WNDNUM]; 321 int i2,i3,i4,WndNum; 322 char *pBuf; 323 HWND hChild; 317 void SetClassTreeFromOneFile_Buf( char *pBuf, int iFileNum ){ 318 int i2,i3,i4; 324 319 char temporary[GENERAL_SIZE]; 325 320 326 hChild=GetWindow(hClient,GW_CHILD);327 while(hChild){328 WndNum=GetWndNum(hChild);329 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){330 if(lstrcmpi(MdiInfo[WndNum].path,lpszFilePath)==0) break;331 }332 hChild=GetNextWindow(hChild,GW_HWNDNEXT);333 }334 335 if(hChild){336 //すでに指定されたファイルが開かれている場合337 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer;338 }339 else{340 //開かれていない場合341 pBuf=ReadBuffer(lpszFilePath);342 if(!pBuf) pBuf=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,1);343 }344 321 for(i2=0;;i2++){ 345 322 if(pBuf[i2]=='\0') break; … … 464 441 } 465 442 } 443 } 444 void SetClassTreeFromOneFile(char *lpszFilePath,int iFileNum){ 445 extern MDIINFO MdiInfo[MAX_WNDNUM]; 446 int WndNum; 447 HWND hChild=GetWindow(hClient,GW_CHILD); 448 while(hChild){ 449 WndNum=GetWndNum(hChild); 450 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){ 451 if(lstrcmpi(MdiInfo[WndNum].path,lpszFilePath)==0) break; 452 } 453 hChild=GetNextWindow(hChild,GW_HWNDNEXT); 454 } 455 456 char *pBuf; 457 if(hChild){ 458 //すでに指定されたファイルが開かれている場合 459 pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 460 } 461 else{ 462 //開かれていない場合 463 pBuf=ReadBuffer(lpszFilePath); 464 if(!pBuf) pBuf=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,1); 465 } 466 467 SetClassTreeFromOneFile_Buf( pBuf, iFileNum ); 466 468 467 469 if(!hChild) HeapDefaultFree(pBuf); … … 469 471 470 472 void SetProcedureTreeData(void *temp_iFileNum){ 471 extern PROJECTINFO ProjectInfo;472 473 int i; 473 474 char temporary[MAX_PATH]; … … 547 548 LockWindowUpdate(hProcedureTreeView); 548 549 549 if(iFileNum==-1){ 550 //プロジェクトのすべてのファイルを解析 551 for(i=0;i<ProjectInfo.pobj_DBFileInfo->iNum;i++){ 552 ProjectInfo.pobj_DBFileInfo->ppobj_FileInfo[i]->GetFullPath(temporary); 553 554 SetClassTreeFromOneFile(temporary,i); 555 } 556 557 //不要になったアイテムを除去 558 pobj_ClassTreeView->finish(); 550 extern PROJECTINFO ProjectInfo; 551 if(ProjectInfo.name[0]){ 552 // プロジェクトが開かれているとき 553 if(iFileNum==-1){ 554 //プロジェクトのすべてのファイルを解析 555 for(i=0;i<ProjectInfo.pobj_DBFileInfo->iNum;i++){ 556 ProjectInfo.pobj_DBFileInfo->ppobj_FileInfo[i]->GetFullPath(temporary); 557 558 SetClassTreeFromOneFile(temporary,i); 559 } 560 561 //不要になったアイテムを除去 562 //pobj_ClassTreeView->finish(); 563 } 564 else{ 565 ///////////////////////////////// 566 // 編集中のファイルのみを解析 567 ///////////////////////////////// 568 569 ProjectInfo.pobj_DBFileInfo->ppobj_FileInfo[iFileNum]->GetFullPath(temporary); 570 571 SetClassTreeFromOneFile(temporary,iFileNum); 572 } 559 573 } 560 574 else{ 561 // ///////////////////////////////562 // 編集中のファイルのみを解析 563 /////////////////////////////////564 565 ProjectInfo.pobj_DBFileInfo->ppobj_FileInfo[iFileNum]->GetFullPath(temporary);566 567 SetClassTreeFromOneFile(temporary,iFileNum); 575 // 編集中の単体ファイルを解析 576 577 HWND hChild=GetWindow(hClient,GW_CHILD); 578 int WndNum=GetWndNum(hChild); 579 char *pBuf=MdiInfo[WndNum].pMdiTextEdit->buffer; 580 SetClassTreeFromOneFile_Buf( pBuf, -1 ); 581 568 582 } 569 583 -
ProjectEditor/ProjectControl.cpp
r24 r81 129 129 for(i=0;i<pobj_ClassTreeView->NumberOfProcedures;i++){ 130 130 if(pobj_ClassTreeView->pProcInfo[i].hTreeItem==hTreeItem){ 131 lstrcpy(temporary, 132 ProjectInfo.pobj_DBFileInfo->ppobj_FileInfo[pobj_ClassTreeView->pProcInfo[i].FileNum]->m_path); 133 GetFullPath(temporary,ProjectInfo.dir); 134 hChild=OpenFileWithExtension(temporary); 131 132 if( ProjectInfo.name[0] ){ 133 // 対象ファイルを開く 134 lstrcpy(temporary, 135 ProjectInfo.pobj_DBFileInfo->ppobj_FileInfo[pobj_ClassTreeView->pProcInfo[i].FileNum]->m_path); 136 GetFullPath(temporary,ProjectInfo.dir); 137 hChild=OpenFileWithExtension(temporary); 138 } 139 else{ 140 hChild = GetWindow(hClient,GW_CHILD); 141 } 135 142 136 143 //プロシージャの行を選択する … … 149 156 } 150 157 } 158 151 159 break; 152 160 … … 537 545 538 546 hOldFont=(HFONT)SelectObject(hdc,hStatusFont); 539 sprintf(temporary,"%s \'%s\'",STRING_PROJECT,ProjectInfo.name); 547 if( ProjectInfo.name[0] ){ 548 sprintf(temporary,"%s \'%s\'",STRING_PROJECT,ProjectInfo.name); 549 } 550 else{ 551 lstrcpy( temporary, "現在のドキュメント" ); 552 } 540 553 541 554 GetTextExtentPoint32(hdc,temporary,lstrlen(temporary),&size); -
ProjectEditor/ProjectEditor.cpp
r62 r81 107 107 } 108 108 int GetFileNum(int WndNum){ 109 if( !ProjectInfo.name[0] ){ 110 return -1; 111 } 112 109 113 int i; 110 114 char temporary[MAX_PATH]; -
ProjectEditor/Replace.cpp
r24 r81 178 178 179 179 180 if(ProjectInfo.name[0]){180 //if(ProjectInfo.name[0]){ 181 181 //プロジェクトが開かれているとき 182 182 if(MdiInfo[WndNum].DocType==WNDTYPE_BASIC){ … … 184 184 ResetClassTree(GetFileNum(WndNum)); 185 185 } 186 }186 //} 187 187 } 188 188 void TextEdit_ReplaceUpdateUndoData(int WndNum,char *str,BOOL bPaste,BOOL bRedraw){
Note:
See TracChangeset
for help on using the changeset viewer.