Trying to edit a non-declarative Pipeline should give a simpler/clearer message and give option to overwrite.
See attached for current result.
Should say somethiing like: "This Jenkinsfile does appear to be a Declarative Pipeline - it not contain a pipeline section. Would you like to overwrite this Jenkinsfile with a blank Declarative Pipeline? CAUTION: Make sure you understand the meaning of "overwrite" and "blank" before you choose to do this!"