def set(self, key, val, to_global=False, fallback=True):
        if to_global:
            if val is None:
                if self.settings.has(key):
                    self.settings.erase(key)
                else:
                    # Return here so it won't wasting time saving old settings
                    return
            else:
                self.settings.set(key, val)
            sublime.save_settings(self.settings_base)
        else:
            window = sublime.active_window()
            project_data = window.project_data()
            if not project_data:
                if fallback:
                    self.set(key, val, to_global=True)
                return
            if val is None:
                if (project_data and "javatar" in project_data and
                        key in project_data["javatar"]):
                    del project_data["javatar"][key]
                else:
                    # Return here so it won't wasting time saving old settings
                    return
            else:
                if project_data and"javatar" in project_data:
                    data = project_data["javatar"]
                else:
                    data = {}
                data[key] = val
                project_data["javatar"] = data
            window.set_project_data(project_data)
obj: dict, Case, or None
dataset/ETHPy150Open spywhere/Javatar/core/settings.py/_Settings.set--crossover with--dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/casehandlers/caseset.py/CaseArray.__init__