+
+ protected class DefaultCallbackHandler implements CallbackHandler {
+ public void handle(final Callback[] callbacks) throws IOException,
+ UnsupportedCallbackException {
+
+ // if (display != null) // RCP
+ Display displayToUse = display.get();
+ if (displayToUse == null)// RCP
+ displayToUse = Display.getDefault();
+ displayToUse.syncExec(new Runnable() {
+ public void run() {
+ DefaultLoginDialog dialog = new DefaultLoginDialog(display
+ .get().getActiveShell());
+ try {
+ dialog.handle(callbacks);
+ } catch (IOException e) {
+ throw new ArgeoException("Cannot open dialog", e);
+ }
+ }
+ });
+ // else {// RAP
+ // DefaultLoginDialog dialog = new DefaultLoginDialog();
+ // dialog.handle(callbacks);
+ // }
+ }
+
+ }