If your code references an undeclared method or field, you can quickly declare it automatically with the correct signature or type, by pressing &shortcut:ShowIntentionActions; and choosing the corresponding quick-fix.