Skip to content

Show relative last termination time in Launch History tooltip#2744

Open
SougandhS wants to merge 1 commit into
eclipse-platform:masterfrom
SougandhS:LastLaunch
Open

Show relative last termination time in Launch History tooltip#2744
SougandhS wants to merge 1 commit into
eclipse-platform:masterfrom
SougandhS:LastLaunch

Conversation

@SougandhS

@SougandhS SougandhS commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

This change enhances the launch history menu by displaying a relative termination time in the tooltip for previously launched configurations. Instead of showing only the launch configuration name, the tooltip now indicates how recently the launch was terminated using user-friendly text such as "a moment ago", "5 mins ago", or "1 hour ago", based on the stored termination timestamp. This provides quick contextual information about recent launches, making it easier to identify and relaunch configurations that were used recently. The additional context is particularly useful when launch favorites are pinned to the top of the menu, as their fixed ordering does not reflect recent usage and can make it harder to determine which configuration was run most recently.

Screenshot 2026-06-08 at 2 39 06 PM Screenshot 2026-06-08 at 2 43 43 PM Screenshot 2026-06-08 at 2 43 38 PM Screenshot 2026-06-08 at 2 39 36 PM image

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   56m 9s ⏱️ +6s
 4 679 tests +2   4 657 ✅ +2   22 💤 ±0  0 ❌ ±0 
11 931 runs  +6  11 778 ✅ +6  153 💤 ±0  0 ❌ ±0 

Results for commit 0460823. ± Comparison against base commit 556f657.

♻️ This comment has been updated with latest results.

@SougandhS SougandhS changed the title Show relative termination time in Launch History tooltip Show relative last termination time in Launch History tooltip Jun 11, 2026
@SougandhS

SougandhS commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Hi @iloveeclipse, could you please check this PR or trigger a co-pilot review ? - when you get time

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enhances the Debug UI launch history/favorites drop-down by showing a human-friendly “terminated X ago” tooltip for inactive (previously terminated) launch configurations, backed by persisting the termination timestamp onto the launch configuration.

Changes:

  • Persist ATTR_TERMINATE_TIMESTAMP into the associated ILaunchConfiguration when a launch terminates.
  • Add relative-time tooltip computation and apply it to inactive launch history/favorite entries.
  • Introduce new NLS message keys for relative-time tooltip strings.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
debug/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchHistoryAction.java Adds relative-time tooltip logic and applies it while building the launch history/favorites menu.
debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties Adds localized strings for “a moment ago”, “{n} mins ago”, etc.
debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java Declares new NLS fields for the added tooltip message keys.
debug/org.eclipse.debug.core/core/org/eclipse/debug/core/Launch.java Persists termination timestamp to the launch configuration on termination.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +487 to +495
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.getMemento(), timeStamp);
prefs.flush();
}

@SougandhS SougandhS Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @iloveeclipse, is this how it should be handled for #2744 (comment) ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes and no. Correct is launchConfig.isLocal(). Not correct is how the prefs are saved
prefs.put(launchConfig.getMemento(), timeStamp);: this persists entire config as a preference key! I believe in the same category launch configs are "identified" by the name. There shouldn't be two configs with same name as far as I remember it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update key with launchConfig names 👍

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated 👍

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

@SougandhS SougandhS force-pushed the LastLaunch branch 3 times, most recently from f777347 to 95253ef Compare June 16, 2026 11:10
Display the relative termination time (for example, "a moment ago", "5
mins ago", or "1 hour ago") in launch history tooltips using the stored
termination timestamp. This provides a quick indication of when a launch
was last terminated
@SougandhS

Copy link
Copy Markdown
Contributor Author

I hope now its good to be merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants