Skip to content

Commit

Permalink
Merge pull request #4 from JieCarolHu/dev/chrmann/Fixers
Browse files Browse the repository at this point in the history
Dev/chrmann/fixers
  • Loading branch information
Carol Hu authored Sep 26, 2018
2 parents 08c6498 + 324f05d commit 5ccf3cb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
24 changes: 12 additions & 12 deletions build/Targets/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -92,24 +92,24 @@
<MicrosoftVisualStudioCodingConventionsVersion>1.1.20180503.2</MicrosoftVisualStudioCodingConventionsVersion>
<MicrosoftVisualStudioComponentModelHostVersion>15.7.27703</MicrosoftVisualStudioComponentModelHostVersion>
<MicrosoftVisualStudioCompositionVersion>15.5.23</MicrosoftVisualStudioCompositionVersion>
<MicrosoftVisualStudioCoreUtilityVersion>16.0.112-gc463d9955d</MicrosoftVisualStudioCoreUtilityVersion>
<MicrosoftVisualStudioCoreUtilityVersion>16.0.128+g71b79b7ac9</MicrosoftVisualStudioCoreUtilityVersion>
<MicrosoftVisualStudioDebuggerEngineVersion>15.0.27309-vsucorediag</MicrosoftVisualStudioDebuggerEngineVersion>
<MicrosoftVisualStudioDebuggerMetadataVersion>15.0.27309-vsucorediag</MicrosoftVisualStudioDebuggerMetadataVersion>
<MicrosoftVisualStudioDebuggerUIInterfacesVersion>15.0.27309-vsucorediag</MicrosoftVisualStudioDebuggerUIInterfacesVersion>
<MicrosoftVisualStudioDesignerInterfacesVersion>1.1.4322</MicrosoftVisualStudioDesignerInterfacesVersion>
<MicrosoftVisualStudioDiagnosticsPerformanceProviderVersion>15.8.27812-alpha</MicrosoftVisualStudioDiagnosticsPerformanceProviderVersion>
<MicrosoftVisualStudioSDKEmbedInteropTypesVersion>15.0.17</MicrosoftVisualStudioSDKEmbedInteropTypesVersion>
<MicrosoftVisualStudioEditorVersion>16.0.112-gc463d9955d</MicrosoftVisualStudioEditorVersion>
<MicrosoftVisualStudioEditorVersion>16.0.128+g71b79b7ac9</MicrosoftVisualStudioEditorVersion>
<MicrosoftVisualStudioGraphModelVersion>15.8.27812-alpha</MicrosoftVisualStudioGraphModelVersion>
<MicrosoftVisualStudioImagingInterop140DesignTimeVersion>14.3.26930</MicrosoftVisualStudioImagingInterop140DesignTimeVersion>
<MicrosoftVisualStudioInteractiveWindowVersion>2.0.0-rc3-61304-01</MicrosoftVisualStudioInteractiveWindowVersion>
<MicrosoftVisualStudioLanguageVersion>16.0.112-gc463d9955d</MicrosoftVisualStudioLanguageVersion>
<MicrosoftVisualStudioLanguageVersion>16.0.128+g71b79b7ac9</MicrosoftVisualStudioLanguageVersion>
<MicrosoftVisualStudioLanguageCallHierarchyVersion>15.8.27812-alpha</MicrosoftVisualStudioLanguageCallHierarchyVersion>
<MicrosoftVisualStudioLanguageIntellisenseVersion>16.0.112-gc463d9955d</MicrosoftVisualStudioLanguageIntellisenseVersion>
<MicrosoftVisualStudioLanguageNavigateToInterfacesVersion>16.0.112-gc463d9955d</MicrosoftVisualStudioLanguageNavigateToInterfacesVersion>
<MicrosoftVisualStudioLanguageStandardClassificationVersion>16.0.112-gc463d9955d</MicrosoftVisualStudioLanguageStandardClassificationVersion>
<MicrosoftVisualStudioLanguageIntellisenseVersion>16.0.128+g71b79b7ac9</MicrosoftVisualStudioLanguageIntellisenseVersion>
<MicrosoftVisualStudioLanguageNavigateToInterfacesVersion>16.0.128+g71b79b7ac9</MicrosoftVisualStudioLanguageNavigateToInterfacesVersion>
<MicrosoftVisualStudioLanguageStandardClassificationVersion>16.0.128+g71b79b7ac9</MicrosoftVisualStudioLanguageStandardClassificationVersion>
<MicrosoftVisualStudioOLEInteropVersion>7.10.6071</MicrosoftVisualStudioOLEInteropVersion>
<MicrosoftVisualStudioPlatformVSEditorVersion>16.0.112-gc463d9955d</MicrosoftVisualStudioPlatformVSEditorVersion>
<MicrosoftVisualStudioPlatformVSEditorVersion>16.0.128+g71b79b7ac9</MicrosoftVisualStudioPlatformVSEditorVersion>
<MicrosoftVisualStudioProgressionCodeSchemaVersion>15.8.27812-alpha</MicrosoftVisualStudioProgressionCodeSchemaVersion>
<MicrosoftVisualStudioProgressionCommonVersion>15.8.27812-alpha</MicrosoftVisualStudioProgressionCommonVersion>
<MicrosoftVisualStudioProgressionInterfacesVersion>15.8.27812-alpha</MicrosoftVisualStudioProgressionInterfacesVersion>
Expand All @@ -130,11 +130,11 @@
<MicrosoftVisualStudioShellInterop80Version>8.0.50728</MicrosoftVisualStudioShellInterop80Version>
<MicrosoftVisualStudioTelemetryVersion>15.8.27812-alpha</MicrosoftVisualStudioTelemetryVersion>
<MicrosoftVisualStudioTemplateWizardInterfaceVersion>8.0.0.0-alpha</MicrosoftVisualStudioTemplateWizardInterfaceVersion>
<MicrosoftVisualStudioTextDataVersion>16.0.112-gc463d9955d</MicrosoftVisualStudioTextDataVersion>
<MicrosoftVisualStudioTextInternalVersion>16.0.112-gc463d9955d</MicrosoftVisualStudioTextInternalVersion>
<MicrosoftVisualStudioTextLogicVersion>16.0.112-gc463d9955d</MicrosoftVisualStudioTextLogicVersion>
<MicrosoftVisualStudioTextUIVersion>16.0.112-gc463d9955d</MicrosoftVisualStudioTextUIVersion>
<MicrosoftVisualStudioTextUIWpfVersion>16.0.112-gc463d9955d</MicrosoftVisualStudioTextUIWpfVersion>
<MicrosoftVisualStudioTextDataVersion>16.0.128+g71b79b7ac9</MicrosoftVisualStudioTextDataVersion>
<MicrosoftVisualStudioTextInternalVersion>16.0.128+g71b79b7ac9</MicrosoftVisualStudioTextInternalVersion>
<MicrosoftVisualStudioTextLogicVersion>16.0.128+g71b79b7ac9</MicrosoftVisualStudioTextLogicVersion>
<MicrosoftVisualStudioTextUIVersion>16.0.128+g71b79b7ac9</MicrosoftVisualStudioTextUIVersion>
<MicrosoftVisualStudioTextUIWpfVersion>16.0.128+g71b79b7ac9</MicrosoftVisualStudioTextUIWpfVersion>
<MicrosoftVisualStudioTextManagerInteropVersion>7.10.6071</MicrosoftVisualStudioTextManagerInteropVersion>
<MicrosoftVisualStudioTextManagerInterop100Version>10.0.30320</MicrosoftVisualStudioTextManagerInterop100Version>
<MicrosoftVisualStudioTextManagerInterop120Version>12.0.30110</MicrosoftVisualStudioTextManagerInterop120Version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
using Microsoft.VisualStudio.Editor.CodeCleanup;
using Microsoft.VisualStudio.Language.CodeCleanUp;
using Microsoft.VisualStudio.LanguageServices.Implementation.CodeCleanup;
using Microsoft.VisualStudio.Utilities;

