Search in sources :

Example 1 with GoogleDriveFileChooserDialog

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

the class GoogleDriveKettleLifecycleListener method onStart.

public void onStart(LifeEventHandler handler) throws LifecycleException {
    if (new File(GoogleDriveFileObject.resolveCredentialsPath() + "/" + resourceBundle.getString("client.secrets")).exists()) {
        /*
      * Registers the UI for the VFS Browser
      * */
        final Spoon spoon = Spoon.getInstance();
        spoon.getDisplay().asyncExec(new Runnable() {

            public void run() {
                VfsFileChooserDialog dialog = spoon.getVfsFileChooserDialog(null, null);
                GoogleDriveFileChooserDialog hadoopVfsFileChooserDialog = new GoogleDriveFileChooserDialog(GoogleDriveFileProvider.SCHEME, GoogleDriveFileProvider.DISPLAY_NAME, dialog, SWT.NONE);
                dialog.addVFSUIPanel(hadoopVfsFileChooserDialog);
            }
        });
    }
}
Also used : GoogleDriveFileChooserDialog(org.pentaho.googledrive.vfs.ui.GoogleDriveFileChooserDialog) VfsFileChooserDialog(org.pentaho.vfs.ui.VfsFileChooserDialog) Spoon(org.pentaho.di.ui.spoon.Spoon) File(java.io.File)

Aggregations

File (java.io.File)1 Spoon (org.pentaho.di.ui.spoon.Spoon)1 GoogleDriveFileChooserDialog (org.pentaho.googledrive.vfs.ui.GoogleDriveFileChooserDialog)1 VfsFileChooserDialog (org.pentaho.vfs.ui.VfsFileChooserDialog)1