assert(currentSelection != null);
// If we had a repository selection before that is different from the current selection
if (previousSelection != null
&& !currentSelection.equals(previousSelection)) {
handleRepositoryCreation();
RepositoryContentProvider cp = new RepositoryContentProvider();
cp.setRepositorySelection(currentSelection);
viewer.setContentProvider(cp);
viewer.setInput(viewer);
previousSelection = currentSelection;
} else {
// If we didn't have a repository selection before (first time this page is loaded)
if (previousSelection == null) {
handleRepositoryCreation();
RepositoryContentProvider cp = new RepositoryContentProvider();
cp.setRepositorySelection(currentSelection);
viewer.setContentProvider(cp);
viewer.setInput(viewer);
previousSelection = currentSelection;
}
}