@@ -0,0 +1,1545 @@
+/*******************************************************************************%0D%0A * Copyright (c) 2011 Bolton University, UK.%0D%0A * All rights reserved. This program and the accompanying materials%0D%0A * are made available under the terms of the License%0D%0A * which accompanies this distribution in the file LICENSE.txt%0D%0A *******************************************************************************/%0D%0Apackage uk.ac.bolton.archimate.editor.ui;%0D%0A%0D%0Aimport org.eclipse.core.runtime.Assert;%0D%0Aimport org.eclipse.jface.viewers.ComboBoxCellEditor;%0D%0Aimport org.eclipse.swt.custom.CCombo;%0D%0Aimport org.eclipse.swt.widgets.Composite;%0D%0A%0D%0A%0D%0A/**%0D%0A * String ComboBox CellEditor%0D%0A * Uses Strings as input rather than Integer index%0D%0A * %0D%0A * @author Phillip Beauvoir%0D%0A */%0D%0Apublic class StringComboBoxCellEditor extends ComboBoxCellEditor %7B%0D%0A%0D%0A    public StringComboBoxCellEditor(Composite parent, String%5B%5D items, boolean editable) %7B%0D%0A        super(parent, items);%0D%0A        setEditable(editable);%0D%0A        ((CCombo)getControl()).setVisibleItemCount(12);%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    protected Object doGetValue() %7B%0D%0A        CCombo combobox = (CCombo)getControl();%0D%0A        return combobox.getText();%0D%0A    %7D%0D%0A    %0D%0A    @Override%0D%0A    protected void doSetValue(Object value) %7B%0D%0A        CCombo combobox = (CCombo)getControl();%0D%0A        Assert.isTrue(value instanceof String);%0D%0A        combobox.setText((String)value);%0D%0A    %7D%0D%0A    %0D%0A    public void setEditable(boolean val) %7B%0D%0A        CCombo combobox = (CCombo)getControl();%0D%0A        combobox.setEditable(val);%0D%0A    %7D%0D%0A%7D%0D%0A

Add StringComboBoxCellEditor