From 1f3e90c4e86309aba05bb7337eb54c8e518dc1fa Mon Sep 17 00:00:00 2001 From: Sougandh S Date: Sat, 18 Jul 2026 07:04:27 +0530 Subject: [PATCH] Improve UX for file selection in the Common tab Automatically focus the associated file path text field when the Shared file, Input File, or Output File option is selected in the Common tab, allowing users to immediately enter or browse for the corresponding file location without an additional click. --- .../ui/org/eclipse/debug/ui/CommonTab.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/debug/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java b/debug/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java index ea94c9dd6af..70994b37535 100644 --- a/debug/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java +++ b/debug/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2019 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 @@ -232,7 +232,12 @@ protected void createSharedConfigComponent(Composite parent) { gd.horizontalSpan = 3; fLocalRadioButton.setLayoutData(gd); fSharedRadioButton = createRadioButton(comp, LaunchConfigurationsMessages.CommonTab_S_hared_4); - fSharedRadioButton.addSelectionListener(widgetSelectedAdapter(e -> handleSharedRadioButtonSelected())); + fSharedRadioButton.addSelectionListener(widgetSelectedAdapter(e -> { + handleSharedRadioButtonSelected(); + if (fSharedRadioButton.getSelection()) { + fSharedLocationText.setFocus(); + } + })); fSharedLocationText = SWTFactory.createSingleText(comp, 1); fSharedLocationText.getAccessible().addAccessibleListener( @@ -258,7 +263,11 @@ private void createOutputCaptureComponent(Composite parent) { fFileOutput = createCheckButton(comp, LaunchConfigurationsMessages.CommonTab_6); fFileOutput.setLayoutData(new GridData(SWT.BEGINNING, SWT.NORMAL, false, false)); fFileOutput.addSelectionListener(widgetSelectedAdapter(e -> { - enableOuputCaptureWidgets(fFileOutput.getSelection()); + boolean selection = fFileOutput.getSelection(); + enableOuputCaptureWidgets(selection); + if (selection) { + fFileText.setFocus(); + } updateLaunchConfigurationDialog(); })); fFileText = SWTFactory.createSingleText(comp, 4); @@ -343,6 +352,9 @@ private void createInputCaptureComponent(Composite parent){ fInputFileCheckButton.setLayoutData(gd); fInputFileCheckButton.addSelectionListener(widgetSelectedAdapter(e -> { handleInputFileButtonSelected(); + if (fInputFileCheckButton.getSelection()) { + fInputFileLocationText.setFocus(); + } updateLaunchConfigurationDialog(); }));