run-editor-js-validationParticipant.js 719 B

12345678910111213141516171819202122232425
  1. define(['vs/base/common/severity'], function (severity) {
  2. 'use strict';
  3. function ValidateParticipant() {}
  4. ValidateParticipant.ID = 'doc.validateParticipant';
  5. ValidateParticipant.prototype.validate = function (mirrorModel, markerService) {
  6. var marker = {
  7. severity: severity.Error,
  8. message: [
  9. { isText: true, text: '\u2188 ' },
  10. { tagName: 'span', style: 'color:red', text: 'I AM' },
  11. { isText: true, text: ' A VALIDATION PARTICIPANT \u2188' }
  12. ],
  13. startLineNumber: 1,
  14. startColumn: 1,
  15. endLineNumber: 1,
  16. endColumn: 3
  17. };
  18. markerService.changeOne(ValidateParticipant.ID, mirrorModel.getAssociatedResource(), [marker]);
  19. };
  20. return {
  21. ValidateParticipant: ValidateParticipant
  22. };
  23. });