MCPcopy Create free account
hub / github.com/WinMerge/winmerge / UpdatePlugin

Function UpdatePlugin

Src/InternalPlugins.cpp:885–903  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

883}
884
885bool UpdatePlugin(const Info& info, String& errmsg)
886{
887 std::list<internal_plugin::Info> list;
888 if (!internal_plugin::LoadFromXML(info.m_locationType, list, errmsg))
889 return false;
890 for (auto it = list.begin(); it != list.end(); ++it)
891 {
892 if (it->m_name == info.m_name)
893 {
894 list.insert(it, info);
895 list.erase(it);
896 break;
897 }
898 }
899 if (!internal_plugin::SaveToXML(info.m_locationType, list, errmsg))
900 return false;
901 CAllThreadsScripts::GetActiveSet()->ReloadAllScripts();
902 return true;
903}
904
905bool RemovePlugin(const Info& info, String& errmsg)
906{

Callers 1

EditPluginMethod · 0.85

Calls 7

LoadFromXMLFunction · 0.85
SaveToXMLFunction · 0.85
ReloadAllScriptsMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected