@@ -10,7 +10,6 @@ var atomUtils = require("../atomUtils");
10
10
var parent = require ( "../../../worker/parent" ) ;
11
11
var utils = require ( "../../lang/utils" ) ;
12
12
var fileStatusCache_1 = require ( "../fileStatusCache" ) ;
13
- var projectCache_1 = require ( "../../lang/projectCache" ) ;
14
13
var panelHeaders = {
15
14
error : 'Errors In Open Files' ,
16
15
build : 'Last Build Output' ,
@@ -176,22 +175,24 @@ var MainPanelView = (function (_super) {
176
175
}
177
176
} ;
178
177
MainPanelView . prototype . updateFileStatus = function ( filePath ) {
179
- var project = projectCache_1 . getOrCreateProject ( filePath ) ;
180
- if ( ! project . projectFile . project . compileOnSave ) {
181
- this . fileStatus . addClass ( "hidden" ) ;
182
- }
183
- else {
184
- var status_1 = fileStatusCache_1 . getFileStatus ( filePath ) ;
185
- this . fileStatus . removeClass ( 'icon-x icon-check text-error text-success hidden' ) ;
186
- if ( status_1 . emitDiffers || status_1 . modified ) {
187
- this . fileStatus . text ( 'Js emit is outdated' ) ;
188
- this . fileStatus . addClass ( 'icon-x text-error' ) ;
178
+ var _this = this ;
179
+ parent . getProjectFileDetails ( { filePath : filePath } ) . then ( function ( fileDetails ) {
180
+ if ( ! fileDetails . project . compileOnSave ) {
181
+ _this . fileStatus . addClass ( "hidden" ) ;
189
182
}
190
183
else {
191
- this . fileStatus . text ( 'Js emit up to date' ) ;
192
- this . fileStatus . addClass ( 'icon-check text-success' ) ;
184
+ var status_1 = fileStatusCache_1 . getFileStatus ( filePath ) ;
185
+ _this . fileStatus . removeClass ( 'icon-x icon-check text-error text-success hidden' ) ;
186
+ if ( status_1 . emitDiffers || status_1 . modified ) {
187
+ _this . fileStatus . text ( 'Js emit is outdated' ) ;
188
+ _this . fileStatus . addClass ( 'icon-x text-error' ) ;
189
+ }
190
+ else {
191
+ _this . fileStatus . text ( 'Js emit up to date' ) ;
192
+ _this . fileStatus . addClass ( 'icon-check text-success' ) ;
193
+ }
193
194
}
194
- }
195
+ } ) ;
195
196
} ;
196
197
MainPanelView . prototype . showPending = function ( ) {
197
198
atom . notifications . addInfo ( 'Pending Requests: <br/> - ' + this . pendingRequests . join ( '<br/> - ' ) ) ;
0 commit comments