mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
This commit is contained in:
parent
1ab7121260
commit
ad047ecf89
5 changed files with 46 additions and 19 deletions
|
@ -1,3 +1,12 @@
|
|||
2003-01-16 David Inglis
|
||||
* src/.../launch/AbstractCLaunchDelegate.java
|
||||
add check for program existance on disk before launch
|
||||
|
||||
* src/.../launch/internal/ui/AbstractCDebuggerTab.java
|
||||
* src/.../launch/ui/CDebuggerTab.java
|
||||
* src/.../launch/ui/CorefileDebuggerTab.java
|
||||
Fixed http://bugs.eclipse.org/bugs/show_bug.cgi?id=29532
|
||||
|
||||
2003-01-06 Alain Magloire
|
||||
|
||||
* build.properties: Patch from Judy Green.
|
||||
|
|
|
@ -396,7 +396,7 @@ abstract public class AbstractCLaunchDelegate implements ILaunchConfigurationDel
|
|||
}
|
||||
|
||||
IFile projectPath = ((IProject) cproject.getResource()).getFile(fileName);
|
||||
if (projectPath == null || !projectPath.exists()) {
|
||||
if (projectPath == null || !projectPath.exists() || !projectPath.getLocation().toFile().exists()) {
|
||||
abort("Program file does not exist", null, ICDTLaunchConfigurationConstants.ERR_PROGRAM_NOT_EXIST);
|
||||
}
|
||||
return projectPath.getLocation();
|
||||
|
|
|
@ -26,6 +26,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
|
|||
// Dynamic Debugger UI widgets
|
||||
protected ILaunchConfigurationTab fDynamicTab;
|
||||
protected Composite fDynamicTabHolder;
|
||||
private boolean fInitDefaults;
|
||||
|
||||
protected void setDebugConfig(ICDebugConfiguration config) {
|
||||
fCurrentDebugConfig = config;
|
||||
|
@ -76,8 +77,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
|
|||
ILaunchConfigurationTab tab = getDynamicTab();
|
||||
if ((super.getErrorMessage() != null) || (tab == null)) {
|
||||
return super.getErrorMessage();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return tab.getErrorMessage();
|
||||
}
|
||||
}
|
||||
|
@ -100,23 +100,24 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
|
|||
if (wc != null) {
|
||||
wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP, (Map) null);
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (wc == null) {
|
||||
try {
|
||||
if (getLaunchConfiguration().isWorkingCopy()) {
|
||||
// get a fresh copy to work on
|
||||
wc = ((ILaunchConfigurationWorkingCopy) getLaunchConfiguration()).getOriginal().getWorkingCopy();
|
||||
setLaunchConfigurationWorkingCopy((ILaunchConfigurationWorkingCopy)getLaunchConfiguration());
|
||||
} else {
|
||||
setLaunchConfigurationWorkingCopy(getLaunchConfiguration().getWorkingCopy());
|
||||
}
|
||||
else {
|
||||
wc = getLaunchConfiguration().getWorkingCopy();
|
||||
}
|
||||
}
|
||||
catch (CoreException e) {
|
||||
wc = getLaunchConfigurationWorkingCopy();
|
||||
|
||||
} catch (CoreException e) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
getDynamicTab().setDefaults(wc);
|
||||
if (initDefaults()) {
|
||||
getDynamicTab().setDefaults(wc);
|
||||
}
|
||||
setInitializeDefault(false);
|
||||
getDynamicTab().initializeFrom(wc);
|
||||
}
|
||||
updateLaunchConfigurationDialog();
|
||||
|
@ -137,9 +138,12 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
|
|||
ICDebugConfiguration debugConfig = getConfigForCurrentDebugger();
|
||||
if (debugConfig == null) {
|
||||
setDynamicTab(null);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
setDynamicTab(CDebugUIPlugin.getDefault().getDebuggerPage(debugConfig.getID()));
|
||||
ICDebugConfiguration oldConfig = getDebugConfig();
|
||||
if ( oldConfig != null && oldConfig != debugConfig ) {
|
||||
setInitializeDefault(true);
|
||||
}
|
||||
}
|
||||
setDebugConfig(debugConfig);
|
||||
if (getDynamicTab() == null) {
|
||||
|
@ -165,13 +169,12 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
|
|||
}
|
||||
|
||||
public void performApply(ILaunchConfigurationWorkingCopy config) {
|
||||
if ( getDebugConfig() != null ) {
|
||||
if (getDebugConfig() != null) {
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, getDebugConfig().getID());
|
||||
ILaunchConfigurationTab dynamicTab = getDynamicTab();
|
||||
if (dynamicTab == null) {
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_SPECIFIC_ATTRS_MAP, (Map) null);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
dynamicTab.performApply(config);
|
||||
}
|
||||
}
|
||||
|
@ -182,6 +185,7 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
|
|||
ILaunchConfigurationTab dynamicTab = getDynamicTab();
|
||||
if (dynamicTab != null) {
|
||||
dynamicTab.setDefaults(config);
|
||||
setInitializeDefault(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -200,4 +204,12 @@ public abstract class AbstractCDebuggerTab extends CLaunchConfigurationTab {
|
|||
return true;
|
||||
}
|
||||
|
||||
protected void setInitializeDefault(boolean init) {
|
||||
fInitDefaults = init;
|
||||
}
|
||||
|
||||
protected boolean initDefaults() {
|
||||
return fInitDefaults;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -132,6 +132,9 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
}
|
||||
}
|
||||
}
|
||||
// if no selection meaning nothing in config the force initdefault on tab
|
||||
setInitializeDefault(selection.equals("") ? true : 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.
|
||||
|
|
|
@ -99,6 +99,9 @@ public class CorefileDebuggerTab extends AbstractCDebuggerTab {
|
|||
}
|
||||
}
|
||||
}
|
||||
// if no selection meaning nothing in config the force initdefault on tab
|
||||
setInitializeDefault(selection.equals("") ? true : 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.
|
||||
|
|
Loading…
Add table
Reference in a new issue