From f2349deb48a9a55ae782c0c4e5fea31200606cea Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Tue, 13 Nov 2018 09:46:04 +0100 Subject: Minor cleanup in AbstractPickList Removes commented code Fixes a few sonar issues Change-Id: Ieb82a66656ae464c033a03b8e35751413ef6a391 Signed-off-by: Lars Vogel --- .../emf/ui/internal/common/AbstractPickList.java | 27 +++------------------- 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/AbstractPickList.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/AbstractPickList.java index cf6b2c08..894e012f 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/AbstractPickList.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/AbstractPickList.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2014, 2017 TwelveTone LLC and others. + * Copyright (c) 2014, 2018 TwelveTone LLC and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -46,12 +46,10 @@ import org.eclipse.swt.widgets.Table; * selectable items, and action buttons for modifying the list. *

* - * @author Steven Spungin - * */ public abstract class AbstractPickList extends Composite { - public static enum PickListFeatures { + public enum PickListFeatures { NO_ORDER, NO_PICKER, NO_GROUP } @@ -65,7 +63,6 @@ public abstract class AbstractPickList extends Composite { protected final Button tiRemove; protected final Button tiUp; protected final Button tiDown; - // private final AutoCompleteField autoCompleteField; @Deprecated public AbstractPickList(Composite parent, int style, List listFeatures, Messages messages, @@ -117,21 +114,6 @@ public abstract class AbstractPickList extends Composite { gdpicker.grabExcessHorizontalSpace = true; control.setLayoutData(gdpicker); - // ComboContentAdapter controlContentAdapter = new ComboContentAdapter() - // { - // @Override - // public void setControlContents(Control control, String text1, int - // cursorPosition) { - // super.setControlContents(control, text1, cursorPosition); - // Object valueInModel = proposals.get(text1); - // if (valueInModel != null) { - // getPicker().setSelection(new StructuredSelection(valueInModel)); - // } - // } - // }; - // autoCompleteField = new AutoCompleteField(control, - // controlContentAdapter, new String[0]); - toolBar = new Composite(comp, SWT.NONE); layout = new GridLayout(5, true); if (listFeatures != null && listFeatures.contains(PickListFeatures.NO_PICKER)) { @@ -238,7 +220,7 @@ public abstract class AbstractPickList extends Composite { protected void addPressed() { } - abstract protected int getItemCount(); + protected abstract int getItemCount(); public TableViewer getList() { return viewer; @@ -247,9 +229,6 @@ public abstract class AbstractPickList extends Composite { public void setInput(Object input) { getPicker().setInput(input); - // proposals = toProposals(input); - // final Set keySet = proposals.keySet(); - // autoCompleteField.setProposals(keySet.toArray(new String[keySet.size()])); } public IStructuredSelection getSelection() { -- cgit v1.2.3