--- /dev/null
+package net.sourceforge.phpeclipse.wiki.actions.httpquery;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import net.sourceforge.phpeclipse.wiki.editor.WikiEditorPlugin;
+import net.sourceforge.phpeclipse.wiki.internal.ConfigurationManager;
+import net.sourceforge.phpeclipse.wiki.internal.IConfiguration;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.ui.dialogs.ListSelectionDialog;
+import org.eclipse.ui.internal.dialogs.ListContentProvider;
+
+public class HTTPQueryAction extends AbstractHTTPQueryAction {
+
+ public HTTPQueryAction() {
+ super();
+ }
+
+ protected String getUrl(String selection) {
+ String selectedURL = null;
+
+ List allConfigsList = ConfigurationManager.getInstance().getConfigurations();
+ ArrayList configsList = new ArrayList();
+ for (int i=0;i<allConfigsList.size();i++) {
+ IConfiguration temp = (IConfiguration)allConfigsList.get(i);
+ if (temp.getType().equals(WikiEditorPlugin.HTTP_QUERY)) {
+ configsList.add(temp);
+ }
+ }
+ Collections.sort(configsList);
+
+ ListSelectionDialog listSelectionDialog = new ListSelectionDialog(WikiEditorPlugin.getDefault().getWorkbench()
+ .getActiveWorkbenchWindow().getShell(), configsList, new ListContentProvider(), new LabelProvider(),
+ "Select URL");
+ listSelectionDialog.setTitle("Multiple configuration found");
+ if (listSelectionDialog.open() == Window.OK) {
+ Object[] configurations = listSelectionDialog.getResult();
+ if (configurations != null) {
+ for (int i = 0; i < configurations.length; i++) {
+ selectedURL = ((IConfiguration) configurations[i]).getURL();
+ break;
+ }
+ }
+ }
+ return selectedURL;
+ }
+
+}
\ No newline at end of file