mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 06:32:10 +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_from_NAME;
|
||||
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_Build_Config;
|
||||
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_tooltip;
|
||||
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_Stop_at_main_on_startup;
|
||||
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_from_NAME=Choose a program to run from {0}:
|
||||
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_Build_Config=Build configuration:
|
||||
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_tooltip=Use workspace settings
|
||||
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_Stop_at_main_on_startup=Stop on startup at:
|
||||
|
|
|
@ -63,6 +63,7 @@ import org.eclipse.ui.dialogs.PreferencesUtil;
|
|||
* @since 6.1
|
||||
*/
|
||||
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 String filterPlatform = EMPTY_STRING;
|
||||
|
||||
|
@ -246,7 +247,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
|
||||
ICProject cProject = getCProject();
|
||||
if (cProject != null) {
|
||||
dialog.setInitialSelections(new Object[]{cProject});
|
||||
dialog.setInitialSelections(new Object[] { cProject });
|
||||
}
|
||||
if (dialog.open() == Window.OK) {
|
||||
return (ICProject)dialog.getFirstResult();
|
||||
|
@ -394,7 +395,7 @@ public abstract class CAbstractMainTab extends CLaunchConfigurationTab {
|
|||
public void widgetSelected(SelectionEvent e) {
|
||||
PreferencesUtil.createPreferenceDialogOn(
|
||||
parent.getShell(),
|
||||
LaunchMessages.CMainTab_Workspace_settings_page_id,
|
||||
LAUNCHING_PREFERENCE_PAGE_ID,
|
||||
null,
|
||||
null).open();
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
* QNX Software Systems - initial API and implementation
|
||||
* Ken Ryall (Nokia) - bug 178731
|
||||
* IBM Corporation
|
||||
* Sergey Prigogin (Google)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.launch.ui;
|
||||
|
||||
|
@ -59,10 +60,9 @@ import org.eclipse.ui.dialogs.TwoPaneElementSelector;
|
|||
* <p>
|
||||
* This class may be instantiated. This class is not intended to be subclassed.
|
||||
* </p>
|
||||
*
|
||||
* @noextend This class is not intended to be subclassed by clients.
|
||||
* @since 2.0
|
||||
*/
|
||||
|
||||
public class CMainTab extends CAbstractMainTab {
|
||||
|
||||
/**
|
||||
|
@ -474,16 +474,9 @@ public class CMainTab extends CAbstractMainTab {
|
|||
setErrorMessage(fPreviouslyCheckedProgramErrorMsg = LaunchMessages.CMainTab_Program_does_not_exist);
|
||||
return (fPreviouslyCheckedProgramIsValid = false);
|
||||
}
|
||||
try {
|
||||
if (!isBinary(project, exePath)) {
|
||||
setErrorMessage(fPreviouslyCheckedProgramErrorMsg = LaunchMessages.CMainTab_Program_is_not_a_recongnized_executable);
|
||||
return (fPreviouslyCheckedProgramIsValid = false);
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
LaunchUIPlugin.log(e);
|
||||
setErrorMessage(fPreviouslyCheckedProgramErrorMsg = e.getLocalizedMessage());
|
||||
return (fPreviouslyCheckedProgramIsValid = false);
|
||||
}
|
||||
// Notice that we don't check if exePath points to a valid executable since such
|
||||
// check is too expensive to be done on the UI thread.
|
||||
// See "https://bugs.eclipse.org/bugs/show_bug.cgi?id=328012".
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue