Using standard dialog org.eclipse.ui.dialogs.ElementListSelectionDialog instead of...
authortoshihiro <toshihiro>
Wed, 9 May 2007 10:03:11 +0000 (10:03 +0000)
committertoshihiro <toshihiro>
Wed, 9 May 2007 10:03:11 +0000 (10:03 +0000)
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPFileSelector.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPProjectSelector.java

index f8b6429..9404adb 100644 (file)
@@ -1,6 +1,5 @@
 package net.sourceforge.phpdt.internal.ui.util;
 
-import net.sourceforge.phpdt.internal.ui.dialogs.ElementListSelectionDialog;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
 
 import org.eclipse.core.resources.IFile;
@@ -13,6 +12,7 @@ import org.eclipse.core.runtime.Path;
 import org.eclipse.jface.util.Assert;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.dialogs.ElementListSelectionDialog;
 import org.eclipse.ui.model.IWorkbenchAdapter;
 
 public class PHPFileSelector extends ResourceSelector {
@@ -97,7 +97,6 @@ public class PHPFileSelector extends ResourceSelector {
                dialog.setTitle(browseDialogTitle);
                dialog.setMessage(browseDialogMessage);
                dialog.setElements(getPHPFiles());
-               dialog.setInitialElementSelections(null);
 
                if (dialog.open() == ElementListSelectionDialog.OK) {
                        textField.setText(((IResource) dialog.getFirstResult())
index 75c22eb..b33471e 100644 (file)
@@ -1,11 +1,11 @@
 package net.sourceforge.phpdt.internal.ui.util;
 
 import net.sourceforge.phpdt.core.JavaCore;
-import net.sourceforge.phpdt.internal.ui.dialogs.ElementListSelectionDialog;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.dialogs.ElementListSelectionDialog;
 import org.eclipse.ui.model.WorkbenchLabelProvider;
 
 public class PHPProjectSelector extends ResourceSelector {
@@ -31,7 +31,6 @@ public class PHPProjectSelector extends ResourceSelector {
                dialog.setTitle(browseDialogTitle);
                dialog.setMessage(browseDialogMessage);
                dialog.setElements(JavaCore.getPHPProjects());
-               dialog.setInitialElementSelections(null);
 
                if (dialog.open() == ElementListSelectionDialog.OK) {
                        textField.setText(((IProject) dialog.getFirstResult()).getName());