コード例 #1
0
 public void JumpToPosition()
 {
     if (hasLocation && !position.IsDeleted)
     {
         FileService.JumpToFilePosition(position.FileName, position.Line, position.Column);
     }
     else if (position != null)
     {
         FileService.OpenFile(position.FileName);
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
 public override void JumpTo()
 {
     FileService.JumpToFilePosition(this.FileName,
                                    this.LineNumber,
                                    this.Column);
 }
コード例 #5
0
ファイル: Task.cs プロジェクト: bangush/SharpDevelopLite
 public void JumpToPosition()
 {
     FileService.JumpToFilePosition(fileName, line, column);
 }
コード例 #6
0
 public virtual void JumpTo()
 {
     FileService.JumpToFilePosition(this.FileName, 0, 0);
 }