code: function toggleEnabled(enabled, doNotSave) {
          if (enabled === undefined) {
              enabled = !_enabled;
          }
  
          // Take no action when there is no change.
          if (enabled === _enabled) {
              return;
          }
  
          _enabled = enabled;
  
          CommandManager.get(Commands.VIEW_TOGGLE_INSPECTION).setChecked(_enabled);
          updateListeners();
          if (!doNotSave) {
              prefs.set(PREF_ENABLED, _enabled);
              prefs.save();
          }
  
          // run immediately
          run();
      }
docs: Enable or disable all inspection.
  @param {?boolean} enabled Enabled state. If omitted, the state is toggled.
  @param {?boolean} doNotSave true if the preference should not be saved to user settings. This is generally for events triggered by project-level settings.