/// <summary> /// Registers a script with a debugger. /// </summary> public ScriptDebugger AddDebugger(LuaSourceContainer script) { var debugger = new ScriptDebugger(script); lock (_locker) { _debuggers.Add(debugger); } return(debugger); }
public CodeEditorViewModel(LuaSourceContainer luaSourceContainer) { LuaSourceContainer = luaSourceContainer; NotifyOfPropertyChange(() => LuaSourceContainer); NotifyOfPropertyChange(() => DisplayName); UpdateTheme(); InsertBreakpointCommand = new InsertBreakpointCommand(this); }
public BreakpointMargin(LuaSourceContainer script, TextEditor editor) { _script = script; _editor = editor; _pen = new Pen(Brushes.White, 4); _debugger = script.Debugger; _debugger.BreakpointAdded.Event += bp => { var line = _editor.Document.GetLineByNumber(bp.Line); var offset = _editor.Document.GetOffset(bp.Line, 1); var anchor = _editor.Document.CreateAnchor(offset); anchor.MovementType = AnchorMovementType.AfterInsertion; anchor.Deleted += (s, e) => bp.Destroy(); bp.Tag = anchor; }; _debugger.BreakpointRemoved.Event += bp => { }; }
internal Execution(LuaSourceContainer script = null) { Script = script; _semaphore = new SemaphoreSlim(0, 1); }
internal WaitExecution(LuaSourceContainer source, LuaThread thread, double seconds, Action continueAction = null) : base(source) { _luaThread = thread; _continueAction = continueAction; _destination = System.DateTime.Now + System.TimeSpan.FromSeconds(seconds); }
public StartExecution(LuaSourceContainer script, object[] args = null) : base(script) { Args = args ?? new object[0]; }
internal CustomCompileOptions(LuaSourceContainer script) { _script = script; }
public void OpenScript(LuaSourceContainer script, int lineNumber = 0) { ScriptService.AssertIdentity(ScriptIdentity.Plugin); CodeEditorViewModel.TryOpenScript(script, lineNumber); }
public static void TryOpenScript(LuaSourceContainer script, int lineNumber = 0) { var editor = IoC.Get <ICodeEditor>(script.InstanceId); Editor.Current.Shell.ActiveDocument = (CodeEditorViewModel)editor; }
public override int GetHashCode() { return(LuaSourceContainer.GetHashCode()); }
public virtual Task OnSave(LuaSourceContainer container) { return(Task.FromResult(true)); }