@@ -44,7 +44,10 @@ define(function (require, exports, module) {
4444 EditorManager = require ( "editor/EditorManager" ) ,
4545 PreferencesManager = require ( "preferences/PreferencesManager" ) ,
4646 PerfUtils = require ( "utils/PerfUtils" ) ,
47- Strings = require ( "strings" ) ;
47+ Strings = require ( "strings" ) ,
48+ StringUtils = require ( "utils/StringUtils" ) ,
49+ AppInit = require ( "utils/AppInit" ) ,
50+ StatusBar = require ( "widgets/StatusBar" ) ;
4851
4952 /**
5053 * @private
@@ -136,9 +139,15 @@ define(function (require, exports, module) {
136139 . append ( $errorTable ) ;
137140 $lintResults . show ( ) ;
138141 $goldStar . hide ( ) ;
142+ if ( JSLINT . errors . length === 1 ) {
143+ StatusBar . updateIndicator ( module . id , true , "jslint-errors" , Strings . JSLINT_ERROR_INFORMATION ) ;
144+ } else {
145+ StatusBar . updateIndicator ( module . id , true , "jslint-errors" , StringUtils . format ( Strings . JSLINT_ERRORS_INFORMATION , JSLINT . errors . length ) ) ;
146+ }
139147 } else {
140148 $lintResults . hide ( ) ;
141149 $goldStar . show ( ) ;
150+ StatusBar . updateIndicator ( module . id , true , "jslint-valid" , Strings . JSLINT_NO_ERRORS ) ;
142151 }
143152
144153 PerfUtils . addMeasurement ( perfTimerDOM ) ;
@@ -148,6 +157,7 @@ define(function (require, exports, module) {
148157 // both the results and the gold star
149158 $lintResults . hide ( ) ;
150159 $goldStar . hide ( ) ;
160+ StatusBar . updateIndicator ( module . id , true , "jslint-disabled" , Strings . JSLINT_DISABLED ) ;
151161 }
152162
153163 EditorManager . resizeEditor ( ) ;
@@ -208,6 +218,12 @@ define(function (require, exports, module) {
208218 _prefs = PreferencesManager . getPreferenceStorage ( module . id , { enabled : ! ! brackets . config . enable_jslint } ) ;
209219 _setEnabled ( _prefs . getValue ( "enabled" ) ) ;
210220
221+ // Init StatusBar indicator
222+ AppInit . htmlReady ( function ( ) {
223+ StatusBar . addIndicator ( module . id , $ ( "#gold-star" ) , false ) ;
224+ } ) ;
225+
226+
211227 // Define public API
212228 exports . run = run ;
213229 exports . getEnabled = getEnabled ;
0 commit comments