|
// Commands.cpp : implementation file
// COPYRIGHT (C) 1999-2000 by Mike Melnikov zmike@andnow.ru
//
#include "stdafx.h"
#include "dlgmgr.h"
#include "Commands.h"
#include "Registry.h"
#include "utils.h"
#include "tags\Options.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern void Search();
CProgressCtrl* CProgress[3] = {NULL};
void CCommands::DoUpdateInfo(bool force)
{
CDialog* CUpdatePD = NULL;
(CUpdatePD = new CDialog())->Create(IDD_UPDATE_DIALOG,&CCommands::Get()->m_wnd);
CProgress[0] = (CProgressCtrl*)CUpdatePD->GetDlgItem(IDC_PROGRESS1);
CProgress[1] = (CProgressCtrl*)CUpdatePD->GetDlgItem(IDC_PROGRESS3);
CProgress[2] = (CProgressCtrl*)CUpdatePD->GetDlgItem(IDC_PROGRESS4);
CUpdatePD->ShowWindow(SW_SHOW);
//CUpdatePD->Invalidate();
CUpdatePD->UpdateWindow();
NeedToDestroy(m_dlgs[_dlgTags]);
ClearVectors();
for(int i=0; i<TAG_COUNT;i++)
Option.include[i] = getValue(GetFind(i),1);
Option.include[TAG_ENUMERATOR] = Option.include[TAG_ENUM];
vector<CString>* slist = &Option.langMap[LANG_CPP];
slist->clear();
if(getValue("SearchSource",1))
{
slist->push_back("CPP");
slist->push_back("C");
slist->push_back("CXX");
}
if(getValue("SearchHeader",1))
{
slist->push_back("H");
slist->push_back("HPP");
slist->push_back("INL");
slist->push_back("");
}
Option.append = !(force || (getValue("UpdateType",0)!=0));
Option.tagFileName = (!DSWPath.IsEmpty() ? DSWPath : "") + "tags.dat";
CWaitCursor wait;
try
{
Search();
}
catch(...)
{
ASSERT(false);
OutputDebugString("CTags FAILED!!!\n");
}
CUpdatePD->DestroyWindow();
delete CUpdatePD;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
Mike has been programming in C/C++ for 11 years and Visual C++/MFC for 4 years. His background includes pure and applied mathematics, engineering and physics, and he is currently based in Moscow, Russia.