ResourcesPlugin.getWorkspace().getRoot(),
"Select the resource");
if (dialog.open() == ContainerSelectionDialog.OK) {
if (dialog.getResult().length == 1) {
org.eclipse.core.resources.IResource selectedRes = (org.eclipse.core.resources.IResource) dialog.getResult()[0];
ExternalResource resource = (ExternalResource) getSelectedResource();
resource.setLocation(selectedRes.getFullPath().toOSString());
resourceSectionPart.markStale();
resourceSectionPart.markDirty();
} else {
MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(),
"Resource selection", "Only one resource must be selected");