public void JumpToPosition() { if (hasLocation && !position.IsDeleted) { FileService.JumpToFilePosition(position.FileName, position.Line, position.Column); } else if (position != null) { FileService.OpenFile(position.FileName); } }
public static bool NavigateTo(IEntity entity) { if (entity == null) { throw new ArgumentNullException("entity"); } var region = entity.Region; if (region.IsEmpty || string.IsNullOrEmpty(region.FileName)) { foreach (var item in AddInTree.BuildItems <INavigateToEntityService>("/SharpDevelop/Services/NavigateToEntityService", null, false)) { if (item.NavigateToEntity(entity)) { return(true); } } return(false); } return(FileService.JumpToFilePosition(region.FileName, region.BeginLine, region.BeginColumn) != null); }
public static bool NavigateTo(Dom.IEntity entity) { if (entity == null) { throw new ArgumentNullException("entity"); } var cu = entity.CompilationUnit; Dom.DomRegion region; if (entity is Dom.IClass) { region = ((Dom.IClass)entity).Region; } else if (entity is Dom.IMember) { region = ((Dom.IMember)entity).Region; } else { region = Dom.DomRegion.Empty; } if (cu == null || string.IsNullOrEmpty(cu.FileName) || region.IsEmpty) { foreach (var item in AddInTree.BuildItems <INavigateToEntityService>("/SharpDevelop/Services/NavigateToEntityService", null, false)) { if (item.NavigateToEntity(entity)) { return(true); } } return(false); } else { return(FileService.JumpToFilePosition(cu.FileName, region.BeginLine, region.BeginColumn) != null); } }
public override void JumpTo() { FileService.JumpToFilePosition(this.FileName, this.LineNumber, this.Column); }
public void JumpToPosition() { FileService.JumpToFilePosition(fileName, line, column); }
public virtual void JumpTo() { FileService.JumpToFilePosition(this.FileName, 0, 0); }