Class KeyTypeComputer

    • Constructor Detail

      • KeyTypeComputer

        public KeyTypeComputer()
    • Method Detail

      • isKey

        public static boolean isKey​(String content)
        Checks if the content is 1C key or language identifier.
        Parameters:
        content - the content, cannot be null.
        Returns:
        true, if the content is a key
      • order

        public int order()
        Description copied from interface: TypeComputer
        Order of call to compute string literal type.
        Specified by:
        order in interface TypeComputer
        Returns:
        the order of call
      • isSupport

        public boolean isSupport​(StringLiteral literal,
                                 List<String> content)
        Description copied from interface: TypeComputer
        Quick checks if type computer is support the literal. This method explicitly calls before #computeIsValidForSupportedType(StringLiteral, List)
        Specified by:
        isSupport in interface TypeComputer
        Parameters:
        literal - the literal
        content - the content
        Returns:
        true, if the literal is support by computer
      • validate

        public org.eclipse.core.runtime.IStatus validate​(StringLiteral literal,
                                                         List<String> content,
                                                         org.eclipse.xtext.util.CancelIndicator monitor)
        Description copied from interface: TypeValidator
        Checks that content of string literal is valid for the declared content type.
        Specified by:
        validate in interface TypeValidator
        Parameters:
        literal - the string literal, cannot be null.
        content - the content of lines of the string literal, cannot be null.
        monitor - the monitor to check cancel status, cannot be null.
        Returns:
        the status of validation, cannot return null.