Class ExpressionsValidationUtil


  • public class ExpressionsValidationUtil
    extends Object
    DCS expressions validation util
    • Constructor Detail

      • ExpressionsValidationUtil

        public ExpressionsValidationUtil()
    • Method Detail

      • validate

        public static List<org.eclipse.xtext.validation.Issue> validate​(org.eclipse.core.resources.IProject project,
                                                                        IV8Project v8project,
                                                                        DataCompositionSchema schema,
                                                                        DcsAvailableSettingsSourceForSchema fieldsSource,
                                                                        DcsAvailableSettingsSourceForSchema.FieldUse fieldUse,
                                                                        String text,
                                                                        String nestedSchemaName,
                                                                        boolean onlyErrors)
        Validate text
        Parameters:
        project - project, can't be null
        v8project - the V8 project, can't be null
        schema - dcs schema, can't be null
        fieldsSource - available fields source, can't be null
        fieldUse - fields kind
        text - text, can't be null
        nestedSchemaName - nested schema name, can't be null
        onlyErrors - ignore warnings
        Returns:
        list of errors, never null
      • getErrors

        public static List<org.eclipse.xtext.validation.Issue> getErrors​(List<org.eclipse.xtext.validation.Issue> issues)
        Get errors from all issues
        Parameters:
        issues - list of all issues, can't be null
        Returns:
        list of errors, never null
      • openIssuesDialog

        public static int openIssuesDialog​(List<org.eclipse.xtext.validation.Issue> issues,
                                           boolean ignore)
        Create dialog with information about issues
        Parameters:
        issues - list of issues, can't be null, must contain error
        ignore - ignore errors
        Returns:
        dialog return code
      • createIssueMessage

        public static String createIssueMessage​(org.eclipse.xtext.validation.Issue issue)
        Create message from issue
        Parameters:
        issue - issue, can't be null
        Returns:
        message, never null