public EnumValue getMaximumValue() { return getValueByIndex(fItems.size() - 1); } }
public EnumValue getMaximumValue() { return getValueByIndex(fItems.size() - 1); } }
public IStatus validate(Object value) { StatusInfo status= new StatusInfo(); if (value instanceof String && ((String)value).length() == 0) { status.setError(TextEditorMessages.TextEditorPreferencePage_emptyInput); return status; } try { EnumValue e= parseEnumValue(value); if (!fValueSet.contains(e)) status.setError(NLSUtility.format(TextEditorMessages.TextEditorPreferencePage_invalidRange, new String[] {getValueByIndex(0).getLabel(), getValueByIndex(fItems.size() - 1).getLabel()})); } catch (NumberFormatException e) { status.setError(NLSUtility.format(TextEditorMessages.TextEditorPreferencePage_invalidInput, String.valueOf(value))); } return status; }
@Override public IStatus validate(Object value) { StatusInfo status= new StatusInfo(); if (value instanceof String && ((String)value).length() == 0) { status.setError(TextEditorMessages.TextEditorPreferencePage_emptyInput); return status; } try { EnumValue e= parseEnumValue(value); if (!fValueSet.contains(e)) status.setError(NLSUtility.format(TextEditorMessages.TextEditorPreferencePage_invalidRange, new String[] {getValueByIndex(0).getLabel(), getValueByIndex(fItems.size() - 1).getLabel()})); } catch (NumberFormatException e) { status.setError(NLSUtility.format(TextEditorMessages.TextEditorPreferencePage_invalidInput, String.valueOf(value))); } return status; }
public EnumValue getMinimumValue() { return getValueByIndex(0); }
public EnumValue getMinimumValue() { return getValueByIndex(0); }
@Override public void widgetSelected(SelectionEvent e) { int index= combo.getSelectionIndex(); EnumValue value= domain.getValueByIndex(index); IStatus status= domain.validate(value); if (!status.matches(IStatus.ERROR)) fOverlayStore.setValue(preference.getKey(), value.getIntValue()); updateStatus(status); } });
public void widgetSelected(SelectionEvent e) { int index= combo.getSelectionIndex(); EnumValue value= domain.getValueByIndex(index); IStatus status= domain.validate(value); if (!status.matches(IStatus.ERROR)) fOverlayStore.setValue(preference.getKey(), value.getIntValue()); updateStatus(status); } });