/**
* imports a resource into the workspace via either http or filesystem
*/
public void importResource() {
Shell sh = getSite().getShell();
ScoreImportResourceDialog sird = new ScoreImportResourceDialog(sh);
int dialogResult = sird.open();
if (dialogResult == Window.OK) {
String newFileName = sird.getNewFileName();
String newProjectName = sird.getNewProjectName();
String resourceLocation = sird.getResourceLocation();
if (sird.isUseProjectName()) {
HelperMethods.downloadFileViaHttp(resourceLocation,
newFileName, newProjectName);
} else {
HelperMethods.downloadFile(resourceLocation, newFileName,
sird.isUseHttp());
}
}
}