use of org.talend.dataprofiler.core.ui.dialog.FolderSelectionDialog in project tdq-studio-se by Talend.
the class CreateSqlFileWizardPage method openFolderSelectionDialog.
protected void openFolderSelectionDialog(IFolder inputFolder) {
assert inputFolder != null;
FolderSelectionDialog dialog = new FolderSelectionDialog(getShell());
// $NON-NLS-1$
dialog.setTitle(DefaultMessagesImpl.getString("MetadataWizardPage.selectFolder"));
// $NON-NLS-1$
dialog.setMessage(DefaultMessagesImpl.getString("MetadataWizardPage.selectFolderItem"));
dialog.setInput(inputFolder);
dialog.addFilter(new DQFolderFilter());
dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
if (dialog.open() == Window.OK) {
if (dialog.getResult() == null || dialog.getResult().length == 0) {
return;
}
Object elements = dialog.getResult()[0];
IResource elem = (IResource) elements;
if (elem instanceof IFolder) {
pathText.setText(elem.getFullPath().toString());
parameter.getFolderProvider().setFolderResource((IFolder) elem);
}
}
}
use of org.talend.dataprofiler.core.ui.dialog.FolderSelectionDialog in project tdq-studio-se by Talend.
the class MetadataWizardPage method openFolderSelectionDialog.
/**
* DOC bZhou Comment method "openFolderSelectionDialog".
*
* @param inputFolder
*/
protected void openFolderSelectionDialog(IFolder inputFolder) {
FolderSelectionDialog dialog = new FolderSelectionDialog(getShell());
// $NON-NLS-1$
dialog.setTitle(DefaultMessagesImpl.getString("MetadataWizardPage.selectFolder"));
// $NON-NLS-1$
dialog.setMessage(DefaultMessagesImpl.getString("MetadataWizardPage.selectFolderItem"));
dialog.setInput(inputFolder);
dialog.addFilter(new DQFolderFilter());
if (dialog.open() == Window.OK) {
if (dialog.getResult() == null || dialog.getResult().length == 0) {
return;
}
Object elements = dialog.getResult()[0];
IResource elem = (IResource) elements;
if (elem instanceof IFolder) {
pathText.setText(elem.getFullPath().toString());
getParameter().getFolderProvider().setFolderResource((IFolder) elem);
}
}
}
Aggregations