diff --git a/platform/external-system-api/resources/i18n/ExternalSystemBundle.properties b/platform/external-system-api/resources/i18n/ExternalSystemBundle.properties index 0ad6a80fecde..a8660af76cb0 100644 --- a/platform/external-system-api/resources/i18n/ExternalSystemBundle.properties +++ b/platform/external-system-api/resources/i18n/ExternalSystemBundle.properties @@ -60,6 +60,8 @@ run.configuration.settings.label.project={0} project: run.configuration.settings.label.tasks=Tasks: run.configuration.settings.label.vmoptions=VM options: run.configuration.settings.caption.vmoptions=VM options: -run.text.starting.multiple.task=Executing external tasks ''{0}''...\n -run.text.starting.single.task=Executing external task ''{0}''...\n +run.text.starting.multiple.task={0}: Executing external tasks ''{1}''...\n +run.text.starting.single.task={0}: Executing external task ''{1}''...\n +run.text.ended.multiple.task={0}: External tasks execution finished ''{1}''.\n +run.text.ended.single.task={0}: External task execution finished ''{1}''.\n run.error.undefined.task=No task to execute is specified \ No newline at end of file diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemRunConfiguration.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemRunConfiguration.java index 60c05b756f6f..2e2b22740c39 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemRunConfiguration.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemRunConfiguration.java @@ -33,6 +33,7 @@ import com.intellij.openapi.util.WriteExternalException; import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.containers.ContainerUtilRt; import com.intellij.util.net.NetUtils; +import com.intellij.util.text.DateFormatUtil; import com.intellij.util.xmlb.XmlSerializer; import org.jdom.Element; import org.jetbrains.annotations.NotNull; @@ -166,12 +167,13 @@ public class ExternalSystemRunConfiguration extends LocatableConfigurationBase { ApplicationManager.getApplication().executeOnPooledThread(new Runnable() { @Override public void run() { + final String startDateTime = DateFormatUtil.formatTimeWithSeconds(System.currentTimeMillis()); final String greeting; if (mySettings.getTaskNames().size() > 1) { - greeting = ExternalSystemBundle.message("run.text.starting.multiple.task", StringUtil.join(mySettings.getTaskNames(), " ")); + greeting = ExternalSystemBundle.message("run.text.starting.multiple.task", startDateTime, StringUtil.join(mySettings.getTaskNames(), " ")); } else { - greeting = ExternalSystemBundle.message("run.text.starting.single.task", StringUtil.join(mySettings.getTaskNames(), " ")); + greeting = ExternalSystemBundle.message("run.text.starting.single.task", startDateTime, StringUtil.join(mySettings.getTaskNames(), " ")); } processHandler.notifyTextAvailable(greeting, ProcessOutputTypes.SYSTEM); task.execute(new ExternalSystemTaskNotificationListenerAdapter() { @@ -189,6 +191,15 @@ public class ExternalSystemRunConfiguration extends LocatableConfigurationBase { @Override public void onEnd(@NotNull ExternalSystemTaskId id) { + final String endDateTime = DateFormatUtil.formatTimeWithSeconds(System.currentTimeMillis()); + final String farewell; + if (mySettings.getTaskNames().size() > 1) { + farewell = ExternalSystemBundle.message("run.text.ended.multiple.task", endDateTime, StringUtil.join(mySettings.getTaskNames(), " ")); + } + else { + farewell = ExternalSystemBundle.message("run.text.ended.single.task", endDateTime, StringUtil.join(mySettings.getTaskNames(), " ")); + } + processHandler.notifyTextAvailable(farewell, ProcessOutputTypes.SYSTEM); processHandler.notifyProcessTerminated(0); } });