}
} else {
formatter = new MWPaneDisambiguationFormatter(getWikipedia(), pages);
getTextContents().setFormatter(formatter);
}
MWPanePopupListener listener = new MWPaneDisambiguationPopupListener(
getWikipedia(), OnePageAnalysisWindow.this);
getTextContents().setPopupListener(listener);
}
} else if (list == listErrors) {
// List of errors
Object selection = listErrors.getSelectedValue();
if ((selection != null) && (selection instanceof CheckErrorPage)) {
listLinks.clearSelection();
CheckErrorPage errorSelected = (CheckErrorPage) selection;
MWPaneFormatter formatter = getTextContents().getFormatter();
if (formatter instanceof MWPaneCheckWikiFormatter) {
MWPaneCheckWikiFormatter cwFormatter =
(MWPaneCheckWikiFormatter) formatter;
if (!cwFormatter.isSameAlgorithm(errorSelected.getAlgorithm())) {
formatter = new MWPaneCheckWikiFormatter(errorSelected.getAlgorithm());
getTextContents().setFormatter(formatter);
}
} else {
formatter = new MWPaneCheckWikiFormatter(errorSelected.getAlgorithm());
getTextContents().setFormatter(formatter);
}
MWPanePopupListener listener = new MWPaneCheckWikiPopupListener(
getWikipedia(), OnePageAnalysisWindow.this);
getTextContents().setPopupListener(listener);
}
}
if (list != null) {