namespace Microsoft.VisualStudio.LanguageServices.CSharp.LanguageService
{
[Export(typeof(CodeCleanUpFixer))]
[VisualStudio.Utilities.ContentType(ContentTypeNames.CSharpContentType)]
internal class CSharpCodeCleanUpFixer : CodeCleanUpFixer
{
public override Task<bool> FixAsync(ICodeCleanUpScope scope, FixIdContainer enabledFixIds, CancellationToken cancellationToken)
public override Task<bool> FixAsync(ICodeCleanUpScope scope, IUIThreadOperationContext operationContext, FixIdContainer enabledFixIds, CancellationToken cancellationToken)
{
switch(scope)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.VisualStudio.Language.CodeCleanUp;
using Microsoft.VisualStudio.Utilities;

namespace Microsoft.VisualStudio.LanguageServices.Implementation.CodeCleanup
{
internal abstract class CodeCleanUpFixer : ICodeCleanUpFixer
{
public abstract Task<bool> FixAsync(ICodeCleanUpScope scope, FixIdContainer enabledFixIds, CancellationToken cancellationToken);
public abstract Task<bool> FixAsync(ICodeCleanUpScope scope, IUIThreadOperationContext operationContext, FixIdContainer enabledFixIds, CancellationToken cancellationToken);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public CodeCleanUpFixerProvider(
_codeCleanUpFixers = codeCleanUpFixers.ToList();
}

public IReadOnlyCollection<ICodeCleanUpFixer> CreateFixers()
public IReadOnlyCollection<ICodeCleanUpFixer> GetFixers()
{
var fixers = new List<CodeCleanUpFixer>();
foreach (var fixerLazy in _codeCleanUpFixers)
Expand All @@ -35,7 +35,7 @@ public IReadOnlyCollection<ICodeCleanUpFixer> CreateFixers()
return fixers;
}

public IReadOnlyCollection<ICodeCleanUpFixer> CreateFixers(IContentType contentType)
public IReadOnlyCollection<ICodeCleanUpFixer> GetFixers(IContentType contentType)
{
var fixers = _codeCleanUpFixers
.Where(handler => handler.Metadata.ContentTypes.Contains(contentType.TypeName)).ToList();
Expand Down

0 comments on commit 5ccf3cb

Please sign in to comment.