1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 01:45:33 +02:00

Applied patch from Tanya Wolff.

This commit is contained in:
Mikhail Khodjaiants 2004-03-12 17:00:31 +00:00
parent 0e48c01b6a
commit ea9c355889
12 changed files with 273 additions and 209 deletions

View file

@ -1,138 +1,151 @@
2003-12-17 Mikhail Khodjaiants
Fix for bug 49061: Different values are used as default for the "Load shared library symbols automatically" option.
* GDBSolibBlock.java
2003-12-01 Mikhail Khodjaiants
Fix for PR 47230: Need a shared library search path editing capability for GDBServerDebugger.
Implemented 'GDBServerDebuggerPage' as an extension of 'GDBDebuggerPage'.
Added two new control blocks - "TCP Connection" and "Serial Connection".
* src/org/eclipse/cdt/debug/mi/internal/ui/GDBDebuggerPage.java
* src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java
* src/org/eclipse/cdt/debug/mi/internal/ui/SerialPortSettingsBlock.java: new
* src/org/eclipse/cdt/debug/mi/internal/ui/TCPSettingsBlock.java: new
2003-11-26 Mikhail Khodjaiants
Cleanup.
* GDBServerDebuggerPage.java
* ComboDialogField.java
2003-11-20 Mikhail Khodjaiants
Removed dependencies on internal packages from other cdt plugins.
* src/org/eclipse/cdt/debug/mi/internal/ui/PixelConverter.java: added
* src/org/eclipse/cdt/debug/mi/internal/ui/SolibSearchPathBlock.java
2003-11-19 Mikhail Khodjaiants
Fix for PR 45533: MIException while creating MISession can leave an orphan gdb process.
* src/org/eclipse/cdt/debug/mi/internal/ui/preferences/MIPreferencePage.java:
added a text field for the launch timeout.
2003-11-06 Alain Magloire
Patch from Ashish Karkare(TimeSys)
*src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java
Add a new Combo that helps select a reasonable line speed, and storing
the selected value as a configuration attribute.
2003-09-29 Mikhail Khodjaiants
Improved the layout of the 'Shared Libraries' component.
* SolibSearchPathBlock.java
2003-09-11 Mikhail Khodjaiants
Moving the shared library search paths block to mi UI.
* SolibSearchPathBlock.java: new
* GDBSolibBlock.java
2003-09-11 Mikhail Khodjaiants
Added the 'org.eclipse.cdt.debug.mi.internal.ui.dialogfields' package.
* CheckedListDialogField.java: new
* ComboDialogField.java: new
* DialogField.java: new
* IDialogFieldListener.java: new
* IListAdapter.java: new
* IStringButtonAdapter.java: new
* LayoutUtil.java: new
* ListDialogField.java: new
* SelectionButtonDialogField.java: new
* SelectionButtonDialogFieldGroup.java: new
* Separator.java: new
* StringButtonDialogField.java: new
* StringButtonStatusDialogField.java: new
* StringDialogField.java: new
2003-09-09 Mikhail Khodjaiants
New UI for the 'Debugger' page of launch configuration.
* CygwinDebuggerPage.java
* GDBDebuggerPage.java
* GDBSolibBlock.java
2003-04-07 Mikhail Khodjaiants
Replaced 'toString()' by 'getMessage()' for CDI exceptions.
* SetAutoSolibActionDelegate.java
2004-04-04 Alain Magloire
Code from Monta Vista to do a GDBServer launch.
The GDBServer launch page.
* src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPager.java:
* plugin.xml
2003-03-26 Mikhail Khodjaiants
Cosmetic changes in the 'MIPreferencePage' class.
* MIPreferencePage.java
2003-02-12 Mikhail Khodjaiants
Changes in the 'Automatically Load Symbols' action because of the removal of the
'setAutoSolib' method from ICDISharedLibraryManager.
* SetAutoSolibActionDelegate.java
* plugin.xml
2003-02-11 Mikhail Khodjaiants
The 'Automatically Load Symbols' action is added to the 'Shared Libraries' view.
* SetAutoSolibActionDelegate.java: new
* plugin.properties
* plugin.xml
* icons/full/clcl16/auto_solib_co.gif: new
* icons/full/dlcl16/auto_solib_co.gif: new
* icons/full/elcl16/auto_solib_co.gif: new
2003-02-11 Mikhail Khodjaiants
New package 'org.eclipse.cdt.debug.mi.internal.ui.actions' is added.
2003-02-06 Alain Magloire
* src/.../internal/ui/CygwinDebuggerPage.java (updateLaunchConfigurationDialog):
New method to increase visibility for inner classes.
(getShell): New method to increase visibility for inner classes.
(fGDBCommandText): Change scope to protected.
(fGDBInitText) Change scope to protected.
* src/.../internal/ui/GDBDebuggerPage.java: Ditto.
2003-01-24 David Inglis
* src/.../internal/ui/CDebuggerPage.java (removed)
* src/.../internal/ui/GDBDebuggerPage.java (added)
rename class plus small layout fix.
* plugin.xml
* src/.../internal/ui/CygwinDebuggerPage.java (added)
make Cywin use its own debug page and remove the auto load solib option.
2003-01-17 David Inglis
* src/.../internal/ui/CDebuggerPage.java
Added some browse buttons and new text field for gdbinit file.
2003-01-03 Alain Magloire
* build.properties: Patch from Judy Green.
2003-01-03 Alain Magloire
* src/org/eclipse./cdt/debug/mi/internal/ui/CDebuggerPage.java (setDefaults):
Set autosolib to true by default.
2002-11-26 Doug Schaefer
* plugin.xml:
Added new debugPage for Cygwin GDB.
2004-03-11 Tanya Wolff
Externalized strings and marked non translatable as such.
* CygwinDebuggerPage.java
* GDBDebuggerPage.java
* GDBServerDebuggerPage.java
* GDBSolibBlock.java
* MIUIPlugin.java
* SolibSearchPathBlock.java
* TCPSettingsBlock.java
* MIUIPluginResources.properties
* SetAutoSolibActionDelegate.java
* MIPreferencePage.java
2003-12-17 Mikhail Khodjaiants
Fix for bug 49061: Different values are used as default for the "Load shared library symbols automatically" option.
* GDBSolibBlock.java
2003-12-01 Mikhail Khodjaiants
Fix for PR 47230: Need a shared library search path editing capability for GDBServerDebugger.
Implemented 'GDBServerDebuggerPage' as an extension of 'GDBDebuggerPage'.
Added two new control blocks - "TCP Connection" and "Serial Connection".
* src/org/eclipse/cdt/debug/mi/internal/ui/GDBDebuggerPage.java
* src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java
* src/org/eclipse/cdt/debug/mi/internal/ui/SerialPortSettingsBlock.java: new
* src/org/eclipse/cdt/debug/mi/internal/ui/TCPSettingsBlock.java: new
2003-11-26 Mikhail Khodjaiants
Cleanup.
* GDBServerDebuggerPage.java
* ComboDialogField.java
2003-11-20 Mikhail Khodjaiants
Removed dependencies on internal packages from other cdt plugins.
* src/org/eclipse/cdt/debug/mi/internal/ui/PixelConverter.java: added
* src/org/eclipse/cdt/debug/mi/internal/ui/SolibSearchPathBlock.java
2003-11-19 Mikhail Khodjaiants
Fix for PR 45533: MIException while creating MISession can leave an orphan gdb process.
* src/org/eclipse/cdt/debug/mi/internal/ui/preferences/MIPreferencePage.java:
added a text field for the launch timeout.
2003-11-06 Alain Magloire
Patch from Ashish Karkare(TimeSys)
*src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPage.java
Add a new Combo that helps select a reasonable line speed, and storing
the selected value as a configuration attribute.
2003-09-29 Mikhail Khodjaiants
Improved the layout of the 'Shared Libraries' component.
* SolibSearchPathBlock.java
2003-09-11 Mikhail Khodjaiants
Moving the shared library search paths block to mi UI.
* SolibSearchPathBlock.java: new
* GDBSolibBlock.java
2003-09-11 Mikhail Khodjaiants
Added the 'org.eclipse.cdt.debug.mi.internal.ui.dialogfields' package.
* CheckedListDialogField.java: new
* ComboDialogField.java: new
* DialogField.java: new
* IDialogFieldListener.java: new
* IListAdapter.java: new
* IStringButtonAdapter.java: new
* LayoutUtil.java: new
* ListDialogField.java: new
* SelectionButtonDialogField.java: new
* SelectionButtonDialogFieldGroup.java: new
* Separator.java: new
* StringButtonDialogField.java: new
* StringButtonStatusDialogField.java: new
* StringDialogField.java: new
2003-09-09 Mikhail Khodjaiants
New UI for the 'Debugger' page of launch configuration.
* CygwinDebuggerPage.java
* GDBDebuggerPage.java
* GDBSolibBlock.java
2003-04-07 Mikhail Khodjaiants
Replaced 'toString()' by 'getMessage()' for CDI exceptions.
* SetAutoSolibActionDelegate.java
2004-04-04 Alain Magloire
Code from Monta Vista to do a GDBServer launch.
The GDBServer launch page.
* src/org/eclipse/cdt/debug/mi/internal/ui/GDBServerDebuggerPager.java:
* plugin.xml
2003-03-26 Mikhail Khodjaiants
Cosmetic changes in the 'MIPreferencePage' class.
* MIPreferencePage.java
2003-02-12 Mikhail Khodjaiants
Changes in the 'Automatically Load Symbols' action because of the removal of the
'setAutoSolib' method from ICDISharedLibraryManager.
* SetAutoSolibActionDelegate.java
* plugin.xml
2003-02-11 Mikhail Khodjaiants
The 'Automatically Load Symbols' action is added to the 'Shared Libraries' view.
* SetAutoSolibActionDelegate.java: new
* plugin.properties
* plugin.xml
* icons/full/clcl16/auto_solib_co.gif: new
* icons/full/dlcl16/auto_solib_co.gif: new
* icons/full/elcl16/auto_solib_co.gif: new
2003-02-11 Mikhail Khodjaiants
New package 'org.eclipse.cdt.debug.mi.internal.ui.actions' is added.
2003-02-06 Alain Magloire
* src/.../internal/ui/CygwinDebuggerPage.java (updateLaunchConfigurationDialog):
New method to increase visibility for inner classes.
(getShell): New method to increase visibility for inner classes.
(fGDBCommandText): Change scope to protected.
(fGDBInitText) Change scope to protected.
* src/.../internal/ui/GDBDebuggerPage.java: Ditto.
2003-01-24 David Inglis
* src/.../internal/ui/CDebuggerPage.java (removed)
* src/.../internal/ui/GDBDebuggerPage.java (added)
rename class plus small layout fix.
* plugin.xml
* src/.../internal/ui/CygwinDebuggerPage.java (added)
make Cywin use its own debug page and remove the auto load solib option.
2003-01-17 David Inglis
* src/.../internal/ui/CDebuggerPage.java
Added some browse buttons and new text field for gdbinit file.
2003-01-03 Alain Magloire
* build.properties: Patch from Judy Green.
2003-01-03 Alain Magloire
* src/org/eclipse./cdt/debug/mi/internal/ui/CDebuggerPage.java (setDefaults):
Set autosolib to true by default.
2002-11-26 Doug Schaefer
* plugin.xml:
Added new debugPage for Cygwin GDB.

