You can use the Extract Variable refactoring even on incomplete statements. Just press &shortcut:IntroduceVariable;, and choose the desired expression: