| Index: plugins/org.chromium.debug.core/src/org/chromium/debug/core/SourceNameMapperContainer.java
|
| diff --git a/plugins/org.chromium.debug.core/src/org/chromium/debug/core/SourceNameMapperContainer.java b/plugins/org.chromium.debug.core/src/org/chromium/debug/core/SourceNameMapperContainer.java
|
| index 5f38b2f844676945d28ce9478f88d2448d908bd7..8ee91723cb948fa09b95b59f48a97613b04c017e 100644
|
| --- a/plugins/org.chromium.debug.core/src/org/chromium/debug/core/SourceNameMapperContainer.java
|
| +++ b/plugins/org.chromium.debug.core/src/org/chromium/debug/core/SourceNameMapperContainer.java
|
| @@ -1,5 +1,7 @@
|
| package org.chromium.debug.core;
|
|
|
| +import org.chromium.debug.core.ReverseSourceLookup.ContainerWrapper;
|
| +import org.eclipse.core.resources.IFile;
|
| import org.eclipse.core.runtime.CoreException;
|
| import org.eclipse.core.runtime.IStatus;
|
| import org.eclipse.core.runtime.Status;
|
| @@ -18,7 +20,7 @@ import org.eclipse.osgi.util.NLS;
|
| * Currently container supports only prefix-based translation: if source name starts with a prefix,
|
| * the prefix is truncated; otherwise the source name is discarded.
|
| */
|
| -public class SourceNameMapperContainer implements ISourceContainer {
|
| +public class SourceNameMapperContainer implements ReverseLookupContainer {
|
|
|
| private static final String TYPE_ID =
|
| "org.chromium.debug.core.SourceNameMapperContainer.type"; //$NON-NLS-1$
|
| @@ -74,6 +76,25 @@ public class SourceNameMapperContainer implements ISourceContainer {
|
| return true;
|
| }
|
|
|
| + @Override
|
| + public ContainerWrapper getReveseLookupImpl() {
|
| + final ContainerWrapper targetContainerWrapper =
|
| + ReverseSourceLookup.wrapSourceContainer(getTargetContainer());
|
| + if (targetContainerWrapper == null) {
|
| + return null;
|
| + }
|
| + return new ContainerWrapper() {
|
| + @Override
|
| + public String lookup(IFile resource) {
|
| + String subResult = targetContainerWrapper.lookup(resource);
|
| + if (subResult == null) {
|
| + return null;
|
| + }
|
| + return prefix + subResult;
|
| + }
|
| + };
|
| + }
|
| +
|
| private String getMemento() throws CoreException {
|
| StringBuilder builder = new StringBuilder();
|
| MementoFormat.encodeComponent(prefix, builder);
|
|
|