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);
}
});
}
}
Aggregations