Improve code with context actions

Press &shortcut:ShowIntentionActions; in the editor to fix a highlighted error or warning, improve, or optimize a code construct. For some intention actions, you can open a preview or an action description by pressing &shortcut:QuickJavaDoc; (View | Quick Documentation).

Context actions