Changeset 655 in dev for trunk/ab5.0/abdev/abdev/src
- Timestamp:
- Jun 18, 2008, 11:03:59 PM (16 years ago)
- Location:
- trunk/ab5.0/abdev/abdev/src
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/src/MainFrame.cpp
r640 r655 1136 1136 1137 1137 //ソースファイル名をtemp2へ 1138 projectInfo.pobj_DBFileInfo->ppobj_FileInfo[0]->GetFullPath(temp2);1138 lstrcpy( temp2, projectInfo.fileSystem.root.files[0].GetFullPath().c_str() ); 1139 1139 1140 1140 //出力ファイル名をtemp3へ … … 1214 1214 1215 1215 //ソースファイル名をtemp2へ 1216 projectInfo.pobj_DBFileInfo->ppobj_FileInfo[0]->GetFullPath(temp2);1216 lstrcpy( temp2, projectInfo.fileSystem.root.files[0].GetFullPath().c_str() ); 1217 1217 1218 1218 //出力ファイル名をtemp3へ … … 1334 1334 1335 1335 //ソースファイル名をtemp2へ 1336 projectInfo.pobj_DBFileInfo->ppobj_FileInfo[0]->GetFullPath(temp2);1336 lstrcpy( temp2, projectInfo.fileSystem.root.files[0].GetFullPath().c_str() ); 1337 1337 1338 1338 //出力ファイル名をtemp3へ -
trunk/ab5.0/abdev/abdev/src/ProjectManager/ProjectManager.cpp
r651 r655 33 33 34 34 //解析 35 this-> pobj_DBFileInfo=new CDBFileInfo();35 this->fileSystem.root.Clear(); 36 36 bool isUseWindow = false; 37 37 for(i=0;;i++){ … … 200 200 } 201 201 if(temporary[0]=='\0') break; 202 this-> pobj_DBFileInfo->add(temporary,0);202 this->fileSystem.root.files.push_back( ActiveBasic::PM::FM::File( temporary, 0 ) ); 203 203 204 204 if(buffer[i]=='\0') break; … … 265 265 266 266 void SetStatusText(char *MenuText); 267 void MakeSourceListToProjectFile( const ActiveBasic::PM::FM::Folder &folder, char *buffer ) 268 { 269 BOOST_FOREACH( const ActiveBasic::PM::FM::Folder &childFolder, folder.folders ) 270 { 271 MakeSourceListToProjectFile( childFolder, buffer ); 272 } 273 274 BOOST_FOREACH( const ActiveBasic::PM::FM::File &file, folder.files ) 275 { 276 lstrcat( buffer, file.GetRelationalPath().c_str() ); 277 lstrcat( buffer, "\r\n" ); 278 } 279 } 280 void MakeIncludeListToProjectFile( const ActiveBasic::PM::FM::Folder &folder, char *buffer, bool isRoot ) 281 { 282 BOOST_FOREACH( const ActiveBasic::PM::FM::Folder &childFolder, folder.folders ) 283 { 284 MakeIncludeListToProjectFile( childFolder, buffer, false ); 285 } 286 287 bool isFirst = true; 288 BOOST_FOREACH( const ActiveBasic::PM::FM::File &file, folder.files ) 289 { 290 if( isRoot && isFirst ) 291 { 292 // メインファイルは除く 293 isFirst = false; 294 continue; 295 } 296 297 sprintf(buffer+lstrlen(buffer),"#include \"%s\"\r\n",file.GetRelationalPath().c_str()); 298 lstrcpy(buffer+lstrlen(buffer),"_ClearNamespaceImported\r\n"); 299 } 300 } 267 301 void Project::Save() 268 302 { 269 int i ,i2,i3,WndNum;303 int i2,i3,WndNum; 270 304 char temporary[MAX_PATH],buffer[32767]; 271 305 HWND hChild; … … 280 314 WndNum=GetWndNum(hChild); 281 315 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum]->DocType)){ 282 if( MdiInfo[WndNum]->pMdiTextEdit->IsModified() ){ 283 for(i=0;i<this->pobj_DBFileInfo->iNum;i++){ 284 this->pobj_DBFileInfo->ppobj_FileInfo[i]->GetFullPath(temporary); 285 if(lstrcmpi(MdiInfo[WndNum]->path.c_str(),temporary)==0){ 286 SaveDocument(hChild,NULL); 287 break; 288 } 316 if( MdiInfo[WndNum]->pMdiTextEdit->IsModified() ) 317 { 318 if( this->fileSystem.root.IsExistFile( MdiInfo[WndNum]->path ) ) 319 { 320 SaveDocument(hChild,NULL); 289 321 } 290 322 } … … 342 374 sprintf(buffer+i2,"#SOURCE\r\n"); 343 375 i2+=lstrlen(buffer+i2); 344 for(i=0;i<this->pobj_DBFileInfo->iNum;i++){ 345 sprintf(buffer+i2,"%s\r\n",this->pobj_DBFileInfo->ppobj_FileInfo[i]->GetPath().c_str()); 346 i2+=lstrlen(buffer+i2); 347 } 376 MakeSourceListToProjectFile( this->fileSystem.root, buffer ); 377 i2 = lstrlen( buffer ); 348 378 349 379 //保存 … … 469 499 i2+=lstrlen(buffer+i2); 470 500 } 471 if(this->pobj_DBFileInfo->iNum>1){ 501 502 { 472 503 lstrcpy(buffer+i2,"\r\n"); 473 504 i2+=lstrlen(buffer+i2); 474 505 lstrcpy(buffer+i2,"'プロジェクト内のプログラム ファイル\r\n"); 475 506 i2+=lstrlen(buffer+i2); 476 for(i=1;i<this->pobj_DBFileInfo->iNum;i++){ 477 //メインファイルは含まない 478 sprintf(buffer+i2,"#include \"%s\"\r\n",this->pobj_DBFileInfo->ppobj_FileInfo[i]->GetPath().c_str()); 479 i2+=lstrlen(buffer+i2); 480 lstrcpy(buffer+i2,"_ClearNamespaceImported\r\n"); 481 i2+=lstrlen(buffer+i2); 482 } 507 MakeIncludeListToProjectFile( this->fileSystem.root, buffer, true ); 508 i2 = lstrlen(buffer); 483 509 } 484 510 if( !this->windowInfos.empty() ) … … 548 574 hChild=GetNextWindow(hChild,GW_HWNDNEXT); 549 575 WndNum=GetWndNum(hCloseChild); 550 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum]->DocType)){ 551 for(i=0;i<this->pobj_DBFileInfo->iNum;i++){ 552 this->pobj_DBFileInfo->ppobj_FileInfo[i]->GetFullPath(temporary); 553 if(lstrcmpi(MdiInfo[WndNum]->path.c_str(),temporary)==0){ 554 555 //変更フラグをオフにする 556 MdiInfo[WndNum]->pMdiTextEdit->UnModify(); 557 558 SendMessage(hCloseChild,WM_CLOSE,0,0); 559 break; 560 } 576 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum]->DocType)) 577 { 578 if( this->fileSystem.root.IsExistFile( MdiInfo[WndNum]->path ) ) 579 { 580 //変更フラグをオフにする 581 MdiInfo[WndNum]->pMdiTextEdit->UnModify(); 582 583 SendMessage(hCloseChild,WM_CLOSE,0,0); 561 584 } 562 585 } … … 593 616 594 617 //ファイル情報のメモリを解放 595 delete this->pobj_DBFileInfo;618 this->fileSystem.root.Clear(); 596 619 597 620 //ブレークポイントのオブジェクトを解放
Note:
See TracChangeset
for help on using the changeset viewer.