Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2008-10-14 19:26:15 +0000
committereutarass2008-10-14 19:26:15 +0000
commit13094e5566b7bc82d1520a48e28175a11ba50b18 (patch)
treed009ff54b867bea3ecc2d8df2749034822f0ee5c /plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch
parent1b5dc1cd2af4273efbfe9007c81010698f2c1c74 (diff)
downloadorg.eclipse.tcf-13094e5566b7bc82d1520a48e28175a11ba50b18.tar.gz
org.eclipse.tcf-13094e5566b7bc82d1520a48e28175a11ba50b18.tar.xz
org.eclipse.tcf-13094e5566b7bc82d1520a48e28175a11ba50b18.zip
TCF debugger launch configuration: allow to run local exe file without specifying a project name
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch')
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFMainTab.java19
1 files changed, 17 insertions, 2 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFMainTab.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFMainTab.java
index 8642356bb..fb5271a7d 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFMainTab.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFMainTab.java
@@ -414,11 +414,26 @@ public class TCFMainTab extends AbstractLaunchConfigurationTab {
IProject project = getProject();
IPath program_path = new Path(local_name);
if (!program_path.isAbsolute()) {
- if (project == null || !project.getFile(local_name).exists()) {
+ if (project == null) {
+ File ws = ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile();
+ File file = new File(ws, local_name);
+ if (!file.exists()) {
+ setErrorMessage("File not found: " + file);
+ return false;
+ }
+ if (file.isDirectory()) {
+ setErrorMessage("Program path is directory name: " + file);
+ return false;
+ }
+ program_path = new Path(file.getAbsolutePath());
+ }
+ else if (!project.getFile(local_name).exists()) {
setErrorMessage("Program does not exist");
return false;
}
- program_path = project.getFile(local_name).getLocation();
+ else {
+ program_path = project.getFile(local_name).getLocation();
+ }
}
else {
File file = program_path.toFile();

Back to the top