View file

@ -5,13 +5,14 @@
package org.eclipse.cdt.debug.mi.internal.ui;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.cdt.debug.mi.internal.ui.MIUIPlugin;
public class CygwinDebuggerPage extends GDBDebuggerPage
{
public String getName()
{
return "Cygwin GDB Debugger Options";
return MIUIPlugin.getResourceString("internal.ui.CygwinDebuggerPage.Cygwin_GDB_Debugger_Options"); //$NON-NLS-1$
}
/* (non-Javadoc)

View file

@ -29,6 +29,7 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Text;
import org.eclipse.cdt.debug.mi.internal.ui.MIUIPlugin;
public class GDBDebuggerPage extends AbstractLaunchConfigurationTab implements Observer
{
@ -54,8 +55,8 @@ public class GDBDebuggerPage extends AbstractLaunchConfigurationTab implements O
public void setDefaults( ILaunchConfigurationWorkingCopy configuration )
{
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb" );
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_GDB_INIT, "" );
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb" ); //$NON-NLS-1$
configuration.setAttribute( IMILaunchConfigurationConstants.ATTR_GDB_INIT, "" ); //$NON-NLS-1$
if ( fSolibBlock != null )
fSolibBlock.setDefaults( configuration );
}
@ -73,7 +74,7 @@ public class GDBDebuggerPage extends AbstractLaunchConfigurationTab implements O
}
else
{
setErrorMessage( "Debugger executable must be specified" );
setErrorMessage( MIUIPlugin.getResourceString("internal.ui.GDBDebuggerPage.Debugger_exec_must_be_specified") ); //$NON-NLS-1$
setMessage( null );
}
return valid;
@ -81,12 +82,12 @@ public class GDBDebuggerPage extends AbstractLaunchConfigurationTab implements O
public void initializeFrom( ILaunchConfiguration configuration )
{
String gdbCommand = "gdb";
String gdbInit = "";
String gdbCommand = "gdb"; //$NON-NLS-1$
String gdbInit = ""; //$NON-NLS-1$
try
{
gdbCommand = configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb" );
gdbInit = configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_GDB_INIT, "" );
gdbCommand = configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb" ); //$NON-NLS-1$
gdbInit = configuration.getAttribute( IMILaunchConfigurationConstants.ATTR_GDB_INIT, "" ); //$NON-NLS-1$
}
catch( CoreException e )
{
@ -111,7 +112,7 @@ public class GDBDebuggerPage extends AbstractLaunchConfigurationTab implements O
public String getName()
{
return "GDB Debugger Options";
return MIUIPlugin.getResourceString("internal.ui.GDBDebuggerPage.GDB_Debugger_Options"); //$NON-NLS-1$
}
/**
@ -154,7 +155,7 @@ public class GDBDebuggerPage extends AbstractLaunchConfigurationTab implements O
public void createMainTab( TabFolder tabFolder )
{
TabItem tabItem = new TabItem( tabFolder, SWT.NONE );
tabItem.setText( "Main" );
tabItem.setText( MIUIPlugin.getResourceString("internal.ui.GDBDebuggerPage.Main") ); //$NON-NLS-1$
Composite comp = ControlFactory.createCompositeEx( fTabFolder, 1, GridData.FILL_BOTH );
((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
@ -163,7 +164,7 @@ public class GDBDebuggerPage extends AbstractLaunchConfigurationTab implements O
Composite subComp = ControlFactory.createCompositeEx( comp, 3, GridData.FILL_HORIZONTAL );
((GridLayout)subComp.getLayout()).makeColumnsEqualWidth = false;
Label label = ControlFactory.createLabel( subComp, "GDB debugger:" );
Label label = ControlFactory.createLabel( subComp, MIUIPlugin.getResourceString("internal.ui.GDBDebuggerPage.GDB_debugger")+':' ); //$NON-NLS-1$
GridData gd = new GridData();
// gd.horizontalSpan = 2;
label.setLayoutData( gd );
@ -178,7 +179,7 @@ public class GDBDebuggerPage extends AbstractLaunchConfigurationTab implements O
}
} );
Button button = createPushButton( subComp, "&Browse...", null );
Button button = createPushButton( subComp, MIUIPlugin.getResourceString("internal.ui.GDBDebuggerPage.Browse"), null ); //$NON-NLS-1$
button.addSelectionListener(
new SelectionAdapter()
{
@ -191,7 +192,7 @@ public class GDBDebuggerPage extends AbstractLaunchConfigurationTab implements O
private void handleGDBButtonSelected()
{
FileDialog dialog = new FileDialog( getShell(), SWT.NONE );
dialog.setText( "GDB Command File" );
dialog.setText( MIUIPlugin.getResourceString("internal.ui.GDBDebuggerPage.GDB_Debugger") ); //$NON-NLS-1$
String gdbCommand = fGDBCommandText.getText().trim();
int lastSeparatorIndex = gdbCommand.lastIndexOf( File.separator );
if ( lastSeparatorIndex != -1 )
@ -207,7 +208,7 @@ public class GDBDebuggerPage extends AbstractLaunchConfigurationTab implements O
}
} );
label = ControlFactory.createLabel( subComp, "GDB command file:" );
label = ControlFactory.createLabel( subComp, MIUIPlugin.getResourceString("internal.ui.GDBDebuggerPage.GDB_command_file")+':' ); //$NON-NLS-1$
gd = new GridData();
// gd.horizontalSpan = 2;
label.setLayoutData( gd );
@ -222,7 +223,7 @@ public class GDBDebuggerPage extends AbstractLaunchConfigurationTab implements O
updateLaunchConfigurationDialog();
}
} );
button = createPushButton( subComp, "&Browse...", null );
button = createPushButton( subComp, MIUIPlugin.getResourceString("internal.ui.GDBDebuggerPage.Browse"), null ); //$NON-NLS-1$
button.addSelectionListener(
new SelectionAdapter()
{
@ -235,7 +236,7 @@ public class GDBDebuggerPage extends AbstractLaunchConfigurationTab implements O
private void handleGDBInitButtonSelected()
{
FileDialog dialog = new FileDialog( getShell(), SWT.NONE );
dialog.setText( "GDB command file" );
dialog.setText( MIUIPlugin.getResourceString("internal.ui.GDBDebuggerPage.GDB_Command_File") ); //$NON-NLS-1$
String gdbCommand = fGDBInitText.getText().trim();
int lastSeparatorIndex = gdbCommand.lastIndexOf( File.separator );
if ( lastSeparatorIndex != -1 )
@ -252,7 +253,7 @@ public class GDBDebuggerPage extends AbstractLaunchConfigurationTab implements O
} );
label = ControlFactory.createLabel( comp,
"(Warning: Some commands in this file may interfere with the startup operation of the debugger, for example \"run\".)",
MIUIPlugin.getResourceString("internal.ui.GDBDebuggerPage.Warning_startup_operation_interference"), //$NON-NLS-1$
200,
SWT.DEFAULT,
SWT.WRAP );
@ -265,7 +266,7 @@ public class GDBDebuggerPage extends AbstractLaunchConfigurationTab implements O
public void createSolibTab( TabFolder tabFolder )
{
TabItem tabItem = new TabItem( tabFolder, SWT.NONE );
tabItem.setText( "Shared Libraries" );
tabItem.setText( MIUIPlugin.getResourceString("internal.ui.GDBDebuggerPage.Shared_libraries") ); //$NON-NLS-1$
Composite comp = ControlFactory.createCompositeEx( fTabFolder, 1, GridData.FILL_BOTH );
tabItem.setControl( comp );

View file

@ -31,6 +31,7 @@ import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.cdt.debug.mi.internal.ui.MIUIPlugin;
/**
* Enter type comment.
@ -39,8 +40,8 @@ import org.eclipse.swt.widgets.TabItem;
*/
public class GDBServerDebuggerPage extends GDBDebuggerPage
{
private final static String CONNECTION_TCP = "TCP";
private final static String CONNECTION_SERIAL = "Serial";
private final static String CONNECTION_TCP = MIUIPlugin.getResourceString("internal.ui.GDBServerDebuggerPage.TCP"); //$NON-NLS-1$
private final static String CONNECTION_SERIAL = MIUIPlugin.getResourceString("internal.ui.GDBServerDebuggerPage.Serial"); //$NON-NLS-1$
private ComboDialogField fConnectionField;
@ -62,7 +63,7 @@ public class GDBServerDebuggerPage extends GDBDebuggerPage
public void createMainTab( TabFolder tabFolder )
{
TabItem tabItem = new TabItem( tabFolder, SWT.NONE );
tabItem.setText( "Main" );
tabItem.setText( MIUIPlugin.getResourceString("internal.ui.GDBServerDebuggerPage.Main") ); //$NON-NLS-1$
Composite comp = ControlFactory.createCompositeEx( fTabFolder, 1, GridData.FILL_BOTH );
((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
@ -71,7 +72,7 @@ public class GDBServerDebuggerPage extends GDBDebuggerPage
Composite subComp = ControlFactory.createCompositeEx( comp, 3, GridData.FILL_HORIZONTAL );
((GridLayout)subComp.getLayout()).makeColumnsEqualWidth = false;
Label label = ControlFactory.createLabel( subComp, "GDB debugger:" );
Label label = ControlFactory.createLabel( subComp, MIUIPlugin.getResourceString("internal.ui.GDBDebuggerPage.GDB_debugger") ); //$NON-NLS-1$
GridData gd = new GridData();
// gd.horizontalSpan = 2;
label.setLayoutData( gd );
@ -86,7 +87,7 @@ public class GDBServerDebuggerPage extends GDBDebuggerPage
}
} );
Button button = createPushButton( subComp, "&Browse...", null );
Button button = createPushButton( subComp, MIUIPlugin.getResourceString("internal.ui.GDBDebuggerPage.Browse"), null ); //$NON-NLS-1$
button.addSelectionListener(
new SelectionAdapter()
{
@ -99,7 +100,7 @@ public class GDBServerDebuggerPage extends GDBDebuggerPage
private void handleGDBButtonSelected()
{
FileDialog dialog = new FileDialog( getShell(), SWT.NONE );
dialog.setText( "GDB Command File" );
dialog.setText( MIUIPlugin.getResourceString("internal.ui.GDBDebuggerPage.GDB_Debugger") ); //$NON-NLS-1$
String gdbCommand = fGDBCommandText.getText().trim();
int lastSeparatorIndex = gdbCommand.lastIndexOf( File.separator );
if ( lastSeparatorIndex != -1 )
@ -115,7 +116,7 @@ public class GDBServerDebuggerPage extends GDBDebuggerPage
}
} );
label = ControlFactory.createLabel( subComp, "GDB command file:" );
label = ControlFactory.createLabel( subComp, MIUIPlugin.getResourceString("internal.ui.GDBDebuggerPage.GDB_command_file")+':' ); //$NON-NLS-1$
gd = new GridData();
// gd.horizontalSpan = 2;
label.setLayoutData( gd );
@ -130,7 +131,7 @@ public class GDBServerDebuggerPage extends GDBDebuggerPage
updateLaunchConfigurationDialog();
}
} );
button = createPushButton( subComp, "&Browse...", null );
button = createPushButton( subComp, MIUIPlugin.getResourceString("internal.ui.GDBDebuggerPage.Browse"), null ); //$NON-NLS-1$
button.addSelectionListener(
new SelectionAdapter()
{
@ -143,7 +144,7 @@ public class GDBServerDebuggerPage extends GDBDebuggerPage
private void handleGDBInitButtonSelected()
{
FileDialog dialog = new FileDialog( getShell(), SWT.NONE );
dialog.setText( "GDB command file" );
dialog.setText( MIUIPlugin.getResourceString("internal.ui.GDBDebuggerPage.GDB_Command_File") ); //$NON-NLS-1$
String gdbCommand = fGDBInitText.getText().trim();
int lastSeparatorIndex = gdbCommand.lastIndexOf( File.separator );
if ( lastSeparatorIndex != -1 )
@ -187,7 +188,7 @@ public class GDBServerDebuggerPage extends GDBDebuggerPage
private ComboDialogField createConnectionField()
{
ComboDialogField field = new ComboDialogField( SWT.DROP_DOWN | SWT.READ_ONLY );
field.setLabelText( "Connection: " );
field.setLabelText( MIUIPlugin.getResourceString("internal.ui.GDBServerDebuggerPage.Connection"));//$NON-NLS-1$
field.setItems( fConnections );
field.setDialogFieldListener(
new IDialogFieldListener()

View file

@ -21,6 +21,7 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.cdt.debug.mi.internal.ui.MIUIPlugin;
/**
* Enter type comment.
@ -54,8 +55,8 @@ public class GDBSolibBlock extends Observable implements Observer
}
if ( autoSolib )
{
fAutoSoLibButton = ControlFactory.createCheckBox( subComp, "Load shared library symbols automatically" );
{
fAutoSoLibButton = ControlFactory.createCheckBox( subComp, MIUIPlugin.getResourceString("mi.internal.ui.GDBSolibBlock.Load_shared_lib_symbols_automatically") );
fAutoSoLibButton.addSelectionListener(
new SelectionAdapter()
{
@ -69,7 +70,7 @@ public class GDBSolibBlock extends Observable implements Observer
if ( stopOnSolibEvents )
{
fStopOnSolibEventsButton = ControlFactory.createCheckBox( subComp, "Stop on shared library events" );
fStopOnSolibEventsButton = ControlFactory.createCheckBox( subComp, MIUIPlugin.getResourceString("mi.internal.ui.GDBSolibBlock.Stop_on_shared_lib_events") ); //$NON-NLS-1$
fStopOnSolibEventsButton.addSelectionListener(
new SelectionAdapter()
{
@ -180,7 +181,7 @@ public class GDBSolibBlock extends Observable implements Observer
{
try
{
boolean enable = !ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE.equals( configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, "" ) );
boolean enable = !ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE.equals( configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, "" ) ); //$NON-NLS-1$
if ( fAutoSoLibButton != null )
fAutoSoLibButton.setEnabled( enable );
if ( fStopOnSolibEventsButton != null )

View file

@ -12,19 +12,20 @@ public class MIUIPlugin extends AbstractUIPlugin {
//The shared instance.
private static MIUIPlugin plugin;
//Resource bundle.
private ResourceBundle resourceBundle;
private static ResourceBundle resourceBundle;
static {
try {
resourceBundle = ResourceBundle.getBundle("org.eclipse.cdt.debug.mi.internal.ui.MIUIPluginResources"); //$NON-NLS-1$
} catch (MissingResourceException x) {
resourceBundle = null;
}
}
/**
* The constructor.
*/
public MIUIPlugin(IPluginDescriptor descriptor) {
super(descriptor);
plugin = this;
try {
resourceBundle= ResourceBundle.getBundle("org.eclipse.cdt.debug.mi.ui.UiPluginResources");
} catch (MissingResourceException x) {
resourceBundle = null;
}
}
/**
@ -46,11 +47,12 @@ public class MIUIPlugin extends AbstractUIPlugin {
* or 'key' if not found.
*/
public static String getResourceString(String key) {
ResourceBundle bundle= MIUIPlugin.getDefault().getResourceBundle();
try {
return bundle.getString(key);
return resourceBundle.getString(key);
} catch (MissingResourceException e) {
return key;
return '!' + key + '!';
} catch (NullPointerException e) {
return '#' + key + '#';
}
}

View file

@ -0,0 +1,41 @@
mi.internal.ui.GDBSolibBlock.Load_shared_lib_symbols_automatically=Load shared library symbols automatically
mi.internal.ui.GDBSolibBlock.Stop_on_shared_lib_events=Stop on shared library events
mi.internal.ui.SerialPortSettingsBlock.Device=Device:
mi.internal.ui.SerialPortSettingsBlock.Speed=Speed:
mi.internal.ui.SerialPortSettingsBlock.Device_must_be_specified=Device must be specified.
mi.internal.ui.SerialPortSettingsBlock.Invalid_device=Invalid device.
mi.internal.ui.SerialPortSettingsBlock.Speed_must_be_specified=Speed must be specified.
TCPSettingsBlock.Host_or_IP=Host name or IP address:
TCPSettingsBlock.Port=Port number:
TCPSettingsBlock.Host_or_IP_must_be_specified=Host name or IP address must be specified.
TCPSettingsBlock.Invalid_host_or_IP=Invalid host name or IP address.
TCPSettingsBlock.Port_must_be_specified=Port number must be specified.
TCPSettingsBlock.Invalid_port=Invalid port number.
internal.ui.GDBDebuggerPage.Debugger_exec_must_be_specified=Debugger executable must be specified
internal.ui.GDBDebuggerPage.GDB_Debugger_Options=GDB Debugger Options
internal.ui.GDBDebuggerPage.Main=Main
internal.ui.GDBDebuggerPage.GDB_debugger=GDB debugger
internal.ui.GDBDebuggerPage.GDB_Debugger=GDB Debugger
internal.ui.GDBDebuggerPage.Browse=&Browse...
internal.ui.GDBDebuggerPage.GDB_Command_File=GDB Command File
internal.ui.GDBDebuggerPage.GDB_command_file=GDB command file
internal.ui.GDBDebuggerPage.Warning_startup_operation_interference=(Warning: Some commands in this file may interfere with the startup operation of the debugger, for example "run".)
internal.ui.GDBDebuggerPage.Shared_libraries=Shared Libraries
internal.ui.SolibSearchPathBlock.Add=Add...
internal.ui.SolibSearchPathBlock.Up=Up
internal.ui.SolibSearchPathBlock.Down=Down
internal.ui.SolibSearchPathBlock.Remove=Remove
internal.ui.SolibSearchPathBlock.Directories=Directories:
internal.ui.SolibSearchPathBlock.Select_directory_with_shared_lib=Select directory that contains shared library.
internal.ui.GDBServerDebuggerPage.TCP=TCP
internal.ui.GDBServerDebuggerPage.Serial=Serial
internal.ui.GDBServerDebuggerPage.Main=Main
internal.ui.GDBServerDebuggerPage.Connection=Connection:
internal.ui.CygwinDebuggerPage.Cygwin_GDB_Debugger_Options=Cygwin GDB Debugger Options
internal.ui.actions.SetAutoSolibActionDelegate.Exception_set_automatically_load_symbols=Exceptions occurred attempting to set 'Automatically Load Symbols' mode.
internal.ui.actions.SetAutoSolibActionDelegate.Set_automatically_load_symbols_failed=Set 'Automatically Load Symbols' mode failed.
internal.ui.preferences.MIPreferencePage.General_GDBMI_settings=General settings for GDB MI.
internal.ui.preferences.MIPreferencePage.Communication=Communication
internal.ui.preferences.MIPreferencePage.Debugger_timeout=&Debugger timeout (ms):
internal.ui.preferences.MIPreferencePage.Launch_timeout=&Launch &timeout (ms):
internal.ui.preferences.MIPreferencePage.Error_Request_timeout_range=The valid value range is [{0},{1}].

View file

@ -25,6 +25,7 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.cdt.debug.mi.internal.ui.MIUIPlugin;
/**
* Enter type comment.
@ -33,15 +34,15 @@ import org.eclipse.swt.widgets.Shell;
*/
public class SerialPortSettingsBlock extends Observable
{
private final static String DEFAULT_ASYNC_DEVICE = "/dev/ttyS0";
private final static String DEFAULT_ASYNC_DEVICE_SPEED = "115200";
private final static String DEFAULT_ASYNC_DEVICE = "/dev/ttyS0"; //$NON-NLS-1$
private final static String DEFAULT_ASYNC_DEVICE_SPEED = "115200"; //$NON-NLS-1$
private Shell fShell;
private StringDialogField fDeviceField;
private ComboDialogField fSpeedField;
private String fSpeedChoices[] = { "9600", "19200", "38400", "57600", "115200" };
private String fSpeedChoices[] = { "9600", "19200", "38400", "57600", "115200" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
private Control fControl;
@ -109,7 +110,7 @@ public class SerialPortSettingsBlock extends Observable
private StringDialogField createDeviceField()
{
StringDialogField field = new StringDialogField();
field.setLabelText( "Device: " );
field.setLabelText( MIUIPlugin.getResourceString("mi.internal.ui.SerialPortSettingsBlock.Device") ); //$NON-NLS-1$
field.setDialogFieldListener(
new IDialogFieldListener()
{
@ -124,7 +125,7 @@ public class SerialPortSettingsBlock extends Observable
private ComboDialogField createSpeedField()
{
ComboDialogField field = new ComboDialogField( SWT.DROP_DOWN | SWT.READ_ONLY );
field.setLabelText( "Speed: " );
field.setLabelText( MIUIPlugin.getResourceString("mi.internal.ui.SerialPortSettingsBlock.Speed") ); //$NON-NLS-1$
field.setItems( fSpeedChoices );
field.setDialogFieldListener(
new IDialogFieldListener()
@ -216,11 +217,11 @@ public class SerialPortSettingsBlock extends Observable
if ( fDeviceField != null && fSpeedField != null )
{
if ( fDeviceField.getText().trim().length() == 0 )
setErrorMessage( "Device must be specified." );
setErrorMessage( MIUIPlugin.getResourceString("mi.internal.ui.SerialPortSettingsBlock.Device_must_be_specified") ); //$NON-NLS-1$
else if ( !deviceIsValid( fDeviceField.getText().trim() ) )
setErrorMessage( "Invalid device." );
setErrorMessage( MIUIPlugin.getResourceString("mi.internal.ui.SerialPortSettingsBlock.Invalid_device") ); //$NON-NLS-1$
else if ( fSpeedField.getSelectionIndex() < 0 )
setErrorMessage( "Speed must be specified." );
setErrorMessage( MIUIPlugin.getResourceString("mi.internal.ui.SerialPortSettingsBlock.Speed_must_be_specified") ); //$NON-NLS-1$
}
}

View file

@ -26,6 +26,7 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.cdt.debug.mi.internal.ui.MIUIPlugin;
/**
* Enter type comment.
@ -63,12 +64,12 @@ public class SolibSearchPathBlock extends Observable
String[] buttonLabels = new String[]
{
/* 0 */ "Add...",
/* 0 */ MIUIPlugin.getResourceString("internal.ui.SolibSearchPathBlock.Add"), //$NON-NLS-1$
/* 1 */ null,
/* 2 */ "Up",
/* 3 */ "Down",
/* 2 */ MIUIPlugin.getResourceString("internal.ui.SolibSearchPathBlock.Up"), //$NON-NLS-1$
/* 3 */ MIUIPlugin.getResourceString("internal.ui.SolibSearchPathBlock.Down"), //$NON-NLS-1$
/* 4 */ null,
/* 5 */ "Remove",
/* 5 */ MIUIPlugin.getResourceString("internal.ui.SolibSearchPathBlock.Remove"), //$NON-NLS-1$
};
IListAdapter listAdapter = new IListAdapter()
@ -84,7 +85,7 @@ public class SolibSearchPathBlock extends Observable
};
fDirList = new SolibSearchPathListDialogField( listAdapter, buttonLabels, new LabelProvider() );
fDirList.setLabelText( "Directories:" );
fDirList.setLabelText( MIUIPlugin.getResourceString("internal.ui.SolibSearchPathBlock.Directories") ); //$NON-NLS-1$
fDirList.setUpButtonIndex( 2 );
fDirList.setDownButtonIndex( 3 );
fDirList.setRemoveButtonIndex( 5 );
@ -150,7 +151,7 @@ public class SolibSearchPathBlock extends Observable
private void addDirectory()
{
DirectoryDialog dialog = new DirectoryDialog( getShell() );
dialog.setMessage( "Select directory that contains shared library." );
dialog.setMessage( MIUIPlugin.getResourceString("internal.ui.SolibSearchPathBlock.Select_directory_with_shared_lib") ); //$NON-NLS-1$
String res = dialog.open();
if ( res != null )
fDirList.addElement( res );

View file

@ -23,6 +23,7 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.cdt.debug.mi.internal.ui.MIUIPlugin;
/**
* Enter type comment.
@ -31,8 +32,8 @@ import org.eclipse.swt.widgets.Shell;
*/
public class TCPSettingsBlock extends Observable
{
private final static String DEFAULT_HOST_NAME = "localhost";
private final static String DEFAULT_PORT_NUMBER = "10000";
private final static String DEFAULT_HOST_NAME = "localhost"; //$NON-NLS-1$
private final static String DEFAULT_PORT_NUMBER = "10000"; //$NON-NLS-1$
private Shell fShell;
@ -103,7 +104,7 @@ public class TCPSettingsBlock extends Observable
private StringDialogField createHostNameField()
{
StringDialogField field = new StringDialogField();
field.setLabelText( "Host name or IP address: " );
field.setLabelText( MIUIPlugin.getResourceString("TCPSettingsBlock.Host_or_IP") ); //$NON-NLS-1$
field.setDialogFieldListener(
new IDialogFieldListener()
{
@ -118,7 +119,7 @@ public class TCPSettingsBlock extends Observable
private StringDialogField createPortNumberField()
{
StringDialogField field = new StringDialogField();
field.setLabelText( "Port number: " );
field.setLabelText( MIUIPlugin.getResourceString("TCPSettingsBlock.Port") ); //$NON-NLS-1$
field.setDialogFieldListener(
new IDialogFieldListener()
{
@ -194,13 +195,13 @@ public class TCPSettingsBlock extends Observable
if ( fHostNameField != null && fPortNumberField != null )
{
if ( fHostNameField.getText().trim().length() == 0 )
setErrorMessage( "Host name or IP address must be specified." );
setErrorMessage( MIUIPlugin.getResourceString("TCPSettingsBlock.Host_or_IP_must_be_specified") ); //$NON-NLS-1$
else if ( !hostNameIsValid( fHostNameField.getText().trim() ) )
setErrorMessage( "Invalid host name or IP address." );
setErrorMessage( MIUIPlugin.getResourceString("TCPSettingsBlock.Invalid_host_or_IP") ); //$NON-NLS-1$
else if ( fPortNumberField.getText().trim().length() == 0 )
setErrorMessage( "Port number must be specified." );
setErrorMessage( MIUIPlugin.getResourceString("TCPSettingsBlock.Port_must_be_specified") ); //$NON-NLS-1$
else if ( !portNumberIsValid( fPortNumberField.getText().trim() ) )
setErrorMessage( "Invalid port number." );
setErrorMessage( MIUIPlugin.getResourceString("TCPSettingsBlock.Invalid_port") ); //$NON-NLS-1$
}
}

View file

@ -28,6 +28,7 @@ import org.eclipse.ui.IViewActionDelegate;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.cdt.debug.mi.internal.ui.MIUIPlugin;
/**
* Enter type comment.
@ -222,7 +223,7 @@ public class SetAutoSolibActionDelegate implements IViewActionDelegate,
protected String getStatusMessage()
{
return "Exceptions occurred attempting to set 'Automaticaly Load Symbols' mode.";
return MIUIPlugin.getResourceString("internal.ui.actions.SetAutoSolibActionDelegate.Exception_set_automatically_load_symbols"); //$NON-NLS-1$
}
/**
@ -230,7 +231,7 @@ public class SetAutoSolibActionDelegate implements IViewActionDelegate,
*/
protected String getErrorDialogMessage()
{
return "Set 'Automatically Load Symbols' mode failed.";
return MIUIPlugin.getResourceString("internal.ui.actions.SetAutoSolibActionDelegate.Set_automatically_load_symbols_failed"); //$NON-NLS-1$
}
protected void setStatus( IStatus status )

View file

@ -49,7 +49,7 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
{
super();
setPreferenceStore( MIUIPlugin.getDefault().getPreferenceStore() );
setDescription( "General settings for GDB MI." );
setDescription( MIUIPlugin.getResourceString("internal.ui.preferences.MIPreferencePage.General_GDBMI_settings") ); //$NON-NLS-1$
}
/* (non-Javadoc)
@ -146,7 +146,7 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
private void createCommunicationPreferences( Composite composite )
{
Composite comp = createGroupComposite( composite, 1, "Communication" );
Composite comp = createGroupComposite( composite, 1, MIUIPlugin.getResourceString("internal.ui.preferences.MIPreferencePage.Communication") ); //$NON-NLS-1$
//Add in an intermediate composite to allow for spacing
Composite spacingComposite = new Composite( comp, SWT.NONE );
GridLayout layout = new GridLayout();
@ -155,7 +155,7 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
data.horizontalSpan = 2;
spacingComposite.setLayoutData( data );
fDebugTimeoutText = createTimeoutField( IMIConstants.PREF_REQUEST_TIMEOUT, "&Debugger timeout (ms):", spacingComposite );
fDebugTimeoutText = createTimeoutField( IMIConstants.PREF_REQUEST_TIMEOUT, MIUIPlugin.getResourceString("internal.ui.preferences.MIPreferencePage.Debugger_timeout"), spacingComposite ); //$NON-NLS-1$
fDebugTimeoutText.setPropertyChangeListener(
new IPropertyChangeListener()
{
@ -166,7 +166,7 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
}
} );
fLaunchTimeoutText = createTimeoutField( IMIConstants.PREF_REQUEST_LAUNCH_TIMEOUT, "&Launch &timeout (ms):", spacingComposite );
fLaunchTimeoutText = createTimeoutField( IMIConstants.PREF_REQUEST_LAUNCH_TIMEOUT, MIUIPlugin.getResourceString("internal.ui.preferences.MIPreferencePage.Launch_timeout"), spacingComposite ); //$NON-NLS-1$
fLaunchTimeoutText.setPropertyChangeListener(
new IPropertyChangeListener()
{
@ -200,7 +200,7 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
toText.setValidRange( IMIConstants.MIN_REQUEST_TIMEOUT, IMIConstants.MAX_REQUEST_TIMEOUT );
String minValue = Integer.toString( IMIConstants.MIN_REQUEST_TIMEOUT );
String maxValue = Integer.toString( IMIConstants.MAX_REQUEST_TIMEOUT );
toText.setErrorMessage( MessageFormat.format( "The valid value range is [{0},{1}].", new String[]{ minValue, maxValue } ) );
toText.setErrorMessage( MessageFormat.format( MIUIPlugin.getResourceString("internal.ui.preferences.MIPreferencePage.Error_Request_timeout_range"), new String[]{ minValue, maxValue } ) ); //$NON-NLS-1$
toText.load();
return toText;
}