pages.add((Page) selection[i]);
}
}
MWPaneFormatter formatter = getTextContents().getFormatter();
if (formatter instanceof MWPaneDisambiguationFormatter) {
MWPaneDisambiguationFormatter dabFormatter =
(MWPaneDisambiguationFormatter) formatter;
if (!dabFormatter.isSameList(pages)) {
formatter = new MWPaneDisambiguationFormatter(getWikipedia(), pages);
getTextContents().setFormatter(formatter);
}
} else {
formatter = new MWPaneDisambiguationFormatter(getWikipedia(), pages);
getTextContents().setFormatter(formatter);
}
MWPanePopupListener listener = new MWPaneDisambiguationPopupListener(
getWikipedia(), OnePageAnalysisWindow.this);
getTextContents().setPopupListener(listener);