1. 16 1月, 2019 3 次提交
  2. 15 1月, 2019 4 次提交
  3. 12 1月, 2019 14 次提交
    • J
      When responding to an IVsHierarchy change, only refresh needed files · dc90fbbf
      Jason Malinowski 提交于
      This is an optimization that if you have 20 or 30 files open, and only
      one of them came from a shared asset project, and that project is
      changing context, we don't need to refresh all of the rest. Since the
      refreshing is on the UI thread, we want that to be quick.
      dc90fbbf
    • J
      5722f218
    • J
      cd5cd58d
    • J
      Clean up Workspace.OnDocumentContextUpdated · be1d1e54
      Jason Malinowski 提交于
      The protected method took the state lock, got the container, let go
      of the state lock, and then acquired all of the locks. This isn't
      really safe anyways because once all the locks were released the
      document could have been closed and disconnected entirely.
      be1d1e54
    • J
      Add comment to Workspace.OnDocumentContextUpdated · 045cf2da
      Jason Malinowski 提交于
      The pattern matches all our other On* methods.
      045cf2da
    • J
      Move comment to the code it actually applies to · 35f71417
      Jason Malinowski 提交于
      This was being applied at the caller, a few lines before the actual
      call. Now it's obvious what it's doing.
      35f71417
    • J
      Remove hack which was trying to avoid a deadlock when projects unload · 18bcaace
      Jason Malinowski 提交于
      This was setting a magic thread local property which tracked if we
      were currently unloading a project, and if so avoided taking a lock
      when the context changed. This was somewhat self-inflicted because
      we were trying to change project contexts in the Visual Studio shell
      during the middle of unload. We're not doing that anymore, and removing
      this also allows us to allow project removal off the UI thread.
      18bcaace
    • J
      Don't call back into the workspace host to force change contexts · 835eb317
      Jason Malinowski 提交于
      This behavior causes all sorts of problems: removing a file (which
      can now happen on a background thread) then tries to call into
      all sorts of UI-affinitized APIs which are unavailable there.
      Practically,  there's no reason we must do this anyways: if you do
      remove a file in one context, we'll update our internal structures to
      point to a new context. There's no real harm in that being temporarily
      out of sync: either we'll pick the right context at random and the
      user won't notice, or if we pick the wrong one, they can select the one
      they want and everything will be updated again.
      
      Fixes dotnet/roslyn#31019.
      835eb317
    • J
      Make GetDocumentIdInCurrentContext non-virtual and remove the comment · 29ef2e27
      Jason Malinowski 提交于
      The comment implied that custom handling could be done by overriding
      this but no such overriding is being done, and trying to do so would
      be very sketchy.
      29ef2e27
    • J
      Correctly free our IVsHierarchy subscriptions when we're done · 85f969bf
      Jason Malinowski 提交于
      Because the code wasn't finished, we were leaking IVsHierarchies since
      we had no cleanup logic. We hold onto the IVsHierarchies per document
      cookie (although we do share the watchers), so if we close a file we
      only unhook from the correct IVsHierarchies rather than having to re-
      look at everything.
      85f969bf
    • J
      Extract out a reference-counted cache implementation · f36378fc
      Jason Malinowski 提交于
      We already had this inside of VisualStudioRuleSetManager, and we need
      it for more things too. For now all the locking semantics are being
      kept identical.
      f36378fc
    • J
      Fix up logic that is determining and setting contexts for files · 513119e2
      Jason Malinowski 提交于
      The basic mental here is to determine a context for a file, we start
      with the Running Document Table and grab the IVsHierarchy for that file.
      We then chase it through shared projects until we arrive at final
      IVsHierarchy. This should be the IVsHierarchy we were given for the
      project. In the case of multitargeting projects, there's one last hop
      where we fetch a VSHPROPID_ActiveIntellisenseProjectContext that just
      returns the project name instead of a IVsHierarchy. If you squint you
      could imagine that as if it returned the IVsHierarchy for that project
      except we don't have unique ones.
      
      To set the context, we start with the project and walk those
      IVsHierarchy pointers backwards. At each step we can do an operation to
      figure out which IVsHierarchy needs its pointer updated, and we point it
      to build the chain, moving back to the IVsHierarchy that will end up
      in the Running Document Table.
      
      This is (still) leaking IVsHierarchies that we subscribe to, and that
      will be fixed next.
      513119e2
    • S
      Merge pull request #32375 from sharwell/fix-errorlist-test · 793fe93b
      Sam Harwell 提交于
      Avoid navigating to message severity items unless requested
      793fe93b
    • A
      Add tests for nullable reference types. (#32371) · 6236885d
      AlekseyTs 提交于
      Closes #31862.
      6236885d
  4. 11 1月, 2019 5 次提交
  5. 10 1月, 2019 6 次提交
  6. 08 1月, 2019 4 次提交
  7. 05 1月, 2019 4 次提交