Extract Method 重构为您的代码片段创建方法。
例如,您可以选择一段代码并按 &shortcut:ExtractMethod;(Refactor | Extract -> Method):
这将导致以下结果: