Skip to content

Commit d14ea4f

Browse files
Merge pull request #277 from jamiehumphries/276-resharper-cleanup
#276 Update ReSharper cleanup command.
2 parents b06b95a + a34ac3a commit d14ea4f

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CodeMaid/Logic/Cleaning/CodeCleanupManager.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,10 @@ private void RunJetBrainsReSharperCleanup(TextDocument textDocument)
455455
{
456456
if (!Settings.Default.ThirdParty_UseJetBrainsReSharperCleanup) return;
457457

458+
// This command changed to include the leading 'ReSharper.' in version 2016.1.
459+
// Execute both commands for backwards compatibility.
458460
ExecuteCommand(textDocument, "ReSharper_SilentCleanupCode");
461+
ExecuteCommand(textDocument, "ReSharper.ReSharper_SilentCleanupCode");
459462
}
460463

461464
/// <summary>

CodeMaid/UI/Dialogs/Options/ThirdParty/ThirdPartyDataTemplate.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<CheckBox Content="Run Telerik JustCode cleanup" IsChecked="{Binding UseTelerikJustCodeCleanup}" IsEnabled="{Binding IsEnabledUseTelerikJustCodeCleanup}" />
1111
<CheckBox Content="Run XAML Styler cleanup" IsChecked="{Binding UseXAMLStylerCleanup}" IsEnabled="{Binding IsEnabledUseXAMLStylerCleanup}" />
1212

13-
<TextBlock Text="Other cleaning commands (ex: ReSharper_SilentCleanupCode)" Margin="5,5,5,0" />
13+
<TextBlock Text="Other cleaning commands (ex: ReSharper.ReSharper_SilentCleanupCode)" Margin="5,5,5,0" />
1414
<TextBox Style="{DynamicResource TextBoxMultiLine}"
1515
Text="{Binding OtherCleaningCommandsExpression, Converter={x:Static cnv:StringReplaceConverter.DoublePipeToNewLine}, UpdateSourceTrigger=PropertyChanged}" />
1616
<TextBlock FontStyle="Italic" Text="Place each command on a separate line" />

CodeMaid/UI/Dialogs/Options/ThirdParty/ThirdPartyViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public string OtherCleaningCommandsExpression
9191
/// <summary>
9292
/// Gets a flag indicating if the UseJetBrainsReSharperCleanup option should be enabled.
9393
/// </summary>
94-
public bool IsEnabledUseJetBrainsReSharperCleanup => _commandHelper.FindCommand("ReSharper_SilentCleanupCode") != null;
94+
public bool IsEnabledUseJetBrainsReSharperCleanup => _commandHelper.FindCommand("ReSharper_SilentCleanupCode") != null || _commandHelper.FindCommand("ReSharper.ReSharper_SilentCleanupCode") != null;
9595

9696
/// <summary>
9797
/// Gets a flag indicating if the UseTelerikJustCodeCleanup option should be enabled.

0 commit comments

Comments
 (0)