[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-patch] (ugly) patch: debug configuration fixlet
|
I take it you are using the gtk SWT? I ask this because I have seen
differences wrt listeners between win32 and motif (which I though I
fixed) so I suspect there is another difference with gtk. I will try and
get hold of a linux/gtk version of eclipse and see what I can gather.
Until then could you check your .log and make sure there are no
exceptions being thrown here, I think something else is happening here
other than getConfigForCurrentDebugger() returning null because at the
end of the loadDebuggerComboBox is should select the first or previously
selected entry there by causing the options page to be created for the
debugger.
Thanks.
Tom Tromey wrote:
With a relatively recent snapshot (earlier today, I think), I have a
problem when setting up a debug launch configuration.
I make a new configuration, and the "Debugger" pane can never be set
to a state that lets me apply the configuration and start debugging.
Sometimes I've somehow gotten to an "ok" state, but if I delete my
workspace and start over with a new project I can always reproduce
this.
I tracked this down to a problem in CDebuggerTab.java. What seems to
be happening is that the ModifyListener is triggered when
loadDebuggerComboBox is setting up the contents of the combo.
However, at this point the combo is a bit inconsistent, so
getConfigForCurrentDebugger ends up returning null. As a result the
Debugger Options pane is never filled in.
My fix, appended, is pretty ugly. It works by forcing a notification
of the ModifyListener when we've finished setting up the combo.
Since I've really just started learning about the CDT, I'd appreciate
it if someone could email me a copy of whatever the real patch happens
to be.
Tom
Index: src/org/eclipse/cdt/launch/ui/CDebuggerTab.java
===================================================================
RCS file: /usr/cygnus/eclipse-cvsroot/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java,v
retrieving revision 1.4
diff -u -r1.4 CDebuggerTab.java
--- src/org/eclipse/cdt/launch/ui/CDebuggerTab.java 4 Oct 2002 13:50:40 -0000 1.4
+++ src/org/eclipse/cdt/launch/ui/CDebuggerTab.java 8 Oct 2002 04:32:07 -0000
@@ -32,6 +32,7 @@
protected Button fStopInMain;
protected Button fAttachButton;
protected Button fRunButton;
+ protected ModifyListener fDListener;
private final boolean DEFAULT_STOP_AT_MAIN = true;
public void createControl(Composite parent) {
GridData gd;
@@ -43,7 +44,7 @@
Label dlabel = new Label(comp, SWT.NONE);
dlabel.setText("Debugger:");
fDCombo = new Combo(comp, SWT.DROP_DOWN | SWT.READ_ONLY);
- fDCombo.addModifyListener(new ModifyListener() {
+ fDListener = new ModifyListener() {
public void modifyText(ModifyEvent e) {
handleDebuggerChanged();
ICDebugConfiguration debugConfig = getConfigForCurrentDebugger();
@@ -74,7 +75,8 @@
}
}
}
- });
+ };
+ fDCombo.addModifyListener(fDListener);
Composite radioComp = new Composite(comp, SWT.NONE);
GridLayout radioLayout = new GridLayout(2, true);
@@ -149,6 +151,7 @@
}
fDCombo.select(selndx);
fDCombo.getParent().layout(true);
+ fDListener.modifyText(null);
}
public void setDefaults(ILaunchConfigurationWorkingCopy config) {
_______________________________________________
cdt-patch mailing list
cdt-patch@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-patch