MCPcopy Create free account
hub / github.com/bruderstein/nppPluginManager / addSteps

Method addSteps

pluginManager/src/PluginList.cpp:386–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384
385
386void PluginList::addSteps(Plugin* plugin, TiXmlElement* installElement, InstallOrRemove ior)
387{
388 if (!installElement)
389 return;
390
391 TiXmlElement *installStepElement = installElement->FirstChildElement();
392
393 InstallStepFactory installStepFactory(_variableHandler);
394
395 while (installStepElement)
396 {
397 // If it is a unicode tag and build for x64, then only process the contents if it's a x64 N++, which is just available for unicode
398 // or if it's an unicode tag and build for x86, then only process the contents if it's an unicode N++
399 // or if it's an ansi tag, then only process the contents if it's an ansi N++
400 if ((g_isUnicode && g_isX64
401 && !_tcscmp(installStepElement->Value(), _T("x64"))
402 && installStepElement->FirstChild())
403 ||
404 (g_isUnicode
405 && !_tcscmp(installStepElement->Value(), _T("unicode"))
406 && installStepElement->FirstChild())
407 ||
408 (!g_isUnicode
409 && !_tcscmp(installStepElement->Value(), _T("ansi"))
410 && installStepElement->FirstChild()))
411 {
412 addSteps(plugin, installStepElement, ior);
413 }
414 else
415 {
416
417 std::shared_ptr<InstallStep> installStep = installStepFactory.create(installStepElement);
418 if (installStep.get())
419 {
420 if (INSTALL == ior)
421 plugin->addInstallStep(installStep);
422 else if (REMOVE == ior)
423 plugin->addRemoveStep(installStep);
424 }
425
426 }
427
428
429
430 installStepElement = (TiXmlElement *)installElement->IterateChildren(installStepElement);
431 }
432}
433
434BOOL PluginList::checkInstalledPlugins()
435{

Callers

nothing calls this directly

Calls 7

addInstallStepMethod · 0.80
addRemoveStepMethod · 0.80
FirstChildElementMethod · 0.45
ValueMethod · 0.45
FirstChildMethod · 0.45
createMethod · 0.45
IterateChildrenMethod · 0.45

Tested by

no test coverage detected