}
private void handleScanButtonPressed() {
ScannedFilesContentProvider contentProvider = new ScannedFilesContentProvider(
"xml");
CheckedTreeSelectionDialog dialog = new CheckedTreeSelectionDialog(
SpringUIUtils.getStandardDisplay().getActiveShell(),
new ScannedFilesLabelProvider(), contentProvider) {
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super
.createDialogArea(parent);
Label note = new Label(composite, SWT.WRAP);
note.setText(Activator.getResourceString(SCAN_NOTE_LABEL));
note.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
return composite;
}
};
dialog.setTitle(Activator.getResourceString(DIALOG_TITLE));
dialog.setMessage(Activator.getResourceString(DIALOG_MESSAGE));
dialog.addFilter(new ConfigFileFilter(new String[] { "xml" }));
dialog.setValidator(new FileSelectionValidator(true));
dialog.setInput(element);
dialog.setSorter(new ResourceSorter(ResourceSorter.NAME));
dialog.setInitialSelections(contentProvider.getElements(project
.getProject()));
if (dialog.open() == ElementTreeSelectionDialog.OK) {
Object[] selection = dialog.getResult();
if (selection != null && selection.length > 0) {
for (int i = 0; i < selection.length; i++) {
IFile file = (IFile) selection[i];
IWebflowConfig config = new WebflowConfig(project);
config.setResource(file);