Bug 578888 - Merge Debug & Run Configuration Dialogs
Summary: Merge Debug & Run Configuration Dialogs
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.23   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-22 04:46 EST by Jörg Kubitz CLA
Modified: 2022-03-21 05:28 EDT (History)
3 users (show)

See Also:


Attachments
Screenshot of proposed Dialog.png (80.57 KB, image/png)
2022-02-22 04:46 EST, Jörg Kubitz CLA
no flags Details
Multiple confusing buttons (132.88 KB, image/png)
2022-03-21 04:32 EDT, Andrey Loskutov 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-22 04:46:31 EST
Created attachment 288099 [details]
Screenshot of proposed Dialog.png

I am always frustrated when i configured something in the run Configurations Dialog and then have to switch to the Debug Configurations dialog, just to search the same config there and press "Debug" there.

There is NO difference in the two Dialogs except the labels!

In principle there could be a difference according to
org.eclipse.debug.ui.ILaunchConfigurationTabGroup.createTabs(ILaunchConfigurationDialog, String mode)
But there is not a single implementation in the eclipse IDE that uses the "mode" parameter (ILaunchManager.RUN_MODE / DEBUG_MODE).

Can we just merge the two dialogs and put 2 buttons in it? Or at least equip both Dialogs with the same two buttons. "Run" / "Debug"?

WDYT? Is anybody aware of a plugin which makes a difference between modes?
Comment 1 Eclipse Genie CLA 2022-02-22 06:34:17 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.debug/+/191050
Comment 2 Karsten Thoms CLA 2022-02-27 03:02:43 EST
Be aware that this is from a user perspective a large change. I assume that many users will be confused when no "Debug" icon exists.

When this should be changed then it must be a consistent experience. 
- At the moment the dialog opens with title "Run Configurations" or "Debug Configurations". When there is only one, it might be that a more generic title "Launch Configurations" might be more appropriate.
- The main menu and context menu contains "Run As" and "Debug As". This has to stay as is. However, when there is only one drop down menu with the "play" icon, then both options have to be present there, too.
- The "Debug" button should be default IMO.
- Equipping both dialog variants with both buttons is not correct IMO. When you open the "Run Configurations" dialog, you expect to launch in Run mode. When you want both buttons on one dialog, there should be only one way to access the dialog.
Comment 3 Mickael Istria CLA 2022-02-28 06:13:30 EST
(In reply to Jörg Kubitz from comment #0)
> In principle there could be a difference according to
> org.eclipse.debug.ui.ILaunchConfigurationTabGroup.
> createTabs(ILaunchConfigurationDialog, String mode)
> But there is not a single implementation in the eclipse IDE that uses the
> "mode" parameter (ILaunchManager.RUN_MODE / DEBUG_MODE).

If this is supported in tabGroup as per contract, then it means that some extenders may have been relying on it. So we cannot remove that and this should be kept working. I don't have an example at hand, but still it's a typical rule of an extensible platform to assume every functionality once provided is to remain working (unless there is a clear explicit plan to remove it and some remediation plan provided and some time left to adopters to transition, we're talking of at least 3 years here).
How to you think a merged dialog can handle this? Should the dialog also contain a toggle between Run the various modes for the configurations that support both to allow showing the relevant tabs (when appropriate)?
Comment 4 Jörg Kubitz CLA 2022-02-28 06:35:35 EST
When working on this i stumbled across several "hidden" features in the Dialogs (which i have not been aware off even after decades):
1. The tree only shows only launch configs available to the mode that was selected to open the Dialog. (for example "Remote Java Apllication" only on debug)
2. Double click in the tree will "launch" the selected launch config in the mode that was selected to open the Dialog.
3. "Show Command Line" button depends on the mode that was selected to open the Dialog.

As a consequence the current suggested commit only adds additional launch Buttons for the other modes. The default button stays the same. That should work independent on API changes even if theoretically a certain tab was not shown. It merges nothing. Please try it out.

Looking ahead i would wish a non-modal edit dialog independent of mode (bug 532000). Since the editor itself would not need to have a tree (that would be job of the launch view) point 1) and 2) would vanish. "Show Command Line" could be adopted to "Show {mode} Command Line" buttons. However the ILaunchConfigurationTabGroup.createTabs() would then have to deprecate the String mode parameter. Future music.
Comment 5 Andrey Loskutov CLA 2022-03-21 04:32:47 EDT
Created attachment 288256 [details]
Multiple confusing buttons

