Skip to content

Commit 0744b52

Browse files
committed
Merge branch 'main' into live
2 parents 8df6ea7 + a45a55e commit 0744b52

File tree

2 files changed

+5
-27
lines changed

2 files changed

+5
-27
lines changed

docs/ide/quick-actions.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Quick Actions, light bulbs, and screwdrivers
33
description: Learn how to use a single Quick Action to refactor, generate, or otherwise modify your code.
44
ms.custom: SEO-VS-2020
5-
ms.date: 09/15/2021
5+
ms.date: 08/29/2022
66
ms.topic: conceptual
77
author: TerryGLee
88
ms.author: tglee
@@ -62,11 +62,12 @@ To see potential fixes, select either the down arrow next to the light bulb or t
6262

6363
![Light bulb expanded](../ide/media/vs2015_lightbulb_hover_expanded.png)
6464

65+
> [!TIP]
66+
> To learn how to turn off some of the code fix Quick Actions, see [Disable source code analysis for .NET](../code-quality/disable-code-analysis.md).
67+
6568
## See also
6669

67-
- [Visual Studio IntelliCode](/visualstudio/intellicode/intellicode-visual-studio)
68-
- [Code generation in Visual Studio](../ide/code-generation-in-visual-studio.md)
6970
- [Common Quick Actions](../ide/common-quick-actions.md)
7071
- [Code styles and Quick Actions](../ide/code-styles-and-code-cleanup.md)
72+
- [Visual Studio IntelliCode](/visualstudio/intellicode/intellicode-visual-studio)
7173
- [Write and refactor code (C++)](/cpp/ide/writing-and-refactoring-code-cpp)
72-
- [Refactoring (Visual Studio for Mac)](/visualstudio/mac/refactoring)

docs/python/refactoring-python-code.md

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -43,29 +43,6 @@ Visual Studio provides several commands for automatically transforming and clean
4343
:::image type="content" source="media/vs-2022/code-refactor-rename-1.png" alt-text="Screenshot of Rename prompt for new identifer name.":::
4444
::: moniker-end
4545

46-
## Extract method
47-
48-
::: moniker range="<=vs-2019"
49-
50-
1. Select the lines of code or the expression to extract into a separate method.
51-
1. Select the **Edit** > **Refactor** > **Extract method** menu command or press **Ctrl**+**R** > **M**.
52-
1. In the dialog that appears, enter a new method name, indicate where to extract it to, and select any closure variables. Variables not selected for closure are turned into method arguments:
53-
:::image type="content" source="media/code-refactor-extract-method-1.png" alt-text="Screenshot of Extract method dialog.":::
54-
55-
1. Select **OK**, and the code is modified.
56-
:::image type="content" source="media/code-refactor-extract-method-2.png" alt-text="Screenshot showing the effect of extracting a method.":::
57-
::: moniker-end
58-
::: moniker range=">=vs-2022"
59-
60-
1. Select the lines of code or the expression to extract into a separate method.
61-
1. When you place the caret on code sample, Visual Studio provides a smart tag (the wrench icon to the left of the code).
62-
1. In the dialog that appears, select **Extract** for closure to be turned into method arguments:
63-
:::image type="content" source="media/vs-2022/code-refactor-extract-method-1.png" alt-text="Screenshot of Extract method dialog.":::
64-
65-
1. Select **OK** and the code is modified.
66-
:::image type="content" source="media/vs-2022/code-refactor-extract-method-2.png" alt-text="Screenshot of Effects of extracting a method.":::
67-
::: moniker-end
68-
6946
## Add import
7047

7148
When you place the caret on an identifier that lacks type information, Visual Studio provides a smart tag (the light bulb icon to the left of the code) whose commands add the necessary `import` or `from ... import` statement.

0 commit comments

Comments
 (0)