mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 328012 - UI freezes when opening a launch configuration if the binary is on a slow file system
This commit is contained in:
parent
ef997227df
commit
3e56b321b1
4 changed files with 8 additions and 18 deletions
|
@ -79,7 +79,6 @@ public class LaunchMessages extends NLS {
|
||||||
public static String CMainTab_Choose_program_to_run;
|
public static String CMainTab_Choose_program_to_run;
|
||||||
public static String CMainTab_Choose_program_to_run_from_NAME;
|
public static String CMainTab_Choose_program_to_run_from_NAME;
|
||||||
public static String CMainTab_UseTerminal;
|
public static String CMainTab_UseTerminal;
|
||||||
public static String CMainTab_Program_is_not_a_recongnized_executable;
|
|
||||||
public static String CMainTab_Program_invalid_proj_path;
|
public static String CMainTab_Program_invalid_proj_path;
|
||||||
public static String CMainTab_Build_Config;
|
public static String CMainTab_Build_Config;
|
||||||
public static String CMainTab_Use_Active;
|
public static String CMainTab_Use_Active;
|
||||||
|
@ -93,7 +92,6 @@ public class LaunchMessages extends NLS {
|
||||||
public static String CMainTab_Workspace_settings_button_label;
|
public static String CMainTab_Workspace_settings_button_label;
|
||||||
public static String CMainTab_Workspace_settings_button_tooltip;
|
public static String CMainTab_Workspace_settings_button_tooltip;
|
||||||
public static String CMainTab_Workspace_settings_link_label;
|
public static String CMainTab_Workspace_settings_link_label;
|
||||||
public static String CMainTab_Workspace_settings_page_id;
|
|
||||||
public static String CDebuggerTab_Advanced_Options_Dialog_Title;
|
public static String CDebuggerTab_Advanced_Options_Dialog_Title;
|
||||||
public static String CDebuggerTab_Stop_at_main_on_startup;
|
public static String CDebuggerTab_Stop_at_main_on_startup;
|
||||||
public static String CDebuggerTab_Automatically_track_values_of;
|
public static String CDebuggerTab_Automatically_track_values_of;
|
||||||
|
|
|
@ -85,7 +85,6 @@ CMainTab_Search=Searc&h Project...
|
||||||
CMainTab_Choose_program_to_run=Choose a &program to run:
|
CMainTab_Choose_program_to_run=Choose a &program to run:
|
||||||
CMainTab_Choose_program_to_run_from_NAME=Choose a program to run from {0}:
|
CMainTab_Choose_program_to_run_from_NAME=Choose a program to run from {0}:
|
||||||
CMainTab_UseTerminal=Connect process input && output to a terminal.
|
CMainTab_UseTerminal=Connect process input && output to a terminal.
|
||||||
CMainTab_Program_is_not_a_recongnized_executable=Program is not a recognized executable.
|
|
||||||
CMainTab_Program_invalid_proj_path=Program specification is not a valid project-relative path.
|
CMainTab_Program_invalid_proj_path=Program specification is not a valid project-relative path.
|
||||||
CMainTab_Build_Config=Build configuration:
|
CMainTab_Build_Config=Build configuration:
|
||||||
CMainTab_Use_Active=Use Active
|
CMainTab_Use_Active=Use Active
|
||||||
|
@ -100,7 +99,6 @@ CMainTab_Enable_build_button_tooltip=Always build project before launching (this
|
||||||
CMainTab_Workspace_settings_button_label=Use workspace settings
|
CMainTab_Workspace_settings_button_label=Use workspace settings
|
||||||
CMainTab_Workspace_settings_button_tooltip=Use workspace settings
|
CMainTab_Workspace_settings_button_tooltip=Use workspace settings
|
||||||
CMainTab_Workspace_settings_link_label=<a>Configure Workspace Settings...</a>
|
CMainTab_Workspace_settings_link_label=<a>Configure Workspace Settings...</a>
|
||||||
CMainTab_Workspace_settings_page_id=org.eclipse.debug.ui.LaunchingPreferencePage
|
|
||||||
|
|
||||||
CDebuggerTab_Advanced_Options_Dialog_Title=Advanced Options
|
CDebuggerTab_Advanced_Options_Dialog_Title=Advanced Options
|
||||||
CDebuggerTab_Stop_at_main_on_startup=Stop on startup at:
|
CDebuggerTab_Stop_at_main_on_startup=Stop on startup at:
|
||||||
|
|
|
@ -63,6 +63,7 @@ import org.eclipse.ui.dialogs.PreferencesUtil;
|
||||||
* @since 6.1
|
* @since 6.1
|
||||||
*/
|
*/
|
||||||
public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
||||||
|
private static final String LAUNCHING_PREFERENCE_PAGE_ID = "org.eclipse.debug.ui.LaunchingPreferencePage"; //$NON-NLS-1$
|
||||||
protected static final String EMPTY_STRING = ""; //$NON-NLS-1$
|
protected static final String EMPTY_STRING = ""; //$NON-NLS-1$
|
||||||
protected String filterPlatform = EMPTY_STRING;
|
protected String filterPlatform = EMPTY_STRING;
|
||||||
|
|
||||||
|
@ -246,7 +247,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
||||||
|
|
||||||
ICProject cProject = getCProject();
|
ICProject cProject = getCProject();
|
||||||
if (cProject != null) {
|
if (cProject != null) {
|
||||||
dialog.setInitialSelections(new Object[]{cProject});
|
dialog.setInitialSelections(new Object[] { cProject });
|
||||||
}
|
}
|
||||||
if (dialog.open() == Window.OK) {
|
if (dialog.open() == Window.OK) {
|
||||||
return (ICProject)dialog.getFirstResult();
|
return (ICProject)dialog.getFirstResult();
|
||||||
|
@ -394,7 +395,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
PreferencesUtil.createPreferenceDialogOn(
|
PreferencesUtil.createPreferenceDialogOn(
|
||||||
parent.getShell(),
|
parent.getShell(),
|
||||||
LaunchMessages.CMainTab_Workspace_settings_page_id,
|
LAUNCHING_PREFERENCE_PAGE_ID,
|
||||||
null,
|
null,
|
||||||
null).open();
|
null).open();
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
* QNX Software Systems - initial API and implementation
|
* QNX Software Systems - initial API and implementation
|
||||||
* Ken Ryall (Nokia) - bug 178731
|
* Ken Ryall (Nokia) - bug 178731
|
||||||
* IBM Corporation
|
* IBM Corporation
|
||||||
|
* Sergey Prigogin (Google)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.launch.ui;
|
package org.eclipse.cdt.launch.ui;
|
||||||
|
|
||||||
|
@ -59,10 +60,9 @@ import org.eclipse.ui.dialogs.TwoPaneElementSelector;
|
||||||
* <p>
|
* <p>
|
||||||
* This class may be instantiated. This class is not intended to be subclassed.
|
* This class may be instantiated. This class is not intended to be subclassed.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class CMainTab extends CAbstractMainTab {
|
public class CMainTab extends CAbstractMainTab {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -474,16 +474,9 @@ public class CMainTab extends CAbstractMainTab {
|
||||||
setErrorMessage(fPreviouslyCheckedProgramErrorMsg = LaunchMessages.CMainTab_Program_does_not_exist);
|
setErrorMessage(fPreviouslyCheckedProgramErrorMsg = LaunchMessages.CMainTab_Program_does_not_exist);
|
||||||
return (fPreviouslyCheckedProgramIsValid = false);
|
return (fPreviouslyCheckedProgramIsValid = false);
|
||||||
}
|
}
|
||||||
try {
|
// Notice that we don't check if exePath points to a valid executable since such
|
||||||
if (!isBinary(project, exePath)) {
|
// check is too expensive to be done on the UI thread.
|
||||||
setErrorMessage(fPreviouslyCheckedProgramErrorMsg = LaunchMessages.CMainTab_Program_is_not_a_recongnized_executable);
|
// See "https://bugs.eclipse.org/bugs/show_bug.cgi?id=328012".
|
||||||
return (fPreviouslyCheckedProgramIsValid = false);
|
|
||||||
}
|
|
||||||
} catch (CoreException e) {
|
|
||||||
LaunchUIPlugin.log(e);
|
|
||||||
setErrorMessage(fPreviouslyCheckedProgramErrorMsg = e.getLocalizedMessage());
|
|
||||||
return (fPreviouslyCheckedProgramIsValid = false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue