Fix function list is empty with new user profile issue

The new behaviour of loading function list will be:

1. For the installer package:
Try to load from %APPDATA%\Notepad++\functionList\, if it failed, then load from %PROGRAMFILES%\Notepad++\functionList\.
In this way, users can override function list in %APPDATA%\Notepad++\functionList\ manually. Otherwise, function list won't be empty.

2. For the portable package:
  - with doLocalConf.xml : Load always from <Notepad++ Dir>\functionList\
  - without doLocalConf.xml : Try to load from %APPDATA%\Notepad++\functionList\, if it failed, then load from <Notepad++ Dir>\functionList\

Fix #9134
This commit is contained in:
Don HO 2020-11-27 03:54:37 +01:00
parent 4b29971168
commit 814e6591b5
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E
4 changed files with 94 additions and 79 deletions

View File

@ -29,140 +29,138 @@
SectionGroup "Function List Files" functionListComponent SectionGroup "Function List Files" functionListComponent
SetOverwrite off SetOverwrite off
; UPDATE_PATH: the value is $UPDATE_PATH if doLocalConf.xml exit,
; otherwise the value is $APPDATA\${APPNAME}
${MementoSection} "C" C_FL ${MementoSection} "C" C_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\c.xml" File ".\functionList\c.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "C++" C++_FL ${MementoSection} "C++" C++_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\cpp.xml" File ".\functionList\cpp.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "Java" Java_FL ${MementoSection} "Java" Java_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\java.xml" File ".\functionList\java.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "C#" C#_FL ${MementoSection} "C#" C#_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\cs.xml" File ".\functionList\cs.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "Assembly" Assembly_FL ${MementoSection} "Assembly" Assembly_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\asm.xml" File ".\functionList\asm.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "Bash" Bash_FL ${MementoSection} "Bash" Bash_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\bash.xml" File ".\functionList\bash.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "SQL" SQL_FL ${MementoSection} "SQL" SQL_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\sql.xml" File ".\functionList\sql.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "PHP" PHP_FL ${MementoSection} "PHP" PHP_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\php.xml" File ".\functionList\php.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "COBOL section free" COBOL-section-free ${MementoSection} "COBOL section free" COBOL-section-free
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\cobol-free.xml" File ".\functionList\cobol-free.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "COBOL" COBOL_FL ${MementoSection} "COBOL" COBOL_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\cobol.xml" File ".\functionList\cobol.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "Perl" Perl_FL ${MementoSection} "Perl" Perl_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\perl.xml" File ".\functionList\perl.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "JavaScript" JavaScript_FL ${MementoSection} "JavaScript" JavaScript_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\javascript.js.xml" File ".\functionList\javascript.js.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "Python" Python_FL ${MementoSection} "Python" Python_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\python.xml" File ".\functionList\python.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "ini" ini_FL ${MementoSection} "ini" ini_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\ini.xml" File ".\functionList\ini.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "Inno Setup" Innosetup_FL ${MementoSection} "Inno Setup" Innosetup_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\inno.xml" File ".\functionList\inno.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "VHDL" VHDL_FL ${MementoSection} "VHDL" VHDL_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\vhdl.xml" File ".\functionList\vhdl.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "KRL" KRL_FL ${MementoSection} "KRL" KRL_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\krl.xml" File ".\functionList\krl.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "Override Map" OverrideMap_FL ${MementoSection} "Override Map" OverrideMap_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\overrideMap.xml" File ".\functionList\overrideMap.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "NSIS" NSIS_FL ${MementoSection} "NSIS" NSIS_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\nsis.xml" File ".\functionList\nsis.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "PowerShell" PowerShell_FL ${MementoSection} "PowerShell" PowerShell_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\powershell.xml" File ".\functionList\powershell.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "BATCH" BATCH_FL ${MementoSection} "BATCH" BATCH_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\batch.xml" File ".\functionList\batch.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "Ruby" Ruby_FL ${MementoSection} "Ruby" Ruby_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\ruby.xml" File ".\functionList\ruby.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "BaanC" BaanC_FL ${MementoSection} "BaanC" BaanC_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\baanc.xml" File ".\functionList\baanc.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "Sinumerik" Sinumerik_FL ${MementoSection} "Sinumerik" Sinumerik_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\sinumerik.xml" File ".\functionList\sinumerik.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "AutoIt" AutoIt_FL ${MementoSection} "AutoIt" AutoIt_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\autoit.xml" File ".\functionList\autoit.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "UniVerse BASIC" UniVerseBASIC_FL ${MementoSection} "UniVerse BASIC" UniVerseBASIC_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\universe_basic.xml" File ".\functionList\universe_basic.xml"
${MementoSectionEnd} ${MementoSectionEnd}
${MementoSection} "XML" XML_FL ${MementoSection} "XML" XML_FL
SetOutPath "$UPDATE_PATH\functionList" SetOutPath "$INSTDIR\functionList"
File ".\functionList\xml.xml" File ".\functionList\xml.xml"
${MementoSectionEnd} ${MementoSectionEnd}
SectionGroupEnd SectionGroupEnd
@ -171,111 +169,111 @@ SectionGroupEnd
SectionGroup un.functionListComponent SectionGroup un.functionListComponent
Section un.PHP_FL Section un.PHP_FL
Delete "$UPDATE_PATH\functionList\php.xml" Delete "$INSTDIR\functionList\php.xml"
SectionEnd SectionEnd
Section un.Assembly_FL Section un.Assembly_FL
Delete "$UPDATE_PATH\functionList\asm.xml" Delete "$INSTDIR\functionList\asm.xml"
SectionEnd SectionEnd
Section un.SQL_FL Section un.SQL_FL
Delete "$UPDATE_PATH\functionList\sql.xml" Delete "$INSTDIR\functionList\sql.xml"
SectionEnd SectionEnd
Section un.Bash_FL Section un.Bash_FL
Delete "$UPDATE_PATH\functionList\bash.xml" Delete "$INSTDIR\functionList\bash.xml"
SectionEnd SectionEnd
Section un.COBOL-section-free_FL Section un.COBOL-section-free_FL
Delete "$UPDATE_PATH\functionList\cobol-free.xml" Delete "$INSTDIR\functionList\cobol-free.xml"
SectionEnd SectionEnd
Section un.Perl_FL Section un.Perl_FL
Delete "$UPDATE_PATH\functionList\perl.xml" Delete "$INSTDIR\functionList\perl.xml"
SectionEnd SectionEnd
Section un.C_FL Section un.C_FL
Delete "$UPDATE_PATH\functionList\c.xml" Delete "$INSTDIR\functionList\c.xml"
SectionEnd SectionEnd
Section un.C++_FL Section un.C++_FL
Delete "$UPDATE_PATH\functionList\cpp.xml" Delete "$INSTDIR\functionList\cpp.xml"
SectionEnd SectionEnd
Section un.Java_FL Section un.Java_FL
Delete "$UPDATE_PATH\functionList\java.xml" Delete "$INSTDIR\functionList\java.xml"
SectionEnd SectionEnd
Section un.C#_FL Section un.C#_FL
Delete "$UPDATE_PATH\functionList\cs.xml" Delete "$INSTDIR\functionList\cs.xml"
SectionEnd SectionEnd
Section un.JavaScript_FL Section un.JavaScript_FL
Delete "$UPDATE_PATH\functionList\javascript.js.xml" Delete "$INSTDIR\functionList\javascript.js.xml"
SectionEnd SectionEnd
Section un.Python_FL Section un.Python_FL
Delete "$UPDATE_PATH\functionList\python.xml" Delete "$INSTDIR\functionList\python.xml"
SectionEnd SectionEnd
Section un.COBOL_FL Section un.COBOL_FL
Delete "$UPDATE_PATH\functionList\cobol.xml" Delete "$INSTDIR\functionList\cobol.xml"
SectionEnd SectionEnd
Section un.ini_FL Section un.ini_FL
Delete "$UPDATE_PATH\functionList\ini.xml" Delete "$INSTDIR\functionList\ini.xml"
SectionEnd SectionEnd
Section un.VHDL_FL Section un.VHDL_FL
Delete "$UPDATE_PATH\functionList\vhdl.xml" Delete "$INSTDIR\functionList\vhdl.xml"
SectionEnd SectionEnd
Section un.Innosetup_FL Section un.Innosetup_FL
Delete "$UPDATE_PATH\functionList\inno.xml" Delete "$INSTDIR\functionList\inno.xml"
SectionEnd SectionEnd
Section un.XML_FL Section un.XML_FL
Delete "$UPDATE_PATH\functionList\xml.xml" Delete "$INSTDIR\functionList\xml.xml"
SectionEnd SectionEnd
Section un.NSIS_FL Section un.NSIS_FL
Delete "$UPDATE_PATH\functionList\nsis.xml" Delete "$INSTDIR\functionList\nsis.xml"
SectionEnd SectionEnd
Section un.KRL_FL Section un.KRL_FL
Delete "$UPDATE_PATH\functionList\krl.xml" Delete "$INSTDIR\functionList\krl.xml"
SectionEnd SectionEnd
Section un.BATCH_FL Section un.BATCH_FL
Delete "$UPDATE_PATH\functionList\batch.xml" Delete "$INSTDIR\functionList\batch.xml"
SectionEnd SectionEnd
Section un.OverrideMap_FL Section un.OverrideMap_FL
Delete "$UPDATE_PATH\functionList\overrideMap.xml" Delete "$INSTDIR\functionList\overrideMap.xml"
SectionEnd SectionEnd
Section un.BaanC_FL Section un.BaanC_FL
Delete "$UPDATE_PATH\functionList\baanc.xml" Delete "$INSTDIR\functionList\baanc.xml"
SectionEnd SectionEnd
Section un.PowerShell_FL Section un.PowerShell_FL
Delete "$UPDATE_PATH\functionList\powershell.xml" Delete "$INSTDIR\functionList\powershell.xml"
SectionEnd SectionEnd
Section un.AutoIt_FL Section un.AutoIt_FL
Delete "$UPDATE_PATH\functionList\autoit.xml" Delete "$INSTDIR\functionList\autoit.xml"
SectionEnd SectionEnd
Section un.Ruby_FL Section un.Ruby_FL
Delete "$UPDATE_PATH\functionList\ruby.xml" Delete "$INSTDIR\functionList\ruby.xml"
SectionEnd SectionEnd
Section un.UniVerseBASIC_FL Section un.UniVerseBASIC_FL
Delete "$UPDATE_PATH\functionList\universe_basic.xml" Delete "$INSTDIR\functionList\universe_basic.xml"
SectionEnd SectionEnd
Section un.Sinumerik_FL Section un.Sinumerik_FL
Delete "$UPDATE_PATH\functionList\sinumerik.xml" Delete "$INSTDIR\functionList\sinumerik.xml"
SectionEnd SectionEnd
SectionGroupEnd SectionGroupEnd

View File

@ -476,26 +476,28 @@ void FunctionListPanel::init(HINSTANCE hInst, HWND hPere, ScintillaEditView **pp
{ {
DockingDlgInterface::init(hInst, hPere); DockingDlgInterface::init(hInst, hPere);
_ppEditView = ppEditView; _ppEditView = ppEditView;
generic_string funcListXmlPath = (NppParameters::getInstance()).getUserPath();
PathAppend(funcListXmlPath, TEXT("functionList"));
generic_string funcListDefaultXmlPath = (NppParameters::getInstance()).getNppPath();
PathAppend(funcListDefaultXmlPath, TEXT("functionList"));
bool doLocalConf = (NppParameters::getInstance()).isLocal(); bool doLocalConf = (NppParameters::getInstance()).isLocal();
if (!doLocalConf) if (!doLocalConf)
{ {
generic_string funcListXmlPath = (NppParameters::getInstance()).getUserPath();
PathAppend(funcListXmlPath, TEXT("functionList"));
if (!PathFileExists(funcListXmlPath.c_str())) if (!PathFileExists(funcListXmlPath.c_str()))
{ {
generic_string funcListDefaultXmlPath = (NppParameters::getInstance()).getNppPath();
PathAppend(funcListDefaultXmlPath, TEXT("functionList"));
if (PathFileExists(funcListDefaultXmlPath.c_str())) if (PathFileExists(funcListDefaultXmlPath.c_str()))
{ {
::CopyFile(funcListDefaultXmlPath.c_str(), funcListXmlPath.c_str(), TRUE); ::CopyFile(funcListDefaultXmlPath.c_str(), funcListXmlPath.c_str(), TRUE);
_funcParserMgr.init(funcListXmlPath, ppEditView); _funcParserMgr.init(funcListXmlPath, funcListDefaultXmlPath, ppEditView);
} }
} }
else else
{ {
_funcParserMgr.init(funcListXmlPath, ppEditView); _funcParserMgr.init(funcListXmlPath, funcListDefaultXmlPath, ppEditView);
} }
} }
else else
@ -504,7 +506,7 @@ void FunctionListPanel::init(HINSTANCE hInst, HWND hPere, ScintillaEditView **pp
PathAppend(funcListDefaultXmlPath, TEXT("functionList")); PathAppend(funcListDefaultXmlPath, TEXT("functionList"));
if (PathFileExists(funcListDefaultXmlPath.c_str())) if (PathFileExists(funcListDefaultXmlPath.c_str()))
{ {
_funcParserMgr.init(funcListDefaultXmlPath, ppEditView); _funcParserMgr.init(funcListDefaultXmlPath, funcListDefaultXmlPath, ppEditView);
} }
} }
} }

