public static DefaultRegion GetRegion(NCC.Location cloc) { try { DefaultRegion reg = new DefaultRegion(cloc.Line, cloc.Column, cloc.EndLine, cloc.EndColumn); reg.FileName = cloc.File; return(reg); } catch { return(GetRegion()); } }
public void Activate(int line, int col) { _line.Text = line.ToString(); _col.Text = col.ToString(); if (_items.Count <= 0) { return; } int index = NLocation.IndexOfMostNested2(_items, delegate(AstNodeInfo n) { return(n.Location); }, line, col); if (index >= 0) { _grid.CurrentCell = _grid.Rows[index].Cells[0]; } }