visitor = new FindRegExAnnotationVisitor(model, regEx);
visitor = new FindRegExAnnotationVisitor(model, pattern);
    public void execute()    {        FindRegExVisitor visitor = null;        switch (index) {            case IN_TITLE:                visitor = new FindRegExTitleVisitor(model, regEx);                break;            case IN_ANNOTATION:                visitor = new FindRegExAnnotationVisitor(model, regEx);                break;            case IN_T_AND_A:                visitor = new FindRegExTitleAndAnnotationVisitor(model, regEx);                        }        if (visitor == null) return;        Browser browser = model.getBrowser();        ImageDisplay selectedDisplay = browser.getSelectedDisplay();        if (selectedDisplay.getParentDisplay() == null) //root            browser.accept(visitor);        else {            if (!(selectedDisplay instanceof ImageNode))                selectedDisplay.accept(visitor);        }         model.getClipBoard().setSearchResults(visitor.getFoundNodes());    }