Bug 578877 - add Terminate All Button for Console
Summary: add Terminate All Button for Console
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.24   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-21 13:59 EST by Jörg Kubitz CLA
Modified: 2022-04-12 14:10 EDT (History)
7 users (show)

See Also:


Attachments
Screenshot (11.72 KB, image/png)
2022-02-21 14:01 EST, Jörg Kubitz CLA
no flags Details
Screenshot Alternative2 - Toobar (6.76 KB, image/png)
2022-02-22 02:52 EST, Jörg Kubitz CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Kubitz CLA 2022-02-21 13:59:27 EST
I want a "Terminate All" Button.
Comment 1 Jörg Kubitz CLA 2022-02-21 14:01:10 EST
Created attachment 288093 [details]
Screenshot
Comment 2 Eclipse Genie CLA 2022-02-21 15:50:43 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.debug/+/191029
Comment 3 Andrey Loskutov CLA 2022-02-21 15:53:32 EST
(In reply to Jörg Kubitz from comment #1)
> Created attachment 288093 [details]
> Screenshot

That doesn't belong to Console view, if it is needed, it belongs to the debug view and/or main run/debug toolbar, where one can start/stop processes.
Comment 4 Jörg Kubitz CLA 2022-02-21 16:29:14 EST
(In reply to Andrey Loskutov from comment #3)
> debug view 

debug view already has a "terminate all" in context menu - but that requires to switch to debug and select a VM first => kinda useless - i also need it even when not debugging.

> run/debug toolbar, where one can start/stop processes.

Currently run toolbar has only start buttons. It would be OK for me to have a stop there, but since the console window already has "Terminate" button and a "Remove All" it feels more natural to have a "Terminate all" there.
The console view even already has a "Terminate/Disconnect All" - but very well hidden in the context menu - and for unknown reasons it's often disabled (=> kinda useless).
Such a button should be independent of any selection. Just terminate ALL without selecting them - like "Remove All".
Comment 5 Jörg Kubitz CLA 2022-02-22 02:52:25 EST
Created attachment 288098 [details]
Screenshot Alternative2 - Toobar

(In reply to Andrey Loskutov from comment #3)
> run/debug toolbar, where one can start/stop processes.

For comparison i also put it in the toolbar. That has the charme, that it is always visible, not only in the console. It also  somehow feels well, because start/stop can also pair.

I am not total sure whats better. Please try out and vote.
Comment 6 Eclipse Genie CLA 2022-02-22 02:54:23 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.debug/+/191040
Comment 7 Thomas Wolf CLA 2022-02-22 06:34:28 EST
The debug toolbar is configurable. (Perspective customizations...) Mine does show the terminate button. It even has a drop-down to terminate specific launches. (Though the little drop-down indicator triangle doesn't show the enabled state correctly; it's always gray (disabled), even when the menu is actually enabled.) I would expect a "Terminate All" action to be the first or last entry in that drop-down menu, separated from the rest by a separator.

The default action of the button seems to be to terminate the first item in that drop-down, so that might need to be adjusted if the "Terminate all" became the first entry. But last would be OK for me, too, and is probably less prone to user mis-manipulation due to mis-clicks.

I wouldn't unconditionally add another button, and certainly not in between the debug and run buttons.
Comment 8 Jörg Kubitz CLA 2022-02-22 07:21:45 EST
(In reply to Thomas Wolf from comment #7)
> It even has a drop-down to terminate specific launches. 

great, but which 3rd party plugin is contributing that? because standard eclipse does not have that. Or i am blind.
Comment 9 Thomas Wolf CLA 2022-02-22 07:50:50 EST
(In reply to Jörg Kubitz from comment #8)
> (In reply to Thomas Wolf from comment #7)
> > It even has a drop-down to terminate specific launches. 
> 
> great, but which 3rd party plugin is contributing that? because standard
> eclipse does not have that. Or i am blind.

Huh! Sorry, that can happen when answering while at work :-) Turns out I was looking at STS. Seems to be https://github.com/spring-projects/sts4/tree/main/eclipse-language-servers/org.springsource.ide.eclipse.commons.ui/src/org/springsource/ide/eclipse/commons/ui/launch

Something similar might be done in Eclipse directly. Or perhaps Vmware/Pivotal might be ready to contribute this? 

Martin, might that be an option?
Comment 10 Sarika Sinha CLA 2022-03-21 10:17:14 EDT
(In reply to Thomas Wolf from comment #9)
> (In reply to Jörg Kubitz from comment #8)
> > (In reply to Thomas Wolf from comment #7)
> > > It even has a drop-down to terminate specific launches. 
> > 
> > great, but which 3rd party plugin is contributing that? because standard
> > eclipse does not have that. Or i am blind.
> 
> Huh! Sorry, that can happen when answering while at work :-) Turns out I was
> looking at STS. Seems to be
> https://github.com/spring-projects/sts4/tree/main/eclipse-language-servers/
> org.springsource.ide.eclipse.commons.ui/src/org/springsource/ide/eclipse/
> commons/ui/launch
> 
> Something similar might be done in Eclipse directly. Or perhaps
> Vmware/Pivotal might be ready to contribute this? 
> 
> Martin, might that be an option?

@Martin,
Can you please confirm? It will help us in deciding the approach.
Comment 11 Martin Lippert CLA 2022-03-22 04:37:38 EDT
Sure, we would be more than happy to contribute the stop buttons that exist in the Spring Tools nowadays to the platform.
Comment 12 Martin Lippert CLA 2022-03-22 04:43:23 EDT
So what would be the approach here? Work on GitHub via PRs?
And where would you like this to end up? Which plugin/package?
Comment 13 Sarika Sinha CLA 2022-03-22 04:52:24 EDT
(In reply to Martin Lippert from comment #12)
> So what would be the approach here? Work on GitHub via PRs?
> And where would you like this to end up? Which plugin/package?

It should go in org.eclipse.debug.ui package.
We will be moving platform debug to github in fee days, after that you can create a PR there.
Comment 14 Martin Lippert CLA 2022-03-29 10:17:35 EDT
(In reply to Sarika Sinha from comment #13)
> It should go in org.eclipse.debug.ui package.
> We will be moving platform debug to github in fee days, after that you can
> create a PR there.

Looks like the repo is now at https://github.com/eclipse-platform/eclipse.platform.debug

Okay for us to create and submit PRs now?
Comment 15 Sarika Sinha CLA 2022-03-29 11:48:43 EDT
(In reply to Martin Lippert from comment #14)
> (In reply to Sarika Sinha from comment #13)
> > It should go in org.eclipse.debug.ui package.
> > We will be moving platform debug to github in fee days, after that you can
> > create a PR there.
> 
> Looks like the repo is now at
> https://github.com/eclipse-platform/eclipse.platform.debug
> 
> Okay for us to create and submit PRs now?

Yes!
Comment 16 Karthik Sankaranarayanan CLA 2022-04-08 02:24:20 EDT
To clarify this, the requirement is to include a "Terminate" Button in the run toolbar. This button has a dropdown that gives a choice of list of running processes that can be terminated and also a "Terminate All" choice at the end of the list in the dropdown. 

If we click on the terminate button, we only kill the most recent process created. If we want to kill other processes, we need to click on the dropdown and select the respective process. And if we click on the "Terminate All" choice, we terminate all running processes. 

Our current implementation in STS4 is done in such a way that the terminate button shows only a list of processes in dropdown and we can select the process we want to terminate. 

In addition to our current implementation, would you be interested in adding a "Terminate All" choice at the end of the list in the dropdown?

Also, would you be interested in relaunch and terminate functionality in one button? We can plan to include that as well if interested.
Comment 17 Jörg Kubitz CLA 2022-04-08 02:30:28 EDT
(In reply to Karthik Sankaranarayanan from comment #16)
> To clarify this, the requirement is to include a "Terminate" Button in the
> run toolbar. This button has a dropdown that gives a choice of list of
> running processes that can be terminated and also a "Terminate All" choice
> at the end of the list in the dropdown. 
> 
> If we click on the terminate button, we only kill the most recent process
> created. If we want to kill other processes, we need  to click on the
> dropdown and select the respective process. And if we click on the
> "Terminate All" choice, we terminate all running processes. 

Sounds good. Would be also good if hovering the terminate button it would say which process it would terminate.

> 
> Our current implementation in STS4 is done in such a way that the terminate
> button shows only a list of processes in dropdown and we can select the
> process we want to terminate. 
> 
> In addition to our current implementation, would you be interested in adding
> a "Terminate All" choice at the end of the list in the dropdown?

I do not get that question. You already defined "Terminate All" above.

> 
> Also, would you be interested in relaunch and terminate functionality in one
> button? We can plan to include that as well if interested.

I do not need a relaunch.

Let's hear what other people would like.
Comment 18 Kris De Volder CLA 2022-04-11 15:13:04 EDT
I would like the 'Relaunch' button. Personally, when using STS which has both of these button (stop / relaunch), I am using the relaunch button all the time. I rarely use the stop button.

Relaunch button is quiet handy to me, it is essentially a 'better' version of the Eclipse build-in launch button. When using the built-in launch button I find it very annoying that it tends to just start a 'duplicate' process if the previous launch is still running. This annoying since it is almost never what I wanted.

Anyway, I realize this issue is not about that, but somehow this issue morphed into contributing STS 'Stop' toolbar button/pulldown to Eclipse even though it actually doesn't provide a 'Stop all' as is (though that 'Stop all' function is easy to add and Udayni and Kharthik are already working on doing that right now). 

The thing is... I am all for contributing our 'stop button' to Eclipse, but... it puts us (STS) in a little bit of a bind if the Relaunch button doesn't come along for the ride. Those two buttons share a common abstract base-class in their implementation in our code. This makes them a bit hard to separate.

So... I would *prefer* it if we could just contribute both, just to avoid some awkward dependencies between STS and Eclipse (i.e. that abstract class would need to become public API in Eclipse, if not, STS would have to keep its own copy of that code).

Besides this, I also just think the Restart button is a great little improvement most people using Eclipse would probably find handy.

Anyway... please think about it :-). 

Just to be clear, we *can* and *will* contribute just the 'stop' button if that is  really what people want.
Comment 19 Kris De Volder CLA 2022-04-11 15:20:34 EDT
To clarify a bit more, so people can make an 'informed' choice.

Relaunch button does this:

- shows list of recent launches whether they are stopped or still running
- when a launch is selected for 'Relaunch'...
- then all/any currently running process associated with the launch are terminated
- subsequently the launch is launched.

This means its a 'handy' button to Relaunch a process you recently launched, and it does what you probably want whether the previous launch is still running or not.
Comment 20 Sarika Sinha CLA 2022-04-12 00:53:56 EDT
(In reply to Kris De Volder from comment #19)
> To clarify a bit more, so people can make an 'informed' choice.
> 
> Relaunch button does this:
> 
> - shows list of recent launches whether they are stopped or still running
> - when a launch is selected for 'Relaunch'...
> - then all/any currently running process associated with the launch are
> terminated
> - subsequently the launch is launched.
> 
> This means its a 'handy' button to Relaunch a process you recently launched,
> and it does what you probably want whether the previous launch is still
> running or not.

We have a preference which can be used to decide whether relaunched process will be after terminate or a separate one: 
Terminate and relaunch while launching (Press 'Shift' to toggle during launch from menu and toolbar)
Comment 21 Kris De Volder CLA 2022-04-12 13:49:09 EDT
> We have a preference which can be used to decide whether relaunched process will be after terminate or a separate one: 
Terminate and relaunch while launching (Press 'Shift' to toggle during launch from menu and toolbar)

Interesting, I guess that does seem to make STS 'relaunch' button somewhat redundant. 

Personally I still prefer a separate 'Relaunch' button for being more discoverable than an obscure preference or a 'secret feature' activated by holding down a modifier key.

So let's focus here on getting just the the 'stop' button contributed.

I'll think about raising these what I think are usability/discoverability issues with the existing 'Launch' button in another ticket.
Comment 22 Kris De Volder CLA 2022-04-12 14:10:40 EDT
Created ticket RE discoverability of 'Relaunch' function that exists currently in Eclipse: https://bugs.eclipse.org/bugs/show_bug.cgi?id=579680