@@ -115,10 +115,12 @@ export interface ProblemMatcher {
115115
116116export interface NamedProblemMatcher extends ProblemMatcher {
117117 name : string ;
118+ label : string ;
118119}
119120
120121export interface NamedMultiLineProblemPattern {
121122 name : string ;
123+ label : string ;
122124 patterns : MultiLineProblemPattern ;
123125}
124126
@@ -495,6 +497,11 @@ export namespace Config {
495497 * The name of the problem pattern.
496498 */
497499 name : string ;
500+
501+ /**
502+ * A human readable label
503+ */
504+ label ?: string ;
498505 }
499506
500507 export namespace NamedProblemPattern {
@@ -518,6 +525,11 @@ export namespace Config {
518525 */
519526 name : string ;
520527
528+ /**
529+ * A human readable label
530+ */
531+ label ?: string ;
532+
521533 /**
522534 * The actual patterns
523535 */
@@ -663,6 +675,11 @@ export namespace Config {
663675 * problem matchter from within a task.
664676 */
665677 name ?: string ;
678+
679+ /**
680+ * A human reable label.
681+ */
682+ label ?: string ;
666683 }
667684
668685 export function isNamedProblemMatcher ( value : ProblemMatcher ) : value is NamedProblemMatcher {
@@ -704,6 +721,7 @@ class ProblemPatternParser extends Parser {
704721 private createNamedMultiLineProblemPattern ( value : Config . NamedMultiLineProblemPattern ) : NamedMultiLineProblemPattern {
705722 let result = {
706723 name : value . name ,
724+ label : value . label ? value . label : value . name ,
707725 patterns : this . createMultiLineProblemPattern ( value . patterns )
708726 } ;
709727 return result . patterns ? result : null ;
@@ -1229,7 +1247,8 @@ export class ProblemMatcherParser extends Parser {
12291247 }
12301248 }
12311249 if ( Config . isNamedProblemMatcher ( description ) ) {
1232- ( < NamedProblemMatcher > result ) . name = description . name ;
1250+ ( result as NamedProblemMatcher ) . name = description . name ;
1251+ ( result as NamedProblemMatcher ) . label = Types . isString ( description . label ) ? description . label : description . name ;
12331252 }
12341253 return result ;
12351254 }
@@ -1466,9 +1485,13 @@ export namespace Schemas {
14661485
14671486 export const NamedProblemMatcher : IJSONSchema = Objects . clone ( ProblemMatcher ) ;
14681487 NamedProblemMatcher . properties = Objects . clone ( NamedProblemMatcher . properties ) ;
1469- NamedProblemMatcher . properties [ ' name' ] = {
1488+ NamedProblemMatcher . properties . name = {
14701489 type : 'string' ,
1471- description : localize ( 'NamedProblemMatcherSchema.name' , 'The name of the problem matcher.' )
1490+ description : localize ( 'NamedProblemMatcherSchema.name' , 'The name of the problem matcher used to refer to it.' )
1491+ } ;
1492+ NamedProblemMatcher . properties . label = {
1493+ type : 'string' ,
1494+ description : localize ( 'NamedProblemMatcherSchema.label' , 'A human readable label of the problem matcher.' )
14721495 } ;
14731496}
14741497
@@ -1481,14 +1504,14 @@ let problemMatchersExtPoint = ExtensionsRegistry.registerExtensionPoint<Config.N
14811504export interface IProblemMatcherRegistry {
14821505 onReady ( ) : TPromise < void > ;
14831506 exists ( name : string ) : boolean ;
1484- get ( name : string ) : ProblemMatcher ;
1485- values ( ) : ProblemMatcher [ ] ;
1507+ get ( name : string ) : NamedProblemMatcher ;
1508+ values ( ) : NamedProblemMatcher [ ] ;
14861509 keys ( ) : string [ ] ;
14871510}
14881511
14891512class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry {
14901513
1491- private matchers : IStringDictionary < ProblemMatcher > ;
1514+ private matchers : IStringDictionary < NamedProblemMatcher > ;
14921515 private readyPromise : TPromise < void > ;
14931516
14941517 constructor ( ) {
@@ -1503,7 +1526,7 @@ class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry {
15031526 for ( let matcher of problemMatchers ) {
15041527 let result = parser . parse ( matcher ) ;
15051528 if ( result && isNamedProblemMatcher ( result ) ) {
1506- this . add ( result . name , result ) ;
1529+ this . add ( result ) ;
15071530 }
15081531 }
15091532 } ) ;
@@ -1522,11 +1545,11 @@ class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry {
15221545 return this . readyPromise ;
15231546 }
15241547
1525- public add ( name : string , matcher : ProblemMatcher ) : void {
1526- this . matchers [ name ] = matcher ;
1548+ public add ( matcher : NamedProblemMatcher ) : void {
1549+ this . matchers [ matcher . name ] = matcher ;
15271550 }
15281551
1529- public get ( name : string ) : ProblemMatcher {
1552+ public get ( name : string ) : NamedProblemMatcher {
15301553 return this . matchers [ name ] ;
15311554 }
15321555
@@ -1542,64 +1565,80 @@ class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry {
15421565 return Object . keys ( this . matchers ) ;
15431566 }
15441567
1545- public values ( ) : ProblemMatcher [ ] {
1568+ public values ( ) : NamedProblemMatcher [ ] {
15461569 return Object . keys ( this . matchers ) . map ( key => this . matchers [ key ] ) ;
15471570 }
15481571
15491572 private fillDefaults ( ) : void {
1550- this . add ( 'msCompile' , {
1573+ this . add ( {
1574+ name : 'msCompile' ,
1575+ label : localize ( 'msCompile' , 'Microsoft compiler problems' ) ,
15511576 owner : 'msCompile' ,
15521577 applyTo : ApplyToKind . allDocuments ,
15531578 fileLocation : FileLocationKind . Absolute ,
15541579 pattern : ProblemPatternRegistry . get ( 'msCompile' )
15551580 } ) ;
15561581
1557- this . add ( 'lessCompile' , {
1582+ this . add ( {
1583+ name : 'lessCompile' ,
1584+ label : localize ( 'lessCompile' , 'Less problems' ) ,
15581585 owner : 'lessCompile' ,
15591586 applyTo : ApplyToKind . allDocuments ,
15601587 fileLocation : FileLocationKind . Absolute ,
15611588 pattern : ProblemPatternRegistry . get ( 'lessCompile' ) ,
15621589 severity : Severity . Error
15631590 } ) ;
15641591
1565- this . add ( 'gulp-tsc' , {
1592+ this . add ( {
1593+ name : 'gulp-tsc' ,
1594+ label : localize ( 'gulp-tsc' , 'Gulp TSC Problems' ) ,
15661595 owner : 'typescript' ,
15671596 applyTo : ApplyToKind . closedDocuments ,
15681597 fileLocation : FileLocationKind . Relative ,
15691598 filePrefix : '${cwd}' ,
15701599 pattern : ProblemPatternRegistry . get ( 'gulp-tsc' )
15711600 } ) ;
15721601
1573- this . add ( 'jshint' , {
1602+ this . add ( {
1603+ name : 'jshint' ,
1604+ label : localize ( 'jshint' , 'JSHint problems' ) ,
15741605 owner : 'jshint' ,
15751606 applyTo : ApplyToKind . allDocuments ,
15761607 fileLocation : FileLocationKind . Absolute ,
15771608 pattern : ProblemPatternRegistry . get ( 'jshint' )
15781609 } ) ;
15791610
1580- this . add ( 'jshint-stylish' , {
1611+ this . add ( {
1612+ name : 'jshint-stylish' ,
1613+ label : localize ( 'jshint-stylish' , 'JSHint stylish problems' ) ,
15811614 owner : 'jshint' ,
15821615 applyTo : ApplyToKind . allDocuments ,
15831616 fileLocation : FileLocationKind . Absolute ,
15841617 pattern : ProblemPatternRegistry . get ( 'jshint-stylish' )
15851618 } ) ;
15861619
1587- this . add ( 'eslint-compact' , {
1620+ this . add ( {
1621+ name : 'eslint-compact' ,
1622+ label : localize ( 'eslint-compact' , 'ESLint compact problems' ) ,
15881623 owner : 'eslint' ,
15891624 applyTo : ApplyToKind . allDocuments ,
15901625 fileLocation : FileLocationKind . Relative ,
15911626 filePrefix : '${cwd}' ,
15921627 pattern : ProblemPatternRegistry . get ( 'eslint-compact' )
15931628 } ) ;
15941629
1595- this . add ( 'eslint-stylish' , {
1630+ this . add ( {
1631+ name : 'eslint-stylish' ,
1632+ label : localize ( 'eslint-stylish' , 'ESLint stylish problems' ) ,
15961633 owner : 'eslint' ,
15971634 applyTo : ApplyToKind . allDocuments ,
15981635 fileLocation : FileLocationKind . Absolute ,
15991636 pattern : ProblemPatternRegistry . get ( 'eslint-stylish' )
16001637 } ) ;
16011638
1602- this . add ( 'go' , {
1639+ this . add ( {
1640+ name : 'go' ,
1641+ label : localize ( 'go' , 'Go problems' ) ,
16031642 owner : 'go' ,
16041643 applyTo : ApplyToKind . allDocuments ,
16051644 fileLocation : FileLocationKind . Relative ,
0 commit comments