GE Lua Documentation

Press F to search!

saveState

Definition


-- @/lua/ge/extensions/editor/main.lua:353

local function saveState(filePath)
  -- do not save state if we did not used the editor in this session
  if not editor.initialized then return end
  editor.logDebug("Saving editor state...")
  local state = {}
  state.version = CurrentStateFileFormatVersion
  editorWasActive = M.active
  lastEditModeName = editor.getCurrentEditModeName()
  extensions.hook("onEditorSaveState", state)
  jsonWriteFile(filePath or editorCurrentStatePath, state, true)
end

Callers

@/lua/ge/extensions/editor/main.lua
      end
      saveState()
      --TODO: remove if window state behaves ok
local function onClientEndMission()
  saveState()
  guihooks.trigger('ShowApps', true)
  editor.active = false
  editor.saveState()
end
    data.editModeName = editor.getCurrentEditModeName()
    saveState()
    if editor.saveWindowsState then
@/inspector/External/Esprima/esprima.js
        JSXParser.prototype.peekJSXToken = function () {
            var state = this.scanner.saveState();
            this.scanner.scanComments();
            if (match) {
                var state = this.scanner.saveState();
                this.scanner.scanComments();
        Parser.prototype.isLexicalDeclaration = function () {
            var state = this.scanner.saveState();
            this.scanner.scanComments();
            if (match) {
                var state = this.scanner.saveState();
                this.scanner.scanComments();