Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorKen Ryall2007-02-02 10:23:52 +0000
committerKen Ryall2007-02-02 10:23:52 +0000
commit8352714872db5fa7c1e5ac69b56cdac6fb1f37be (patch)
treefa1deeac9609ca51c05ac42c713ab846e224aa18 /debug
parente4e2222d0f421ad91ccaabb203a79e8d20fab88a (diff)
downloadorg.eclipse.cdt-8352714872db5fa7c1e5ac69b56cdac6fb1f37be.tar.gz
org.eclipse.cdt-8352714872db5fa7c1e5ac69b56cdac6fb1f37be.tar.xz
org.eclipse.cdt-8352714872db5fa7c1e5ac69b56cdac6fb1f37be.zip
Fix problems importing an executable into an existing project and having it recognized as a binary.
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/AbstractImportExecutableWizard.java19
1 files changed, 6 insertions, 13 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/AbstractImportExecutableWizard.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/AbstractImportExecutableWizard.java
index 5e7b2505bba..e87d4a111bf 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/AbstractImportExecutableWizard.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/AbstractImportExecutableWizard.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 Nokia and others.
+ * Copyright (c) 2007 Nokia and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -108,18 +108,17 @@ public abstract class AbstractImportExecutableWizard extends Wizard implements I
* project receiving the executables
* @throws CoreException
*/
- private void addExecutables(IProject project) throws CoreException {
+ private void addExecutables(ICProject project) throws CoreException {
String[] executables = pageOne.getSelectedExecutables();
for (int i = 0; i < executables.length; i++) {
IPath location = Path.fromOSString(executables[i]);
String executableName = location.toFile().getName();
- IFile exeFile = project.getFile(executableName);
+ IFile exeFile = project.getProject().getFile(executableName);
if (!exeFile.exists())
exeFile.createLink(location, 0, null);
}
-
}
public void addPages() {
@@ -203,22 +202,16 @@ public abstract class AbstractImportExecutableWizard extends Wizard implements I
ICProject targetProject = null;
try {
if (pageTwo.isCreateNewProjectSelected()) {
- // Create a new project and add the executables and binary
- // parsers.
IProject newProject = createCProjectForExecutable(pageTwo
.getNewProjectName());
setupProject(newProject);
- addExecutables(newProject);
- addBinaryParsers(newProject);
targetProject = CCorePlugin.getDefault().getCoreModel().create(
newProject);
} else {
- // Assume the existing project already has binary parsers setup,
- // just add the executables.
- ICProject existingProject = pageTwo.getExistingCProject();
- addExecutables(existingProject.getProject());
- targetProject = existingProject;
+ targetProject = pageTwo.getExistingCProject();
}
+ addBinaryParsers(targetProject.getProject());
+ addExecutables(targetProject);
if (pageTwo.isCreateLaunchConfigurationSelected()) {
createLaunchConfiguration(targetProject);
}

Back to the top