-
Notifications
You must be signed in to change notification settings - Fork 167
Show relative last termination time in Launch History tooltip #2744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| /******************************************************************************* | ||
| * Copyright (c) 2000, 2018 IBM Corporation and others. | ||
| * Copyright (c) 2000, 2026 IBM Corporation and others. | ||
| * | ||
| * This program and the accompanying materials | ||
| * are made available under the terms of the Eclipse Public License 2.0 | ||
|
|
@@ -25,15 +25,19 @@ | |
| import java.util.concurrent.locks.ReadWriteLock; | ||
| import java.util.concurrent.locks.ReentrantReadWriteLock; | ||
|
|
||
| import org.eclipse.core.runtime.CoreException; | ||
| import org.eclipse.core.runtime.IStatus; | ||
| import org.eclipse.core.runtime.MultiStatus; | ||
| import org.eclipse.core.runtime.PlatformObject; | ||
| import org.eclipse.core.runtime.preferences.IEclipsePreferences; | ||
| import org.eclipse.core.runtime.preferences.InstanceScope; | ||
| import org.eclipse.debug.core.model.IDebugTarget; | ||
| import org.eclipse.debug.core.model.IDisconnect; | ||
| import org.eclipse.debug.core.model.IProcess; | ||
| import org.eclipse.debug.core.model.ISourceLocator; | ||
| import org.eclipse.debug.internal.core.DebugCoreMessages; | ||
| import org.eclipse.debug.internal.core.LaunchManager; | ||
| import org.osgi.service.prefs.BackingStoreException; | ||
|
|
||
| /** | ||
| * A launch is the result of launching a debug session | ||
|
|
@@ -475,7 +479,24 @@ protected void fireChanged() { | |
| * properly created/initialized. | ||
| */ | ||
| protected void fireTerminate() { | ||
| setAttribute(DebugPlugin.ATTR_TERMINATE_TIMESTAMP, Long.toString(System.currentTimeMillis())); | ||
| String timeStamp = Long.toString(System.currentTimeMillis()); | ||
| setAttribute(DebugPlugin.ATTR_TERMINATE_TIMESTAMP, timeStamp); | ||
| ILaunchConfiguration launchConfig = getLaunchConfiguration(); | ||
| if (launchConfig != null) { | ||
| try { | ||
|
SougandhS marked this conversation as resolved.
|
||
| if (launchConfig.isLocal()) { | ||
| ILaunchConfigurationWorkingCopy launchCopy = launchConfig.getWorkingCopy(); | ||
| launchCopy.setAttribute(DebugPlugin.ATTR_TERMINATE_TIMESTAMP, timeStamp); | ||
| launchCopy.doSave(); | ||
| } else { | ||
| IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(DebugPlugin.getUniqueIdentifier()); | ||
| prefs.put(launchConfig.getName(), timeStamp); | ||
| prefs.flush(); | ||
| } | ||
|
Comment on lines
+487
to
+495
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @iloveeclipse, is this how it should be handled for #2744 (comment) ?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes and no. Correct is
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will update key with launchConfig names 👍
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated 👍
SougandhS marked this conversation as resolved.
SougandhS marked this conversation as resolved.
|
||
| } catch (CoreException | BackingStoreException e) { | ||
| DebugPlugin.log(e); | ||
| } | ||
| } | ||
| if (!fSuppressChange) { | ||
| ((LaunchManager)getLaunchManager()).fireUpdate(this, LaunchManager.TERMINATE); | ||
| ((LaunchManager)getLaunchManager()).fireUpdate(new ILaunch[] {this}, LaunchManager.TERMINATE); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.