// Pages
int nbPages = error.getPageCount();
for (int numPage = 0; numPage < nbPages; numPage++) {
Page page = error.getPage(numPage);
CheckErrorPage errorPage = new CheckErrorPage(page, error.getAlgorithm());
if ((errorPage.isInWhiteList()) && (page.getPageId() != null)) {
markPageAsFixed(error.getAlgorithm().getErrorNumberString(), page);
} else {
modelPages.addElement(errorPage);
}
}
setPageLoaded(false);
actionSelectPages();
updateComponentState();
} else {
buttonReloadError.setEnabled(false);
buttonErrorDetail.setEnabled(false);
buttonErrorList.setEnabled(false);
buttonWhiteList.setEnabled(false);
displayErrorDescription();
if (selection instanceof String) {
List<String> listTmp = new ArrayList<String>();
for (CheckError error : errors) {
int nbPages = error.getPageCount();
for (int numPage = 0; numPage < nbPages; numPage++) {
Page page = error.getPage(numPage);
listTmp.add(page.getTitle());
}
}
Collections.sort(listTmp);
List<String> listErrorPages = new ArrayList<String>();
for (int listPosition = 1; listPosition < listTmp.size(); listPosition++) {
if (listTmp.get(listPosition - 1).equals(listTmp.get(listPosition))) {
if (!listErrorPages.contains(listTmp.get(listPosition))) {
listErrorPages.add(listTmp.get(listPosition));
}
}
}
for (String page : listErrorPages) {
CheckErrorPage errorPage = new CheckErrorPage(DataManager.getPage(getWikipedia(), page, null, null, null), null);
modelPages.addElement(errorPage);
}
}
setPageLoaded(false);