Revision a8397603
Added by Patrick Plitzner almost 5 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrixToolbar.java | ||
---|---|---|
14 | 14 |
import java.util.Properties; |
15 | 15 |
import java.util.function.Consumer; |
16 | 16 |
|
17 |
import org.apache.commons.lang.StringUtils; |
|
17 | 18 |
import org.eclipse.jface.viewers.ArrayContentProvider; |
18 | 19 |
import org.eclipse.jface.viewers.ComboViewer; |
19 | 20 |
import org.eclipse.jface.viewers.LabelProvider; |
... | ... | |
181 | 182 |
|
182 | 183 |
// create a combobox for showing the available view states |
183 | 184 |
Collection<String> availableStates = PersistenceHelper.getAvailableStates(natTableState); |
185 |
if(availableStates.isEmpty()){ |
|
186 |
natTableState.put(StringUtils.EMPTY, StringUtils.EMPTY); // add default config if no states are persisted |
|
187 |
natTableState.setProperty(PersistenceDialog.ACTIVE_VIEW_CONFIGURATION_KEY, StringUtils.EMPTY); |
|
188 |
availableStates.add(StringUtils.EMPTY); |
|
189 |
} |
|
184 | 190 |
comboStates.setLabelProvider(new LabelProvider(){ |
185 | 191 |
@Override |
186 | 192 |
public String getText(Object element) { |
Also available in: Unified diff
ref #8335 Add default state to table states