private void ColorBreakpoint(ISledDocument sd, SledProjectFilesBreakpointType bp) { if (!m_debugService.IsConnected) { return; } if (sd.SledProjectFile == null) { return; } // Grab parsed breakpoint line numbers associated with this file var parsedBreakpointsLineNumbers = m_luaVariableParserService.ValidBreakpointLineNumbers(sd.SledProjectFile); if (parsedBreakpointsLineNumbers == null) { return; } // If breakpoint line number not in list then mark it as invalid if (!parsedBreakpointsLineNumbers.Contains(bp.Line)) { bp.Breakpoint.BackColor = m_bpInvalidColor; } }
private static int CompareEnvironment(SledProjectFilesBreakpointType x, SledProjectFilesBreakpointType y) { if (x.UseFunctionEnvironment == y.UseFunctionEnvironment) { return(0); } return(x.UseFunctionEnvironment ? -1 : 1); }
private SledBreakpointServiceBreakpointChangingEventArgs(SledBreakpointChangeType changeType, SledProjectFilesBreakpointType bp, int iOldLine, int iNewLine, string oldCondition, string newCondition) { ChangeType = changeType; Breakpoint = bp; OldLine = iOldLine; NewLine = iNewLine; OldCondition = oldCondition; NewCondition = newCondition; }
private static int CompareConditionResult(SledProjectFilesBreakpointType x, SledProjectFilesBreakpointType y) { if (x.ConditionResult == y.ConditionResult) { return(0); } return(x.ConditionResult ? -1 : 1); }
private static int CompareConditionEnabled(SledProjectFilesBreakpointType x, SledProjectFilesBreakpointType y) { if (x.ConditionEnabled && y.ConditionEnabled) { return(0); } return(x.ConditionEnabled ? -1 : 1); }
private static int CompareLine(SledProjectFilesBreakpointType x, SledProjectFilesBreakpointType y) { if (x.Line == y.Line) { return(0); } return(x.Line < y.Line ? -1 : 1); }
private void SendBreakpoint(SledProjectFilesBreakpointType bp) { if (!m_debugService.IsConnected) { return; } if (bp.File == null) { return; } if (bp.File.LanguagePlugin == null) { return; } // // Gather breakpoint details // // Language plugin that is setting the breakpoint var languageId = bp.File.LanguagePlugin.LanguageId; // Relative path to script file breakpoint is in var relPath = bp.File.Path.Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar); // Condition if any (only send the condition if the condition is enabled and it isn't null/empty!) var condition = (bp.ConditionEnabled && !string.IsNullOrEmpty(bp.Condition)) ? bp.Condition : string.Empty; // Create network breakpoint var netBp = new Shared.Scmp.BreakpointDetails(languageId, relPath, bp.Line, condition, bp.ConditionResult, bp.UseFunctionEnvironment); // Send breakpoint to target m_debugService.SendScmp(netBp); }
private bool PassesBreakpointColorCheck(SledProjectFilesBreakpointType bp) { if (bp == null) { return(false); } if (bp.File == null) { return(false); } if (bp.File.LanguagePlugin != m_luaLanguagePlugin) { return(false); } if (bp.File.SledDocument == null) { return(false); } return(true); }
/// <summary> /// Constructor /// </summary> /// <param name="bp">Breakpoint type</param> public SledBreakpointServiceBreakpointEventArgs(SledProjectFilesBreakpointType bp) { Breakpoint = bp; }
/// <summary> /// Constructor /// </summary> /// <param name="changeType">Breakpoint change type</param> /// <param name="bp">Breakpoint type</param> /// <param name="oldCondition">Old breakpoint condition</param> /// <param name="newCondition">New breakpoint condition</param> public SledBreakpointServiceBreakpointChangingEventArgs(SledBreakpointChangeType changeType, SledProjectFilesBreakpointType bp, string oldCondition, string newCondition) : this(changeType, bp, -1, -1, oldCondition, newCondition) { }
/// <summary> /// Constructor /// </summary> /// <param name="changeType">Breakpoint change type</param> /// <param name="bp">Breakpoint type</param> /// <param name="iOldLine">Old breakpoint line number</param> /// <param name="iNewLine">New breakpoint line number</param> public SledBreakpointServiceBreakpointChangingEventArgs(SledBreakpointChangeType changeType, SledProjectFilesBreakpointType bp, int iOldLine, int iNewLine) : this(changeType, bp, iOldLine, iNewLine, null, null) { }
/// <summary> /// Constructor /// </summary> /// <param name="changeType">Breakpoint change type</param> /// <param name="bp">Breakpoint type</param> public SledBreakpointServiceBreakpointChangingEventArgs(SledBreakpointChangeType changeType, SledProjectFilesBreakpointType bp) : this(changeType, bp, -1, -1, null, null) { }
private static int CompareCondition(SledProjectFilesBreakpointType x, SledProjectFilesBreakpointType y) { return(string.Compare(x.Condition, y.Condition, StringComparison.CurrentCultureIgnoreCase)); }
private static int CompareFile(SledProjectFilesBreakpointType x, SledProjectFilesBreakpointType y) { return(string.Compare(x.File.Path, y.File.Path, StringComparison.CurrentCultureIgnoreCase)); }