Compatibility fragment commit
[phpeclipse.git] / net.sourceforge.phpeclipse.32.compatibility / src / net / sourceforge / phpeclipse / xdebug / php / launching / PHPSourceLookupParticipant.java
diff --git a/net.sourceforge.phpeclipse.32.compatibility/src/net/sourceforge/phpeclipse/xdebug/php/launching/PHPSourceLookupParticipant.java b/net.sourceforge.phpeclipse.32.compatibility/src/net/sourceforge/phpeclipse/xdebug/php/launching/PHPSourceLookupParticipant.java
new file mode 100644 (file)
index 0000000..59cdae3
--- /dev/null
@@ -0,0 +1,17 @@
+package net.sourceforge.phpeclipse.xdebug.php.launching;
+
+import net.sourceforge.phpeclipse.xdebug.php.model.XDebugStackFrame;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupParticipant;
+
+public class PHPSourceLookupParticipant extends AbstractSourceLookupParticipant {
+
+       public String getSourceName(Object object) throws CoreException {
+               if (object instanceof XDebugStackFrame) {
+                       return ((XDebugStackFrame) object).getSourceName();
+               }
+               return null;
+       }
+
+}