use of com.microsoft.azuretools.adauth.AuthCanceledException in project azure-tools-for-java by Microsoft.
the class SignInDialog method signInAsync.
private void signInAsync() throws InvocationTargetException, InterruptedException {
IRunnableWithProgress op = new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
monitor.beginTask("Signing In...", IProgressMonitor.UNKNOWN);
try {
AdAuthManager.getInstance().signIn();
} catch (AuthCanceledException ex) {
System.out.println(ex.getMessage());
} catch (IOException ex) {
System.out.println("run@ProgressDialog@signInAsync@SingInDialog: " + ex.getMessage());
//ex.printStackTrace();
//LOG.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "run@ProgressDialog@signInAsync@SingInDialog", e));
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
ErrorWindow.go(getShell(), ex.getMessage(), "Sign In Error");
;
}
});
}
}
};
new ProgressMonitorDialog(this.getShell()).run(true, false, op);
}
Aggregations