1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-19 23:15:24 +02:00

Report problems when adding the executable to the project.

This commit is contained in:
Ken Ryall 2007-03-01 13:30:35 +00:00
parent e1d592c130
commit 36c39970b9
3 changed files with 11 additions and 2 deletions

View file

@ -107,7 +107,7 @@ public abstract class AbstractImportExecutableWizard extends Wizard implements I
* project receiving the executables * project receiving the executables
* @throws CoreException * @throws CoreException
*/ */
private void addExecutables(ICProject project) throws CoreException { private void addExecutables(ICProject project) {
String[] executables = pageOne.getSelectedExecutables(); String[] executables = pageOne.getSelectedExecutables();
@ -116,7 +116,13 @@ public abstract class AbstractImportExecutableWizard extends Wizard implements I
String executableName = location.toFile().getName(); String executableName = location.toFile().getName();
IFile exeFile = project.getProject().getFile(executableName); IFile exeFile = project.getProject().getFile(executableName);
if (!exeFile.exists()) if (!exeFile.exists())
exeFile.createLink(location, 0, null); {
try {
exeFile.createLink(location, 0, null);
} catch (Exception e) {
this.getImportExecutablePage2().setErrorMessage("Error importing: " + executables[i]);
}
}
} }
} }

View file

@ -24,6 +24,8 @@ public class Messages extends NLS {
NLS.initializeMessages(BUNDLE_NAME, Messages.class); NLS.initializeMessages(BUNDLE_NAME, Messages.class);
} }
public static String AbstractImportExecutableWizard_ErrorImporting;
public static String ImportExecutableWizard_pageOneTitle; public static String ImportExecutableWizard_pageOneTitle;
public static String ImportExecutableWizard_pageOneDescription; public static String ImportExecutableWizard_pageOneDescription;

View file

@ -41,4 +41,5 @@ ImportExecutablePageOne_NoteAnEXE=Not an executable file.
ImportExecutablePageOne_SelectAll=Select All ImportExecutablePageOne_SelectAll=Select All
ImportExecutablePageOne_Searching=Searching: ImportExecutablePageOne_Searching=Searching:
AbstractImportExecutableWizard_windowTitle=Import Executable AbstractImportExecutableWizard_windowTitle=Import Executable
AbstractImportExecutableWizard_ErrorImporting=Error importing:
AbstractImportExecutableWizard_CreateLaunchConfiguration=Create Launch Configuration AbstractImportExecutableWizard_CreateLaunchConfiguration=Create Launch Configuration