Fix export fuctionlist bug
This commit is contained in:
parent
1f89110b04
commit
78ea2110d2
@ -251,10 +251,10 @@ bool FunctionListPanel::serialize(const generic_string & outputFilename)
|
|||||||
if (!f)
|
if (!f)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (const auto & info : _funcinfos)
|
for (const auto & info : _foundFuncInfos)
|
||||||
{
|
{
|
||||||
generic_string entryName;
|
generic_string entryName;
|
||||||
if (info._pos2 != -1)
|
if (!info._data2.empty())
|
||||||
{
|
{
|
||||||
entryName = info._data2;
|
entryName = info._data2;
|
||||||
entryName += TEXT("=>");
|
entryName += TEXT("=>");
|
||||||
@ -290,7 +290,7 @@ void FunctionListPanel::reload()
|
|||||||
::SendMessage(_hSearchEdit, WM_SETTEXT, 0, reinterpret_cast<LPARAM>(TEXT("")));
|
::SendMessage(_hSearchEdit, WM_SETTEXT, 0, reinterpret_cast<LPARAM>(TEXT("")));
|
||||||
setSort(false);
|
setSort(false);
|
||||||
|
|
||||||
_funcinfos.clear();
|
_foundFuncInfos.clear();
|
||||||
|
|
||||||
Buffer* currentBuf = (*_ppEditView)->getCurrentBuffer();
|
Buffer* currentBuf = (*_ppEditView)->getCurrentBuffer();
|
||||||
const TCHAR *fn = currentBuf->getFileName();
|
const TCHAR *fn = currentBuf->getFileName();
|
||||||
@ -306,30 +306,30 @@ void FunctionListPanel::reload()
|
|||||||
|
|
||||||
TCHAR *ext = ::PathFindExtension(fn);
|
TCHAR *ext = ::PathFindExtension(fn);
|
||||||
|
|
||||||
bool parsedOK = _funcParserMgr.parse(_funcinfos, AssociationInfo(-1, langID, ext, udln));
|
bool parsedOK = _funcParserMgr.parse(_foundFuncInfos, AssociationInfo(-1, langID, ext, udln));
|
||||||
if (parsedOK)
|
if (parsedOK)
|
||||||
{
|
{
|
||||||
_treeView.addItem(fn, NULL, INDEX_ROOT, TEXT("-1"));
|
_treeView.addItem(fn, NULL, INDEX_ROOT, TEXT("-1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0, len = _funcinfos.size(); i < len; ++i)
|
for (size_t i = 0, len = _foundFuncInfos.size(); i < len; ++i)
|
||||||
{
|
{
|
||||||
// no 2 level
|
// no 2 level
|
||||||
bool b = false;
|
bool b = false;
|
||||||
if (b)
|
if (b)
|
||||||
{
|
{
|
||||||
generic_string entryName = TEXT("");
|
generic_string entryName = TEXT("");
|
||||||
if (_funcinfos[i]._pos2 != -1)
|
if (!_foundFuncInfos[i]._data2.empty())
|
||||||
{
|
{
|
||||||
entryName = _funcinfos[i]._data2;
|
entryName = _foundFuncInfos[i]._data2;
|
||||||
entryName += TEXT("=>");
|
entryName += TEXT("=>");
|
||||||
}
|
}
|
||||||
entryName += _funcinfos[i]._data;
|
entryName += _foundFuncInfos[i]._data;
|
||||||
addEntry(NULL, entryName.c_str(), _funcinfos[i]._pos);
|
addEntry(NULL, entryName.c_str(), _foundFuncInfos[i]._pos);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
addEntry(_funcinfos[i]._data2.c_str(), _funcinfos[i]._data.c_str(), _funcinfos[i]._pos);
|
addEntry(_foundFuncInfos[i]._data2.c_str(), _foundFuncInfos[i]._data.c_str(), _foundFuncInfos[i]._pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,10 +42,6 @@
|
|||||||
|
|
||||||
class ScintillaEditView;
|
class ScintillaEditView;
|
||||||
|
|
||||||
struct FuncInfo {
|
|
||||||
generic_string _displayText;
|
|
||||||
size_t _offsetPos;
|
|
||||||
};
|
|
||||||
/*
|
/*
|
||||||
1. global function + object + methods: Tree view of 2 levels - only the leaf contains the position info
|
1. global function + object + methods: Tree view of 2 levels - only the leaf contains the position info
|
||||||
root
|
root
|
||||||
@ -115,8 +111,6 @@ public:
|
|||||||
bool serialize(const generic_string & outputFilename = TEXT(""));
|
bool serialize(const generic_string & outputFilename = TEXT(""));
|
||||||
void addEntry(const TCHAR *node, const TCHAR *displayText, size_t pos);
|
void addEntry(const TCHAR *node, const TCHAR *displayText, size_t pos);
|
||||||
void removeAllEntries();
|
void removeAllEntries();
|
||||||
void removeEntry();
|
|
||||||
void modifyEntry();
|
|
||||||
void searchFuncAndSwitchView();
|
void searchFuncAndSwitchView();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -133,11 +127,10 @@ private:
|
|||||||
generic_string _sortTipStr;
|
generic_string _sortTipStr;
|
||||||
generic_string _reloadTipStr;
|
generic_string _reloadTipStr;
|
||||||
|
|
||||||
std::vector<foundInfo> _funcinfos;
|
std::vector<foundInfo> _foundFuncInfos;
|
||||||
|
|
||||||
ScintillaEditView **_ppEditView;
|
ScintillaEditView **_ppEditView;
|
||||||
FunctionParsersManager _funcParserMgr;
|
FunctionParsersManager _funcParserMgr;
|
||||||
std::vector<FuncInfo> _funcInfos;
|
|
||||||
std::vector< std::pair<int, int> > _skipZones;
|
std::vector< std::pair<int, int> > _skipZones;
|
||||||
std::vector<TreeParams> _treeParams;
|
std::vector<TreeParams> _treeParams;
|
||||||
HIMAGELIST _hTreeViewImaLst;
|
HIMAGELIST _hTreeViewImaLst;
|
||||||
|
Loading…
Reference in New Issue
Block a user