Skip to main content

Show message dialog before options are displayed

Comments

2 comments

  • 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:

    @Override
    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!

    Cheers,
    Tom

  • Pamela Russell

    This works! Thanks Tom!

    0

Please sign in to leave a comment.