summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorScott Tepavich2012-10-01 09:32:36 (EDT)
committer Pawel Piech2012-11-27 12:32:23 (EST)
commitccaf8ed54e94a9a1de8a486e85af17bb67f7b46a (patch)
tree816385ae0f5171dc7b42743d65332df19e090b23
parent5993ca26e7f3cca6edfa5901b54a4cd9714000ef (diff)
downloadorg.eclipse.tcf-ccaf8ed54e94a9a1de8a486e85af17bb67f7b46a.zip
org.eclipse.tcf-ccaf8ed54e94a9a1de8a486e85af17bb67f7b46a.tar.gz
org.eclipse.tcf-ccaf8ed54e94a9a1de8a486e85af17bb67f7b46a.tar.bz2
Bug [390822] Add filtered list of container types.
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFSourceLookupDirector.java26
1 files changed, 26 insertions, 0 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 b9e35df..d0ff202 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
@@ -12,7 +12,9 @@ package org.eclipse.tcf.internal.debug.launch;
import java.io.File;
import java.net.URI;
+import java.util.HashSet;
import java.util.Map;
+import java.util.Set;
import org.eclipse.core.filesystem.URIUtil;
import org.eclipse.core.resources.IFile;
@@ -22,6 +24,7 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.debug.core.model.ISourceLocator;
import org.eclipse.debug.core.model.IStackFrame;
import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector;
+import org.eclipse.debug.core.sourcelookup.ISourceContainerType;
import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
import org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant;
import org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage;
@@ -37,6 +40,21 @@ import org.eclipse.tcf.util.TCFTask;
*/
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");
+ 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) {
if (element instanceof ILineNumbers.CodeArea) {
element = TCFSourceLookupParticipant.toFileName((ILineNumbers.CodeArea)element);
@@ -120,4 +138,12 @@ public class TCFSourceLookupDirector extends AbstractSourceLookupDirector {
public void initializeParticipants() {
addParticipants(new ISourceLookupParticipant[] { new TCFSourceLookupParticipant() });
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.sourcelookup.ISourceLookupDirector#supportsSourceContainerType(org.eclipse.debug.core.sourcelookup.ISourceContainerType)
+ */
+ @Override
+ public boolean supportsSourceContainerType(ISourceContainerType type) {
+ return fSupportedContainerTypes.contains(type.getId());
+ }
}