Class DiagnosticHelper


  • public final class DiagnosticHelper
    extends java.lang.Object
    Helper class for validation handling.
    Author:
    Mat Hansen
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean checkDiagnosticData​(org.eclipse.emf.common.util.Diagnostic diagnostic)
      Verify if the given Diagnostic contains at least one EStructuralFeature or a InternalEObject.
      static org.eclipse.emf.ecore.EStructuralFeature getEStructuralFeature​(java.util.List<?> data)
      Returns the first EStructuralFeature in the given list.
      static org.eclipse.emf.ecore.InternalEObject getFirstInternalEObject​(java.util.List<?> data)
      Returns the first InternalEObject in the given list.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getEStructuralFeature

        public static org.eclipse.emf.ecore.EStructuralFeature getEStructuralFeature​(java.util.List<?> data)
        Returns the first EStructuralFeature in the given list.
        Parameters:
        data - the list to search for a EStructuralFeature
        Returns:
        the found EStructuralFeature, null if no EStructuralFeature is found
      • getFirstInternalEObject

        public static org.eclipse.emf.ecore.InternalEObject getFirstInternalEObject​(java.util.List<?> data)
        Returns the first InternalEObject in the given list.
        Parameters:
        data - the list to search for a InternalEObject
        Returns:
        the found InternalEObject, null if no InternalEObject is found
      • checkDiagnosticData

        public static boolean checkDiagnosticData​(org.eclipse.emf.common.util.Diagnostic diagnostic)
        Verify if the given Diagnostic contains at least one EStructuralFeature or a InternalEObject.
        Parameters:
        diagnostic - the Diagnostic to check
        Returns:
        true if the Diagnostic contains at least one EStructuralFeature or InternalEObject, false otherwise