Class NstrTypeComputer

    • Constructor Detail

      • NstrTypeComputer

        public NstrTypeComputer()
    • Method Detail

      • 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.
      • isNls

        public static boolean isNls​(Invocation nlsInvocation)
        Checks if the Invocation is NLS function NStr
        Parameters:
        nlsInvocation - the invocation to check, can be null
        Returns:
        true, if the invocation is NLS
      • getStaticInvocationParams

        protected Set<org.eclipse.xtext.util.Pair<String,​Integer>> getStaticInvocationParams​(StaticFeatureAccess featureAccess)
        Description copied from class: AbstractInvocationTypeComputer
        Gets the static invocation parameters. Should return both English and Russian variants of method name. Clients should override this method to implement type computer on static invocation context.
        Overrides:
        getStaticInvocationParams in class AbstractInvocationTypeComputer
        Parameters:
        featureAccess - the static feature access, if need dependably compute the collection of methods.
        Returns:
        the static invocation parameters, collection of global context method name and position of string literal in the invocation parameters.