From 809f41207b74a1356208f11b8fa3a15233734050 Mon Sep 17 00:00:00 2001 From: Will Smith Date: Wed, 20 Mar 2019 12:24:03 -0700 Subject: [PATCH] Stop statusbar updates (#6339) * Removed status bar updates until VS has a fix * Using underscores --- .../Navigation/GoToDefinition.fs | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/vsintegration/src/FSharp.Editor/Navigation/GoToDefinition.fs b/vsintegration/src/FSharp.Editor/Navigation/GoToDefinition.fs index f664db8de1b..e1591ed0561 100644 --- a/vsintegration/src/FSharp.Editor/Navigation/GoToDefinition.fs +++ b/vsintegration/src/FSharp.Editor/Navigation/GoToDefinition.fs @@ -115,38 +115,41 @@ type internal FSharpNavigableItem(document: Document, textSpan: TextSpan) = member __.DisplayTaggedParts = ImmutableArray.Empty member __.ChildItems = ImmutableArray.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"