Skip to content

Commit

Permalink
Merge pull request dotnet#6351 from Microsoft/merges/dev16.0-to-fsharp5
Browse files Browse the repository at this point in the history
Merge dev16.0 to fsharp5
  • Loading branch information
dotnet-automerge-bot authored Mar 21, 2019
2 parents 67ff032 + 4b47f18 commit 148dd21
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions Navigation/GoToDefinition.fs
Original file line number Diff line number Diff line change
Expand Up @@ -115,38 +115,41 @@ type internal FSharpNavigableItem(document: Document, textSpan: TextSpan) =
member __.DisplayTaggedParts = ImmutableArray<TaggedText>.Empty
member __.ChildItems = ImmutableArray<INavigableItem>.Empty

// TODO: Uncomment code when VS has a fix for updating the status bar.
type internal StatusBar(statusBar: IVsStatusbar) =
let mutable searchIcon = int16 Microsoft.VisualStudio.Shell.Interop.Constants.SBAI_Find :> obj
let mutable _searchIcon = int16 Microsoft.VisualStudio.Shell.Interop.Constants.SBAI_Find :> obj

let clear() =
let _clear() =
// unfreeze the statusbar
statusBar.FreezeOutput 0 |> ignore
statusBar.Clear() |> ignore

member __.Message(msg: string) =
let _, frozen = statusBar.IsFrozen()
// unfreeze the status bar
if frozen <> 0 then statusBar.FreezeOutput 0 |> ignore
statusBar.SetText msg |> ignore
// freeze the status bar
statusBar.FreezeOutput 1 |> ignore

member this.TempMessage(msg: string) =
this.Message msg
async {
do! Async.Sleep 4000
match statusBar.GetText() with
| 0, currentText when currentText <> msg -> ()
| _ -> clear()
}|> Async.Start
member __.Message(_msg: string) =
()
//let _, frozen = statusBar.IsFrozen()
//// unfreeze the status bar
//if frozen <> 0 then statusBar.FreezeOutput 0 |> ignore
//statusBar.SetText msg |> ignore
//// freeze the status bar
//statusBar.FreezeOutput 1 |> ignore

member this.TempMessage(_msg: string) =
()
//this.Message msg
//async {
// do! Async.Sleep 4000
// match statusBar.GetText() with
// | 0, currentText when currentText <> msg -> ()
// | _ -> clear()
//}|> Async.Start

member __.Clear() = clear()
member __.Clear() = () //clear()

/// Animated magnifying glass that displays on the status bar while a symbol search is in progress.
member __.Animate() : IDisposable =
statusBar.Animation (1, &searchIcon) |> ignore
//statusBar.Animation (1, &searchIcon) |> ignore
{ new IDisposable with
member __.Dispose() = statusBar.Animation(0, &searchIcon) |> ignore }
member __.Dispose() = () } //statusBar.Animation(0, &searchIcon) |> ignore }

type internal GoToDefinition(checker: FSharpChecker, projectInfoManager: FSharpProjectOptionsManager) =
let userOpName = "GoToDefinition"
Expand Down

0 comments on commit 148dd21

Please sign in to comment.