Added more Wikipedia configurations
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.wiki / src / net / sourceforge / phpeclipse / wiki / ui / internal / ConfigurationDialog.java
index 363c427..6fd92a4 100644 (file)
@@ -4,15 +4,16 @@
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
-  *
+ �*
  * Contributors:
  *    IBM - Initial API and implementation
  **********************************************************************/
 package net.sourceforge.phpeclipse.wiki.ui.internal;
 
+import java.util.ArrayList;
+
 import net.sourceforge.phpeclipse.wiki.editor.WikiEditorPlugin;
 import net.sourceforge.phpeclipse.wiki.internal.IConfigurationWorkingCopy;
-import net.sourceforge.phpeclipse.wiki.preferences.Messages;
 
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
@@ -122,14 +123,14 @@ public class ConfigurationDialog extends Dialog {
     return text;
   }
 
-  protected Combo createTypeCombo(Composite comp, final String[] types, String sel, final TypeModifyListener listener) {
+  protected Combo createTypeCombo(Composite comp, final ArrayList types, String sel, final TypeModifyListener listener) {
     final Combo combo = new Combo(comp, SWT.DROP_DOWN | SWT.READ_ONLY);
-    int size = types.length;
+    int size = types.size();
     String[] items = new String[size];
     int index = -1;
     for (int i = 0; i < size; i++) {
-      items[i] = types[i];
-      if (types[i].equals(sel))
+      items[i] = (String)types.get(i);
+      if (items[i].equals(sel))
         index = i;
     }
     combo.setItems(items);
@@ -141,7 +142,7 @@ public class ConfigurationDialog extends Dialog {
     if (listener != null)
       combo.addSelectionListener(new SelectionListener() {
         public void widgetSelected(SelectionEvent e) {
-          listener.valueChanged(types[combo.getSelectionIndex()]);
+          listener.valueChanged((String)types.get(combo.getSelectionIndex()));
         }
 
         public void widgetDefaultSelected(SelectionEvent e) {