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.

694 lines
28KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2022 - 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 7 End-User License
  8. Agreement and JUCE Privacy Policy.
  9. End User License Agreement: www.juce.com/juce-7-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 final : 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 final : public Component,
  95. private ValueTree::Listener,
  96. private Value::Listener
  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. auto& appSettings = getAppSettings();
  107. appSettings.addProjectDefaultsListener (*this);
  108. appSettings.addFallbackPathsListener (*this);
  109. addAndMakeVisible (group);
  110. refresh();
  111. }
  112. ~ModuleSettingsPanel() override
  113. {
  114. auto& appSettings = getAppSettings();
  115. appSettings.removeProjectDefaultsListener (*this);
  116. appSettings.removeFallbackPathsListener (*this);
  117. }
  118. void refresh()
  119. {
  120. auto& modules = project.getEnabledModules();
  121. setEnabled (modules.isModuleEnabled (moduleID));
  122. PropertyListBuilder props;
  123. props.add (new ModuleInfoComponent (project, moduleID));
  124. if (modules.getExtraDependenciesNeeded (moduleID).size() > 0)
  125. props.add (new MissingDependenciesComponent (project, moduleID));
  126. if (modules.doesModuleHaveHigherCppStandardThanProject (moduleID))
  127. props.add (new CppStandardWarningComponent());
  128. group.clearProperties();
  129. exporterModulePathValues.clear();
  130. for (Project::ExporterIterator exporter (project); exporter.next();)
  131. {
  132. auto modulePathValue = exporter->getPathForModuleValue (moduleID);
  133. const auto fallbackPath = getAppSettings().getStoredPath (isJUCEModule (moduleID) ? Ids::defaultJuceModulePath
  134. : Ids::defaultUserModulePath,
  135. exporter->getTargetOSForExporter()).get().toString();
  136. modulePathValue.setDefault (fallbackPath);
  137. exporterModulePathValues.add (modulePathValue.getPropertyAsValue());
  138. exporterModulePathValues.getReference (exporterModulePathValues.size() - 1).addListener (this);
  139. auto pathComponent = std::make_unique<FilePathPropertyComponent> (modulePathValue,
  140. "Path for " + exporter->getUniqueName().quoted(),
  141. true,
  142. exporter->getTargetOSForExporter() == TargetOS::getThisOS(),
  143. "*",
  144. project.getProjectFolder());
  145. pathComponent->setEnabled (! modules.shouldUseGlobalPath (moduleID));
  146. props.add (pathComponent.release(),
  147. "A path to the folder that contains the " + moduleID + " module when compiling the "
  148. + exporter->getUniqueName().quoted() + " target. "
  149. "This can be an absolute path, or relative to the jucer project folder, but it "
  150. "must be valid on the filesystem of the target machine that will be performing this build. If this "
  151. "is empty then the global path will be used.");
  152. }
  153. useGlobalPathValue = 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 valueTreePropertyChanged (ValueTree&, const Identifier& property) override
  192. {
  193. if (property == Ids::defaultJuceModulePath || property == Ids::defaultUserModulePath)
  194. refresh();
  195. }
  196. void valueChanged (Value& v) override
  197. {
  198. auto isExporterPathValue = [this, &v]
  199. {
  200. for (auto& exporterValue : exporterModulePathValues)
  201. if (exporterValue.refersToSameSourceAs (v))
  202. return true;
  203. return false;
  204. }();
  205. if (isExporterPathValue)
  206. project.rescanExporterPathModules();
  207. refresh();
  208. }
  209. //==============================================================================
  210. Array<Value> exporterModulePathValues;
  211. Value useGlobalPathValue;
  212. OwnedArray<Project::ConfigFlag> configFlags;
  213. PropertyGroupComponent group;
  214. Project& project;
  215. SafePointer<TreeView> modulesTree;
  216. String moduleID;
  217. //==============================================================================
  218. class ModuleInfoComponent final : public PropertyComponent,
  219. private Value::Listener
  220. {
  221. public:
  222. ModuleInfoComponent (Project& p, const String& modID)
  223. : PropertyComponent ("Module", 150), project (p), moduleID (modID)
  224. {
  225. for (Project::ExporterIterator exporter (project); exporter.next();)
  226. listeningValues.add (new Value (exporter->getPathForModuleValue (moduleID).getPropertyAsValue()))->addListener (this);
  227. refresh();
  228. }
  229. void refresh() override
  230. {
  231. info = project.getEnabledModules().getModuleInfo (moduleID);
  232. repaint();
  233. }
  234. private:
  235. void paint (Graphics& g) override
  236. {
  237. auto bounds = getLocalBounds().reduced (10);
  238. bounds.removeFromTop (5);
  239. if (info.isValid())
  240. {
  241. auto topSlice = bounds.removeFromTop (bounds.getHeight() / 2);
  242. bounds.removeFromTop (bounds.getHeight() / 6);
  243. auto bottomSlice = bounds;
  244. g.setColour (findColour (defaultTextColourId));
  245. g.drawFittedText (info.getName(), topSlice.removeFromTop (topSlice.getHeight() / 4), Justification::centredLeft, 1);
  246. g.drawFittedText ("Version: " + info.getVersion(), topSlice.removeFromTop (topSlice.getHeight() / 3), Justification::centredLeft, 1);
  247. g.drawFittedText ("License: " + info.getLicense(), topSlice.removeFromTop (topSlice.getHeight() / 2), Justification::centredLeft, 1);
  248. g.drawFittedText ("Location: " + info.getFolder().getParentDirectory().getFullPathName(),
  249. topSlice.removeFromTop (topSlice.getHeight()), Justification::centredLeft, 1);
  250. g.drawFittedText (info.getDescription(), bottomSlice, Justification::topLeft, 3, 1.0f);
  251. }
  252. else
  253. {
  254. g.setColour (Colours::red);
  255. g.drawFittedText ("Cannot find this module at the specified path!", bounds, Justification::centred, 1);
  256. }
  257. }
  258. void valueChanged (Value&) override
  259. {
  260. refresh();
  261. }
  262. Project& project;
  263. String moduleID;
  264. OwnedArray<Value> listeningValues;
  265. ModuleDescription info;
  266. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ModuleInfoComponent)
  267. };
  268. //==============================================================================
  269. class MissingDependenciesComponent final : public PropertyComponent
  270. {
  271. public:
  272. MissingDependenciesComponent (Project& p, const String& modID)
  273. : PropertyComponent ("Dependencies", 100),
  274. project (p), moduleID (modID),
  275. missingDependencies (project.getEnabledModules().getExtraDependenciesNeeded (modID))
  276. {
  277. addAndMakeVisible (fixButton);
  278. fixButton.setColour (TextButton::buttonColourId, Colours::red);
  279. fixButton.setColour (TextButton::textColourOffId, Colours::white);
  280. fixButton.onClick = [this] { fixDependencies(); };
  281. }
  282. void refresh() override {}
  283. void paint (Graphics& g) override
  284. {
  285. String text ("This module has missing dependencies!\n\n"
  286. "To build correctly, it requires the following modules to be added:\n");
  287. text << missingDependencies.joinIntoString (", ");
  288. g.setColour (Colours::red);
  289. g.drawFittedText (text, getLocalBounds().reduced (10), Justification::topLeft, 3);
  290. }
  291. void fixDependencies()
  292. {
  293. auto& enabledModules = project.getEnabledModules();
  294. if (enabledModules.tryToFixMissingDependencies (moduleID))
  295. {
  296. missingDependencies.clear();
  297. }
  298. else
  299. {
  300. missingDependencies = enabledModules.getExtraDependenciesNeeded (moduleID);
  301. auto options = MessageBoxOptions::makeOptionsOk (MessageBoxIconType::WarningIcon,
  302. "Adding Missing Dependencies",
  303. "Couldn't locate some of these modules - you'll need to find their "
  304. "folders manually and add them to the list.");
  305. messageBox = AlertWindow::showScopedAsync (options, nullptr);
  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. ScopedMessageBox messageBox;
  318. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MissingDependenciesComponent)
  319. };
  320. //==============================================================================
  321. struct CppStandardWarningComponent final : public PropertyComponent
  322. {
  323. CppStandardWarningComponent()
  324. : PropertyComponent ("CppStandard", 100)
  325. {
  326. }
  327. void refresh() override {}
  328. void paint (Graphics& g) override
  329. {
  330. auto text = String ("This module has a higher C++ language standard requirement than your project!\n\n"
  331. "To use this module you need to increase the C++ standard of the project.\n");
  332. g.setColour (findColour (defaultHighlightColourId));
  333. g.drawFittedText (text, getLocalBounds().reduced (10), Justification::topLeft, 3);
  334. }
  335. StringArray configsToWarnAbout;
  336. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CppStandardWarningComponent)
  337. };
  338. };
  339. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ModuleItem)
  340. };
  341. //==============================================================================
  342. class EnabledModulesItem final : public ProjectTreeItemBase,
  343. private Value::Listener,
  344. private AvailableModulesList::Listener
  345. {
  346. public:
  347. EnabledModulesItem (Project& p)
  348. : project (p),
  349. modulesListTree (project.getEnabledModules().getState())
  350. {
  351. modulesListTree.addListener (this);
  352. projectCppStandardValue.referTo (project.getProjectValue (Ids::cppLanguageStandard));
  353. projectCppStandardValue.addListener (this);
  354. ProjucerApplication::getApp().getJUCEPathModulesList().addListener (this);
  355. ProjucerApplication::getApp().getUserPathsModulesList().addListener (this);
  356. project.getExporterPathsModulesList().addListener (this);
  357. }
  358. ~EnabledModulesItem() override
  359. {
  360. ProjucerApplication::getApp().getJUCEPathModulesList().removeListener (this);
  361. ProjucerApplication::getApp().getUserPathsModulesList().removeListener (this);
  362. project.getExporterPathsModulesList().removeListener (this);
  363. }
  364. int getItemHeight() const override { return 22; }
  365. bool isModulesList() const override { return true; }
  366. bool canBeSelected() const override { return true; }
  367. bool mightContainSubItems() override { return true; }
  368. String getUniqueName() const override { return "modules"; }
  369. String getRenamingName() const override { return getDisplayName(); }
  370. String getDisplayName() const override { return "Modules"; }
  371. void setName (const String&) override {}
  372. bool isMissing() const override { return false; }
  373. Icon getIcon() const override { return Icon (getIcons().graph, getContentColour (true)); }
  374. void showDocument() override
  375. {
  376. if (auto* pcc = getProjectContentComponent())
  377. pcc->setScrollableEditorComponent (std::make_unique<ModulesInformationComponent> (project));
  378. }
  379. static File getModuleFolder (const File& draggedFile)
  380. {
  381. if (draggedFile.hasFileExtension (headerFileExtensions))
  382. return draggedFile.getParentDirectory();
  383. return draggedFile;
  384. }
  385. bool isInterestedInFileDrag (const StringArray& files) override
  386. {
  387. for (auto i = files.size(); --i >= 0;)
  388. if (ModuleDescription (getModuleFolder (files[i])).isValid())
  389. return true;
  390. return false;
  391. }
  392. void filesDropped (const StringArray& files, int /*insertIndex*/) override
  393. {
  394. Array<ModuleDescription> modules;
  395. for (auto f : files)
  396. {
  397. ModuleDescription m (getModuleFolder (f));
  398. if (m.isValid())
  399. modules.add (m);
  400. }
  401. for (int i = 0; i < modules.size(); ++i)
  402. project.getEnabledModules().addModule (modules.getReference (i).getModuleFolder(),
  403. project.getEnabledModules().areMostModulesCopiedLocally(),
  404. project.getEnabledModules().areMostModulesUsingGlobalPath());
  405. }
  406. void addSubItems() override
  407. {
  408. for (int i = 0; i < project.getEnabledModules().getNumModules(); ++i)
  409. addSubItem (new ModuleItem (project, project.getEnabledModules().getModuleID (i)));
  410. }
  411. void showPopupMenu (Point<int> p) override
  412. {
  413. auto& enabledModules = project.getEnabledModules();
  414. PopupMenu allModules;
  415. int index = 100;
  416. // JUCE path
  417. PopupMenu jucePathModules;
  418. for (auto& mod : ProjucerApplication::getApp().getJUCEPathModulesList().getAllModules())
  419. jucePathModules.addItem (index++, mod.first, ! enabledModules.isModuleEnabled (mod.first));
  420. jucePathModules.addSeparator();
  421. jucePathModules.addItem (-1, "Re-scan path");
  422. allModules.addSubMenu ("Global JUCE modules path", jucePathModules);
  423. // User path
  424. index = 200;
  425. PopupMenu userPathModules;
  426. for (auto& mod : ProjucerApplication::getApp().getUserPathsModulesList().getAllModules())
  427. userPathModules.addItem (index++, mod.first, ! enabledModules.isModuleEnabled (mod.first));
  428. userPathModules.addSeparator();
  429. userPathModules.addItem (-2, "Re-scan path");
  430. allModules.addSubMenu ("Global user modules path", userPathModules);
  431. // Exporter path
  432. index = 300;
  433. PopupMenu exporterPathModules;
  434. for (auto& mod : project.getExporterPathsModulesList().getAllModules())
  435. exporterPathModules.addItem (index++, mod.first, ! enabledModules.isModuleEnabled (mod.first));
  436. exporterPathModules.addSeparator();
  437. exporterPathModules.addItem (-3, "Re-scan path");
  438. allModules.addSubMenu ("Exporter paths", exporterPathModules);
  439. PopupMenu menu;
  440. menu.addSubMenu ("Add a module", allModules);
  441. menu.addSeparator();
  442. menu.addItem (1001, "Add a module from a specified folder...");
  443. launchPopupMenu (menu, p);
  444. }
  445. void handlePopupMenuResult (int resultCode) override
  446. {
  447. if (resultCode == 1001)
  448. {
  449. project.getEnabledModules().addModuleFromUserSelectedFile();
  450. }
  451. else if (resultCode < 0)
  452. {
  453. if (resultCode == -1) ProjucerApplication::getApp().rescanJUCEPathModules();
  454. else if (resultCode == -2) ProjucerApplication::getApp().rescanUserPathModules();
  455. else if (resultCode == -3) project.rescanExporterPathModules();
  456. }
  457. else if (resultCode > 0)
  458. {
  459. std::vector<AvailableModulesList::ModuleIDAndFolder> list;
  460. int offset = -1;
  461. if (resultCode < 200)
  462. {
  463. list = ProjucerApplication::getApp().getJUCEPathModulesList().getAllModules();
  464. offset = 100;
  465. }
  466. else if (resultCode < 300)
  467. {
  468. list = ProjucerApplication::getApp().getUserPathsModulesList().getAllModules();
  469. offset = 200;
  470. }
  471. else if (resultCode < 400)
  472. {
  473. list = project.getExporterPathsModulesList().getAllModules();
  474. offset = 300;
  475. }
  476. if (offset != -1)
  477. project.getEnabledModules().addModuleInteractive (list[(size_t) (resultCode - offset)].first);
  478. }
  479. }
  480. //==============================================================================
  481. void valueTreeChildAdded (ValueTree& parentTree, ValueTree&) override { refreshIfNeeded (parentTree); }
  482. void valueTreeChildRemoved (ValueTree& parentTree, ValueTree&, int) override { refreshIfNeeded (parentTree); }
  483. void valueTreeChildOrderChanged (ValueTree& parentTree, int, int) override { refreshIfNeeded (parentTree); }
  484. void refreshIfNeeded (ValueTree& changedTree)
  485. {
  486. if (changedTree == modulesListTree)
  487. {
  488. auto selectedID = getSelectedItemID();
  489. refreshSubItems();
  490. if (selectedID.isNotEmpty())
  491. setSelectedItem (selectedID);
  492. }
  493. }
  494. private:
  495. Project& project;
  496. ValueTree modulesListTree;
  497. Value projectCppStandardValue;
  498. //==============================================================================
  499. void valueChanged (Value& v) override
  500. {
  501. if (v == projectCppStandardValue)
  502. {
  503. for (int i = 0; i < getNumSubItems(); ++i)
  504. {
  505. if (auto* moduleItem = dynamic_cast<ModuleItem*> (getSubItem (i)))
  506. {
  507. if (moduleItem->checkCppStandard())
  508. {
  509. refreshSubItems();
  510. return;
  511. }
  512. }
  513. }
  514. }
  515. }
  516. void removeDuplicateModules()
  517. {
  518. auto jucePathModulesList = ProjucerApplication::getApp().getJUCEPathModulesList().getAllModules();
  519. auto& userPathModules = ProjucerApplication::getApp().getUserPathsModulesList();
  520. userPathModules.removeDuplicates (jucePathModulesList);
  521. auto& exporterPathModules = project.getExporterPathsModulesList();
  522. exporterPathModules.removeDuplicates (jucePathModulesList);
  523. exporterPathModules.removeDuplicates (userPathModules.getAllModules());
  524. }
  525. void availableModulesChanged (AvailableModulesList*) override
  526. {
  527. removeDuplicateModules();
  528. refreshSubItems();
  529. }
  530. String getSelectedItemID() const
  531. {
  532. for (int i = 0; i < getNumSubItems(); ++i)
  533. if (auto* item = getSubItem (i))
  534. if (item->isSelected())
  535. return item->getUniqueName();
  536. return {};
  537. }
  538. void setSelectedItem (const String& itemID)
  539. {
  540. for (int i = 0; i < getNumSubItems(); ++i)
  541. {
  542. if (auto* item = getSubItem (i))
  543. {
  544. if (item->getUniqueName() == itemID)
  545. {
  546. item->setSelected (true, true);
  547. return;
  548. }
  549. }
  550. }
  551. }
  552. //==============================================================================
  553. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EnabledModulesItem)
  554. };