You can generate a property, function, or class declaration, from its usage: just press &shortcut:ShowIntentionActions; and select the corresponding action in the list.