(In reply to Karsten Thoms from comment #2)
> Be aware that this is from a user perspective a large change. I assume that
> many users will be confused when no "Debug" icon exists.
> 
> When this should be changed then it must be a consistent experience. 
> - At the moment the dialog opens with title "Run Configurations" or "Debug
> Configurations". When there is only one, it might be that a more generic
> title "Launch Configurations" might be more appropriate.
> - The main menu and context menu contains "Run As" and "Debug As". This has
> to stay as is. However, when there is only one drop down menu with the
> "play" icon, then both options have to be present there, too.
> - The "Debug" button should be default IMO.
> - Equipping both dialog variants with both buttons is not correct IMO. When
> you open the "Run Configurations" dialog, you expect to launch in Run mode.
> When you want both buttons on one dialog, there should be only one way to
> access the dialog.

I fully agree.

There are products & users of the products that expect a *dedicated* *single* "DoWhatYouExpected" button in the dialog, not a row of possible choices.

Beside all the consistencies described above, such simple to use dialog in a product that contains various extensions will look awfully complex after this change, look at the possible result in the attached screenshot.
Comment 6 Jörg Kubitz CLA 2022-03-21 04:39:31 EDT
(In reply to Andrey Loskutov from comment #5)
> (In reply to Karsten Thoms from comment #2)

@Andrey, Karsten, 
Do you have any suggestions how it could be solved?
For example it would be enough for me to just have the default buttons "Run","Debug" in every dialog ... because that are the common ones to use. So would you accept a less generic approach?
Comment 7 Andrey Loskutov CLA 2022-03-21 05:03:13 EDT
(In reply to Jörg Kubitz from comment #6)
> (In reply to Andrey Loskutov from comment #5)
> > (In reply to Karsten Thoms from comment #2)
> 
> @Andrey, Karsten, 
> Do you have any suggestions how it could be solved?
> For example it would be enough for me to just have the default buttons
> "Run","Debug" in every dialog ... because that are the common ones to use.
> So would you accept a less generic approach?

No, *every* dialog is wrong. And note, the "common" use case for run/debug is "common" to you as Java developer, but Eclipse is IDE for *various* things, and run/debug might be not that "easily" supported by a non-Java launches as JDT it does.

Custom extensions to launch configurations don't expect *anything* except "XYZ" action, and this is what most users expect too.

The original goal of this bug was to "fix" Run dialog in case user decided to "Debug" it. 

May be one could think of "Change to ... mode" button somewhere, that would open another dialog if that is supported by the page? Or "alternate action" button / handler could be contributed by the page so it allows to have "another" launch mode be shown.

In any case, that should only be available to launch config types / pages that *explicitly* support this new feature (by new extension point attribute/interface/whatever). No one should be forced to change existing product code to get rid of unwanted buttons in custom launch configs.
Comment 8 Jörg Kubitz CLA 2022-03-21 05:09:17 EDT
ok, more specific, how about to add:

1. "Run" Button to "Debug" Dialog and
2. "Debug" Button to "Run" Dialog

On the other hand i was surprised that External Run configurations Dialog would support a "Debug" launch but only has a "Run" Button.  I missed the Debug functionality there, but  maybe that's another topic.
Comment 9 Andrey Loskutov CLA 2022-03-21 05:28:12 EDT
(In reply to Jörg Kubitz from comment #8)
> ok, more specific, how about to add:
> 
> 1. "Run" Button to "Debug" Dialog and
> 2. "Debug" Button to "Run" Dialog

I personally don't see a need in that, only possible source of confusion for users.

Once again: *if* that will be done, it must be done in a way that it would affect *only* launch configurations that *explicitly* support that.