mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 18:56:02 +02:00
show error when failure to create debugger page
This commit is contained in:
parent
540b9dc9f1
commit
52f7290c19
4 changed files with 18 additions and 10 deletions
|
@ -143,19 +143,14 @@ public class CDebugUIPlugin extends AbstractUIPlugin implements ISelectionListen
|
|||
log( new Status( IStatus.ERROR, getUniqueIdentifier(), ICDebugUIConstants.INTERNAL_ERROR, message, null ) );
|
||||
}
|
||||
|
||||
public ILaunchConfigurationTab getDebuggerPage( String debuggerID ) {
|
||||
public ILaunchConfigurationTab getDebuggerPage( String debuggerID ) throws CoreException {
|
||||
if ( fDebuggerPageMap == null ) {
|
||||
initializeDebuggerPageMap();
|
||||
}
|
||||
IConfigurationElement configElement = (IConfigurationElement)fDebuggerPageMap.get( debuggerID );
|
||||
ILaunchConfigurationTab tab = null;
|
||||
if ( configElement != null ) {
|
||||
try {
|
||||
tab = (ILaunchConfigurationTab)configElement.createExecutableExtension( "class" ); //$NON-NLS-1$
|
||||
}
|
||||
catch( CoreException ce ) {
|
||||
log( new Status( IStatus.ERROR, getUniqueIdentifier(), 100, "An error occurred retrieving a C Debugger page", ce ) ); //$NON-NLS-1$
|
||||
}
|
||||
tab = (ILaunchConfigurationTab)configElement.createExecutableExtension( "class" ); //$NON-NLS-1$
|
||||
}
|
||||
return tab;
|
||||
}
|
||||
|
|
|
@ -145,7 +145,13 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
|
|||
if (debugConfig == null) {
|
||||
setDynamicTab(null);
|
||||
} else {
|
||||
setDynamicTab(CDebugUIPlugin.getDefault().getDebuggerPage(debugConfig.getID()));
|
||||
ILaunchConfigurationTab tab = null;
|
||||
try {
|
||||
tab = CDebugUIPlugin.getDefault().getDebuggerPage(debugConfig.getID());
|
||||
} catch (CoreException e) {
|
||||
LaunchUIPlugin.errorDialog(LaunchUIPlugin.getResourceString("AbstractCDebuggerTab.ErrorLoadingDebuggerPage"), e.getStatus()); //$NON-NLS-1$
|
||||
}
|
||||
setDynamicTab(tab);
|
||||
ICDebugConfiguration oldConfig = getDebugConfig();
|
||||
if ( oldConfig != null && oldConfig != debugConfig ) {
|
||||
setInitializeDefault(true);
|
||||
|
|
|
@ -58,6 +58,7 @@ CApplicationLaunchShortcut.Launch_failed_no_project_selected=Launch failed no pr
|
|||
|
||||
AbstractCDebuggerTab.No_debugger_available=No debugger available
|
||||
AbstractCDebuggerTab.Debugger=Debugger
|
||||
AbstractCDebuggerTab.ErrorLoadingDebuggerPage=Error Loading Debugger UI Component.
|
||||
|
||||
LaunchUIPlugin.Error=Error
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
protected Button fVarBookKeeping;
|
||||
|
||||
private final boolean DEFAULT_STOP_AT_MAIN = true;
|
||||
private boolean pageUpdated;
|
||||
|
||||
public void createControl(Composite parent) {
|
||||
GridData gd;
|
||||
|
@ -177,14 +178,19 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
// if no selection meaning nothing in config the force initdefault on tab
|
||||
setInitializeDefault(selection.equals("") ? true : false); //$NON-NLS-1$
|
||||
|
||||
pageUpdated = false;
|
||||
fDCombo.select(selndx == -1 ? 0 : selndx);
|
||||
//The behaviour is undefined for if the callbacks should be triggered for this,
|
||||
//so to avoid unnecessary confusion, we force an update.
|
||||
updateComboFromSelection();
|
||||
//so force page update if needed.
|
||||
if (!pageUpdated) {
|
||||
updateComboFromSelection();
|
||||
}
|
||||
pageUpdated = false;
|
||||
getControl().getParent().layout(true);
|
||||
}
|
||||
|
||||
protected void updateComboFromSelection() {
|
||||
pageUpdated = true;
|
||||
handleDebuggerChanged();
|
||||
ICDebugConfiguration debugConfig = getConfigForCurrentDebugger();
|
||||
if (debugConfig != null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue