Describe the bug
Renaming an UndefinedFunction causes UnsupportedOperationException.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Maybe show a hint that a function has to be created manually first in the assembly editor.
Screenshots

Environment:
Build Date: 2019-May-16 1545 EDT
Ghidra Version: 9.0.4
Java Home: /usr/lib/jvm/jdk-12.0.1
JVM Version: Oracle Corporation 12.0.1
OS: Linux 4.18.0-25-generic amd64
Solution: It is necessary to create the function manually in the assembly window: right click -> create function. Maybe instead of the error message, a hint could be useful.
Thanks for catching this. At the very least we should prevent users from attempting to rename the undefined function.
Most helpful comment
Solution: It is necessary to create the function manually in the assembly window: right click -> create function. Maybe instead of the error message, a hint could be useful.