From 587c7cb6cc94b56a537e8cf4432a4b1ad9ffdffc Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Thu, 21 Aug 2008 14:02:54 +0000 Subject: [PATCH] Bug 244567 makes the project optional. The bug I was attributing to the platform, was, as Pawel kindly pointed out, was actually part of our CMainTab class. I have fixed this. --- .../eclipse/dd/gdb/internal/ui/launching/CMainTab.java | 9 ++++++--- .../provisional/launching/GdbLaunchDelegate.java | 6 ++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/org.eclipse.dd.gdb.ui/src/org/eclipse/dd/gdb/internal/ui/launching/CMainTab.java b/plugins/org.eclipse.dd.gdb.ui/src/org/eclipse/dd/gdb/internal/ui/launching/CMainTab.java index 2e434cb49ee..1bc8cbf7c8d 100644 --- a/plugins/org.eclipse.dd.gdb.ui/src/org/eclipse/dd/gdb/internal/ui/launching/CMainTab.java +++ b/plugins/org.eclipse.dd.gdb.ui/src/org/eclipse/dd/gdb/internal/ui/launching/CMainTab.java @@ -305,7 +305,10 @@ public class CMainTab extends CLaunchConfigurationTab { } } } catch (CoreException e) { e.printStackTrace(); } + } else { + config.setMappedResources(null); } + config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, fProjText.getText()); config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, fProgText.getText()); if (fTerminalButton != null) { @@ -527,6 +530,9 @@ public class CMainTab extends CLaunchConfigurationTab { setErrorMessage(null); setMessage(null); + if (dontCheckProgram) + return true; + String name = fProjText.getText().trim(); if (name.length() == 0) { setErrorMessage(LaunchMessages.getString("CMainTab.Project_not_specified")); //$NON-NLS-1$ @@ -542,9 +548,6 @@ public class CMainTab extends CLaunchConfigurationTab { return false; } - if (dontCheckProgram) - return true; - name = fProgText.getText().trim(); if (name.length() == 0) { setErrorMessage(LaunchMessages.getString("CMainTab.Program_not_specified")); //$NON-NLS-1$ diff --git a/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/GdbLaunchDelegate.java b/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/GdbLaunchDelegate.java index 77fd42a03ee..a8ddfe3e78e 100644 --- a/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/GdbLaunchDelegate.java +++ b/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/GdbLaunchDelegate.java @@ -112,12 +112,10 @@ public class GdbLaunchDelegate extends LaunchConfigurationDelegate // An attach session also does not need to necessarily have a project // specified. This is because we can perform source lookup towards // code that is outside the workspace. - // However, the Platform does not support this, so for now, we check // See bug 244567 - - // First verify we are dealing with a proper project. - ICProject project = LaunchUtils.verifyCProject(config); if (!attach) { + // First verify we are dealing with a proper project. + ICProject project = LaunchUtils.verifyCProject(config); // Now verify we know the program to debug. exePath = LaunchUtils.verifyProgramPath(config, project); // Finally, make sure the program is a proper binary.