Skip to main content

Show message dialog before options are displayed



  • Official comment
    Tom Edwards

    Hi Pam,

    If you are creating a SequenceAnnotationGenerator then you should be overriding a getOptions() method in order to create your options. There is a method of getOptions which has a SelectionRange passed into it so I would recommend checking if the selectionRange is null as the first thing to do when you override that method.
    For example something like this:

    public Options getOptions(AnnotatedPluginDocument[] documents, SelectionRange selectionRange) throws DocumentOperationException {
    if (selectionRange == null){
    throw new DocumentOperationException("You must select a selection range");

    Let us know if that works out for you!


  • Pamela Russell

    This works! Thanks Tom!


Please sign in to leave a comment.