Class DirectLocation


  • public class DirectLocation
    extends Object
    Direct location specification for the region that caused a validation incident. Used to perform complex validation scenarios with custom definition of the affected region in the Xtext document or to support the marking of non-semantic elements (like documenting comments, etc)
    • Constructor Detail

      • DirectLocation

        public DirectLocation​(Integer offset,
                              Integer length,
                              Integer lineNumber,
                              org.eclipse.emf.ecore.EObject causer)
        Constructs an instance of the direct location
        Parameters:
        offset - The starting location to construct, absolute offset in the xtext file. May not be null
        length - The length of the location. May not be null
        lineNumber - The line number, starting from 1. May be null
        causer - The semantic model element that is a real cause of the problem. Used for the navigation in the Xtext editor. May be left null if no navigation form the marker is necessary
    • Method Detail

      • getCauser

        public org.eclipse.emf.ecore.EObject getCauser()
        Gets the causer of the issue
        Returns:
        The causer. May be null
      • getLength

        public Integer getLength()
        Gets the length of the selected region
        Returns:
        The length of the region. May not be null
      • getLineNumber

        public Integer getLineNumber()
        Gets the starting line number of the region
        Returns:
        The starting line of the number. May be null
      • getOffset

        public Integer getOffset()
        Gets the absolute offset of the region starting from the beginning of the language file
        Returns:
        The offset. May not be null