}
final FetchOperationUI op;
int timeout = Activator.getDefault().getPreferenceStore().getInt(
UIPreferences.REMOTE_CONNECTION_TIMEOUT);
final RepositorySelection repoSelection = repoPage.getSelection();
if (calledFromRepoPage)
op = new FetchOperationUI(localDb, repoSelection.getConfig(),
timeout, false);
else if (repoSelection.isConfigSelected())
op = new FetchOperationUI(localDb, repoSelection.getConfig()
.getURIs().get(0), refSpecPage.getRefSpecs(), timeout,
false);
else
op = new FetchOperationUI(localDb, repoSelection.getURI(false),
refSpecPage.getRefSpecs(), timeout, false);
UserPasswordCredentials credentials = repoPage.getCredentials();
if (credentials != null)
op.setCredentialsProvider(new UsernamePasswordCredentialsProvider(