1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 22:22:11 +02:00

Select the first available command factory when a new launch configuration is created.

This commit is contained in:
Mikhail Khodjaiants 2006-03-01 21:49:42 +00:00
parent 40de7ba4a9
commit 87084d47d1
2 changed files with 27 additions and 23 deletions

View file

@ -1,3 +1,7 @@
2006-03-01 Mikhail Khodjaiants
Select the first available command factory when a new launch configuration is created.
* StandardGDBDebuggerPage.java
2006-02-08 Mikhail Khodjaiants
Bug 114793: Add an extension point to contribute command factories.
GDBServerDebuggerPage should extend StandardGDBDebuggerPage.

View file

@ -134,29 +134,29 @@ public class StandardGDBDebuggerPage extends AbstractCDebuggerPage implements Ob
index = i;
}
fCommandFactoryCombo.setItems( descLabels );
if ( index >= 0 ) {
fCommandFactoryCombo.select( index );
String[] miVersions = fCommandFactoryDescriptors[index].getMIVersions();
fProtocolCombo.setItems( miVersions );
if ( miVersions.length == 0 ) {
miVersions = new String[] { DEFAULT_MI_VERSION };
}
String mi = DEFAULT_MI_VERSION;
try {
mi = configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL, DEFAULT_MI_VERSION );
}
catch( CoreException e ) {
// use default
}
int miIndex = 0;
for ( int i = 0; i < miVersions.length; ++i ) {
if ( miVersions[i].equals( mi ) ) {
miIndex = i;
break;
}
}
fProtocolCombo.select( miIndex );
if ( index < 0 )
index = 0;
fCommandFactoryCombo.select( index );
String[] miVersions = fCommandFactoryDescriptors[index].getMIVersions();
fProtocolCombo.setItems( miVersions );
if ( miVersions.length == 0 ) {
miVersions = new String[] { DEFAULT_MI_VERSION };
}
String mi = DEFAULT_MI_VERSION;
try {
mi = configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL, DEFAULT_MI_VERSION );
}
catch( CoreException e ) {
// use default
}
int miIndex = 0;
for ( int i = 0; i < miVersions.length; ++i ) {
if ( miVersions[i].equals( mi ) ) {
miIndex = i;
break;
}
}
fProtocolCombo.select( miIndex );
setInitializing( false );
}
@ -170,7 +170,7 @@ public class StandardGDBDebuggerPage extends AbstractCDebuggerPage implements Ob
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_GDB_INIT, str );
str = fCommandFactoryCombo.getText();
int index = fCommandFactoryCombo.indexOf( str );
str = fCommandFactoryDescriptors[index].getIdentifier();
str = ( index < 0 ) ? "" : fCommandFactoryDescriptors[index].getIdentifier(); //$NON-NLS-1$
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_COMMAND_FACTORY, str );
str = fProtocolCombo.getText();
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL, str );