/** * Returns the resource locator for {@link #getString(String, Object[]) fetching} model-specific messages. * This implementation returns the {@link #getEcoreResourceLocator() Ecore resource locator}; * derived validators <b>must</b> override this to return the resource locator for their model. * @return the resource locator for fetching model-specific messages. * @since 2.4 */ protected ResourceLocator getResourceLocator() { return getEcoreResourceLocator(); }
/** * Returns the resource locator for {@link #getString(String, Object[]) fetching} model-specific messages. * This implementation returns the {@link #getEcoreResourceLocator() Ecore resource locator}; * derived validators <b>must</b> override this to return the resource locator for their model. * @return the resource locator for fetching model-specific messages. * @since 2.4 */ protected ResourceLocator getResourceLocator() { return getEcoreResourceLocator(); }
/** * Returns a translated message with the given substitutions. * The {@link #getEcoreResourceLocator() Ecore resource locator} is used. * @param key the key for the message. * @param substitutions the substitutions for the key; <code>null</code> if there are no substitutions. * @return the message. * @since 2.4 */ protected String getEcoreString(String key, Object [] substitutions) { return getString(getEcoreResourceLocator(), key, substitutions); }
/** * Returns a translated message with the given substitutions. * The {@link #getEcoreResourceLocator() Ecore resource locator} is used. * @param key the key for the message. * @param substitutions the substitutions for the key; <code>null</code> if there are no substitutions. * @return the message. * @since 2.4 */ protected String getEcoreString(String key, Object [] substitutions) { return getString(getEcoreResourceLocator(), key, substitutions); }
/** * Returns a translated message with the given substitutions. * The {@link #getResourceLocator() resource locator} is used. * @param key the key for the message. * @param substitutions the substitutions for the key; <code>null</code> if there are no substitutions. * @return the message. * @since 2.4 */ protected String getString(String key, Object [] substitutions) { return getString(isEcoreString(key) ? getEcoreResourceLocator() : getResourceLocator(), key, substitutions); }
/** * Returns a translated message with the given substitutions. * The {@link #getResourceLocator() resource locator} is used. * @param key the key for the message. * @param substitutions the substitutions for the key; <code>null</code> if there are no substitutions. * @return the message. * @since 2.4 */ protected String getString(String key, Object [] substitutions) { return getString(isEcoreString(key) ? getEcoreResourceLocator() : getResourceLocator(), key, substitutions); }
getEcoreResourceLocator().getString("_UI_ListHead_composition", new Object [] { getValueLabel(eDataType, i.next(), context) }); while (i.hasNext()) getEcoreResourceLocator().getString ("_UI_ListTail_composition", new Object [] { valueLiterals, getValueLabel(eDataType, i.next(), context) });
getEcoreResourceLocator().getString("_UI_ListHead_composition", new Object [] { getValueLabel(eDataType, i.next(), context) }); while (i.hasNext()) getEcoreResourceLocator().getString ("_UI_ListTail_composition", new Object [] { valueLiterals, getValueLabel(eDataType, i.next(), context) });
protected void reportDataValuePatternViolation (EDataType eDataType, Object value, PatternMatcher [] patterns, DiagnosticChain diagnostics, Map<Object, Object> context) { String patternLiterals = ""; if (patterns.length > 0) { patternLiterals = getEcoreResourceLocator().getString("_UI_ListHead_composition", new Object [] { patterns[0] }); for (int i = 1; i < patterns.length; ++i) { patternLiterals = getEcoreResourceLocator().getString("_UI_ListTail_composition", new Object [] { patternLiterals, patterns[i] }); } } diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, DATA_VALUE__MATCHES_PATTERN, "_UI_PatternConstraint_diagnostic", new Object [] { getValueLabel(eDataType, value, context), patternLiterals }, new Object [] { value, eDataType, patterns }, context)); }
protected void reportDataValuePatternViolation (EDataType eDataType, Object value, PatternMatcher [] patterns, DiagnosticChain diagnostics, Map<Object, Object> context) { String patternLiterals = ""; if (patterns.length > 0) { patternLiterals = getEcoreResourceLocator().getString("_UI_ListHead_composition", new Object [] { patterns[0] }); for (int i = 1; i < patterns.length; ++i) { patternLiterals = getEcoreResourceLocator().getString("_UI_ListTail_composition", new Object [] { patternLiterals, patterns[i] }); } } diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, DATA_VALUE__MATCHES_PATTERN, "_UI_PatternConstraint_diagnostic", new Object [] { getValueLabel(eDataType, value, context), patternLiterals }, new Object [] { value, eDataType, patterns }, context)); }
ResourceLocator ecoreResourceLocator = getEcoreResourceLocator(); if (choices.size() == 2)