| Quintiq file version 2.0 | 
| #parent: #root | 
| StaticMethod CanSetIsIgnored ( | 
|   SCK_Messages messages, | 
|   SCK_Group group, | 
|   Boolean is_ignored, | 
|   Boolean is_webclient, | 
|   output String feedback_o | 
| ) const declarative remote as Boolean | 
| { | 
|   Description: 'Indicates if the ignored flag of the violations in [violations] can be set to [is_ignored] and provides feedback [feedback_o] if this is not the case' | 
|   TextBody: | 
|   [* | 
|     result := true; | 
|      | 
|     if ( messages.Size() > 0 and forall( messages, Elements, v, v.IsIgnoredMe() = is_ignored ) ) | 
|     { | 
|       manager := messages.Element( 0 ).GetSanityManager(); | 
|       items := manager.TRANSLATION_Violations();  | 
|       feedback_o := ifexpr( is_ignored | 
|                           , manager.TRANSLATION_AlreadyIgnoredItems( items ) | 
|                           , manager.TRANSLATION_AlreadyUnIgnoredItems( items ) ); | 
|      | 
|       result := false;   | 
|     } | 
|      | 
|     // For web client, if group level is ignored, message level wont be able to ignore/unignore. | 
|     if( is_webclient and group.IsIgnored() ) | 
|     { | 
|       result := false; | 
|       feedback_o := Translations::SanityChecking_Message_AlreadyIgnoredGroup( group.Name() ); | 
|     } | 
|      | 
|     return result; | 
|   *] | 
| } |