View File

@ -41,12 +41,19 @@ FunctionParsersManager::~FunctionParsersManager()
} }
} }
bool FunctionParsersManager::init(const generic_string& xmlDirPath, ScintillaEditView ** ppEditView) bool FunctionParsersManager::init(const generic_string& xmlDirPath, const generic_string& xmlInstalledPath, ScintillaEditView ** ppEditView)
{ {
_ppEditView = ppEditView; _ppEditView = ppEditView;
_xmlDirPath = xmlDirPath; _xmlDirPath = xmlDirPath;
_xmlDirInstalledPath = xmlInstalledPath;
return getOverrideMapFromXmlTree(); bool isOK = getOverrideMapFromXmlTree(_xmlDirPath);
if (isOK)
return true;
else if (_xmlDirPath != _xmlDirInstalledPath && !_xmlDirInstalledPath.empty())
return getOverrideMapFromXmlTree(_xmlDirInstalledPath);
else
return false;
} }
bool FunctionParsersManager::getZonePaserParameters(TiXmlNode *classRangeParser, generic_string &mainExprStr, generic_string &openSymboleStr, generic_string &closeSymboleStr, std::vector<generic_string> &classNameExprArray, generic_string &functionExprStr, std::vector<generic_string> &functionNameExprArray) bool FunctionParsersManager::getZonePaserParameters(TiXmlNode *classRangeParser, generic_string &mainExprStr, generic_string &openSymboleStr, generic_string &closeSymboleStr, std::vector<generic_string> &classNameExprArray, generic_string &functionExprStr, std::vector<generic_string> &functionNameExprArray)
@ -143,9 +150,9 @@ bool FunctionParsersManager::getUnitPaserParameters(TiXmlNode *functionParser, g
} }
bool FunctionParsersManager::loadFuncListFromXmlTree(LangType lType, const generic_string& overrideId, int udlIndex) bool FunctionParsersManager::loadFuncListFromXmlTree(generic_string & xmlDirPath, LangType lType, const generic_string& overrideId, int udlIndex)
{ {
generic_string funcListRulePath = _xmlDirPath; generic_string funcListRulePath = xmlDirPath;
funcListRulePath += TEXT("\\"); funcListRulePath += TEXT("\\");
int index = -1; int index = -1;
if (lType == L_USER) // UDL if (lType == L_USER) // UDL
@ -245,9 +252,9 @@ bool FunctionParsersManager::loadFuncListFromXmlTree(LangType lType, const gener
return true; return true;
} }
bool FunctionParsersManager::getOverrideMapFromXmlTree() bool FunctionParsersManager::getOverrideMapFromXmlTree(generic_string & xmlDirPath)
{ {
generic_string funcListRulePath = _xmlDirPath; generic_string funcListRulePath = xmlDirPath;
funcListRulePath += TEXT("\\overrideMap.xml"); funcListRulePath += TEXT("\\overrideMap.xml");
TiXmlDocument xmlFuncListDoc(funcListRulePath); TiXmlDocument xmlFuncListDoc(funcListRulePath);
@ -325,7 +332,9 @@ FunctionParser * FunctionParsersManager::getParser(const AssociationInfo & assoI
else else
{ {
// load it // load it
if (loadFuncListFromXmlTree(static_cast<LangType>(assoInfo._langID), _parsers[assoInfo._langID]->_id)) if (loadFuncListFromXmlTree(_xmlDirPath, static_cast<LangType>(assoInfo._langID), _parsers[assoInfo._langID]->_id))
return _parsers[assoInfo._langID]->_parser;
else if (_xmlDirPath != _xmlDirInstalledPath && !_xmlDirInstalledPath.empty() && loadFuncListFromXmlTree(_xmlDirInstalledPath, static_cast<LangType>(assoInfo._langID), _parsers[assoInfo._langID]->_id))
return _parsers[assoInfo._langID]->_parser; return _parsers[assoInfo._langID]->_parser;
} }
} }
@ -333,7 +342,9 @@ FunctionParser * FunctionParsersManager::getParser(const AssociationInfo & assoI
{ {
_parsers[assoInfo._langID] = new ParserInfo; _parsers[assoInfo._langID] = new ParserInfo;
// load it // load it
if (loadFuncListFromXmlTree(static_cast<LangType>(assoInfo._langID), _parsers[assoInfo._langID]->_id)) if (loadFuncListFromXmlTree(_xmlDirPath, static_cast<LangType>(assoInfo._langID), _parsers[assoInfo._langID]->_id))
return _parsers[assoInfo._langID]->_parser;
else if (_xmlDirPath != _xmlDirInstalledPath && !_xmlDirInstalledPath.empty() && loadFuncListFromXmlTree(_xmlDirInstalledPath, static_cast<LangType>(assoInfo._langID), _parsers[assoInfo._langID]->_id))
return _parsers[assoInfo._langID]->_parser; return _parsers[assoInfo._langID]->_parser;
return nullptr; return nullptr;
@ -357,7 +368,9 @@ FunctionParser * FunctionParsersManager::getParser(const AssociationInfo & assoI
else else
{ {
// load it // load it
if (loadFuncListFromXmlTree(static_cast<LangType>(assoInfo._langID), _parsers[i]->_id, i)) if (loadFuncListFromXmlTree(_xmlDirPath, static_cast<LangType>(assoInfo._langID), _parsers[i]->_id, i))
return _parsers[i]->_parser;
else if (_xmlDirPath != _xmlDirInstalledPath && !_xmlDirInstalledPath.empty() && loadFuncListFromXmlTree(_xmlDirInstalledPath, static_cast<LangType>(assoInfo._langID), _parsers[i]->_id, i))
return _parsers[i]->_parser; return _parsers[i]->_parser;
} }
@ -371,7 +384,7 @@ FunctionParser * FunctionParsersManager::getParser(const AssociationInfo & assoI
} }
return NULL; return nullptr;
} }

View File

@ -158,18 +158,20 @@ class FunctionParsersManager final
public: public:
~FunctionParsersManager(); ~FunctionParsersManager();
bool init(const generic_string& xmlPath, ScintillaEditView ** ppEditView); bool init(const generic_string& xmlPath, const generic_string& xmlInstalledPath, ScintillaEditView ** ppEditView);
bool parse(std::vector<foundInfo> & foundInfos, const AssociationInfo & assoInfo); bool parse(std::vector<foundInfo> & foundInfos, const AssociationInfo & assoInfo);
private: private:
ScintillaEditView **_ppEditView = nullptr; ScintillaEditView **_ppEditView = nullptr;
generic_string _xmlDirPath; generic_string _xmlDirPath; // The 1st place to load function list files. Usually it's "%APPDATA%\Notepad++\functionList\"
generic_string _xmlDirInstalledPath; // Where Notepad++ is installed. The 2nd place to load function list files. Usually it's "%PROGRAMFILES%\Notepad++\functionList\"
ParserInfo* _parsers[L_EXTERNAL + nbMaxUserDefined] = {nullptr}; ParserInfo* _parsers[L_EXTERNAL + nbMaxUserDefined] = {nullptr};
int _currentUDIndex = L_EXTERNAL; int _currentUDIndex = L_EXTERNAL;
bool getOverrideMapFromXmlTree(); bool getOverrideMapFromXmlTree(generic_string & xmlDirPath);
bool loadFuncListFromXmlTree(LangType lType, const generic_string& overrideId, int udlIndex = -1); bool loadFuncListFromXmlTree(generic_string & xmlDirPath, LangType lType, const generic_string& overrideId, int udlIndex = -1);
bool getZonePaserParameters(TiXmlNode *classRangeParser, generic_string &mainExprStr, generic_string &openSymboleStr, generic_string &closeSymboleStr, std::vector<generic_string> &classNameExprArray, generic_string &functionExprStr, std::vector<generic_string> &functionNameExprArray); bool getZonePaserParameters(TiXmlNode *classRangeParser, generic_string &mainExprStr, generic_string &openSymboleStr, generic_string &closeSymboleStr, std::vector<generic_string> &classNameExprArray, generic_string &functionExprStr, std::vector<generic_string> &functionNameExprArray);
bool getUnitPaserParameters(TiXmlNode *functionParser, generic_string &mainExprStr, std::vector<generic_string> &functionNameExprArray, std::vector<generic_string> &classNameExprArray); bool getUnitPaserParameters(TiXmlNode *functionParser, generic_string &mainExprStr, std::vector<generic_string> &functionNameExprArray, std::vector<generic_string> &classNameExprArray);
FunctionParser * getParser(const AssociationInfo & assoInfo); FunctionParser * getParser(const AssociationInfo & assoInfo);