Changes for 3.x
authorcperkonig <cperkonig>
Sun, 28 Mar 2004 08:36:35 +0000 (08:36 +0000)
committercperkonig <cperkonig>
Sun, 28 Mar 2004 08:36:35 +0000 (08:36 +0000)
net.sourceforge.phpeclipse.debug.ui/src/net/sourceforge/phpdt/internal/debug/ui/launcher/PHPEnvironmentTab.java

index 92162b0..754118d 100644 (file)
@@ -14,9 +14,10 @@ import net.sourceforge.phpdt.internal.launching.PHPInterpreter;
 import net.sourceforge.phpdt.internal.launching.PHPLaunchConfigurationAttribute;
 import net.sourceforge.phpdt.internal.launching.PHPRuntime;
 import net.sourceforge.phpdt.internal.ui.PHPUiImages;
+import net.sourceforge.phpdt.core.JavaCore;
 import net.sourceforge.phpeclipse.LoadPathEntry;
-import net.sourceforge.phpeclipse.PHPCore;
 import net.sourceforge.phpeclipse.resourcesview.PHPProject;
+import net.sourceforge.phpeclipse.PHPeclipsePlugin;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
@@ -26,6 +27,7 @@ import org.eclipse.jface.viewers.ListViewer;
 import org.eclipse.jface.viewers.TableLayout;
 import org.eclipse.jface.viewers.ColumnWeightData;
 import org.eclipse.swt.SWT;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
@@ -495,9 +497,11 @@ public class PHPEnvironmentTab extends AbstractLaunchConfigurationTab {
                        if (useDefaultLoadPath) {
                                String projectName = configuration.getAttribute(PHPLaunchConfigurationAttribute.PROJECT_NAME, "");
                                if (projectName != "") {
-                                       PHPProject project = PHPCore.getPHPProject(projectName);
-                                       if (project != null) {
-                                               List loadPathEntries = project.getLoadPathEntries();
+                                   IProject aProject = PHPeclipsePlugin.getWorkspace().getRoot().getProject(projectName);
+                                       if ((aProject != null) && JavaCore.isPHPProject(aProject)) {
+                                             PHPProject thePHPProject = new PHPProject();
+                                             thePHPProject.setProject(aProject);                                               
+                                               List loadPathEntries = thePHPProject.getLoadPathEntries();
                                                loadPathListViewer.setInput(loadPathEntries);
                                        }
                                }