Importing the XDebugProxy code in the HEAD. The repo was tagged with T_BEFORE_XDEBUGP...
[phpeclipse.git] / net.sourceforge.phpeclipse.xdebug.core / src / net / sourceforge / phpeclipse / xdebug / php / launching / PHPSourceLookupDirector.java
index b570c4b..7c1ffaa 100644 (file)
@@ -1,12 +1,25 @@
 package net.sourceforge.phpeclipse.xdebug.php.launching;
 
+
+import java.util.List;
 import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector;
 import org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant;
 
 public class PHPSourceLookupDirector extends AbstractSourceLookupDirector {
 
        public void initializeParticipants() {
-               addParticipants(new ISourceLookupParticipant[] { new PHPSourceLookupParticipant() });
+               setFindDuplicates(true);
+               addParticipants(new ISourceLookupParticipant[] {new PHPSourceLookupParticipant()});
        }
-
-}
+       
+       public Object getSourceElement(Object element) {
+               List sources = doSourceLookup(element);
+               if(sources.size() == 1) {
+                       return sources.get(0);
+               } else if(sources.size() > 1) {
+                       return resolveSourceElement(element, sources);
+               } else { 
+                       return null;
+               }
+       }
+}
\ No newline at end of file