1. 28 4月, 2015 3 次提交
  2. 27 4月, 2015 1 次提交
  3. 26 4月, 2015 1 次提交
  4. 25 4月, 2015 2 次提交
    • S
      Avoid duplicate generate method fixes in light bulb · e67a1b0a
      Shyam N 提交于
      Fixes #1899
      
      Consider the following case where M1 and M2 are non-existant methods -
      
      this.M1(System.Exception.M2());
      
      The code fix provider for generate method was offering two fixes to generate the method M1 above. Here's why. The fix provider gets called once each for the two diagnostics on the above line - the first with span corresponding to M1 and the second with span corresponding to M2. For the first span, the fix provider correctly constructs a fix to generate M1.
      
      For the second span the fix provider correctly realizes that it can't construct a fix to generate M2 since System.Exception is a type from metadata and not source. However, looks like fix provider has fallback code to walk up the tree and see if there are other methods that it can construct in such cases. It ends up finding the InvocationExpression for M1 up the tree and therfore ends up returning another fix for generating M1.
      
      I didn't want to change this fall back logic since it appears to be shared across multiple GFU fix providers and I didn't want to break other legit cases where this may be required for generate method.
      
      Instead I am fixing this by introducing equivalence key for the corresponding CodeAction to ensure that the duplicate fixes will get filtered out when the light bulb presents the list of fixes in its UI. (This is identical to equivalence keys that we have in place for other GFU fixes such as Generate Type etc.). Note that we need the equivalence key for generate method anyways to avoid duplicate fixes in other unrelated cases such as following where M is a non-existant method -
      
      var x = this; var y = this;
      string.Format("{0}:{1}", x.M(), y.M())
      
      Also, note that in some cases where we used to offer multiple valid fixes to generate methods with the same name but different signatures before, we will now only display one fix at a time. But this is fine since user can always fix first issue then invoke light bulb again to fix 2nd issue. Example of a case where there are 2 methods with same name but different signature -
      
      this.M(this.M());
      e67a1b0a
    • W
      [Localize] partially localize a part of strings like "finally clause" · e6f5d968
      Wonseok Chae 提交于
      We use resource commenting "locked" to define what to localize.
      e6f5d968
  5. 24 4月, 2015 3 次提交
  6. 23 4月, 2015 1 次提交
  7. 22 4月, 2015 1 次提交
  8. 21 4月, 2015 1 次提交
  9. 18 4月, 2015 2 次提交
  10. 17 4月, 2015 3 次提交
  11. 16 4月, 2015 2 次提交
    • M
      Analyzer driver performance improvements to improve command line build throughput with analyzers. · 0ee67910
      Manish Vasani 提交于
      These changes bring down the self-build of Roslyn.sln with Roslyn analyzers from 2x of the core build time (build with no analyzers) to ~1.15x on my box.
      
      1) Parallelize compilation event processing: Currently, a single thread processes all compilation events. This is the primary bottleneck for 2x build time with analyzers enabled. However, now that multiple threads process compilation events and execute analyzers, we need to guard against actions running concurrently for the same analyzer instance via a lock. This is accomplished via creating unique gate objects per analyzer instance and locking on them. Deadlock is not possible as these are stored on a private map of the core AnalyzerExecutor, and analyzer callbacks cannot call back into the AnalyzerDriver.
      
      2) Execute syntax node actions for every symbol declared event sequentially: Current approach executes node actions in parallel for different analyzers (though each analyzer's actions are always executed sequentially). Invariably, these action callbacks on different analyzers share the same semantic model, leading to lot of contention on bound node cache accesses, hurting the overall performance. Switching this to completely sequential execution model for each symbol declared event, along with optimization (1) improves the overall performance. There is scope to still fine tune perf here by executing actions with distinct {Analyzer, SemanticModel} tuple in parallel, but I'll leave that for a separate attempt.
      0ee67910
    • H
      Some code clean up. · 1754008c
      Heejae Chang 提交于
      First is cleanup some infobar code such as adding copyright header, adding internal, removing unused usings and etc.
      Second is adding more info in exception log.
      Last is making code action more resilient to null return value from user code.
      1754008c
  12. 15 4月, 2015 2 次提交
  13. 14 4月, 2015 1 次提交
  14. 11 4月, 2015 2 次提交
  15. 10 4月, 2015 2 次提交
  16. 09 4月, 2015 3 次提交
    • M
      Make DiagnosticAnalyzerExtensions.GetDiagnosticAnalyzerCategory async to avoid... · 630cb899
      Manish Vasani 提交于
      Make DiagnosticAnalyzerExtensions.GetDiagnosticAnalyzerCategory async to avoid force computing registered analyzer actions in the IDE.
      630cb899
    • S
      Honor requested categories and spans specified by light bulb · f14aa061
      Shyam N 提交于
      1. When light bulb asks us for suggestions (i.e. in HasSuggestedActionsAsync() and GetSuggestedActions()), it also specifies the category of suggestions that it is looking for (code fixes, refactorings, anything etc.). So far, we were completely ignoring the requested categories. HasSuggestedActionsAsync() would always return true so long as we had a code fix (that is not a suppression fix) and GetSuggestedActions() would always return all types of suggestions (fixes, suppressions and refactorings) regardless of what the light bulb is asking for. This led to strange bugs where we would return refactorings even when light bulb didn't ask for them. In other cases, HasSuggestedActionsAsync() and GetSuggestedActions() would disagree for the same requested categories. This change makes things consistent so that we always honor the suggestion categories that the light bulb is requesting.
      
      2. When computing refactorings we were completely ignoring the span specified by light bulb and only considering selection specified by user. This led to incorrect behavior in some cases - for example, on mouse hover over a squiggle, we would return the code fixes corresponding to the squiggle along with refactorings for completely unrelated portions of the code that the user may have previously selected.
      
      Fixes #1030, #1595, #1631
      f14aa061
    • M
      Fix DiagnosticAnalyzerExtensions.GetDiagnosticAnalyzerCategory to return... · ca03cd74
      Manish Vasani 提交于
      Fix DiagnosticAnalyzerExtensions.GetDiagnosticAnalyzerCategory to return DiagnosticAnalyzerCategory.SemanticDocumentAnalysis if the analyzer has semantic actions and cannot support semantic span based analysis.
      
      Fixes #1709
      ca03cd74
  17. 07 4月, 2015 1 次提交
  18. 04 4月, 2015 1 次提交
    • D
      Commit rename on save and debugging run mode · dbc9e6c1
      David Poeschl 提交于
      Fixes internal TFS bug 1142095
      
      Commit any existing rename session when a document is saved or when
      debugging run mode is entered. This ensures rename sessions are
      completed before Edit and Continue sets the buffers to readonly when
      debugging begins or when break mode is exited.
      dbc9e6c1
  19. 03 4月, 2015 2 次提交
  20. 02 4月, 2015 4 次提交
  21. 01 4月, 2015 2 次提交