Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourceLookupDirector.java13
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourcePathComputerDelegate.java41
2 files changed, 9 insertions, 45 deletions
diff --git a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourceLookupDirector.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourceLookupDirector.java
index d0ff20234..cf654e77a 100644
--- a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourceLookupDirector.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourceLookupDirector.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2014 Wind River Systems, Inc. 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
@@ -43,16 +43,9 @@ public class TCFSourceLookupDirector extends AbstractSourceLookupDirector {
private static Set<String> fSupportedContainerTypes;
static {
fSupportedContainerTypes = new HashSet<String>();
- fSupportedContainerTypes.add("org.eclipse.cdt.debug.core.containerType.absolutePath");
- fSupportedContainerTypes.add("org.eclipse.cdt.debug.core.containerType.absolutePath");
- fSupportedContainerTypes.add("org.eclipse.cdt.debug.core.containerType.programRelativePath");
+ // Bug 440538:
+ // Only CDT path mapping source containers are currently supported
fSupportedContainerTypes.add("org.eclipse.cdt.debug.core.containerType.mapping");
- fSupportedContainerTypes.add("org.eclipse.cdt.debug.core.containerType.compilationDirectory");
- fSupportedContainerTypes.add("org.eclipse.cdt.debug.core.containerType.project");
- fSupportedContainerTypes.add("org.eclipse.cdt.debug.core.containerType.sourceFoldersRelativePath");
- fSupportedContainerTypes.add("org.eclipse.debug.core.containerType.folder");
- fSupportedContainerTypes.add("org.eclipse.debug.core.containerType.workspace");
- fSupportedContainerTypes.add("org.eclipse.debug.core.containerType.directory");
};
public static Object lookup(final TCFLaunch launch, final String ctx, Object element) {
diff --git a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourcePathComputerDelegate.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourcePathComputerDelegate.java
index 49de27459..1d7a8a265 100644
--- a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourcePathComputerDelegate.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourcePathComputerDelegate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2014 Wind River Systems, Inc. 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
@@ -10,52 +10,23 @@
*******************************************************************************/
package org.eclipse.tcf.internal.debug.launch;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.HashSet;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.filesystem.URIUtil;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.sourcelookup.ISourceContainer;
import org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate;
-import org.eclipse.debug.core.sourcelookup.containers.ProjectSourceContainer;
-import org.eclipse.debug.core.sourcelookup.containers.WorkspaceSourceContainer;
/**
- * Computes the default source lookup path for a TCF launch configuration. The
- * default source lookup path is the project containing the TCF
- * program being launched. If the program is not specified, the workspace is
- * searched by default.
+ * Computes the default source lookup path for a TCF launch configuration.
*/
public class TCFSourcePathComputerDelegate implements ISourcePathComputerDelegate {
public ISourceContainer[] computeSourceContainers(
ILaunchConfiguration configuration, IProgressMonitor monitor)
throws CoreException {
- ArrayList<ISourceContainer> res = new ArrayList<ISourceContainer>();
- String project_name = configuration.getAttribute(TCFLaunchDelegate.ATTR_PROJECT_NAME, (String)null);
- String program_name = configuration.getAttribute(TCFLaunchDelegate.ATTR_LOCAL_PROGRAM_FILE, (String)null);
- String path = TCFLaunchDelegate.getProgramPath(project_name, program_name);
- if (path != null) {
- URI uri = URIUtil.toURI(new Path(path));
- IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(uri);
- if (files != null && files.length > 0) {
- HashSet<IProject> projects = new HashSet<IProject>();
- for (IFile file : files) projects.add(file.getProject());
- for (IProject project : projects) res.add(new ProjectSourceContainer(project, true));
- }
- }
- if (res.size() == 0 && project_name != null && project_name.length() > 0) {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(project_name);
- if (project != null) res.add(new ProjectSourceContainer(project, true));
- }
- if (res.size() == 0) res.add(new WorkspaceSourceContainer());
- return res.toArray(new ISourceContainer[res.size()]);
+ // Bug 440538:
+ // Eclipse platform source lookup containers don't work well with TCF
+ // therefore we don't provide default source containers.
+ return new ISourceContainer[0];
}
}

Back to the top