Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2020-02-14 21:18:42 +0000
committerPaul Pazderski2020-02-16 22:41:13 +0000
commit296b2b78ef97e1aecb6e46e0eb45e4aed37c0ffb (patch)
tree8c8cca28755f62116b3a9e31d055dd0ef1c48d09 /org.eclipse.debug.core/core/org
parent74e688a23653d390662d791d63d879af077a4217 (diff)
downloadeclipse.platform.debug-296b2b78ef97e1aecb6e46e0eb45e4aed37c0ffb.tar.gz
eclipse.platform.debug-296b2b78ef97e1aecb6e46e0eb45e4aed37c0ffb.tar.xz
eclipse.platform.debug-296b2b78ef97e1aecb6e46e0eb45e4aed37c0ffb.zip
Bug 251642 - Store termination timestamp as launch and process attributeI20200217-0600I20200216-1800
Also show termination time in process property dialog and process console label and set launch time as process attribute for external tool launches. Change-Id: I052d280d16d8ad42d70992b0a57324a9ce2e4963 Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
Diffstat (limited to 'org.eclipse.debug.core/core/org')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java8
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/Launch.java1
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/RuntimeProcess.java4
3 files changed, 12 insertions, 1 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
index 135b669d5..6388573f8 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
@@ -277,6 +277,14 @@ public class DebugPlugin extends Plugin {
public static final String ATTR_LAUNCH_TIMESTAMP = PI_DEBUG_CORE + ".launch.timestamp"; //$NON-NLS-1$
/**
+ * The launch attribute that stores the time stamp of when a launch configuration was
+ * launched. Value is {@link Long#toString(long)} of {@link System#currentTimeMillis()}.
+ *
+ * @since 3.15
+ */
+ public static final String ATTR_TERMINATE_TIMESTAMP = PI_DEBUG_CORE + ".terminate.timestamp"; //$NON-NLS-1$
+
+ /**
* This launch attribute designates the encoding to be used by the console
* associated with the launch.
* <p>
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/Launch.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/Launch.java
index 504274106..ca8d5398b 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/Launch.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/Launch.java
@@ -475,6 +475,7 @@ public class Launch extends PlatformObject implements ILaunch, IDisconnect, ILau
* properly created/initialized.
*/
protected void fireTerminate() {
+ setAttribute(DebugPlugin.ATTR_TERMINATE_TIMESTAMP, Long.toString(System.currentTimeMillis()));
if (!fSuppressChange) {
((LaunchManager)getLaunchManager()).fireUpdate(this, LaunchManager.TERMINATE);
((LaunchManager)getLaunchManager()).fireUpdate(new ILaunch[] {this}, LaunchManager.TERMINATE);
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/RuntimeProcess.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/RuntimeProcess.java
index 1bfb08a1e..6cf829bca 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/RuntimeProcess.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/RuntimeProcess.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -244,6 +244,8 @@ public class RuntimeProcess extends PlatformObject implements IProcess {
* has terminated.
*/
protected void terminated() {
+ setAttribute(DebugPlugin.ATTR_TERMINATE_TIMESTAMP, Long.toString(System.currentTimeMillis()));
+
if (fStreamsProxy instanceof StreamsProxy) {
((StreamsProxy)fStreamsProxy).close();
}

Back to the top