protected void reportMinLengthViolation (EDataType eDataType, Object value, int length, int bound, DiagnosticChain diagnostics, Map<Object, Object> context) { diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, DATA_VALUE__LENGTH_IN_RANGE, "_UI_MinLengthConstraint_diagnostic", new Object [] { getValueLabel(eDataType, value, context), Integer.toString(length), Integer.toString(bound) }, new Object [] { value, eDataType, length, bound }, context)); }
protected void reportMaxLengthViolation (EDataType eDataType, Object value, int length, int bound, DiagnosticChain diagnostics, Map<Object, Object> context) { diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, DATA_VALUE__LENGTH_IN_RANGE, "_UI_MaxLengthConstraint_diagnostic", new Object [] { getValueLabel(eDataType, value, context), Integer.toString(length), Integer.toString(bound) }, new Object [] { value, eDataType, length, bound }, context)); }
protected void reportMinLengthViolation (EDataType eDataType, Object value, int length, int bound, DiagnosticChain diagnostics, Map<Object, Object> context) { diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, DATA_VALUE__LENGTH_IN_RANGE, "_UI_MinLengthConstraint_diagnostic", new Object [] { getValueLabel(eDataType, value, context), Integer.toString(length), Integer.toString(bound) }, new Object [] { value, eDataType, length, bound }, context)); }
protected void reportMaxLengthViolation (EDataType eDataType, Object value, int length, int bound, DiagnosticChain diagnostics, Map<Object, Object> context) { diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, DATA_VALUE__LENGTH_IN_RANGE, "_UI_MaxLengthConstraint_diagnostic", new Object [] { getValueLabel(eDataType, value, context), Integer.toString(length), Integer.toString(bound) }, new Object [] { value, eDataType, length, bound }, context)); }
protected void reportFractionDigitsViolation (EDataType eDataType, Object value, int fractionDigits, DiagnosticChain diagnostics, Map<Object, Object> context) { diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, DATA_VALUE__FRACTION_DIGITS_IN_RANGE, "_UI_FractionDigitsConstraint_diagnostic", new Object [] { getValueLabel(eDataType, value, context), fractionDigits }, new Object [] { value, eDataType, fractionDigits }, context)); }
protected void reportTotalDigitsViolation (EDataType eDataType, Object value, int totalDigits, DiagnosticChain diagnostics, Map<Object, Object> context) { diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, DATA_VALUE__TOTAL_DIGITS_IN_RANGE, "_UI_TotalDigitsConstraint_diagnostic", new Object [] { getValueLabel(eDataType, value, context), totalDigits }, new Object [] { value, eDataType, totalDigits }, context)); }
protected void reportTotalDigitsViolation (EDataType eDataType, Object value, int totalDigits, DiagnosticChain diagnostics, Map<Object, Object> context) { diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, DATA_VALUE__TOTAL_DIGITS_IN_RANGE, "_UI_TotalDigitsConstraint_diagnostic", new Object [] { getValueLabel(eDataType, value, context), totalDigits }, new Object [] { value, eDataType, totalDigits }, context)); }
protected void reportFractionDigitsViolation (EDataType eDataType, Object value, int fractionDigits, DiagnosticChain diagnostics, Map<Object, Object> context) { diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, DATA_VALUE__FRACTION_DIGITS_IN_RANGE, "_UI_FractionDigitsConstraint_diagnostic", new Object [] { getValueLabel(eDataType, value, context), fractionDigits }, new Object [] { value, eDataType, fractionDigits }, context)); }
protected void reportDataValueTypeViolation (EDataType eDataType, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) { diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, DATA_VALUE__TYPE_CORRECT, "_UI_BadDataValueType_diagnostic", new Object [] { getValueLabel(eDataType, value, context), value == null ? "<null>" : value.getClass().getName(), eDataType.getInstanceClassName() }, new Object [] { value, eDataType }, context)); }
(createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE,
protected void reportDataValueTypeViolation (EDataType eDataType, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) { diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, DATA_VALUE__TYPE_CORRECT, "_UI_BadDataValueType_diagnostic", new Object [] { getValueLabel(eDataType, value, context), value == null ? "<null>" : value.getClass().getName(), eDataType.getInstanceClassName() }, new Object [] { value, eDataType }, context)); }
protected void reportMaxViolation (EDataType eDataType, Object value, Object bound, boolean isInclusive, DiagnosticChain diagnostics, Map<Object, Object> context) { diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, DATA_VALUE__VALUE_IN_RANGE, isInclusive ? "_UI_MaxInclusiveConstraint_diagnostic" : "_UI_MaxExclusiveConstraint_diagnostic", new Object [] { getValueLabel(eDataType, value, context), "<", getValueLabel(eDataType, bound, context) }, new Object [] { value, bound, isInclusive ? Boolean.TRUE : Boolean.FALSE }, context)); }
protected DiagnosticChain createBadDataValueDiagnostic (EObject eObject, EAttribute eAttribute, DiagnosticChain diagnostics, Map<Object, Object> context) { BasicDiagnostic diagnostic = createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, EOBJECT__EVERY_DATA_VALUE_CONFORMS, "_UI_BadDataValue_diagnostic", new Object [] { getFeatureLabel(eAttribute, context), getObjectLabel(eObject, context) }, new Object [] { eObject, eAttribute }, context); diagnostics.add(diagnostic); return diagnostic; }
protected void reportMinViolation (EDataType eDataType, Object value, Object bound, boolean isInclusive, DiagnosticChain diagnostics, Map<Object, Object> context) { diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, DATA_VALUE__VALUE_IN_RANGE, isInclusive ? "_UI_MinInclusiveConstraint_diagnostic" : "_UI_MinExclusiveConstraint_diagnostic", new Object [] { getValueLabel(eDataType, value, context), isInclusive ? ">=" : ">", getValueLabel(eDataType, bound, context) }, new Object [] { value, bound, isInclusive ? Boolean.TRUE : Boolean.FALSE }, context)); }
protected void reportMaxViolation (EDataType eDataType, Object value, Object bound, boolean isInclusive, DiagnosticChain diagnostics, Map<Object, Object> context) { diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, DATA_VALUE__VALUE_IN_RANGE, isInclusive ? "_UI_MaxInclusiveConstraint_diagnostic" : "_UI_MaxExclusiveConstraint_diagnostic", new Object [] { getValueLabel(eDataType, value, context), "<", getValueLabel(eDataType, bound, context) }, new Object [] { value, bound, isInclusive ? Boolean.TRUE : Boolean.FALSE }, context)); }
protected void reportMinViolation (EDataType eDataType, Object value, Object bound, boolean isInclusive, DiagnosticChain diagnostics, Map<Object, Object> context) { diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, DATA_VALUE__VALUE_IN_RANGE, isInclusive ? "_UI_MinInclusiveConstraint_diagnostic" : "_UI_MinExclusiveConstraint_diagnostic", new Object [] { getValueLabel(eDataType, value, context), isInclusive ? ">=" : ">", getValueLabel(eDataType, bound, context) }, new Object [] { value, bound, isInclusive ? Boolean.TRUE : Boolean.FALSE }, context)); }
protected DiagnosticChain createBadDataValueDiagnostic (EObject eObject, EAttribute eAttribute, DiagnosticChain diagnostics, Map<Object, Object> context) { BasicDiagnostic diagnostic = createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, EOBJECT__EVERY_DATA_VALUE_CONFORMS, "_UI_BadDataValue_diagnostic", new Object [] { getFeatureLabel(eAttribute, context), getObjectLabel(eObject, context) }, new Object [] { eObject, eAttribute }, context); diagnostics.add(diagnostic); return diagnostic; }
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)); }
(createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE,