* 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;
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);
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) {