mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Select the first available command factory when a new launch configuration is created.
This commit is contained in:
parent
40de7ba4a9
commit
87084d47d1
2 changed files with 27 additions and 23 deletions
|
@ -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
|
2006-02-08 Mikhail Khodjaiants
|
||||||
Bug 114793: Add an extension point to contribute command factories.
|
Bug 114793: Add an extension point to contribute command factories.
|
||||||
GDBServerDebuggerPage should extend StandardGDBDebuggerPage.
|
GDBServerDebuggerPage should extend StandardGDBDebuggerPage.
|
||||||
|
|
|
@ -134,29 +134,29 @@ public class StandardGDBDebuggerPage extends AbstractCDebuggerPage implements Ob
|
||||||
index = i;
|
index = i;
|
||||||
}
|
}
|
||||||
fCommandFactoryCombo.setItems( descLabels );
|
fCommandFactoryCombo.setItems( descLabels );
|
||||||
if ( index >= 0 ) {
|
if ( index < 0 )
|
||||||
fCommandFactoryCombo.select( index );
|
index = 0;
|
||||||
String[] miVersions = fCommandFactoryDescriptors[index].getMIVersions();
|
fCommandFactoryCombo.select( index );
|
||||||
fProtocolCombo.setItems( miVersions );
|
String[] miVersions = fCommandFactoryDescriptors[index].getMIVersions();
|
||||||
if ( miVersions.length == 0 ) {
|
fProtocolCombo.setItems( miVersions );
|
||||||
miVersions = new String[] { DEFAULT_MI_VERSION };
|
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 );
|
|
||||||
}
|
}
|
||||||
|
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 );
|
setInitializing( false );
|
||||||
}
|
}
|
||||||
|
@ -170,7 +170,7 @@ public class StandardGDBDebuggerPage extends AbstractCDebuggerPage implements Ob
|
||||||
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_GDB_INIT, str );
|
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_GDB_INIT, str );
|
||||||
str = fCommandFactoryCombo.getText();
|
str = fCommandFactoryCombo.getText();
|
||||||
int index = fCommandFactoryCombo.indexOf( str );
|
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 );
|
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_COMMAND_FACTORY, str );
|
||||||
str = fProtocolCombo.getText();
|
str = fProtocolCombo.getText();
|
||||||
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL, str );
|
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUGGER_PROTOCOL, str );
|
||||||
|
|
Loading…
Add table
Reference in a new issue