Exemplo n.º 1
0
        private void Select(int column, int line)
        {
            var location = new Mono.TextEditor.DocumentLocation(line - 1, column);

            source.TextArea.ScrollTo(line, column);
            source.TextArea.Caret.Location = location;
        }
Exemplo n.º 2
0
        static PathEntry GetRegionEntry(ParsedDocument unit, Mono.TextEditor.DocumentLocation loc)
        {
            PathEntry entry;

            if (!unit.UserRegions.Any())
            {
                return(null);
            }
            var reg = unit.UserRegions.LastOrDefault(r => r.Region.IsInside(loc));

            if (reg == null)
            {
                entry = new PathEntry(GettextCatalog.GetString("No region"));
            }
            else
            {
                entry = new PathEntry(CompilationUnitDataProvider.Pixbuf,
                                      GLib.Markup.EscapeText(reg.Name));
            }
            entry.Position = EntryPosition.Right;
            return(entry);
        }
Exemplo n.º 3
0
 public void GetLineColumnFromPosition(int position, out int line, out int column)
 {
     Mono.TextEditor.DocumentLocation loc = document.OffsetToLocation(position);
     line   = loc.Line;
     column = loc.Column;
 }