The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

695 lines
28KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2020 - Raw Material Software Limited
  5. JUCE is an open source library subject to commercial or open-source
  6. licensing.
  7. By using JUCE, you agree to the terms of both the JUCE 6 End-User License
  8. Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
  9. End User License Agreement: www.juce.com/juce-6-licence
  10. Privacy Policy: www.juce.com/juce-privacy-policy
  11. Or: You may also use this code under the terms of the GPL v3 (see
  12. www.gnu.org/licenses).
  13. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  14. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  15. DISCLAIMED.
  16. ==============================================================================
  17. */
  18. #pragma once
  19. //==============================================================================
  20. class ModuleItem : public ProjectTreeItemBase
  21. {
  22. public:
  23. ModuleItem (Project& p, const String& modID)
  24. : project (p), moduleID (modID)
  25. {
  26. missingDependencies = project.getEnabledModules().getExtraDependenciesNeeded (moduleID).size() > 0;
  27. cppStandardHigherThanProject = project.getEnabledModules().doesModuleHaveHigherCppStandardThanProject (moduleID);
  28. moduleInfo = project.getEnabledModules().getModuleInfo (moduleID);
  29. }
  30. bool canBeSelected() const override { return true; }
  31. bool mightContainSubItems() override { return false; }
  32. String getUniqueName() const override { return "module_" + moduleID; }
  33. String getDisplayName() const override { return moduleID; }
  34. String getRenamingName() const override { return getDisplayName(); }
  35. void setName (const String&) override {}
  36. bool isMissing() const override { return missingDependencies; }
  37. bool hasWarnings() const override { return cppStandardHigherThanProject; }
  38. void showDocument() override
  39. {
  40. showSettingsPage (new ModuleSettingsPanel (project, moduleID, getOwnerView()));
  41. }
  42. void deleteItem() override
  43. {
  44. closeSettingsPage();
  45. project.getEnabledModules().removeModule (moduleID);
  46. }
  47. Icon getIcon() const override
  48. {
  49. auto iconColour = getOwnerView()->findColour (isSelected() ? defaultHighlightedTextColourId
  50. : treeIconColourId);
  51. if (! isSelected())
  52. {
  53. if (moduleInfo.isValid() && moduleInfo.getVendor() == "juce")
  54. {
  55. if (moduleInfo.getLicense() == "ISC")
  56. iconColour = Colours::lightblue;
  57. else if (moduleInfo.getLicense() == "GPL/Commercial")
  58. iconColour = Colours::orange;
  59. }
  60. }
  61. return Icon (getIcons().singleModule, iconColour);
  62. }
  63. void showAddMenu (Point<int> p) override
  64. {
  65. if (auto* parent = dynamic_cast<EnabledModulesItem*> (getParentItem()))
  66. parent->showPopupMenu (p);
  67. }
  68. void showPopupMenu (Point<int> p) override
  69. {
  70. PopupMenu menu;
  71. menu.addItem (1, "Remove this module");
  72. launchPopupMenu (menu, p);
  73. }
  74. void handlePopupMenuResult (int resultCode) override
  75. {
  76. if (resultCode == 1)
  77. deleteItem();
  78. }
  79. bool checkCppStandard()
  80. {
  81. auto oldVal = cppStandardHigherThanProject;
  82. cppStandardHigherThanProject = project.getEnabledModules().doesModuleHaveHigherCppStandardThanProject (moduleID);
  83. if (oldVal != cppStandardHigherThanProject)
  84. return true;
  85. return false;
  86. }
  87. Project& project;
  88. String moduleID;
  89. private:
  90. ModuleDescription moduleInfo;
  91. bool missingDependencies = false;
  92. bool cppStandardHigherThanProject = false;
  93. //==============================================================================
  94. class ModuleSettingsPanel : public Component,
  95. private Value::Listener,
  96. private Timer
  97. {
  98. public:
  99. ModuleSettingsPanel (Project& p, const String& modID, TreeView* tree)
  100. : group (p.getEnabledModules().getModuleInfo (modID).getID(),
  101. Icon (getIcons().singleModule, Colours::transparentBlack)),
  102. project (p),
  103. modulesTree (tree),
  104. moduleID (modID)
  105. {
  106. addAndMakeVisible (group);
  107. refresh();
  108. }
  109. void refresh()
  110. {
  111. auto& modules = project.getEnabledModules();
  112. setEnabled (modules.isModuleEnabled (moduleID));
  113. PropertyListBuilder props;
  114. props.add (new ModuleInfoComponent (project, moduleID));
  115. if (modules.getExtraDependenciesNeeded (moduleID).size() > 0)
  116. props.add (new MissingDependenciesComponent (project, moduleID));
  117. if (modules.doesModuleHaveHigherCppStandardThanProject (moduleID))
  118. props.add (new CppStandardWarningComponent());
  119. group.clearProperties();
  120. exporterModulePathDefaultValues.clear();
  121. exporterModulePathValues.clear();
  122. globalPathValues.clear();
  123. for (Project::ExporterIterator exporter (project); exporter.next();)
  124. {
  125. if (exporter->isCLion())
  126. continue;
  127. exporterModulePathDefaultValues.add (exporter->getPathForModuleValue (moduleID));
  128. auto& defaultValue = exporterModulePathDefaultValues.getReference (exporterModulePathDefaultValues.size() - 1);
  129. exporterModulePathValues.add (defaultValue.getPropertyAsValue());
  130. auto pathComponent = std::make_unique<FilePathPropertyComponent> (defaultValue,
  131. "Path for " + exporter->getUniqueName().quoted(),
  132. true,
  133. exporter->getTargetOSForExporter() == TargetOS::getThisOS(),
  134. "*",
  135. project.getProjectFolder());
  136. pathComponent->setEnabled (! modules.shouldUseGlobalPath (moduleID));
  137. props.add (pathComponent.release(),
  138. "A path to the folder that contains the " + moduleID + " module when compiling the "
  139. + exporter->getUniqueName().quoted() + " target. "
  140. "This can be an absolute path, or relative to the jucer project folder, but it "
  141. "must be valid on the filesystem of the target machine that will be performing this build. If this "
  142. "is empty then the global path will be used.");
  143. globalPathValues.add (getAppSettings().getStoredPath (isJUCEModule (moduleID) ? Ids::defaultJuceModulePath : Ids::defaultUserModulePath,
  144. exporter->getTargetOSForExporter()).getPropertyAsValue());
  145. }
  146. for (int i = 0; i < exporterModulePathDefaultValues.size(); ++i)
  147. {
  148. exporterModulePathDefaultValues.getReference (i).onDefaultChange = [this] { startTimer (50); };
  149. exporterModulePathValues.getReference (i).addListener (this);
  150. globalPathValues.getReference (i).addListener (this);
  151. }
  152. useGlobalPathValue.removeListener (this);
  153. useGlobalPathValue.referTo (modules.shouldUseGlobalPathValue (moduleID));
  154. useGlobalPathValue.addListener (this);
  155. auto menuItemString = (TargetOS::getThisOS() == TargetOS::osx ? "\"Projucer->Global Paths...\""
  156. : "\"File->Global Paths...\"");
  157. props.add (new BooleanPropertyComponent (useGlobalPathValue,
  158. "Use global path", "Use global path for this module"),
  159. String ("If this is enabled, then the locally-stored global path (set in the ") + menuItemString + " menu item) "
  160. "will be used as the path to this module. "
  161. "This means that if this Projucer project is opened on another machine it will use that machine's global path as the path to this module.");
  162. props.add (new BooleanPropertyComponent (modules.shouldCopyModuleFilesLocallyValue (moduleID),
  163. "Create local copy", "Copy the module into the project folder"),
  164. "If this is enabled, then a local copy of the entire module will be made inside your project (in the auto-generated JuceLibraryFiles folder), "
  165. "so that your project will be self-contained, and won't need to contain any references to files in other folders. "
  166. "This also means that you can check the module into your source-control system to make sure it is always in sync with your own code.");
  167. props.add (new BooleanPropertyComponent (modules.shouldShowAllModuleFilesInProjectValue (moduleID),
  168. "Add source to project", "Make module files browsable in projects"),
  169. "If this is enabled, then the entire source tree from this module will be shown inside your project, "
  170. "making it easy to browse/edit the module's classes. If disabled, then only the minimum number of files "
  171. "required to compile it will appear inside your project.");
  172. auto info = modules.getModuleInfo (moduleID);
  173. if (info.isValid())
  174. {
  175. configFlags.clear();
  176. LibraryModule (info).getConfigFlags (project, configFlags);
  177. for (auto* flag : configFlags)
  178. {
  179. auto* c = new ChoicePropertyComponent (flag->value, flag->symbol);
  180. c->setTooltip (flag->description);
  181. props.add (c);
  182. }
  183. }
  184. group.setProperties (props);
  185. parentSizeChanged();
  186. }
  187. void parentSizeChanged() override { updateSize (*this, group); }
  188. void resized() override { group.setBounds (getLocalBounds().withTrimmedLeft (12)); }
  189. String getModuleID() const noexcept { return moduleID; }
  190. private:
  191. void valueChanged (Value& v) override
  192. {
  193. auto isExporterPathValue = [&]
  194. {
  195. for (auto& exporterValue : exporterModulePathValues)
  196. if (exporterValue.refersToSameSourceAs (v))
  197. return true;
  198. return false;
  199. }();
  200. if (isExporterPathValue)
  201. project.rescanExporterPathModules();
  202. startTimer (50);
  203. }
  204. void timerCallback() override
  205. {
  206. stopTimer();
  207. refresh();
  208. }
  209. //==============================================================================
  210. Array<ValueWithDefault> exporterModulePathDefaultValues;
  211. Array<Value> exporterModulePathValues, globalPathValues;
  212. Value useGlobalPathValue;
  213. OwnedArray<Project::ConfigFlag> configFlags;
  214. PropertyGroupComponent group;
  215. Project& project;
  216. SafePointer<TreeView> modulesTree;
  217. String moduleID;
  218. //==============================================================================
  219. class ModuleInfoComponent : public PropertyComponent,
  220. private Value::Listener
  221. {
  222. public:
  223. ModuleInfoComponent (Project& p, const String& modID)
  224. : PropertyComponent ("Module", 150), project (p), moduleID (modID)
  225. {
  226. for (Project::ExporterIterator exporter (project); exporter.next();)
  227. listeningValues.add (new Value (exporter->getPathForModuleValue (moduleID).getPropertyAsValue()))->addListener (this);
  228. refresh();
  229. }
  230. void refresh() override
  231. {
  232. info = project.getEnabledModules().getModuleInfo (moduleID);
  233. repaint();
  234. }
  235. private:
  236. void paint (Graphics& g) override
  237. {
  238. auto bounds = getLocalBounds().reduced (10);
  239. bounds.removeFromTop (5);
  240. if (info.isValid())
  241. {
  242. auto topSlice = bounds.removeFromTop (bounds.getHeight() / 2);
  243. bounds.removeFromTop (bounds.getHeight() / 6);
  244. auto bottomSlice = bounds;
  245. g.setColour (findColour (defaultTextColourId));
  246. g.drawFittedText (info.getName(), topSlice.removeFromTop (topSlice.getHeight() / 4), Justification::centredLeft, 1);
  247. g.drawFittedText ("Version: " + info.getVersion(), topSlice.removeFromTop (topSlice.getHeight() / 3), Justification::centredLeft, 1);
  248. g.drawFittedText ("License: " + info.getLicense(), topSlice.removeFromTop (topSlice.getHeight() / 2), Justification::centredLeft, 1);
  249. g.drawFittedText ("Location: " + info.getFolder().getParentDirectory().getFullPathName(),
  250. topSlice.removeFromTop (topSlice.getHeight()), Justification::centredLeft, 1);
  251. g.drawFittedText (info.getDescription(), bottomSlice, Justification::topLeft, 3, 1.0f);
  252. }
  253. else
  254. {
  255. g.setColour (Colours::red);
  256. g.drawFittedText ("Cannot find this module at the specified path!", bounds, Justification::centred, 1);
  257. }
  258. }
  259. void valueChanged (Value&) override
  260. {
  261. refresh();
  262. }
  263. Project& project;
  264. String moduleID;
  265. OwnedArray<Value> listeningValues;
  266. ModuleDescription info;
  267. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ModuleInfoComponent)
  268. };
  269. //==============================================================================
  270. class MissingDependenciesComponent : public PropertyComponent
  271. {
  272. public:
  273. MissingDependenciesComponent (Project& p, const String& modID)
  274. : PropertyComponent ("Dependencies", 100),
  275. project (p), moduleID (modID),
  276. missingDependencies (project.getEnabledModules().getExtraDependenciesNeeded (modID))
  277. {
  278. addAndMakeVisible (fixButton);
  279. fixButton.setColour (TextButton::buttonColourId, Colours::red);
  280. fixButton.setColour (TextButton::textColourOffId, Colours::white);
  281. fixButton.onClick = [this] { fixDependencies(); };
  282. }
  283. void refresh() override {}
  284. void paint (Graphics& g) override
  285. {
  286. String text ("This module has missing dependencies!\n\n"
  287. "To build correctly, it requires the following modules to be added:\n");
  288. text << missingDependencies.joinIntoString (", ");
  289. g.setColour (Colours::red);
  290. g.drawFittedText (text, getLocalBounds().reduced (10), Justification::topLeft, 3);
  291. }
  292. void fixDependencies()
  293. {
  294. auto& enabledModules = project.getEnabledModules();
  295. if (enabledModules.tryToFixMissingDependencies (moduleID))
  296. {
  297. missingDependencies.clear();
  298. }
  299. else
  300. {
  301. missingDependencies = enabledModules.getExtraDependenciesNeeded (moduleID);
  302. AlertWindow::showMessageBoxAsync (MessageBoxIconType::WarningIcon,
  303. "Adding Missing Dependencies",
  304. "Couldn't locate some of these modules - you'll need to find their "
  305. "folders manually and add them to the list.");
  306. }
  307. }
  308. void resized() override
  309. {
  310. fixButton.setBounds (getWidth() - 168, getHeight() - 26, 160, 22);
  311. }
  312. private:
  313. Project& project;
  314. String moduleID;
  315. StringArray missingDependencies;
  316. TextButton fixButton { "Add Required Modules" };
  317. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MissingDependenciesComponent)
  318. };
  319. //==============================================================================
  320. struct CppStandardWarningComponent : public PropertyComponent
  321. {
  322. CppStandardWarningComponent()
  323. : PropertyComponent ("CppStandard", 100)
  324. {
  325. }
  326. void refresh() override {}
  327. void paint (Graphics& g) override
  328. {
  329. auto text = String ("This module has a higher C++ language standard requirement than your project!\n\n"
  330. "To use this module you need to increase the C++ standard of the project.\n");
  331. g.setColour (findColour (defaultHighlightColourId));
  332. g.drawFittedText (text, getLocalBounds().reduced (10), Justification::topLeft, 3);
  333. }
  334. StringArray configsToWarnAbout;
  335. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CppStandardWarningComponent)
  336. };
  337. };
  338. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ModuleItem)
  339. };
  340. //==============================================================================
  341. class EnabledModulesItem : public ProjectTreeItemBase,
  342. private Value::Listener,
  343. private AvailableModulesList::Listener
  344. {
  345. public:
  346. EnabledModulesItem (Project& p)
  347. : project (p),
  348. modulesListTree (project.getEnabledModules().getState())
  349. {
  350. modulesListTree.addListener (this);
  351. projectCppStandardValue.referTo (project.getProjectValue (Ids::cppLanguageStandard));
  352. projectCppStandardValue.addListener (this);
  353. ProjucerApplication::getApp().getJUCEPathModulesList().addListener (this);
  354. ProjucerApplication::getApp().getUserPathsModulesList().addListener (this);
  355. project.getExporterPathsModulesList().addListener (this);
  356. }
  357. ~EnabledModulesItem() override
  358. {
  359. ProjucerApplication::getApp().getJUCEPathModulesList().removeListener (this);
  360. ProjucerApplication::getApp().getUserPathsModulesList().removeListener (this);
  361. project.getExporterPathsModulesList().removeListener (this);
  362. }
  363. int getItemHeight() const override { return 22; }
  364. bool isModulesList() const override { return true; }
  365. bool canBeSelected() const override { return true; }
  366. bool mightContainSubItems() override { return true; }
  367. String getUniqueName() const override { return "modules"; }
  368. String getRenamingName() const override { return getDisplayName(); }
  369. String getDisplayName() const override { return "Modules"; }
  370. void setName (const String&) override {}
  371. bool isMissing() const override { return false; }
  372. Icon getIcon() const override { return Icon (getIcons().graph, getContentColour (true)); }
  373. void showDocument() override
  374. {
  375. if (auto* pcc = getProjectContentComponent())
  376. pcc->setScrollableEditorComponent (std::make_unique<ModulesInformationComponent> (project));
  377. }
  378. static File getModuleFolder (const File& draggedFile)
  379. {
  380. if (draggedFile.hasFileExtension (headerFileExtensions))
  381. return draggedFile.getParentDirectory();
  382. return draggedFile;
  383. }
  384. bool isInterestedInFileDrag (const StringArray& files) override
  385. {
  386. for (auto i = files.size(); --i >= 0;)
  387. if (ModuleDescription (getModuleFolder (files[i])).isValid())
  388. return true;
  389. return false;
  390. }
  391. void filesDropped (const StringArray& files, int /*insertIndex*/) override
  392. {
  393. Array<ModuleDescription> modules;
  394. for (auto f : files)
  395. {
  396. ModuleDescription m (getModuleFolder (f));
  397. if (m.isValid())
  398. modules.add (m);
  399. }
  400. for (int i = 0; i < modules.size(); ++i)
  401. project.getEnabledModules().addModule (modules.getReference (i).getModuleFolder(),
  402. project.getEnabledModules().areMostModulesCopiedLocally(),
  403. project.getEnabledModules().areMostModulesUsingGlobalPath());
  404. }
  405. void addSubItems() override
  406. {
  407. for (int i = 0; i < project.getEnabledModules().getNumModules(); ++i)
  408. addSubItem (new ModuleItem (project, project.getEnabledModules().getModuleID (i)));
  409. }
  410. void showPopupMenu (Point<int> p) override
  411. {
  412. auto& enabledModules = project.getEnabledModules();
  413. PopupMenu allModules;
  414. int index = 100;
  415. // JUCE path
  416. PopupMenu jucePathModules;
  417. for (auto& mod : ProjucerApplication::getApp().getJUCEPathModulesList().getAllModules())
  418. jucePathModules.addItem (index++, mod.first, ! enabledModules.isModuleEnabled (mod.first));
  419. jucePathModules.addSeparator();
  420. jucePathModules.addItem (-1, "Re-scan path");
  421. allModules.addSubMenu ("Global JUCE modules path", jucePathModules);
  422. // User path
  423. index = 200;
  424. PopupMenu userPathModules;
  425. for (auto& mod : ProjucerApplication::getApp().getUserPathsModulesList().getAllModules())
  426. userPathModules.addItem (index++, mod.first, ! enabledModules.isModuleEnabled (mod.first));
  427. userPathModules.addSeparator();
  428. userPathModules.addItem (-2, "Re-scan path");
  429. allModules.addSubMenu ("Global user modules path", userPathModules);
  430. // Exporter path
  431. index = 300;
  432. PopupMenu exporterPathModules;
  433. for (auto& mod : project.getExporterPathsModulesList().getAllModules())
  434. exporterPathModules.addItem (index++, mod.first, ! enabledModules.isModuleEnabled (mod.first));
  435. exporterPathModules.addSeparator();
  436. exporterPathModules.addItem (-3, "Re-scan path");
  437. allModules.addSubMenu ("Exporter paths", exporterPathModules);
  438. PopupMenu menu;
  439. menu.addSubMenu ("Add a module", allModules);
  440. menu.addSeparator();
  441. menu.addItem (1001, "Add a module from a specified folder...");
  442. launchPopupMenu (menu, p);
  443. }
  444. void handlePopupMenuResult (int resultCode) override
  445. {
  446. if (resultCode == 1001)
  447. {
  448. project.getEnabledModules().addModuleFromUserSelectedFile();
  449. }
  450. else if (resultCode < 0)
  451. {
  452. if (resultCode == -1) ProjucerApplication::getApp().rescanJUCEPathModules();
  453. else if (resultCode == -2) ProjucerApplication::getApp().rescanUserPathModules();
  454. else if (resultCode == -3) project.rescanExporterPathModules();
  455. }
  456. else if (resultCode > 0)
  457. {
  458. std::vector<AvailableModulesList::ModuleIDAndFolder> list;
  459. int offset = -1;
  460. if (resultCode < 200)
  461. {
  462. list = ProjucerApplication::getApp().getJUCEPathModulesList().getAllModules();
  463. offset = 100;
  464. }
  465. else if (resultCode < 300)
  466. {
  467. list = ProjucerApplication::getApp().getUserPathsModulesList().getAllModules();
  468. offset = 200;
  469. }
  470. else if (resultCode < 400)
  471. {
  472. list = project.getExporterPathsModulesList().getAllModules();
  473. offset = 300;
  474. }
  475. if (offset != -1)
  476. project.getEnabledModules().addModuleInteractive (list[(size_t) (resultCode - offset)].first);
  477. }
  478. }
  479. //==============================================================================
  480. void valueTreeChildAdded (ValueTree& parentTree, ValueTree&) override { refreshIfNeeded (parentTree); }
  481. void valueTreeChildRemoved (ValueTree& parentTree, ValueTree&, int) override { refreshIfNeeded (parentTree); }
  482. void valueTreeChildOrderChanged (ValueTree& parentTree, int, int) override { refreshIfNeeded (parentTree); }
  483. void refreshIfNeeded (ValueTree& changedTree)
  484. {
  485. if (changedTree == modulesListTree)
  486. {
  487. auto selectedID = getSelectedItemID();
  488. refreshSubItems();
  489. if (selectedID.isNotEmpty())
  490. setSelectedItem (selectedID);
  491. }
  492. }
  493. private:
  494. Project& project;
  495. ValueTree modulesListTree;
  496. Value projectCppStandardValue;
  497. //==============================================================================
  498. void valueChanged (Value& v) override
  499. {
  500. if (v == projectCppStandardValue)
  501. {
  502. for (int i = 0; i < getNumSubItems(); ++i)
  503. {
  504. if (auto* moduleItem = dynamic_cast<ModuleItem*> (getSubItem (i)))
  505. {
  506. if (moduleItem->checkCppStandard())
  507. {
  508. refreshSubItems();
  509. return;
  510. }
  511. }
  512. }
  513. }
  514. }
  515. void removeDuplicateModules()
  516. {
  517. auto jucePathModulesList = ProjucerApplication::getApp().getJUCEPathModulesList().getAllModules();
  518. auto& userPathModules = ProjucerApplication::getApp().getUserPathsModulesList();
  519. userPathModules.removeDuplicates (jucePathModulesList);
  520. auto& exporterPathModules = project.getExporterPathsModulesList();
  521. exporterPathModules.removeDuplicates (jucePathModulesList);
  522. exporterPathModules.removeDuplicates (userPathModules.getAllModules());
  523. }
  524. void availableModulesChanged (AvailableModulesList*) override
  525. {
  526. removeDuplicateModules();
  527. refreshSubItems();
  528. }
  529. String getSelectedItemID() const
  530. {
  531. for (int i = 0; i < getNumSubItems(); ++i)
  532. if (auto* item = getSubItem (i))
  533. if (item->isSelected())
  534. return item->getUniqueName();
  535. return {};
  536. }
  537. void setSelectedItem (const String& itemID)
  538. {
  539. for (int i = 0; i < getNumSubItems(); ++i)
  540. {
  541. if (auto* item = getSubItem (i))
  542. {
  543. if (item->getUniqueName() == itemID)
  544. {
  545. item->setSelected (true, true);
  546. return;
  547. }
  548. }
  549. }
  550. }
  551. //==============================================================================
  552. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EnabledModulesItem)
  553. };