/*******************************************************************************
* Copyright (c) 2012 Google, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Google, Inc. - initial API and implementation
*******************************************************************************/
package com.windowtester.swt.codegen.wizards;
import org.eclipse.swt.widgets.Combo;
/**
* Combo helper.
*/
public class ComboHelper {
public static void addIfNotPresent(String item, Combo combo) {
String[] items = combo.getItems();
for (int i = 0; i < items.length; i++) {
if (items[i].equals(item))
return;
}
combo.add(item);
}
}