try {
getProgressMonitor().setTicksCount(3);
authClient = new OsmOAuthAuthorizationClient(
getAdvancedPropertiesPanel().getAdvancedParameters()
);
OAuthToken requestToken = authClient.getRequestToken(
getProgressMonitor().createSubTaskMonitor(1, false)
);
getProgressMonitor().worked(1);
if (canceled)return;
authClient.authorise(
requestToken,
getOsmUserName(),
getOsmPassword(),
pnlOsmPrivileges.getPrivileges(),
getProgressMonitor().createSubTaskMonitor(1, false)
);
getProgressMonitor().worked(1);
if (canceled)return;
final OAuthToken accessToken = authClient.getAccessToken(
getProgressMonitor().createSubTaskMonitor(1,false)
);
getProgressMonitor().worked(1);
if (canceled)return;
GuiHelper.runInEDT(new Runnable() {