Package org.eclipse.emf.common.util

Examples of org.eclipse.emf.common.util.BasicDiagnostic$DiagnosticWrapper


   * @since 2.6
   */
  protected static void reportInvariantDelegateNotFound(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context, EOperation invariant, int severity, String source, int code, String validationDelegate)
  {
    diagnostics.add
    (new BasicDiagnostic
      (severity,
       source,
       code,
       EcorePlugin.INSTANCE.getString("_UI_InvariantDelegateNotFound_diagnostic", new Object[] { invariant.getName(), getObjectLabel(eObject, context), validationDelegate }),
       new Object [] { eObject }));
View Full Code Here


  {
    String message =
      DIAGNOSTIC_SOURCE.equals(source) ?
        getEcoreString(messageKey, messageSubstitutions) :
        getString(messageKey, messageSubstitutions);
    return new BasicDiagnostic(severity, source, code, message, data);
  }
View Full Code Here

  }

  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",
View Full Code Here

   * @since 2.6
   */
  protected void reportConstraintDelegateViolation(EDataType eDataType, Object value, DiagnosticChain diagnostics, Map<Object, Object> context, String constraint, int severity, String source, int code)
  {
    diagnostics.add
      (new BasicDiagnostic
        (severity,
         source,
         code,
         getString("_UI_GenericConstraint_diagnostic", new Object[] { constraint, getValueLabel(eDataType, value, context) }),
         new Object [] { value }));
View Full Code Here

   * @since 2.6
   */
  protected void reportConstraintDelegateException(EDataType eDataType, Object value, DiagnosticChain diagnostics, Map<Object, Object> context, String constraint, int severity, String source, int code, Throwable throwable)
  {
    diagnostics.add
      (new BasicDiagnostic
        (severity,
         source,
         code,
         getString("_UI_ConstraintDelegateException_diagnostic", new Object[] { constraint, getValueLabel(eDataType, value, context), throwable.getLocalizedMessage() }),
         new Object [] { value }));
View Full Code Here

   * @since 2.6
   */
  protected void reportConstraintDelegateNotFound(EDataType eDataType, Object value, DiagnosticChain diagnostics, Map<Object, Object> context, String constraint, int severity, String source, int code, String validationDelegate)
  {
    diagnostics.add
      (new BasicDiagnostic
        (severity,
         source,
         code,
         getString("_UI_ConstraintDelegateNotFound_diagnostic", new Object[] { constraint, getValueLabel(eDataType, value, context), validationDelegate }),
         new Object [] { value }));
View Full Code Here

   * @since 2.6
   */
  protected void reportConstraintDelegateViolation(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context, String constraint, int severity, String source, int code)
  {
    diagnostics.add
      (new BasicDiagnostic
        (severity,
         source,
         code,
         getString("_UI_GenericConstraint_diagnostic", new Object[] { constraint, getObjectLabel(eObject, context) }),
         new Object [] { eObject }));
View Full Code Here

   * @since 2.6
   */
  protected void reportConstraintDelegateException(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context, String constraint, int severity, String source, int code, Throwable throwable)
  {
    diagnostics.add
      (new BasicDiagnostic
        (severity,
         source,
         code,
         getString("_UI_ConstraintDelegateException_diagnostic", new Object[] { constraint, getObjectLabel(eObject, context), throwable.getLocalizedMessage() }),
         new Object [] { eObject }));
View Full Code Here

   * @since 2.6
   */
  protected void reportConstraintDelegateNotFound(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context, String constraint, int severity, String source, int code, String validationDelegate)
  {
    diagnostics.add
      (new BasicDiagnostic
        (severity,
         source,
         code,
         getString("_UI_ConstraintDelegateNotFound_diagnostic", new Object[] { constraint, getObjectLabel(eObject, context), validationDelegate }),
         new Object [] { eObject }));
View Full Code Here

    {
      return Diagnostic.OK_INSTANCE;
    }
    else
    {
      BasicDiagnostic basicDiagnostic = new BasicDiagnostic();
      for (Resource.Diagnostic resourceDiagnostic : resource.getErrors())
      {
        Diagnostic diagnostic = null;
        if (resourceDiagnostic instanceof Throwable)
        {
          diagnostic = BasicDiagnostic.toDiagnostic((Throwable)resourceDiagnostic);
        }
        else
        {
          diagnostic = new BasicDiagnostic(
            Diagnostic.ERROR,
            "org.eclipse.emf.ecore.resource",
            0,
            resourceDiagnostic.getMessage(),
            new Object[]{resourceDiagnostic});
        }
        basicDiagnostic.add(diagnostic);
      }
     
      if (includeWarnings)
      {
        for (Resource.Diagnostic resourceDiagnostic : resource.getWarnings())
        {
          Diagnostic diagnostic = null;
          if (resourceDiagnostic instanceof Throwable)
          {
            diagnostic = BasicDiagnostic.toDiagnostic((Throwable)resourceDiagnostic);
          }
          else
          {
            diagnostic = new BasicDiagnostic(
              Diagnostic.WARNING,
              "org.eclipse.emf.ecore.resource",
              0,
              resourceDiagnostic.getMessage(),
              new Object[]{resourceDiagnostic});
          }
          basicDiagnostic.add(diagnostic);
        }
      }
 
      return basicDiagnostic;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.emf.common.util.BasicDiagnostic$DiagnosticWrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.