Skip to content

Commit ceb43e1

Browse files
committed
Merge pull request #708 from mjbvz/remove-npm-status-logging
#145 Remove Npm logging to status bar
2 parents aa52f80 + 4f10f2b commit ceb43e1

1 file changed

Lines changed: 12 additions & 15 deletions

File tree

Nodejs/Product/Nodejs/Project/NodeModulesNode.cs

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ private void ConditionallyShowNpmOutputPane() {
217217
}
218218

219219
#if INTEGRATE_WITH_ERROR_LIST
220-
221220
private ErrorListProvider _errorListProvider;
222221

223222
private ErrorListProvider GetErrorListProvider() {
@@ -301,8 +300,6 @@ private void WriteNpmLogToOutputWindow(string logText) {
301300
pane.WriteLine(logText);
302301
}
303302

304-
UpdateStatusBarWithNpmActivity(logText);
305-
306303
#if INTEGRATE_WITH_ERROR_LIST
307304
WriteNpmErrorsToErrorList(args);
308305
#endif
@@ -339,18 +336,7 @@ private void NpmController_CommandCompleted(object sender, NpmCommandCompletedEv
339336
}
340337
}
341338

342-
string message;
343-
if (e.WithErrors) {
344-
message = SR.GetString(
345-
e.Cancelled ? SR.NpmCancelledWithErrors : SR.NpmCompletedWithErrors,
346-
e.CommandText
347-
);
348-
} else if (e.Cancelled) {
349-
message = SR.GetString(SR.NpmCancelled, e.CommandText);
350-
} else {
351-
message = SR.GetString(SR.NpmSuccessfullyCompleted, e.CommandText);
352-
}
353-
339+
var message = GetStatusBarMessage(e);
354340
ForceUpdateStatusBarWithNpmActivitySafe(message);
355341

356342
StopNpmIdleTimer();
@@ -359,6 +345,17 @@ private void NpmController_CommandCompleted(object sender, NpmCommandCompletedEv
359345
null, 1000, Timeout.Infinite);
360346
}
361347

348+
private static string GetStatusBarMessage(NpmCommandCompletedEventArgs e) {
349+
if (e.WithErrors) {
350+
return SR.GetString(
351+
e.Cancelled ? SR.NpmCancelledWithErrors : SR.NpmCompletedWithErrors,
352+
e.CommandText);
353+
} else if (e.Cancelled) {
354+
return SR.GetString(SR.NpmCancelled, e.CommandText);
355+
}
356+
return SR.GetString(SR.NpmSuccessfullyCompleted, e.CommandText);
357+
}
358+
362359
private void StopNpmIdleTimer() {
363360
if (null != _npmIdleTimer) {
364361
_npmIdleTimer.Dispose();

0 commit comments

Comments
 (0)