可以对不完整的语句使用 提取变量 重构。按 &shortcut:IntroduceVariable; 并选择表达式。

Extract variable in an incomplete statement