Search in sources :

Example 1 with GoogleAuthorizationDialog

use of org.pentaho.googledrive.vfs.ui.GoogleAuthorizationDialog in project pentaho-kettle by pentaho.

the class CustomAuthorizationCodeInstalledApp method onAuthorization.

protected void onAuthorization(AuthorizationCodeRequestUrl authorizationUrl) throws IOException {
    String url = authorizationUrl.build();
    Spoon spoon = Spoon.getInstance();
    if (spoon != null) {
        Display.getDefault().syncExec(new Runnable() {

            public void run() {
                Shell shell = spoon.getShell();
                GoogleAuthorizationDialog authorizationDialog = new GoogleAuthorizationDialog(shell, getReceiver());
                authorizationDialog.open(url);
            }
        });
    } else {
        browse(url);
    }
}
Also used : GoogleAuthorizationDialog(org.pentaho.googledrive.vfs.ui.GoogleAuthorizationDialog) Shell(org.eclipse.swt.widgets.Shell) Spoon(org.pentaho.di.ui.spoon.Spoon)

Aggregations

Shell (org.eclipse.swt.widgets.Shell)1 Spoon (org.pentaho.di.ui.spoon.Spoon)1 GoogleAuthorizationDialog (org.pentaho.googledrive.vfs.ui.GoogleAuthorizationDialog)1