diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog index 1432043ef57..253405137af 100644 --- a/debug/org.eclipse.cdt.debug.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog @@ -1,3 +1,14 @@ +2004-03-02 Tanya Wolff + Partial Fix for #51189, completing the externalizing of strings for this plugin. + Affected packages are: + debug.internal.ui + debug.internal.ui.actions + debug.internal.ui.editors + debug.internal.ui.preferences + debug.internal.ui.wizards + debug.ui + debug.ui.sourcelookup. + 2004-02-20 Alain Magloire Partial Fix for #52155, we simply catch the exception. We do not worry about it too much since this code will @@ -8,6 +19,18 @@ Fix for bug 52135: Debugger should indicate which thread triggered breakpoint. * CDTDebugModelPresentation.java +2004-02-16 Tanya Wolff + Partial Fix for bug 51189. + Externalized strings in new CDT Debug views. + * CDebugUIPluginResources.properties + * MemoryControlArea.java + * MemoryPresentation.java + * MemoryView.java + * MemoryViewer.java + * RegistersView.java + * SharedLibrariesView.java + * SignalsViewer.java + 2004-02-11 Mikhail Khodjaiants Fix for bug 51062: Source locator oddness. * DefualtSourceLocator.java diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDTDebugModelPresentation.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDTDebugModelPresentation.java index 5dce030238c..821ccd9247b 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDTDebugModelPresentation.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDTDebugModelPresentation.java @@ -96,7 +96,7 @@ public class CDTDebugModelPresentation extends LabelProvider */ public final static String DISPLAY_FULL_PATHS = "DISPLAY_FULL_PATHS"; //$NON-NLS-1$ - private static final String DUMMY_STACKFRAME_LABEL = "..."; + private static final String DUMMY_STACKFRAME_LABEL = "..."; //$NON-NLS-1$ protected HashMap fAttributes = new HashMap(3); @@ -327,7 +327,7 @@ public class CDTDebugModelPresentation extends LabelProvider StringBuffer baseText = new StringBuffer( getBaseText( element ) ); if ( element instanceof ICDebugElementErrorStatus && !((ICDebugElementErrorStatus)element).isOK() ) { - baseText.append( getFormattedString( " <{0}>", ((ICDebugElementErrorStatus)element).getMessage() ) ); + baseText.append( getFormattedString( " <{0}>", ((ICDebugElementErrorStatus)element).getMessage() ) ); //$NON-NLS-1$ } return baseText.toString(); } @@ -451,7 +451,7 @@ public class CDTDebugModelPresentation extends LabelProvider { label += ". Exit code = " + ((ICDIExitInfo)info).getCode(); } - return label + ")"; + return label + ")"; //$NON-NLS-1$ } case IState.SUSPENDED: return target.getName() + " (Suspended)"; diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddAddressBreakpointActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddAddressBreakpointActionDelegate.java index a7bc28be279..3bb33b41c61 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddAddressBreakpointActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddAddressBreakpointActionDelegate.java @@ -13,6 +13,7 @@ import org.eclipse.debug.core.model.IDebugTarget; import org.eclipse.jface.dialogs.IInputValidator; import org.eclipse.jface.dialogs.InputDialog; import org.eclipse.jface.window.Window; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * @@ -44,7 +45,7 @@ public class AddAddressBreakpointActionDelegate extends AbstractListenerActionDe public String isValid( String newText ) { if ( newText.trim().length() == 0 ) - return ""; + return ""; //$NON-NLS-1$ long value = 0; try { @@ -52,9 +53,9 @@ public class AddAddressBreakpointActionDelegate extends AbstractListenerActionDe } catch( NumberFormatException e ) { - return "Invalid address."; + return CDebugUIPlugin.getResourceString("internal.ui.actions.AddAddressBreakpointActionDelegate.Invalid_address"); //$NON-NLS-1$ } - return ( value > 0 ) ? null : "Address can not be 0."; + return ( value > 0 ) ? null : CDebugUIPlugin.getResourceString("internal.ui.actions.AddAddressBreakpointActionDelegate.Address_can_not_be_0"); //$NON-NLS-1$ } } @@ -64,8 +65,8 @@ public class AddAddressBreakpointActionDelegate extends AbstractListenerActionDe protected void doAction( Object element ) throws DebugException { InputDialog dialog = new InputDialog( getWindow().getShell(), - "Add Address Breakpoint", - "Enter address:", + CDebugUIPlugin.getResourceString("internal.ui.actions.AddAddressBreakpointActionDelegate.Add_Address_Breakpoint"), //$NON-NLS-1$ + CDebugUIPlugin.getResourceString("internal.ui.actions.AddAddressBreakpointActionDelegate.Enter_address"), //$NON-NLS-1$ null, new AddressValidator() ); if ( dialog.open() == Window.OK ) @@ -74,7 +75,7 @@ public class AddAddressBreakpointActionDelegate extends AbstractListenerActionDe parseValue( dialog.getValue().trim() ), true, 0, - "", + "", //$NON-NLS-1$ true ); } } @@ -95,7 +96,7 @@ public class AddAddressBreakpointActionDelegate extends AbstractListenerActionDe protected long parseValue( String text ) throws NumberFormatException { long value = 0; - if ( text.trim().startsWith( "0x" ) ) + if ( text.trim().startsWith( "0x" ) ) //$NON-NLS-1$ { value = Integer.parseInt( text.substring( 2 ), 16 ); } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddExpressionActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddExpressionActionDelegate.java index f3238d93346..208ea69f24b 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddExpressionActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddExpressionActionDelegate.java @@ -62,7 +62,7 @@ public class AddExpressionActionDelegate extends AbstractEditorActionDelegate { return ((ITextSelection)selection).getText().trim(); } - return ""; + return ""; //$NON-NLS-1$ } protected Shell getShell() @@ -96,7 +96,7 @@ public class AddExpressionActionDelegate extends AbstractEditorActionDelegate } catch( DebugException e ) { - CDebugUIPlugin.errorDialog( "Evaluation of expression failed.", e ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.AddExpressionActionDelegate.Evaluation_of_expression_failed"), e ); //$NON-NLS-1$ } } } ); diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddGlobalsActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddGlobalsActionDelegate.java index 3003180419d..a3be2282125 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddGlobalsActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddGlobalsActionDelegate.java @@ -290,7 +290,7 @@ public class AddGlobalsActionDelegate extends ActionDelegate { if ( element instanceof Global ) { - String path = ""; + String path = ""; //$NON-NLS-1$ if ( ((Global)element).getPath() != null ) { path = ((Global)element).getPath().toString(); @@ -298,12 +298,12 @@ public class AddGlobalsActionDelegate extends ActionDelegate if ( index != -1 ) path = path.substring( index + 1 ); } - return ( path.length() > 0 ? ( '\'' + path + "\'::" ) : "" ) + ((Global)element).getName(); + return ( path.length() > 0 ? ( '\'' + path + "\'::" ) : "" ) + ((Global)element).getName(); //$NON-NLS-1$ //$NON-NLS-2$ } return null; } }, - "Select Variables:" ); + CDebugUIPlugin.getResourceString("internal.ui.actions.AddGlobalsActionDelegate.Select_Variables") ); //$NON-NLS-1$ } protected Global[] getGlobals() @@ -353,7 +353,7 @@ public class AddGlobalsActionDelegate extends ActionDelegate protected String getStatusMessage() { - return "Exceptions occurred attempting to add global variables."; + return CDebugUIPlugin.getResourceString("internal.ui.actions.AddGlobalsActionDelegate.Exceptions_occurred_attempting_to_add_global_variables."); //$NON-NLS-1$ } /** @@ -361,7 +361,7 @@ public class AddGlobalsActionDelegate extends ActionDelegate */ protected String getErrorDialogMessage() { - return "Add global variables failed."; + return CDebugUIPlugin.getResourceString("internal.ui.actions.AddGlobalsActionDelegate.Add_global_variables_failed"); //$NON-NLS-1$ } protected void setStatus( IStatus status ) diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddWatchpointActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddWatchpointActionDelegate.java index 44f48eaada8..ebc6cd0d888 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddWatchpointActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddWatchpointActionDelegate.java @@ -164,7 +164,7 @@ public class AddWatchpointActionDelegate extends ActionDelegate } } } - return ""; + return ""; //$NON-NLS-1$ } protected void update( ISelection selection ) @@ -220,7 +220,7 @@ public class AddWatchpointActionDelegate extends ActionDelegate } catch( CoreException ce ) { - CDebugUIPlugin.errorDialog( "Cannot add watchpoint", ce ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.AddWatchpointActionDelegate.Cannot_add_watchpoint"), ce ); //$NON-NLS-1$ } } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddWatchpointDialog.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddWatchpointDialog.java index 80b7e496bfd..f3382f09d8d 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddWatchpointDialog.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddWatchpointDialog.java @@ -22,6 +22,7 @@ import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * @@ -38,7 +39,7 @@ public class AddWatchpointDialog extends Dialog private boolean fWrite = true; private boolean fRead = false; - private String fExpression = ""; + private String fExpression = ""; //$NON-NLS-1$ /** * Constructor for AddWatchpointDialog. @@ -56,7 +57,7 @@ public class AddWatchpointDialog extends Dialog protected void configureShell( Shell shell ) { super.configureShell( shell ); - shell.setText( "Add C/C++ Watchpoint" ); + shell.setText( CDebugUIPlugin.getResourceString("internal.ui.actions.AddWatchpointDialog.Add_C_C++_Watchpoint") ); //$NON-NLS-1$ shell.setImage( CDebugImages.get( CDebugImages.IMG_OBJS_WATCHPOINT_ENABLED ) ); } @@ -101,7 +102,7 @@ public class AddWatchpointDialog extends Dialog private Text createExpressionText( Composite parent ) { Label label = new Label( parent, SWT.RIGHT ); - label.setText( "Expression to watch:" ); + label.setText( CDebugUIPlugin.getResourceString("internal.ui.actions.AddWatchpointDialog.Expression_to_watch") ); //$NON-NLS-1$ final Text text = new Text( parent, SWT.BORDER ); GridData gridData = new GridData( GridData.FILL_HORIZONTAL ); gridData.widthHint = 300; @@ -115,12 +116,12 @@ public class AddWatchpointDialog extends Dialog Group group = new Group( parent, SWT.NONE ); group.setLayout( new GridLayout() ); group.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); - group.setText( "Access" ); + group.setText( CDebugUIPlugin.getResourceString("internal.ui.actions.AddWatchpointDialog.Access") ); //$NON-NLS-1$ fChkBtnWrite = new Button( group, SWT.CHECK ); - fChkBtnWrite.setText( "Write" ); + fChkBtnWrite.setText( CDebugUIPlugin.getResourceString("internal.ui.actions.AddWatchpointDialog.Write") ); //$NON-NLS-1$ addSelectionListener( fChkBtnWrite ); fChkBtnRead = new Button( group, SWT.CHECK ); - fChkBtnRead.setText( "Read" ); + fChkBtnRead.setText( CDebugUIPlugin.getResourceString("internal.ui.actions.AddWatchpointDialog.Read") ); //$NON-NLS-1$ addSelectionListener( fChkBtnRead ); } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AutoRefreshMemoryAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AutoRefreshMemoryAction.java index 8d415332db8..34615e90540 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AutoRefreshMemoryAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AutoRefreshMemoryAction.java @@ -11,6 +11,7 @@ import org.eclipse.cdt.debug.internal.ui.views.memory.MemoryViewer; import org.eclipse.ui.actions.SelectionProviderAction; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.texteditor.IUpdate; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * Enter type comment. @@ -28,11 +29,11 @@ public class AutoRefreshMemoryAction extends SelectionProviderAction implements */ public AutoRefreshMemoryAction( MemoryViewer viewer ) { - super( viewer, "Auto-Refresh" ); + super( viewer, CDebugUIPlugin.getResourceString("internal.ui.actions.AutoRefreshMemoryAction.Auto-Refresh") ); //$NON-NLS-1$ fMemoryViewer = viewer; CDebugImages.setLocalImageDescriptors( this, CDebugImages.IMG_LCL_AUTO_REFRESH ); - setDescription( "Automatically Refresh Memory Block" ); - setToolTipText( "Auto-Refresh" ); + setDescription( CDebugUIPlugin.getResourceString("internal.ui.actions.AutoRefreshMemoryAction.Automatically_Refresh_Memory_Block") ); //$NON-NLS-1$ + setToolTipText( CDebugUIPlugin.getResourceString("internal.ui.actions.AutoRefreshMemoryAction.Auto-Refresh") ); //$NON-NLS-1$ WorkbenchHelp.setHelp( this, ICDebugHelpContextIds.AUTO_REFRESH_MEMORY_ACTION ); } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CBreakpointPreferencePage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CBreakpointPreferencePage.java index b616b0d3e21..9cef26236a8 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CBreakpointPreferencePage.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CBreakpointPreferencePage.java @@ -40,7 +40,7 @@ public class CBreakpointPreferencePage extends FieldEditorPreferencePage public BreakpointIntegerFieldEditor( String name, String labelText, Composite parent ) { super( name, labelText, parent ); - setErrorMessage( "Ignore count must be a positive integer" ); + setErrorMessage( CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.Ignore_count_must_be_positive_integer") ); //$NON-NLS-1$ } /** @@ -265,7 +265,7 @@ public class CBreakpointPreferencePage extends FieldEditorPreferencePage String condition= breakpoint.getCondition(); if ( condition == null ) { - condition = ""; + condition = ""; //$NON-NLS-1$ } store.setValue( CBreakpointPreferenceStore.CONDITION, condition ); @@ -292,7 +292,7 @@ public class CBreakpointPreferencePage extends FieldEditorPreferencePage if ( breakpoint instanceof ICFunctionBreakpoint ) { ICFunctionBreakpoint fbrkpt = (ICFunctionBreakpoint)breakpoint; - String function = "Not available"; + String function = CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.Not_available"); //$NON-NLS-1$ try { function = fbrkpt.getFunction(); @@ -305,9 +305,9 @@ public class CBreakpointPreferencePage extends FieldEditorPreferencePage } if ( function != null ) { - addField( createLabelEditor( getFieldEditorParent(), "Function name: ", function ) ); + addField( createLabelEditor( getFieldEditorParent(), CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.Function_name"), function ) ); //$NON-NLS-1$ } - setTitle( "C/C++ Function Breakpoint Properties" ); + setTitle( CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.Function_Breakpoint_Properties") ); //$NON-NLS-1$ } else if ( breakpoint instanceof ICAddressBreakpoint ) { @@ -325,18 +325,18 @@ public class CBreakpointPreferencePage extends FieldEditorPreferencePage } if ( address != null ) { - addField( createLabelEditor( getFieldEditorParent(), "Address: ", address ) ); + addField( createLabelEditor( getFieldEditorParent(), CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.Address"), address ) ); //$NON-NLS-1$ } - setTitle( "C/C++ Address Breakpoint Properties" ); + setTitle( CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.Address_Breakpoint_Properties") ); //$NON-NLS-1$ } else if ( breakpoint instanceof ILineBreakpoint ) { String fileName = breakpoint.getMarker().getResource().getLocation().toOSString(); if ( fileName != null ) { - addField( createLabelEditor( getFieldEditorParent(), "File: ", fileName ) ); + addField( createLabelEditor( getFieldEditorParent(), CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.File"), fileName ) ); //$NON-NLS-1$ } - setTitle( "C/C++ Line Breakpoint Properties" ); + setTitle( CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.Line_Breakpoint_Properties") ); //$NON-NLS-1$ ILineBreakpoint lBreakpoint = (ILineBreakpoint)breakpoint; StringBuffer lineNumber = new StringBuffer( 4 ); try @@ -353,7 +353,7 @@ public class CBreakpointPreferencePage extends FieldEditorPreferencePage } if ( lineNumber.length() > 0 ) { - addField( createLabelEditor( getFieldEditorParent(), "Line Number: ", lineNumber.toString() ) ); + addField( createLabelEditor( getFieldEditorParent(), CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.Line_Number"), lineNumber.toString() ) ); //$NON-NLS-1$ } } else if ( breakpoint instanceof ICWatchpoint ) @@ -361,19 +361,19 @@ public class CBreakpointPreferencePage extends FieldEditorPreferencePage String projectName = breakpoint.getMarker().getResource().getLocation().toOSString(); if ( projectName != null ) { - addField( createLabelEditor( getFieldEditorParent(), "Project: ", projectName ) ); + addField( createLabelEditor( getFieldEditorParent(), CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.Project"), projectName ) ); //$NON-NLS-1$ } ICWatchpoint watchpoint = (ICWatchpoint)breakpoint; - String title = ""; - String expression = ""; + String title = ""; //$NON-NLS-1$ + String expression = ""; //$NON-NLS-1$ try { if ( watchpoint.isReadType() && !watchpoint.isWriteType() ) - title = "C/C++ Read Watchpoint Properties"; + title = CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.Read_Watchpoint_Properties"); //$NON-NLS-1$ else if ( !watchpoint.isReadType() && watchpoint.isWriteType() ) - title = "C/C++ Watchpoint Properties"; + title = CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.Watchpoint_Properties"); //$NON-NLS-1$ else - title = "C/C++ Access Watchpoint Properties"; + title = CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.Access_Watchpoint_Properties"); //$NON-NLS-1$ expression = watchpoint.getExpression(); } catch( CoreException ce ) @@ -381,21 +381,21 @@ public class CBreakpointPreferencePage extends FieldEditorPreferencePage CDebugUIPlugin.log( ce ); } setTitle( title ); - addField( createLabelEditor( getFieldEditorParent(), "Expression To Watch: ", expression ) ); + addField( createLabelEditor( getFieldEditorParent(), CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.Expression_To_Watch"), expression ) ); //$NON-NLS-1$ } } protected void createConditionEditor( Composite parent ) { - fCondition = new BreakpointStringFieldEditor( CBreakpointPreferenceStore.CONDITION, "&Condition", parent ); + fCondition = new BreakpointStringFieldEditor( CBreakpointPreferenceStore.CONDITION, CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.Condition"), parent ); //$NON-NLS-1$ fCondition.setEmptyStringAllowed( true ); - fCondition.setErrorMessage( "Invalid_condition" ); + fCondition.setErrorMessage( CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.Invalid_condition") ); //$NON-NLS-1$ addField( fCondition ); } protected void createIgnoreCountEditor( Composite parent ) { - fIgnoreCount = new BreakpointIntegerFieldEditor( CBreakpointPreferenceStore.IGNORE_COUNT, "&Ignore Count: ", parent ); + fIgnoreCount = new BreakpointIntegerFieldEditor( CBreakpointPreferenceStore.IGNORE_COUNT, CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPreferencePage.Ignore_Count"), parent ); //$NON-NLS-1$ fIgnoreCount.setValidRange( 0, Integer.MAX_VALUE ); fIgnoreCountTextControl = fIgnoreCount.getTextControl( parent ); try diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CBreakpointPropertiesRulerAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CBreakpointPropertiesRulerAction.java index 0e5e6863cc8..c9cbab96be5 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CBreakpointPropertiesRulerAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CBreakpointPropertiesRulerAction.java @@ -9,6 +9,7 @@ import org.eclipse.cdt.debug.core.model.ICBreakpoint; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.text.source.IVerticalRulerInfo; import org.eclipse.ui.texteditor.ITextEditor; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * @@ -26,7 +27,7 @@ public class CBreakpointPropertiesRulerAction extends AbstractBreakpointRulerAct { setInfo( info ); setTextEditor( editor ); - setText( "Breakpoint &Properties..." ); + setText( CDebugUIPlugin.getResourceString("internal.ui.actions.CBreakpointPropertiesRulerAction.Breakpoint_Properties") ); //$NON-NLS-1$ } /** diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToArrayActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToArrayActionDelegate.java index 8495b3855ce..8978883bf3e 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToArrayActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToArrayActionDelegate.java @@ -48,7 +48,7 @@ public class CastToArrayActionDelegate extends ActionDelegate implements IObject { protected class CastToArrayDialog extends Dialog { - private String fType = ""; + private String fType = ""; //$NON-NLS-1$ private int fFirstIndex = 0; private int fLength = 0; @@ -61,7 +61,7 @@ public class CastToArrayActionDelegate extends ActionDelegate implements IObject public CastToArrayDialog( Shell parentShell, String initialType, int initialStart, int initialLength ) { super( parentShell ); - fType = ( initialType == null ) ? "" : initialType; + fType = ( initialType == null ) ? "" : initialType; //$NON-NLS-1$ fFirstIndex = initialStart; fLength = initialLength; } @@ -87,7 +87,7 @@ public class CastToArrayActionDelegate extends ActionDelegate implements IObject protected void configureShell( Shell newShell ) { super.configureShell( newShell ); - newShell.setText( "Display As Array" ); + newShell.setText( CDebugUIPlugin.getResourceString("internal.ui.actions.CastToArrayActionDelegate.Shell_Display_As_Array") ); //$NON-NLS-1$ newShell.setImage( CDebugImages.get( CDebugImages.IMG_LCL_DISPLAY_AS_ARRAY ) ); } @@ -141,7 +141,7 @@ public class CastToArrayActionDelegate extends ActionDelegate implements IObject ((GridData)composite.getLayoutData()).widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH ); ((GridLayout)composite.getLayout()).makeColumnsEqualWidth = true; - Label label = ControlFactory.createLabel( composite, "Start index:" ); + Label label = ControlFactory.createLabel( composite, CDebugUIPlugin.getResourceString("internal.ui.actions.CastToArrayActionDelegate.Start_index") ); //$NON-NLS-1$ ((GridData)label.getLayoutData()).horizontalSpan = 3; fFirstIndexText = ControlFactory.createTextField( composite ); fFirstIndexText.addModifyListener( @@ -153,7 +153,7 @@ public class CastToArrayActionDelegate extends ActionDelegate implements IObject } } ); - label = ControlFactory.createLabel( composite, "Length:" ); + label = ControlFactory.createLabel( composite, CDebugUIPlugin.getResourceString("internal.ui.actions.CastToArrayActionDelegate.Length") ); //$NON-NLS-1$ ((GridData)label.getLayoutData()).horizontalSpan = 3; fLengthText = ControlFactory.createTextField( composite ); fLengthText.addModifyListener( @@ -169,11 +169,11 @@ public class CastToArrayActionDelegate extends ActionDelegate implements IObject protected void validateInput() { boolean enabled = true; - String message = ""; + String message = ""; //$NON-NLS-1$ String firstIndex = fFirstIndexText.getText().trim(); if ( firstIndex.length() == 0 ) { - message = "The 'First index' field must not be empty."; + message = CDebugUIPlugin.getResourceString("internal.ui.actions.CastToArrayActionDelegate.First_index_field_must_not_be_empty"); //$NON-NLS-1$ enabled = false; } else @@ -184,7 +184,7 @@ public class CastToArrayActionDelegate extends ActionDelegate implements IObject } catch( NumberFormatException e ) { - message = "Invalid first index."; + message = CDebugUIPlugin.getResourceString("internal.ui.actions.CastToArrayActionDelegate.7"); //$NON-NLS-1$ enabled = false; } if ( enabled ) @@ -192,7 +192,7 @@ public class CastToArrayActionDelegate extends ActionDelegate implements IObject String lengthText = fLengthText.getText().trim(); if ( lengthText.length() == 0 ) { - message = "The 'Last index' field must not be empty."; + message = CDebugUIPlugin.getResourceString("internal.ui.actions.CastToArrayActionDelegate.Invalid_first_index"); //$NON-NLS-1$ enabled = false; } else @@ -204,12 +204,12 @@ public class CastToArrayActionDelegate extends ActionDelegate implements IObject } catch( NumberFormatException e ) { - message = "Invalid last index."; + message = CDebugUIPlugin.getResourceString("internal.ui.actions.CastToArrayActionDelegate.Invalid_last_index."); //$NON-NLS-1$ enabled = false; } if ( enabled && length < 1 ) { - message = "The length must be greater than 0."; + message = CDebugUIPlugin.getResourceString("internal.ui.actions.CastToArrayActionDelegate.The_length_must_be_greater_than_0"); //$NON-NLS-1$ enabled = false; } } @@ -292,7 +292,7 @@ public class CastToArrayActionDelegate extends ActionDelegate implements IObject IWorkbenchWindow window= CDebugUIPlugin.getActiveWorkbenchWindow(); if ( window != null ) { - CDebugUIPlugin.errorDialog( "Unable to display this variable as an array.", getStatus() ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.CastToArrayActionDelegate.Unable_to_display_this_variable_as_an_array"), getStatus() ); //$NON-NLS-1$ } else { diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToTypeActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToTypeActionDelegate.java index b20b2951e52..f46f99f3062 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToTypeActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/CastToTypeActionDelegate.java @@ -46,7 +46,7 @@ public class CastToTypeActionDelegate extends ActionDelegate { if ( newText.trim().length() == 0 ) { - return "The 'Type' field must not be empty."; + return CDebugUIPlugin.getResourceString("internal.ui.actions.CastToTypeActionDelegate.Type_field_must_not_be_empty"); //$NON-NLS-1$ } return null; } @@ -57,7 +57,10 @@ public class CastToTypeActionDelegate extends ActionDelegate { public CastToTypeDialog( Shell parentShell, String initialValue ) { - super( parentShell, "Cast To Type", "Enter type:", initialValue, new CastToTypeInputValidator() ); + super( parentShell, + CDebugUIPlugin.getResourceString("internal.ui.actions.CastToTypeActionDelegate.Cast_To_Type"), + CDebugUIPlugin.getResourceString("internal.ui.actions.CastToTypeActionDelegate.Enter_type"), + initialValue, new CastToTypeInputValidator() ); //$NON-NLS-1$ //$NON-NLS-2$ } /* (non-Javadoc) @@ -116,7 +119,7 @@ public class CastToTypeActionDelegate extends ActionDelegate IWorkbenchWindow window= CDebugUIPlugin.getActiveWorkbenchWindow(); if ( window != null ) { - CDebugUIPlugin.errorDialog( "Unable to cast to type.", getStatus() ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.CastToTypeActionDelegate.Unable_to_cast_to_type."), getStatus() ); //$NON-NLS-1$ } else { diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ChangeRegisterValueAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ChangeRegisterValueAction.java index 1b6b353f5b6..09c59025029 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ChangeRegisterValueAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ChangeRegisterValueAction.java @@ -57,7 +57,7 @@ public class ChangeRegisterValueAction extends SelectionProviderAction */ public ChangeRegisterValueAction( Viewer viewer ) { - super( viewer, "Change Register Value" ); + super( viewer, CDebugUIPlugin.getResourceString("internal.ui.actions.ChangeRegisterValueAction.Change_Register_Value") ); //$NON-NLS-1$ setDescription( "Change Register Value" ); CDebugImages.setLocalImageDescriptors( this, CDebugImages.IMG_LCL_CHANGE_REGISTER_VALUE ); fTree = ((TreeViewer)viewer).getTree(); @@ -103,7 +103,7 @@ public class ChangeRegisterValueAction extends SelectionProviderAction // getting pushed down so that only there very tops are visible. Thus, // we have to specify different style constants for the different platforms. int textStyles = SWT.SINGLE | SWT.LEFT; - if ( SWT.getPlatform().equals( "win32" ) ) + if ( SWT.getPlatform().equals( "win32" ) ) //$NON-NLS-1$ { //$NON-NLS-1$ textStyles |= SWT.BORDER; } @@ -116,7 +116,7 @@ public class ChangeRegisterValueAction extends SelectionProviderAction } catch( DebugException de ) { - CDebugUIPlugin.errorDialog( "Setting the register value failed.", de ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.ChangeRegisterValueAction.Setting_the_register_value_failed"), de ); //$NON-NLS-1$ } TreeItem[] selectedItems = fTree.getSelection(); fTreeEditor.horizontalAlignment = SWT.LEFT; diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ClearMemoryAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ClearMemoryAction.java index dffbed5b73d..99153c5e914 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ClearMemoryAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ClearMemoryAction.java @@ -11,6 +11,7 @@ import org.eclipse.cdt.debug.internal.ui.views.memory.MemoryViewer; import org.eclipse.ui.actions.SelectionProviderAction; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.texteditor.IUpdate; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * Enter type comment. @@ -28,11 +29,11 @@ public class ClearMemoryAction extends SelectionProviderAction implements IUpdat */ public ClearMemoryAction( MemoryViewer viewer ) { - super( viewer, "Clear" ); + super( viewer, CDebugUIPlugin.getResourceString("internal.ui.actions.ClearMemoryAction.Clear") ); //$NON-NLS-1$ fMemoryViewer = viewer; CDebugImages.setLocalImageDescriptors( this, CDebugImages.IMG_LCL_MEMORY_CLEAR ); - setDescription( "Clear Memory Block" ); - setToolTipText( "Clear" ); + setDescription( CDebugUIPlugin.getResourceString("internal.ui.actions.ClearMemoryAction.Clear_Memory_Block") ); //$NON-NLS-1$ + setToolTipText( CDebugUIPlugin.getResourceString("internal.ui.actions.ClearMemoryAction.Clear") ); //$NON-NLS-1$ WorkbenchHelp.setHelp( this, ICDebugHelpContextIds.MEMORY_CLEAR_ACTION ); } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableDisableBreakpointRulerAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableDisableBreakpointRulerAction.java index 5de26a7f8b5..397377a365a 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableDisableBreakpointRulerAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableDisableBreakpointRulerAction.java @@ -15,7 +15,7 @@ public class EnableDisableBreakpointRulerAction extends AbstractBreakpointRulerA { setInfo( info ); setTextEditor( editor ); - setText( "&Enable Breakpoint" ); + setText( CDebugUIPlugin.getResourceString("internal.ui.actions.EnableDisableBreakpointRulerAction.Enable_Breakpoint") ); //$NON-NLS-1$ } /** @@ -32,8 +32,8 @@ public class EnableDisableBreakpointRulerAction extends AbstractBreakpointRulerA catch (CoreException e) { ErrorDialog.openError( getTextEditor().getEditorSite().getShell(), - "Enabling/disabling breakpoints", - "Exceptions occurred enabling disabling the breakpoint", + CDebugUIPlugin.getResourceString("internal.ui.actions.EnableDisableBreakpointRulerAction.Enabling_disabling_breakpoints"), //$NON-NLS-1$ + CDebugUIPlugin.getResourceString("internal.ui.actions.EnableDisableBreakpointRulerAction.Exceptions_occured_enabling_disabling_breakpoint"), //$NON-NLS-1$ e.getStatus() ); } } @@ -54,7 +54,7 @@ public class EnableDisableBreakpointRulerAction extends AbstractBreakpointRulerA try { boolean enabled = getBreakpoint().isEnabled(); - setText( enabled ? "&Disable Breakpoint" : "&Enable Breakpoint" ); + setText( enabled ? CDebugUIPlugin.getResourceString("internal.ui.actions.EnableDisableBreakpointRulerAction.Disable_breakpoint") : "&Enable Breakpoint" ); //$NON-NLS-1$ } catch( CoreException ce ) { diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableVariablesActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableVariablesActionDelegate.java index 4b341bf2a5a..6b4df491c39 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableVariablesActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableVariablesActionDelegate.java @@ -81,7 +81,7 @@ public class EnableVariablesActionDelegate implements IViewActionDelegate return; final Iterator enum = selection.iterator(); - final MultiStatus ms = new MultiStatus( CDebugUIPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, "Enable variable(s) failed.", null ); + final MultiStatus ms = new MultiStatus( CDebugUIPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, CDebugUIPlugin.getResourceString("internal.ui.actions.EnableVariablesActionDelegate.Enable_variables_failed."), null ); //$NON-NLS-1$ Runnable runnable = new Runnable() { public void run() @@ -117,7 +117,7 @@ public class EnableVariablesActionDelegate implements IViewActionDelegate if ( !ms.isOK() ) { - CDebugUIPlugin.errorDialog( "Exceptions occurred enabling the variable(s).", ms ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.EnableVariablesActionDelegate.Exceptions_occurred_enabling_the_variables"), ms ); //$NON-NLS-1$ } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ExpressionDialog.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ExpressionDialog.java index 4cb372c460d..c7055b8aae6 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ExpressionDialog.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ExpressionDialog.java @@ -20,6 +20,7 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * @@ -48,7 +49,7 @@ public class ExpressionDialog extends Dialog protected void configureShell( Shell shell ) { super.configureShell( shell ); - shell.setText( "Add Expression" ); + shell.setText( CDebugUIPlugin.getResourceString("internal.ui.actions.ExpressionDialog.Add_Expression") ); //$NON-NLS-1$ shell.setImage( DebugPluginImages.getImage( IDebugUIConstants.IMG_OBJS_EXPRESSION ) ); } @@ -92,7 +93,7 @@ public class ExpressionDialog extends Dialog private Text createExpressionText( Composite parent ) { Label label = new Label( parent, SWT.RIGHT ); - label.setText( "Expression to add:" ); + label.setText( CDebugUIPlugin.getResourceString("internal.ui.actions.ExpressionDialog.Expression_to_add") ); //$NON-NLS-1$ final Text text = new Text( parent, SWT.BORDER ); GridData gridData = new GridData( GridData.FILL_HORIZONTAL ); gridData.widthHint = 300; diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsActionDelegate.java index 8d2b056ff7a..9ac7984262d 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsActionDelegate.java @@ -49,7 +49,7 @@ public class LoadSymbolsActionDelegate implements IObjectActionDelegate if ( getSharedLibrary() != null ) { final MultiStatus ms = new MultiStatus( CDebugUIPlugin.getUniqueIdentifier(), - DebugException.REQUEST_FAILED, "Unable to load symbols of shared library.", null ); + DebugException.REQUEST_FAILED, CDebugUIPlugin.getResourceString("internal.ui.actions.LoadSymbolsActionDelegate.Unable_to_load_symbols_of_shared_library"), null ); //$NON-NLS-1$ BusyIndicator.showWhile( Display.getCurrent(), new Runnable() { @@ -70,7 +70,7 @@ public class LoadSymbolsActionDelegate implements IObjectActionDelegate IWorkbenchWindow window = CDebugUIPlugin.getActiveWorkbenchWindow(); if ( window != null ) { - CDebugUIPlugin.errorDialog( "Operation failed.", ms ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.LoadSymbolsActionDelegate.Operation_failed"), ms ); //$NON-NLS-1$ } else { diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllAction.java index f7f460b1926..ee91ce9af5b 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllAction.java @@ -31,11 +31,11 @@ public class LoadSymbolsForAllAction extends Action implements IUpdate */ public LoadSymbolsForAllAction( Viewer viewer ) { - super( "Load Symbols For All" ); + super( CDebugUIPlugin.getResourceString("internal.ui.actions.LoadSymbolsForAllAction.Load_Symbols_For_all") ); //$NON-NLS-1$ fViewer = viewer; CDebugImages.setLocalImageDescriptors( this, CDebugImages.IMG_LCL_LOAD_ALL_SYMBOLS ); - setDescription( "Load symbols for all shared libraries." ); - setToolTipText( "Load Symbols For All" ); + setDescription( CDebugUIPlugin.getResourceString("internal.ui.actions.LoadSymbolsForAllAction.Load_symbols_for_all_shared_libraries.") ); //$NON-NLS-1$ + setToolTipText( CDebugUIPlugin.getResourceString("internal.ui.actions.LoadSymbolsForAllAction.Load_Symbols_For_All") ); //$NON-NLS-1$ WorkbenchHelp.setHelp( this, ICDebugHelpContextIds.LOAD_SYMBOLS_FOR_ALL ); } @@ -72,7 +72,7 @@ public class LoadSymbolsForAllAction extends Action implements IUpdate } catch( DebugException e ) { - CDebugUIPlugin.errorDialog( "Unable to load symbols.", e.getStatus() ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("ui.actions.LoadSymbolsForAllAction.Unable_to_load_symbols."), e.getStatus() ); //$NON-NLS-1$ } } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ManageBreakpointActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ManageBreakpointActionDelegate.java index 87a4c8e61ae..20567d873fa 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ManageBreakpointActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ManageBreakpointActionDelegate.java @@ -217,7 +217,7 @@ public class ManageBreakpointActionDelegate implements IWorkbenchWindowActionDel } catch( CoreException ce ) { - CDebugUIPlugin.errorDialog( "Cannot add breakpoint", ce ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.ManageBreakpointActionDelegate.Cannot_add_breakpoint"), ce ); //$NON-NLS-1$ } } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ManageBreakpointRulerAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ManageBreakpointRulerAction.java index 1d177911170..363149f97b6 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ManageBreakpointRulerAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ManageBreakpointRulerAction.java @@ -61,8 +61,8 @@ public class ManageBreakpointRulerAction extends Action implements IUpdate { fRuler = ruler; fTextEditor = editor; - fAddLabel = "Add Breakpoint"; - fRemoveLabel = "Remove Breakpoint"; + fAddLabel = CDebugUIPlugin.getResourceString("internal.ui.actions.ManageBreakpointRulerAction.Add_Breakpoint"); //$NON-NLS-1$ + fRemoveLabel = CDebugUIPlugin.getResourceString("internal.ui.actions.ManageBreakpointRulerAction.Remove_Breakpoint"); //$NON-NLS-1$ } /* (non-Javadoc) @@ -243,11 +243,11 @@ public class ManageBreakpointRulerAction extends Action implements IUpdate } catch( DebugException e ) { - CDebugUIPlugin.errorDialog( "Cannot add breakpoint", e ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.ManageBreakpointRulerAction.Cannot_add_breakpoint"), e ); //$NON-NLS-1$ } catch( CoreException e ) { - CDebugUIPlugin.errorDialog( "Cannot add breakpoint", e ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.ManageBreakpointRulerAction.Cannot_add_breakpoint"), e ); //$NON-NLS-1$ } } @@ -263,7 +263,7 @@ public class ManageBreakpointRulerAction extends Action implements IUpdate { if ( CDebugModel.lineBreakpointExists( fileName, lineNumber ) == null ) { - CDebugModel.createLineBreakpoint( editorInput.getFile(), lineNumber, true, 0, "", true ); + CDebugModel.createLineBreakpoint( editorInput.getFile(), lineNumber, true, 0, "", true ); //$NON-NLS-1$ } } } @@ -284,7 +284,7 @@ public class ManageBreakpointRulerAction extends Action implements IUpdate long address = ((IDisassemblyStorage)editorInput.getStorage()).getAddress( lineNumber ); if ( address != 0 && CDebugModel.addressBreakpointExists( resource, address ) == null ) { - CDebugModel.createAddressBreakpoint( resource, address, true, 0, "", true ); + CDebugModel.createAddressBreakpoint( resource, address, true, 0, "", true ); //$NON-NLS-1$ } } } @@ -305,7 +305,7 @@ public class ManageBreakpointRulerAction extends Action implements IUpdate } catch( CoreException e ) { - CDebugUIPlugin.errorDialog( "Cannot remove breakpoint", e ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.ManageBreakpointRulerAction.Cannot_remove_breakpoint"), e ); //$NON-NLS-1$ } } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ManageFunctionBreakpointActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ManageFunctionBreakpointActionDelegate.java index b33c884ab45..e5921c24f84 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ManageFunctionBreakpointActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ManageFunctionBreakpointActionDelegate.java @@ -107,12 +107,12 @@ public class ManageFunctionBreakpointActionDelegate extends ActionDelegate } else { - CDebugModel.createFunctionBreakpoint( function, true, 0, "", true ); + CDebugModel.createFunctionBreakpoint( function, true, 0, "", true ); //$NON-NLS-1$ } } catch( CoreException e ) { - CDebugUIPlugin.errorDialog( "Cannot add breakpoint", e ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.ManageFunctionBreakpointActionDelegate.Cannot_add_breakpoint"), e ); //$NON-NLS-1$ } } @@ -132,7 +132,7 @@ public class ManageFunctionBreakpointActionDelegate extends ActionDelegate } else { - CDebugModel.createMethodBreakpoint( method, true, 0, "", true ); + CDebugModel.createMethodBreakpoint( method, true, 0, "", true ); //$NON-NLS-1$ } } catch( CoreException e ) diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MemoryFormatAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MemoryFormatAction.java index c13f19d9e59..2d45b9aa963 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MemoryFormatAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MemoryFormatAction.java @@ -59,24 +59,24 @@ public class MemoryFormatAction extends Action implements IUpdate } catch( DebugException e ) { - CDebugUIPlugin.errorDialog( "Unable to change format.", e.getStatus() ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.MemoryFormatAction.Unable_to_change_format"), e.getStatus() ); //$NON-NLS-1$ setChecked( false ); } } private static String getLabel( int id ) { - String label = ""; + String label = ""; //$NON-NLS-1$ switch( id ) { case( IFormattedMemoryBlock.MEMORY_FORMAT_HEX ): - label = "Hexadecimal"; + label = CDebugUIPlugin.getResourceString("internal.ui.actions.MemoryFormatAction.Hexadecimal"); //$NON-NLS-1$ break; case( IFormattedMemoryBlock.MEMORY_FORMAT_SIGNED_DECIMAL ): - label = "Signed Decimal"; + label = CDebugUIPlugin.getResourceString("internal.ui.actions.MemoryFormatAction.Signed_Decimal"); //$NON-NLS-1$ break; case( IFormattedMemoryBlock.MEMORY_FORMAT_UNSIGNED_DECIMAL ): - label = "Unsigned Decimal"; + label = CDebugUIPlugin.getResourceString("internal.ui.actions.MemoryFormatAction.Unsigned_Decimal"); //$NON-NLS-1$ break; } return label; @@ -84,6 +84,6 @@ public class MemoryFormatAction extends Action implements IUpdate public String getActionId() { - return "MemoryFormat" + fFormat; + return "MemoryFormat" + fFormat; //$NON-NLS-1$ } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MemoryNumberOfColumnAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MemoryNumberOfColumnAction.java index 286a84bb259..3bfbe153e8f 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MemoryNumberOfColumnAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MemoryNumberOfColumnAction.java @@ -38,7 +38,11 @@ public class MemoryNumberOfColumnAction extends Action implements IUpdate private static String getLabel( int numberOfColumns ) { - return Integer.toString( numberOfColumns) + " column" + ( ( numberOfColumns > 1 ) ? "s" : "" ); + //String col = CDebugUIPlugin.getResourceString("internal.ui.actions.MemoryNumberOfColumnsAction.column"); + //String cols = CDebugUIPlugin.getResourceString("internal.ui.actions.MemoryNumberOfColumnsAction.columns"); + //ChoiceFormat myform = new ChoiceFormat("0# "+cols+"|1# "+col+"|2# "+cols); + //return Integer.toString( numberOfColumns) + myform.format(numberOfColumns); + return CDebugUIPlugin.getFormattedString("internal.ui.actions.MemoryNumberOfColumnsAction.number_of_columns", new Integer(numberOfColumns)); //$NON-NLS-1$ } /* (non-Javadoc) @@ -62,13 +66,13 @@ public class MemoryNumberOfColumnAction extends Action implements IUpdate } catch( DebugException e ) { - CDebugUIPlugin.errorDialog( "Unable to change the column number.", e.getStatus() ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.MemoryNumberOfColumnAction.Unable_to_change_the_column_number."), e.getStatus() ); //$NON-NLS-1$ setChecked( false ); } } public String getActionId() { - return "MemoryNumberOfColumns" + fNumberOfColumns; + return "MemoryNumberOfColumns" + fNumberOfColumns; //$NON-NLS-1$ } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MemorySizeAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MemorySizeAction.java index e9c153ae13d..bc5125dd3ba 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MemorySizeAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MemorySizeAction.java @@ -48,21 +48,18 @@ public class MemorySizeAction extends Action implements IUpdate private static String getLabel( int id ) { - String label = ""; + String label = ""; //$NON-NLS-1$ + switch( id ) { case( IFormattedMemoryBlock.MEMORY_SIZE_BYTE ): - label = "1 byte"; - break; case( IFormattedMemoryBlock.MEMORY_SIZE_HALF_WORD ): - label = "2 bytes"; - break; case( IFormattedMemoryBlock.MEMORY_SIZE_WORD ): - label = "4 bytes"; - break; case( IFormattedMemoryBlock.MEMORY_SIZE_DOUBLE_WORD ): - label = "8 bytes"; - break; + // English value of key is "{0, number} {0, choice, 1#byte|2#bytes}" + label = CDebugUIPlugin.getFormattedString("internal.ui.actions.MemorySizeAction.byte_bytes", new Integer(id)); //$NON-NLS-1$ + break; + } return label; } @@ -79,13 +76,13 @@ public class MemorySizeAction extends Action implements IUpdate } catch( DebugException e ) { - CDebugUIPlugin.errorDialog( "Unable to change memory unit size.", e.getStatus() ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("MemorySizeAction.Unable_to_change_memory_unit_size"), e.getStatus() ); //$NON-NLS-1$ setChecked( false ); } } public String getActionId() { - return "MemorySize" + fId; + return "MemorySize" + fId; //$NON-NLS-1$ } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RefreshAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RefreshAction.java index 6211528f1ee..075fd99c080 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RefreshAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RefreshAction.java @@ -64,7 +64,7 @@ public class RefreshAction extends Action implements IUpdate } catch( DebugException e ) { - CDebugUIPlugin.errorDialog( "Unable to refresh.", e.getStatus() ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.RefreshAction.Unable_to_refresh"), e.getStatus() ); //$NON-NLS-1$ } } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RefreshMemoryAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RefreshMemoryAction.java index c7d39f3c8cf..9c6deb368a1 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RefreshMemoryAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RefreshMemoryAction.java @@ -11,6 +11,7 @@ import org.eclipse.cdt.debug.internal.ui.views.memory.MemoryViewer; import org.eclipse.ui.actions.SelectionProviderAction; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.texteditor.IUpdate; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * Enter type comment. @@ -28,11 +29,11 @@ public class RefreshMemoryAction extends SelectionProviderAction implements IUpd */ public RefreshMemoryAction( MemoryViewer viewer ) { - super( viewer, "Refresh" ); + super( viewer, "Refresh" ); //$NON-NLS-1$ fMemoryViewer = viewer; CDebugImages.setLocalImageDescriptors( this, CDebugImages.IMG_LCL_REFRESH ); - setDescription( "Refresh Memory Block" ); - setToolTipText( "Refresh" ); + setDescription( CDebugUIPlugin.getResourceString("internal.ui.actions.RefreshMemoryAction.Refresh_Memory_Block") ); //$NON-NLS-1$ + setToolTipText( CDebugUIPlugin.getResourceString("internal.ui.actions.RefreshMemoryAction.Refresh") ); //$NON-NLS-1$ WorkbenchHelp.setHelp( this, ICDebugHelpContextIds.REFRESH_MEMORY_ACTION ); } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RestartActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RestartActionDelegate.java index 011931efcd6..2d709cf9e25 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RestartActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RestartActionDelegate.java @@ -7,6 +7,7 @@ package org.eclipse.cdt.debug.internal.ui.actions; import org.eclipse.cdt.debug.core.model.IRestart; import org.eclipse.debug.core.DebugException; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * @@ -57,7 +58,7 @@ public class RestartActionDelegate extends AbstractListenerActionDelegate */ protected String getStatusMessage() { - return "Exceptions occurred attempting to restart."; + return CDebugUIPlugin.getResourceString("internal.ui.actions.RestartActionDelegate.Exceptions_occurred_attempting_to_restart"); //$NON-NLS-1$ } /** @@ -65,7 +66,7 @@ public class RestartActionDelegate extends AbstractListenerActionDelegate */ protected String getErrorDialogMessage() { - return "Restart failed."; + return CDebugUIPlugin.getResourceString("internal.ui.actions.RestartActionDelegate.Restart_failed"); //$NON-NLS-1$ } /** @@ -73,6 +74,6 @@ public class RestartActionDelegate extends AbstractListenerActionDelegate */ protected String getErrorDialogTitle() { - return "Restart"; + return CDebugUIPlugin.getResourceString("internal.ui.actions.RestartActionDelegate.Restart"); //$NON-NLS-1$ } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RestoreDefaultTypeActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RestoreDefaultTypeActionDelegate.java index 424b31cf383..f5cfcd70077 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RestoreDefaultTypeActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RestoreDefaultTypeActionDelegate.java @@ -84,7 +84,7 @@ public class RestoreDefaultTypeActionDelegate extends ActionDelegate IWorkbenchWindow window= CDebugUIPlugin.getActiveWorkbenchWindow(); if ( window != null ) { - CDebugUIPlugin.errorDialog( "Unable to cast to type.", getStatus() ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.RestoreDefaultTypeActionDelegate.Unable_to_cast_type"), getStatus() ); //$NON-NLS-1$ } else { diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RunToLineRulerAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RunToLineRulerAction.java index d0d57687ac5..22abd4bae07 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RunToLineRulerAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RunToLineRulerAction.java @@ -48,7 +48,7 @@ public class RunToLineRulerAction extends Action { setInfo( info ); setTextEditor( editor ); - setText( "Run To Line" ); + setText( CDebugUIPlugin.getResourceString("internal.ui.actions.RunToLineRulerAction.Run_To_Line") ); //$NON-NLS-1$ initializeTarget(); update(); } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowAsciiAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowAsciiAction.java index 352c79c1690..425e56115ad 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowAsciiAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowAsciiAction.java @@ -11,6 +11,7 @@ import org.eclipse.cdt.debug.internal.ui.views.memory.MemoryViewer; import org.eclipse.ui.actions.SelectionProviderAction; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.texteditor.IUpdate; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * Enter type comment. @@ -28,11 +29,11 @@ public class ShowAsciiAction extends SelectionProviderAction implements IUpdate */ public ShowAsciiAction( MemoryViewer viewer ) { - super( viewer, "Show ASCII" ); + super( viewer, CDebugUIPlugin.getResourceString("internal.ui.actions.ShowAsciiAction.Show_ASCII") ); //$NON-NLS-1$ fMemoryViewer = viewer; CDebugImages.setLocalImageDescriptors( this, CDebugImages.IMG_LCL_SHOW_ASCII ); - setDescription( "Show ASCII" ); - setToolTipText( "Show ASCII" ); + setDescription( CDebugUIPlugin.getResourceString("internal.ui.actions.ShowAsciiAction.Show_ASCII") ); //$NON-NLS-1$ + setToolTipText( CDebugUIPlugin.getResourceString("internal.ui.actions.ShowAsciiAction.Show_ASCII") ); //$NON-NLS-1$ WorkbenchHelp.setHelp( this, ICDebugHelpContextIds.MEMORY_SHOW_ASCII_ACTION ); } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowRegisterTypesAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowRegisterTypesAction.java index ba13ef8b818..91e3d47d14b 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowRegisterTypesAction.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowRegisterTypesAction.java @@ -32,9 +32,9 @@ public class ShowRegisterTypesAction extends Action */ public ShowRegisterTypesAction( IDebugView view ) { - super( "Show &Type Names", IAction.AS_CHECK_BOX ); + super( CDebugUIPlugin.getResourceString("internal.ui.actions.ShowRegisterTypesAction.Show_Type_Names_checkbox"), IAction.AS_CHECK_BOX ); //$NON-NLS-1$ setView( view ); - setToolTipText( "Show Type Names" ); + setToolTipText( CDebugUIPlugin.getResourceString("internal.ui.actions.ShowRegisterTypesAction.Show_Type_Names_tooltip") ); //$NON-NLS-1$ CDebugImages.setLocalImageDescriptors( this, CDebugImages.IMG_LCL_TYPE_NAMES ); setId( CDebugUIPlugin.getUniqueIdentifier() + ".ShowTypesAction" ); //$NON-NLS-1$ WorkbenchHelp.setHelp( this, ICDebugHelpContextIds.SHOW_TYPES_ACTION ); diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SignalActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SignalActionDelegate.java index 9ebe62b460e..7089c1b8c52 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SignalActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SignalActionDelegate.java @@ -52,7 +52,7 @@ public class SignalActionDelegate implements IObjectActionDelegate { final MultiStatus ms = new MultiStatus( CDebugUIPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, - MessageFormat.format( "Unable to deliver the signal ''{0}'' to the target.", new String[] { getSignal().getName() } ), + MessageFormat.format( CDebugUIPlugin.getResourceString("internal.ui.actions.SignalActionDelegate.Unable_to_deliver_signal_to_target"), new String[] { getSignal().getName() } ), //$NON-NLS-1$ null ); BusyIndicator.showWhile( Display.getCurrent(), new Runnable() @@ -74,7 +74,7 @@ public class SignalActionDelegate implements IObjectActionDelegate IWorkbenchWindow window = CDebugUIPlugin.getActiveWorkbenchWindow(); if ( window != null ) { - CDebugUIPlugin.errorDialog( "Operation failed.", ms ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.SignalActionDelegate.Operation_failed"), ms ); //$NON-NLS-1$ } else { diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SignalZeroObjectActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SignalZeroObjectActionDelegate.java index d248889936e..7ab7d3e6413 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SignalZeroObjectActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SignalZeroObjectActionDelegate.java @@ -51,7 +51,7 @@ public class SignalZeroObjectActionDelegate implements IObjectActionDelegate { final MultiStatus ms = new MultiStatus( CDebugUIPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, - "Unable to resume ignoring signal.", + CDebugUIPlugin.getResourceString("internal.ui.actions.SignalZeroObjectActionDelegate.Unable_to_resume_ignoring_signal"), //$NON-NLS-1$ null ); BusyIndicator.showWhile( Display.getCurrent(), new Runnable() @@ -73,7 +73,7 @@ public class SignalZeroObjectActionDelegate implements IObjectActionDelegate IWorkbenchWindow window = CDebugUIPlugin.getActiveWorkbenchWindow(); if ( window != null ) { - CDebugUIPlugin.errorDialog( "Operation failed.", ms ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.SignalZeroObjectActionDelegate.Operation_failed"), ms ); //$NON-NLS-1$ } else { diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SignalZeroWorkbenchActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SignalZeroWorkbenchActionDelegate.java index 580650284c8..272817aa8bd 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SignalZeroWorkbenchActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SignalZeroWorkbenchActionDelegate.java @@ -7,6 +7,7 @@ package org.eclipse.cdt.debug.internal.ui.actions; import org.eclipse.cdt.debug.core.model.IResumeWithoutSignal; import org.eclipse.debug.core.DebugException; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * Enter type comment. @@ -43,7 +44,7 @@ public class SignalZeroWorkbenchActionDelegate extends AbstractListenerActionDel */ protected String getStatusMessage() { - return "Exceptions occurred attempting to resume without signal."; + return CDebugUIPlugin.getResourceString("internal.ui.actions.SignalZeroWorkbenchActionDelegate.Exceptions_occurred_attempting_to_resume_without_signal"); //$NON-NLS-1$ } /** @@ -51,7 +52,7 @@ public class SignalZeroWorkbenchActionDelegate extends AbstractListenerActionDel */ protected String getErrorDialogMessage() { - return "Resume without signal failed."; + return CDebugUIPlugin.getResourceString("internal.ui.actions.SignalZeroWorkbenchActionDelegate.ErrorMsg_Resume_without_signal_failed"); //$NON-NLS-1$ } /** @@ -59,6 +60,6 @@ public class SignalZeroWorkbenchActionDelegate extends AbstractListenerActionDel */ protected String getErrorDialogTitle() { - return "Resume Without Signal"; + return CDebugUIPlugin.getResourceString("internal.ui.actions.SignalZeroWorkbenchActionDelegate.ErrorMsgTitle_Resume_Without_Signal"); //$NON-NLS-1$ } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SwitchToDisassemblyActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SwitchToDisassemblyActionDelegate.java index 9e8cfa2f30c..956f3660799 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SwitchToDisassemblyActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SwitchToDisassemblyActionDelegate.java @@ -16,6 +16,7 @@ import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.Viewer; import org.eclipse.ui.IViewPart; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * Enter type comment. @@ -80,7 +81,7 @@ public class SwitchToDisassemblyActionDelegate extends AbstractListenerActionDel */ protected String getStatusMessage() { - return "Exceptions occurred attempting to switch to disassembly/source mode."; + return CDebugUIPlugin.getResourceString("internal.ui.actions.SwitchToDisassemblyActionDelegate.Exceptions_occurred_attempting_to_switch_to_disassemblysource_mode."); //$NON-NLS-1$ } /** @@ -88,7 +89,7 @@ public class SwitchToDisassemblyActionDelegate extends AbstractListenerActionDel */ protected String getErrorDialogMessage() { - return "Switch to disassembly/source mode failed."; + return CDebugUIPlugin.getResourceString("internal.ui.actions.SwitchToDisassemblyActionDelegate.1"); //$NON-NLS-1$ } /** @@ -96,7 +97,7 @@ public class SwitchToDisassemblyActionDelegate extends AbstractListenerActionDel */ protected String getErrorDialogTitle() { - return "Switch to disassembly/source mode"; + return CDebugUIPlugin.getResourceString("internal.ui.actions.SwitchToDisassemblyActionDelegate.2"); //$NON-NLS-1$ } /* (non-Javadoc) diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/VariableFormatActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/VariableFormatActionDelegate.java index 1986a7bfc20..d06fbc058fc 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/VariableFormatActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/VariableFormatActionDelegate.java @@ -79,7 +79,7 @@ public class VariableFormatActionDelegate implements IObjectActionDelegate IWorkbenchWindow window = CDebugUIPlugin.getActiveWorkbenchWindow(); if ( window != null ) { - CDebugUIPlugin.errorDialog( "Unable to set format of variable.", ms ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("internal.ui.actions.VariableFormatActionDelegate.Unable_to_set_format_of_variable"), ms ); //$NON-NLS-1$ } else { diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/CDebugEditor.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/CDebugEditor.java index e2fc7e812c2..c136eaf8a17 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/CDebugEditor.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/CDebugEditor.java @@ -155,22 +155,22 @@ public class CDebugEditor extends CEditor Composite composite = createComposite( fScrolledComposite ); composite.setLayout( new GridLayout() ); - createTitleLabel( composite, "C/C++ File Editor" ); + createTitleLabel( composite, CDebugUIPlugin.getResourceString("internal.ui.editors.CDebugEditor.C_CPP_File_Editor") ); //$NON-NLS-1$ createLabel( composite, null ); createLabel( composite, null ); - createHeadingLabel( composite, "Source not found" ); + createHeadingLabel( composite, CDebugUIPlugin.getResourceString("internal.ui.editors.CDebugEditor.Source_not_found") ); //$NON-NLS-1$ Composite separator = createCompositeSeparator( composite ); GridData data = new GridData( GridData.FILL_HORIZONTAL ); data.heightHint = 2; separator.setLayoutData( data ); - fInputLabel = createLabel( composite, "" ); - createLabel( composite, "You can attach a new source location by pressing the button below:" ); + fInputLabel = createLabel( composite, "" ); //$NON-NLS-1$ + createLabel( composite, CDebugUIPlugin.getResourceString("internal.ui.editors.CDebugEditor.attach_source_location_instructions") ); //$NON-NLS-1$ createLabel( composite, null ); - fAttachButton = createButton( composite, "&Attach Source..." ); + fAttachButton = createButton( composite, CDebugUIPlugin.getResourceString("internal.ui.editors.CDebugEditor.Attach_Source_button") ); //$NON-NLS-1$ fAttachButton.addSelectionListener( new SelectionListener() { @@ -287,7 +287,7 @@ public class CDebugEditor extends CEditor { FileNotFoundElement element = (FileNotFoundElement)input.getAdapter( FileNotFoundElement.class ); if ( element != null ) - fInputLabel.setText( MessageFormat.format( "Can not find the file ''{0}'' in the specified source locations.", new String[] { element.getFullPath().toOSString() } ) ); + fInputLabel.setText( MessageFormat.format( CDebugUIPlugin.getResourceString("internal.ui.editors.CDebugEditor.Can_not_find_file"), new String[] { element.getFullPath().toOSString() } ) ); //$NON-NLS-1$ } protected ScrolledComposite getScrolledComposite() @@ -351,7 +351,7 @@ public class CDebugEditor extends CEditor } } - public static final String EDITOR_ID = CDebugUIPlugin.getUniqueIdentifier() + ".editor.CDebugEditor"; + public static final String EDITOR_ID = CDebugUIPlugin.getUniqueIdentifier() + ".editor.CDebugEditor"; //$NON-NLS-1$ private AttachSourceForm fAttachSourceForm = null; diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DebugTextHover.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DebugTextHover.java index 87ea488f416..3bb0bf6af4f 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DebugTextHover.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DebugTextHover.java @@ -156,7 +156,7 @@ public class DebugTextHover implements ITextHover String debugTargetName ) throws DebugException { if ( value.length() > MAX_HOVER_INFO_SIZE ) - value = value.substring( 0, MAX_HOVER_INFO_SIZE ) + " ..."; + value = value.substring( 0, MAX_HOVER_INFO_SIZE ) + " ..."; //$NON-NLS-1$ buffer.append( "

" ); //$NON-NLS-1$ if ( debugTargetName != null ) { diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DisassemblyEditorInput.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DisassemblyEditorInput.java index 060f38fdbd4..ede135f310c 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DisassemblyEditorInput.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DisassemblyEditorInput.java @@ -13,6 +13,7 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.IPersistableElement; import org.eclipse.ui.IStorageEditorInput; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * Enter type comment. @@ -21,7 +22,7 @@ import org.eclipse.ui.IStorageEditorInput; */ public class DisassemblyEditorInput implements IStorageEditorInput { - private final static String FILE_NAME_EXTENSION = ".dasm"; + private final static String FILE_NAME_EXTENSION = ".dasm"; //$NON-NLS-1$ protected IStorage fStorage; /** @@ -72,7 +73,7 @@ public class DisassemblyEditorInput implements IStorageEditorInput { // ignore } - return ""; + return ""; //$NON-NLS-1$ } /* (non-Javadoc) @@ -88,7 +89,7 @@ public class DisassemblyEditorInput implements IStorageEditorInput */ public String getToolTipText() { - return "Disassembly"; + return CDebugUIPlugin.getResourceString("internal.ui.editors.DisassemblyEditorInput.Disassembly"); //$NON-NLS-1$ } /* (non-Javadoc) diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DisassemblyMarkerAnnotationModel.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DisassemblyMarkerAnnotationModel.java index ffff8db027e..57bf972397c 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DisassemblyMarkerAnnotationModel.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DisassemblyMarkerAnnotationModel.java @@ -60,7 +60,7 @@ public class DisassemblyMarkerAnnotationModel extends AbstractMarkerAnnotationMo } catch( CoreException x ) { - doHandleCoreException( x, "Resource Changed" ); + doHandleCoreException( x, "Resource Changed" ); } } } @@ -263,7 +263,7 @@ public class DisassemblyMarkerAnnotationModel extends AbstractMarkerAnnotationMo { try { - return createPositionFromAddress( Long.parseLong( marker.getAttribute( ICAddressBreakpoint.ADDRESS, "0" ) ) ); + return createPositionFromAddress( Long.parseLong( marker.getAttribute( ICAddressBreakpoint.ADDRESS, "0" ) ) ); //$NON-NLS-1$ } catch( NumberFormatException e ) { diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/EditorInputDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/EditorInputDelegate.java index 2a7dba26943..d4eeb93ec54 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/EditorInputDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/EditorInputDelegate.java @@ -68,7 +68,7 @@ public class EditorInputDelegate implements IEditorInputDelegate { if ( fDelegate != null ) return fDelegate.getName(); - return ( fElement != null ) ? fElement.getName() : ""; + return ( fElement != null ) ? fElement.getName() : ""; //$NON-NLS-1$ } /** @@ -88,7 +88,7 @@ public class EditorInputDelegate implements IEditorInputDelegate { if ( fDelegate != null ) return fDelegate.getToolTipText(); - return ""; + return ""; //$NON-NLS-1$ } /** @@ -150,7 +150,7 @@ public class EditorInputDelegate implements IEditorInputDelegate { if ( getElement() != null ) return getElement().getName(); - return ""; + return ""; //$NON-NLS-1$ } public boolean isReadOnly() diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/FileNotFoundElement.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/FileNotFoundElement.java index 1730ee539d9..2ac72c3e684 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/FileNotFoundElement.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/FileNotFoundElement.java @@ -45,7 +45,7 @@ public class FileNotFoundElement public String getName() { IPath path = getFullPath(); - return ( path != null ) ? path.lastSegment() : ""; + return ( path != null ) ? path.lastSegment() : ""; //$NON-NLS-1$ } public IStackFrame getStackFrame() diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java index 7ea0e6a18e1..ebfe9f88b07 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java @@ -65,7 +65,7 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr // Format constants private static int[] fFormatIds = new int[]{ ICDIFormat.NATURAL, ICDIFormat.HEXADECIMAL, ICDIFormat.DECIMAL }; - private static String[] fFormatLabels = new String[] { "Natural", "Hexadecimal", "Decimal" }; + private static String[] fFormatLabels = new String[] { CDebugUIPlugin.getResourceString("internal.ui.preferences.CDebugPreferencePage.Natural"), CDebugUIPlugin.getResourceString("internal.ui.preferences.CDebugPreferencePage.Hexadecimal"), CDebugUIPlugin.getResourceString("internal.ui.preferences.CDebugPreferencePage.Decimal") }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ private PropertyChangeListener fPropertyChangeListener; @@ -99,7 +99,7 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr super(); setPreferenceStore( CDebugUIPlugin.getDefault().getPreferenceStore() ); getPreferenceStore().addPropertyChangeListener( getPropertyChangeListener() ); - setDescription( "General settings for C/C++ Debugging." ); + setDescription( CDebugUIPlugin.getResourceString("internal.ui.preferences.CDebugPreferencePage.Preference_page_description") ); //$NON-NLS-1$ } /* (non-Javadoc) @@ -203,13 +203,13 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr */ private void createViewSettingPreferences( Composite parent ) { - Composite comp = createGroupComposite( parent, 1, "Opened view default settings" ); - fPathsButton = createCheckButton( comp, "Show full &paths" ); + Composite comp = createGroupComposite( parent, 1, CDebugUIPlugin.getResourceString("internal.ui.preferences.CDebugPreferencePage.Opened_view_default_settings") ); //$NON-NLS-1$ + fPathsButton = createCheckButton( comp, CDebugUIPlugin.getResourceString("internal.ui.preferences.CDebugPreferencePage.pathsButton") ); //$NON-NLS-1$ Composite formatComposite = ControlFactory.createCompositeEx( comp, 2, 0 ); ((GridLayout)formatComposite.getLayout()).makeColumnsEqualWidth = true; - fVariableFormatCombo = createComboBox( formatComposite, "Default variable format:", fFormatLabels, fFormatLabels[0] ); - fExpressionFormatCombo = createComboBox( formatComposite, "Default expression format:", fFormatLabels, fFormatLabels[0] ); - fRegisterFormatCombo = createComboBox( formatComposite, "Default register format:", fFormatLabels, fFormatLabels[0] ); + fVariableFormatCombo = createComboBox( formatComposite, CDebugUIPlugin.getResourceString("internal.ui.preferences.CDebugPreferencePage.variableFormatCombo"), fFormatLabels, fFormatLabels[0] ); //$NON-NLS-1$ + fExpressionFormatCombo = createComboBox( formatComposite, CDebugUIPlugin.getResourceString("internal.ui.preferences.CDebugPreferencePage.expressionFormatCombo"), fFormatLabels, fFormatLabels[0] ); //$NON-NLS-1$ + fRegisterFormatCombo = createComboBox( formatComposite, CDebugUIPlugin.getResourceString("internal.ui.preferences.CDebugPreferencePage.registerFormatCombo"), fFormatLabels, fFormatLabels[0] ); //$NON-NLS-1$ } /** @@ -217,8 +217,8 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr */ private void createDisassemblySettingPreferences( Composite parent ) { - Composite comp = createGroupComposite( parent, 1, "Disassembly options" ); - fAutoDisassemblyButton = createCheckButton( comp, "Automatically switch to &disassembly mode" ); + Composite comp = createGroupComposite( parent, 1, CDebugUIPlugin.getResourceString("internal.ui.preferences.CDebugPreferencePage.Disassembly_options") ); //$NON-NLS-1$ + fAutoDisassemblyButton = createCheckButton( comp, CDebugUIPlugin.getResourceString("internal.ui.preferences.CDebugPreferencePage.autoDisassemblyButton") ); //$NON-NLS-1$ createMaxNumberOfInstructionsField( comp ); } @@ -226,7 +226,7 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr { Composite composite = ControlFactory.createComposite( parent, 2 ); fMaxNumberOfInstructionsText = new IntegerFieldEditor( ICDebugConstants.PREF_MAX_NUMBER_OF_INSTRUCTIONS, - "Maximum number of instructions: ", + CDebugUIPlugin.getResourceString("internal.ui.preferences.CDebugPreferencePage.maxNumberOfInstructions"), //$NON-NLS-1$ composite, NUMBER_OF_DIGITS ); GridData data = (GridData)fMaxNumberOfInstructionsText.getTextControl( composite ).getLayoutData(); @@ -237,7 +237,7 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr fMaxNumberOfInstructionsText.setValidRange( ICDebugConstants.MIN_NUMBER_OF_INSTRUCTIONS, ICDebugConstants.MAX_NUMBER_OF_INSTRUCTIONS ); String minValue = Integer.toString( ICDebugConstants.MIN_NUMBER_OF_INSTRUCTIONS ); String maxValue = Integer.toString( ICDebugConstants.MAX_NUMBER_OF_INSTRUCTIONS ); - fMaxNumberOfInstructionsText.setErrorMessage( MessageFormat.format( "The valid value range is [{0},{1}].", new String[]{ minValue, maxValue } ) ); + fMaxNumberOfInstructionsText.setErrorMessage( MessageFormat.format( CDebugUIPlugin.getResourceString("internal.ui.preferences.CDebugPreferencePage.ErrorMaxNumberOfInstructionsRange"), new String[]{ minValue, maxValue } ) ); //$NON-NLS-1$ fMaxNumberOfInstructionsText.load(); fMaxNumberOfInstructionsText.setPropertyChangeListener( new IPropertyChangeListener() diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/ICDebugPreferenceConstants.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/ICDebugPreferenceConstants.java index 96c77a4faeb..9ed966e4d58 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/ICDebugPreferenceConstants.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/ICDebugPreferenceConstants.java @@ -31,7 +31,7 @@ public interface ICDebugPreferenceConstants * full paths. When true the debugger * will show full paths in newly opened views. */ - public static final String PREF_SHOW_FULL_PATHS = ICDebugUIConstants.PLUGIN_ID + "cDebug.show_full_paths"; + public static final String PREF_SHOW_FULL_PATHS = ICDebugUIConstants.PLUGIN_ID + "cDebug.show_full_paths"; //$NON-NLS-1$ /** * The RGB for the color to be used to indicate changed registers @@ -41,7 +41,7 @@ public interface ICDebugPreferenceConstants /** * The default values for the memory view parameters. */ - public static final String DEFAULT_MEMORY_PADDING_CHAR = "."; + public static final String DEFAULT_MEMORY_PADDING_CHAR = "."; //$NON-NLS-1$ public static final FontData DEFAULT_MEMORY_FONT = Display.getDefault().getSystemFont().getFontData()[0]; public static final RGB DEFAULT_MEMORY_FOREGROUND_RGB = Display.getCurrent().getSystemColor( SWT.COLOR_LIST_FOREGROUND ).getRGB(); @@ -50,11 +50,11 @@ public interface ICDebugPreferenceConstants public static final RGB DEFAULT_MEMORY_CHANGED_RGB = Display.getCurrent().getSystemColor( SWT.COLOR_RED ).getRGB(); public static final RGB DEFAULT_MEMORY_DIRTY_RGB = Display.getCurrent().getSystemColor( SWT.COLOR_BLUE ).getRGB(); - public static final String PREF_MEMORY_NUMBER_OF_BYTES = "Memory.NumberOfBytes"; - public static final String PREF_MEMORY_SIZE = "Memory.Size"; - public static final String PREF_MEMORY_FORMAT = "Memory.Format"; - public static final String PREF_MEMORY_BYTES_PER_ROW = "Memory.BytesPerRow"; - public static final String PREF_MEMORY_PADDING_CHAR = "Memory.PaddingChar"; + public static final String PREF_MEMORY_NUMBER_OF_BYTES = "Memory.NumberOfBytes"; //$NON-NLS-1$ + public static final String PREF_MEMORY_SIZE = "Memory.Size"; //$NON-NLS-1$ + public static final String PREF_MEMORY_FORMAT = "Memory.Format"; //$NON-NLS-1$ + public static final String PREF_MEMORY_BYTES_PER_ROW = "Memory.BytesPerRow"; //$NON-NLS-1$ + public static final String PREF_MEMORY_PADDING_CHAR = "Memory.PaddingChar"; //$NON-NLS-1$ /** * The RGB for the memory text foreground color diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/MemoryViewPreferencePage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/MemoryViewPreferencePage.java index b44f009c664..9a53f1b38b2 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/MemoryViewPreferencePage.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/MemoryViewPreferencePage.java @@ -39,7 +39,7 @@ public class MemoryViewPreferencePage extends FieldEditorPreferencePage public MemoryViewPreferencePage() { super( GRID ); - setDescription( "Memory View Settings." ); + setDescription( CDebugUIPlugin.getResourceString("internal.ui.preferences.MemoryViewPreferencePage.Description") ); //$NON-NLS-1$ setPreferenceStore( CDebugUIPlugin.getDefault().getPreferenceStore() ); } @@ -82,13 +82,13 @@ public class MemoryViewPreferencePage extends FieldEditorPreferencePage addField( new BooleanFieldEditor( ICDebugPreferenceConstants.PREF_MEMORY_DISPLAY_ASCII, "Display ASCII", getFieldEditorParent() ) ); */ - ColorFieldEditor foreground = new ColorFieldEditor( ICDebugPreferenceConstants.MEMORY_FOREGROUND_RGB, "Text Color:", getFieldEditorParent() ); - ColorFieldEditor background = new ColorFieldEditor( ICDebugPreferenceConstants.MEMORY_BACKGROUND_RGB, "Background Color:", getFieldEditorParent() ); - ColorFieldEditor address = new ColorFieldEditor( ICDebugPreferenceConstants.MEMORY_ADDRESS_RGB, "Address Color:", getFieldEditorParent() ); - ColorFieldEditor changed = new ColorFieldEditor( ICDebugPreferenceConstants.MEMORY_CHANGED_RGB, "Changed Value Color:", getFieldEditorParent() ); + ColorFieldEditor foreground = new ColorFieldEditor( ICDebugPreferenceConstants.MEMORY_FOREGROUND_RGB, CDebugUIPlugin.getResourceString("internal.ui.preferences.MemoryViewPreferencePage.Text_Color"), getFieldEditorParent() ); //$NON-NLS-1$ + ColorFieldEditor background = new ColorFieldEditor( ICDebugPreferenceConstants.MEMORY_BACKGROUND_RGB, CDebugUIPlugin.getResourceString("internal.ui.preferences.MemoryViewPreferencePage.Background_Color"), getFieldEditorParent() ); //$NON-NLS-1$ + ColorFieldEditor address = new ColorFieldEditor( ICDebugPreferenceConstants.MEMORY_ADDRESS_RGB, CDebugUIPlugin.getResourceString("internal.ui.preferences.MemoryViewPreferencePage.Address_Color"), getFieldEditorParent() ); //$NON-NLS-1$ + ColorFieldEditor changed = new ColorFieldEditor( ICDebugPreferenceConstants.MEMORY_CHANGED_RGB, CDebugUIPlugin.getResourceString("internal.ui.preferences.MemoryViewPreferencePage.Changed_Value_Color"), getFieldEditorParent() ); //$NON-NLS-1$ // ColorFieldEditor dirty = new ColorFieldEditor( ICDebugPreferenceConstants.MEMORY_DIRTY_RGB, "Modified Value Color:", getFieldEditorParent() ); - FontFieldEditor font = new FontFieldEditor( ICDebugPreferenceConstants.MEMORY_FONT, "Font:", getFieldEditorParent() ); + FontFieldEditor font = new FontFieldEditor( ICDebugPreferenceConstants.MEMORY_FONT, CDebugUIPlugin.getResourceString("internal.ui.preferences.MemoryViewPreferencePage.Font"), getFieldEditorParent() ); //$NON-NLS-1$ addField( foreground ); addField( background ); @@ -144,7 +144,7 @@ public class MemoryViewPreferencePage extends FieldEditorPreferencePage private StringFieldEditor createPaddingCharacterField() { - return new StringFieldEditor( ICDebugPreferenceConstants.PREF_MEMORY_PADDING_CHAR, "Padding Character:", 1, getFieldEditorParent() ) + return new StringFieldEditor( ICDebugPreferenceConstants.PREF_MEMORY_PADDING_CHAR, CDebugUIPlugin.getResourceString("internal.ui.preferences.MemoryViewPreferencePage.Padding_Character"), 1, getFieldEditorParent() ) //$NON-NLS-1$ { protected boolean doCheckState() { @@ -155,7 +155,7 @@ public class MemoryViewPreferencePage extends FieldEditorPreferencePage private void createDefaultSettingsFields() { - addField( new BooleanFieldEditor( ICDebugPreferenceConstants.PREF_MEMORY_AUTO_REFRESH, "Auto-Refresh by default", SWT.NONE, getFieldEditorParent() ) ); - addField( new BooleanFieldEditor( ICDebugPreferenceConstants.PREF_MEMORY_SHOW_ASCII, "Show ASCII by default", SWT.NONE, getFieldEditorParent() ) ); + addField( new BooleanFieldEditor( ICDebugPreferenceConstants.PREF_MEMORY_AUTO_REFRESH, CDebugUIPlugin.getResourceString("internal.ui.preferences.MemoryViewPreferencePage.Auto_Refresh_by_default"), SWT.NONE, getFieldEditorParent() ) ); //$NON-NLS-1$ + addField( new BooleanFieldEditor( ICDebugPreferenceConstants.PREF_MEMORY_SHOW_ASCII, CDebugUIPlugin.getResourceString("internal.ui.preferences.MemoryViewPreferencePage.Show_ascii_by_default"), SWT.NONE, getFieldEditorParent() ) ); //$NON-NLS-1$ } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/RegistersViewPreferencePage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/RegistersViewPreferencePage.java index 92e47e75f3d..c2776fe9de1 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/RegistersViewPreferencePage.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/RegistersViewPreferencePage.java @@ -42,7 +42,7 @@ public class RegistersViewPreferencePage extends FieldEditorPreferencePage public RegistersViewPreferencePage() { super( GRID ); - setDescription( "Registers View Settings." ); + setDescription( CDebugUIPlugin.getResourceString("internal.ui.preferences.RegistersViewPreferencePage.Registers_View_Settings") ); //$NON-NLS-1$ setPreferenceStore( CDebugUIPlugin.getDefault().getPreferenceStore() ); } @@ -60,9 +60,9 @@ public class RegistersViewPreferencePage extends FieldEditorPreferencePage */ protected void createFieldEditors() { - addField( new ColorFieldEditor( ICDebugPreferenceConstants.CHANGED_REGISTER_RGB, "&Changed register value color:", getFieldEditorParent() ) ); + addField( new ColorFieldEditor( ICDebugPreferenceConstants.CHANGED_REGISTER_RGB, CDebugUIPlugin.getResourceString("internal.ui.preferences.RegistersViewPreferencePage.Changed_register_value_color"), getFieldEditorParent() ) ); //$NON-NLS-1$ createSpacer( getFieldEditorParent(), 2 ); - fAutoRefreshField = ControlFactory.createCheckBox( getFieldEditorParent(), "Auto-Refresh by default" ); + fAutoRefreshField = ControlFactory.createCheckBox( getFieldEditorParent(), CDebugUIPlugin.getResourceString("internal.ui.preferences.RegistersViewPreferencePage.Auto-Refresh_by_default") ); //$NON-NLS-1$ fAutoRefreshField.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getBoolean( ICDebugConstants.PREF_REGISTERS_AUTO_REFRESH ) ); } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/SharedLibrariesViewPreferencePage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/SharedLibrariesViewPreferencePage.java index 2a5bcd4622d..798ba2a9fc8 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/SharedLibrariesViewPreferencePage.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/SharedLibrariesViewPreferencePage.java @@ -39,7 +39,7 @@ public class SharedLibrariesViewPreferencePage extends FieldEditorPreferencePage public SharedLibrariesViewPreferencePage() { super( GRID ); - setDescription( "Shared Libraries View Settings." ); + setDescription( CDebugUIPlugin.getResourceString("internal.ui.preferences.SharedLibrariesViewPreferencePage.Shared_Libraries_View_Settings") ); //$NON-NLS-1$ setPreferenceStore( CDebugUIPlugin.getDefault().getPreferenceStore() ); } @@ -48,7 +48,7 @@ public class SharedLibrariesViewPreferencePage extends FieldEditorPreferencePage */ protected void createFieldEditors() { - fAutoRefreshField = ControlFactory.createCheckBox( getFieldEditorParent(), "Auto-Refresh by default" ); + fAutoRefreshField = ControlFactory.createCheckBox( getFieldEditorParent(), CDebugUIPlugin.getResourceString("internal.ui.preferences.SharedLibrariesViewPreferencePage.Auto-Refresh_by_default") ); //$NON-NLS-1$ fAutoRefreshField.setSelection( CDebugCorePlugin.getDefault().getPluginPreferences().getBoolean( ICDebugConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH ) ); } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/SourcePreferencePage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/SourcePreferencePage.java index 5afc6f17181..9a862712487 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/SourcePreferencePage.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/SourcePreferencePage.java @@ -52,7 +52,7 @@ public class SourcePreferencePage extends PreferencePage implements IWorkbenchPr { super(); setPreferenceStore( CDebugUIPlugin.getDefault().getPreferenceStore() ); - setDescription( "Common source lookup settings." ); + setDescription( CDebugUIPlugin.getResourceString("internal.ui.preferences.SourcePreferencePage.Description") ); //$NON-NLS-1$ } /* (non-Javadoc) @@ -108,7 +108,7 @@ public class SourcePreferencePage extends PreferencePage implements IWorkbenchPr private SourceListDialogField createSourceListField() { SourceListDialogField field = - new SourceListDialogField( "Source Locations", + new SourceListDialogField( CDebugUIPlugin.getResourceString("internal.ui.preferences.SourcePreferencePage.Source_locations"), //$NON-NLS-1$ new IListAdapter() { public void customButtonPressed( DialogField field, int index ) @@ -127,7 +127,7 @@ public class SourcePreferencePage extends PreferencePage implements IWorkbenchPr private SelectionButtonDialogField createSearchForDuplicateFilesButton() { SelectionButtonDialogField button = new SelectionButtonDialogField( SWT.CHECK ); - button.setLabelText( "Search for duplicate source files" ); + button.setLabelText( CDebugUIPlugin.getResourceString("internal.ui.preferences.SourcePreferencePage.Search_for_duplicate_source_files") ); //$NON-NLS-1$ button.setDialogFieldListener( new IDialogFieldListener() { diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryControlArea.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryControlArea.java index b3bb3513fd6..300a256d38f 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryControlArea.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryControlArea.java @@ -110,7 +110,7 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget composite.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); // create label Label label = new Label( composite, SWT.RIGHT ); - label.setText( "Address: " ); + label.setText( CDebugUIPlugin.getResourceString("MemoryControlArea.Address") ); //$NON-NLS-1$ label.pack(); // create address text @@ -177,8 +177,8 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget } ); fEvaluateButton = new Button( composite, SWT.PUSH ); - fEvaluateButton.setText( "Evaluate" ); - fEvaluateButton.setToolTipText( "Evaluate expression to address" ); + fEvaluateButton.setText( CDebugUIPlugin.getResourceString("MemoryControlArea.Evaluate") ); //$NON-NLS-1$ + fEvaluateButton.setToolTipText( CDebugUIPlugin.getResourceString("MemoryControlArea.Evaluate_Expression") ); //$NON-NLS-1$ fEvaluateButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) @@ -211,7 +211,7 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget } catch( DebugException e ) { - CDebugUIPlugin.errorDialog( "Unable to get memory block.", e.getStatus() ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("MemoryControlArea.Error_memoryBlock"), e.getStatus() ); //$NON-NLS-1$ } refresh(); getMemoryView().updateObjects(); @@ -262,7 +262,7 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget protected void refresh() { - fAddressText.setText( ( getPresentation() != null ) ? getPresentation().getAddressExpression() : "" ); + fAddressText.setText( ( getPresentation() != null ) ? getPresentation().getAddressExpression() : "" ); //$NON-NLS-1$ fMemoryText.refresh(); getMemoryView().updateObjects(); updateToolTipText(); @@ -411,7 +411,7 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget protected void clear() { - fAddressText.setText( "" ); + fAddressText.setText( "" ); //$NON-NLS-1$ handleAddressEnter(); updateToolTipText(); } @@ -435,7 +435,7 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget CTabItem[] tabItems = ((CTabFolder)getParent()).getItems(); return tabItems[fIndex].getText(); } - return ""; + return ""; //$NON-NLS-1$ } protected void setTitle( String title ) @@ -453,7 +453,7 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget if ( getParent() instanceof CTabFolder ) { CTabItem[] tabItems = ((CTabFolder)getParent()).getItems(); - tabItems[fIndex].setToolTipText( "Memory View " + (fIndex + 1) + ( ( newText.length() > 0 ) ? ( ": " + newText ) : "" ) ); + tabItems[fIndex].setToolTipText( CDebugUIPlugin.getResourceString("MemoryControlArea.Memory_view") + (fIndex + 1) + ( ( newText.length() > 0 ) ? ( ": " + newText ) : "" ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } } @@ -467,7 +467,7 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget } catch( DebugException e ) { - CDebugUIPlugin.errorDialog( "Unable to refresh memory.", e.getStatus() ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("MemoryControlArea.Error_memoryRefresh"), e.getStatus() ); //$NON-NLS-1$ } } } @@ -514,7 +514,7 @@ public class MemoryControlArea extends Composite implements ITextOperationTarget } catch( DebugException e ) { - CDebugUIPlugin.errorDialog( "Unable to get memory block.", e.getStatus() ); + CDebugUIPlugin.errorDialog( CDebugUIPlugin.getResourceString("MemoryControlArea.Error_memoryBlock"), e.getStatus() ); //$NON-NLS-1$ } } if ( getMemoryBlock() != null ) diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryPresentation.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryPresentation.java index 6b4bb3561fc..af857a1b20b 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryPresentation.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryPresentation.java @@ -121,12 +121,12 @@ public class MemoryPresentation public String getStartAddress() { - return ( fBlock != null ) ? getAddressString( fBlock.getStartAddress() ) : ""; + return ( fBlock != null ) ? getAddressString( fBlock.getStartAddress() ) : ""; //$NON-NLS-1$ } public String getAddressExpression() { - return ( fBlock != null ) ? fBlock.getAddressExpression() : ""; + return ( fBlock != null ) ? fBlock.getAddressExpression() : ""; //$NON-NLS-1$ } private String getInterval( int length ) @@ -431,7 +431,7 @@ public class MemoryPresentation case IFormattedMemoryBlock.MEMORY_FORMAT_UNSIGNED_DECIMAL: return convertToDecimal( getWordSize(), item, false ); } - return ""; + return ""; //$NON-NLS-1$ } private int getDecimalDataItemLength( int wordSize, boolean signed ) @@ -478,7 +478,7 @@ public class MemoryPresentation private String convertToDecimal( int wordSize, String item, boolean signed ) { - String result = ""; + String result = ""; //$NON-NLS-1$ boolean le = getMemoryBlock().isLittleEndian(); switch( wordSize ) { diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryView.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryView.java index 8ee8c55185f..2e7aa366ee2 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryView.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryView.java @@ -88,27 +88,31 @@ public class MemoryView extends AbstractDebugEventHandlerView IAction action = null; action = new MemoryViewAction( this, ITextOperationTarget.CUT ); - action.setText( "Cut" ); - action.setToolTipText( "Cut" ); - action.setDescription( "Cut" ); + String cutStr = CDebugUIPlugin.getResourceString("MemoryView.Cut"); //$NON-NLS-1$ + action.setText( cutStr ); + action.setToolTipText( cutStr ); + action.setDescription( cutStr ); setGlobalAction( ITextEditorActionConstants.CUT, (MemoryViewAction)action ); action = new MemoryViewAction( this, ITextOperationTarget.COPY ); - action.setText( "Copy" ); - action.setToolTipText( "Copy" ); - action.setDescription( "Copy" ); + String copyStr = CDebugUIPlugin.getResourceString("MemoryView.Copy"); //$NON-NLS-1$ + action.setText( copyStr ); + action.setToolTipText( copyStr ); + action.setDescription( copyStr ); setGlobalAction( ITextEditorActionConstants.COPY, (MemoryViewAction)action ); action = new MemoryViewAction( this, ITextOperationTarget.PASTE ); - action.setText( "Paste" ); - action.setToolTipText( "Paste" ); - action.setDescription( "Paste" ); + String pasteStr = CDebugUIPlugin.getResourceString("MemoryView.Paste"); //$NON-NLS-1$ + action.setText( pasteStr ); + action.setToolTipText( pasteStr ); + action.setDescription( pasteStr ); setGlobalAction( ITextEditorActionConstants.PASTE, (MemoryViewAction)action ); action = new MemoryViewAction( this, ITextOperationTarget.SELECT_ALL ); - action.setText( "Select All" ); - action.setToolTipText( "Select All" ); - action.setDescription( "Select All" ); + String selectAllStr = CDebugUIPlugin.getResourceString("MemoryView.Select_All"); //$NON-NLS-1$ + action.setText( selectAllStr ); + action.setToolTipText( selectAllStr ); + action.setDescription( selectAllStr ); setGlobalAction( ITextEditorActionConstants.SELECT_ALL, (MemoryViewAction)action ); action = new RefreshMemoryAction( (MemoryViewer)getViewer() ); @@ -174,7 +178,7 @@ public class MemoryView extends AbstractDebugEventHandlerView menu.appendToGroup( ICDebugUIConstants.MEMORY_GROUP, getAction( "RefreshMemory" ) ); //$NON-NLS-1$ menu.appendToGroup( ICDebugUIConstants.MEMORY_GROUP, getAction( "ClearMemory" ) ); //$NON-NLS-1$ - MenuManager subMenu = new MenuManager( "Format" ); + MenuManager subMenu = new MenuManager( CDebugUIPlugin.getResourceString("MemoryView.Format") ); //$NON-NLS-1$ { IAction[] actions = fMemoryFormatGroup.getActions(); for ( int i = 0; i < actions.length; ++i ) @@ -184,7 +188,7 @@ public class MemoryView extends AbstractDebugEventHandlerView } menu.appendToGroup( ICDebugUIConstants.FORMAT_GROUP, subMenu ); - subMenu = new MenuManager( "Memory Unit Size " ); + subMenu = new MenuManager( CDebugUIPlugin.getResourceString("MemoryView.Memory_Unit_Size") ); //$NON-NLS-1$ { IAction[] actions = fMemorySizeGroup.getActions(); for ( int i = 0; i < actions.length; ++i ) @@ -194,7 +198,7 @@ public class MemoryView extends AbstractDebugEventHandlerView } menu.appendToGroup( ICDebugUIConstants.FORMAT_GROUP, subMenu ); - subMenu = new MenuManager( "Number Of Columns" ); + subMenu = new MenuManager( CDebugUIPlugin.getResourceString("MemoryView.Number_of_Columns") ); //$NON-NLS-1$ { IAction[] actions = fMemoryNumberOfColumnsGroup.getActions(); for ( int i = 0; i < actions.length; ++i ) @@ -263,10 +267,10 @@ public class MemoryView extends AbstractDebugEventHandlerView removeActionGroup( fMemoryNumberOfColumnsGroup ); fMemoryNumberOfColumnsGroup.dispose(); - remove( (ShowAsciiAction)getAction( "ShowAscii" ) ); - remove( (ClearMemoryAction)getAction( "ClearMemory" ) ); - remove( (RefreshMemoryAction)getAction( "RefreshMemory" ) ); - remove( (AutoRefreshMemoryAction)getAction( "AutoRefreshMemory" ) ); + remove( (ShowAsciiAction)getAction( "ShowAscii" ) ); //$NON-NLS-1$ + remove( (ClearMemoryAction)getAction( "ClearMemory" ) ); //$NON-NLS-1$ + remove( (RefreshMemoryAction)getAction( "RefreshMemory" ) ); //$NON-NLS-1$ + remove( (AutoRefreshMemoryAction)getAction( "AutoRefreshMemory" ) ); //$NON-NLS-1$ getSite().getPage().removeSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this ); CDebugUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener( this ); diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryViewer.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryViewer.java index 27ab64da9d8..4c52f35b88f 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryViewer.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/MemoryViewer.java @@ -20,6 +20,7 @@ import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * @@ -65,7 +66,7 @@ public class MemoryViewer extends ContentViewer for ( int i = 0; i < NUMBER_OF_TABS; ++i ) { CTabItem tabItem = new CTabItem( fTabFolder, SWT.NONE ); - tabItem.setText( "Memory " + (i + 1) ); + tabItem.setText( CDebugUIPlugin.getResourceString("MemoryViewer.Memory") + (i + 1) ); //$NON-NLS-1$ fMemoryControlAreas[i] = new MemoryControlArea( fTabFolder, SWT.NONE, i, fView ); tabItem.setControl( fMemoryControlAreas[i] ); } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/registers/RegistersView.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/registers/RegistersView.java index 01b25148591..9a87bb21b88 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/registers/RegistersView.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/registers/RegistersView.java @@ -183,19 +183,19 @@ public class RegistersView extends AbstractDebugEventHandlerView setAction( "ChangeRegisterValue", action ); //$NON-NLS-1$ setAction( DOUBLE_CLICK_ACTION, action ); - action = new AutoRefreshAction( getViewer(), "Auto-Refresh" ); + action = new AutoRefreshAction( getViewer(), CDebugUIPlugin.getResourceString("RegistersView.Auto_Refresh") ); //$NON-NLS-1$ CDebugImages.setLocalImageDescriptors( action, CDebugImages.IMG_LCL_AUTO_REFRESH ); - action.setDescription( "Automatically Refresh Registers View" ); - action.setToolTipText( "Auto-Refresh" ); + action.setDescription( CDebugUIPlugin.getResourceString("RegistersView.Automatically_Refresh_Registers_View") ); //$NON-NLS-1$ + action.setToolTipText( CDebugUIPlugin.getResourceString("RegistersView.Auto_Refresh") ); //$NON-NLS-1$ WorkbenchHelp.setHelp( action, ICDebugHelpContextIds.AUTO_REFRESH_REGISTERS_ACTION ); action.setEnabled( false ); setAction( "AutoRefresh", action ); //$NON-NLS-1$ add( (AutoRefreshAction)action ); - action = new RefreshAction( getViewer(), "Refresh" ); + action = new RefreshAction( getViewer(), CDebugUIPlugin.getResourceString("RegistersView.Refresh") ); //$NON-NLS-1$ CDebugImages.setLocalImageDescriptors( action, CDebugImages.IMG_LCL_REFRESH ); - action.setDescription( "Refresh Registers View" ); - action.setToolTipText( "Refresh" ); + action.setDescription( CDebugUIPlugin.getResourceString("RegistersView.Refresh_Registers_View") ); //$NON-NLS-1$ + action.setToolTipText( CDebugUIPlugin.getResourceString("RegistersView.Refresh") ); //$NON-NLS-1$ WorkbenchHelp.setHelp( action, ICDebugHelpContextIds.REFRESH_REGISTERS_ACTION ); action.setEnabled( false ); setAction( "Refresh", action ); //$NON-NLS-1$ diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/sharedlibs/SharedLibrariesView.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/sharedlibs/SharedLibrariesView.java index c02ba9c03e9..41f8d8b8c4c 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/sharedlibs/SharedLibrariesView.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/sharedlibs/SharedLibrariesView.java @@ -42,6 +42,7 @@ import org.eclipse.ui.ISelectionListener; import org.eclipse.ui.IWorkbenchActionConstants; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.help.WorkbenchHelp; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * Enter type comment. @@ -78,15 +79,15 @@ public class SharedLibrariesView extends AbstractDebugEventHandlerView switch( columnIndex ) { case 0: - return ""; + return ""; //$NON-NLS-1$ case 1: return getText( element ); case 2: return ( library.getStartAddress() > 0 ) ? - CDebugUtils.toHexAddressString( library.getStartAddress() ) : ""; + CDebugUtils.toHexAddressString( library.getStartAddress() ) : ""; //$NON-NLS-1$ case 3: return ( library.getEndAddress() > 0 ) ? - CDebugUtils.toHexAddressString( library.getEndAddress() ) : ""; + CDebugUtils.toHexAddressString( library.getEndAddress() ) : ""; //$NON-NLS-1$ } } return null; @@ -113,10 +114,10 @@ public class SharedLibrariesView extends AbstractDebugEventHandlerView columns[2].setResizable( true ); columns[3].setResizable( true ); - columns[0].setText( "" ); - columns[1].setText( "Name" ); - columns[2].setText( "Start Address" ); - columns[3].setText( "End Address" ); + columns[0].setText( "" ); //$NON-NLS-1$ + columns[1].setText( CDebugUIPlugin.getResourceString("SharedLibrariesView.Name") ); //$NON-NLS-1$ + columns[2].setText( CDebugUIPlugin.getResourceString("SharedLibrariesView.Start_Address") ); //$NON-NLS-1$ + columns[3].setText( CDebugUIPlugin.getResourceString("SharedLibrariesView.End_Address") ); //$NON-NLS-1$ PixelConverter pc = new PixelConverter( parent ); columns[0].setWidth( pc.convertWidthInCharsToPixels( 3 ) ); @@ -139,19 +140,19 @@ public class SharedLibrariesView extends AbstractDebugEventHandlerView */ protected void createActions() { - IAction action = new AutoRefreshAction( getViewer(), "Auto-Refresh" ); + IAction action = new AutoRefreshAction( getViewer(), CDebugUIPlugin.getResourceString("RegistersView.Auto_Refresh") ); //$NON-NLS-1$ CDebugImages.setLocalImageDescriptors( action, CDebugImages.IMG_LCL_AUTO_REFRESH ); - action.setDescription( "Automatically Refresh Shared Libraries View" ); - action.setToolTipText( "Auto-Refresh" ); + action.setDescription( "Automatically Refresh Shared Libraries View" ); //$NON-NLS-1$ + action.setToolTipText( CDebugUIPlugin.getResourceString("RegistersView.Auto_Refresh") ); //$NON-NLS-1$ WorkbenchHelp.setHelp( action, ICDebugHelpContextIds.AUTO_REFRESH_SHARED_LIBRARIES_ACTION ); action.setEnabled( false ); setAction( "AutoRefresh", action ); //$NON-NLS-1$ add( (AutoRefreshAction)action ); - action = new RefreshAction( getViewer(), "Refresh" ); + action = new RefreshAction( getViewer(), CDebugUIPlugin.getResourceString("RegistersView.Refresh") ); //$NON-NLS-1$ CDebugImages.setLocalImageDescriptors( action, CDebugImages.IMG_LCL_REFRESH ); - action.setDescription( "Refresh Shared Libraries View" ); - action.setToolTipText( "Refresh" ); + action.setDescription( CDebugUIPlugin.getResourceString("SharedLibrariesView.Refresh_Shared_Libraries_View") ); //$NON-NLS-1$ + action.setToolTipText( CDebugUIPlugin.getResourceString("RegistersView.Refresh") ); //$NON-NLS-1$ WorkbenchHelp.setHelp( action, ICDebugHelpContextIds.REFRESH_SHARED_LIBRARIES_ACTION ); action.setEnabled( false ); setAction( "Refresh", action ); //$NON-NLS-1$ diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/signals/SignalsViewer.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/signals/SignalsViewer.java index 530a43a5ffe..e07ac1e7305 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/signals/SignalsViewer.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/signals/SignalsViewer.java @@ -20,6 +20,7 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * Enter type comment. @@ -29,14 +30,14 @@ import org.eclipse.swt.widgets.TableColumn; public class SignalsViewer extends TableViewer { // String constants - protected static final String YES_VALUE = "yes"; - protected static final String NO_VALUE = "no"; + protected static final String YES_VALUE = CDebugUIPlugin.getResourceString("SignalsViewer.yes"); //$NON-NLS-1$ + protected static final String NO_VALUE = CDebugUIPlugin.getResourceString("SignalsViewer.no"); //$NON-NLS-1$ // Column properties - private static final String CP_NAME = "name"; - private static final String CP_PASS = "pass"; - private static final String CP_SUSPEND = "suspend"; - private static final String CP_DESCRIPTION = "description"; + private static final String CP_NAME = "name"; //$NON-NLS-1$ + private static final String CP_PASS = "pass"; //$NON-NLS-1$ + private static final String CP_SUSPEND = "suspend"; //$NON-NLS-1$ + private static final String CP_DESCRIPTION = "description"; //$NON-NLS-1$ private IDebugExceptionHandler fExceptionHandler = null; @@ -64,10 +65,10 @@ public class SignalsViewer extends TableViewer columns[2].setResizable( false ); columns[3].setResizable( true ); - columns[0].setText( "Name" ); - columns[1].setText( "Pass" ); - columns[2].setText( "Suspend" ); - columns[3].setText( "Description" ); + columns[0].setText( CDebugUIPlugin.getResourceString("SignalsViewer.Name") ); //$NON-NLS-1$ + columns[1].setText( CDebugUIPlugin.getResourceString("SignalsViewer.Pass") ); //$NON-NLS-1$ + columns[2].setText( CDebugUIPlugin.getResourceString("SignalsViewer.Suspend") ); //$NON-NLS-1$ + columns[3].setText( CDebugUIPlugin.getResourceString("SignalsViewer.Description") ); //$NON-NLS-1$ PixelConverter pc = new PixelConverter( parent ); columns[0].setWidth( pc.convertWidthInCharsToPixels( 20 ) ); diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddDirectorySourceLocationBlock.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddDirectorySourceLocationBlock.java index f3b57aa2ee2..e855164509e 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddDirectorySourceLocationBlock.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddDirectorySourceLocationBlock.java @@ -25,6 +25,7 @@ import org.eclipse.swt.widgets.DirectoryDialog; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * Enter type comment. @@ -84,7 +85,7 @@ public class AddDirectorySourceLocationBlock { PixelConverter converter = new PixelConverter( parent ); Label label = new Label( parent, SWT.NONE ); - label.setText( "Select location directory:" ); + label.setText( CDebugUIPlugin.getResourceString("AddDirectorySourceLocationBlock.Select_location_directory") ); //$NON-NLS-1$ label.setLayoutData( new GridData( GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL ) ); Composite composite = new Composite( parent, SWT.NONE ); composite.setLayout( new GridLayout( 2, false ) ); @@ -93,7 +94,7 @@ public class AddDirectorySourceLocationBlock composite.setLayoutData( data ); fLocationText = new Text( composite, SWT.SINGLE | SWT.BORDER ); fLocationText.setLayoutData( new GridData( GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL ) ); - Button button = createButton( composite, "&Browse..." ); + Button button = createButton( composite, CDebugUIPlugin.getResourceString("AddDirectorySourceLocationBlock.Browse") ); //$NON-NLS-1$ button.addSelectionListener( new SelectionAdapter() { /* (non-Javadoc) @@ -109,7 +110,7 @@ public class AddDirectorySourceLocationBlock protected void selectLocation() { DirectoryDialog dialog = new DirectoryDialog( fShell ); - dialog.setMessage( "Select Location Directory" ); + dialog.setMessage( CDebugUIPlugin.getResourceString("AddDirectorySourceLocationBlock.Select_Location_Directory") ); //$NON-NLS-1$ String result = dialog.open(); if ( result != null ) { @@ -124,7 +125,7 @@ public class AddDirectorySourceLocationBlock GridData data = new GridData( GridData.FILL_BOTH ); composite.setLayoutData( data ); fAssocitedCheckButton = new Button( composite, SWT.CHECK ); - fAssocitedCheckButton.setText( "&Associate with" ); + fAssocitedCheckButton.setText( CDebugUIPlugin.getResourceString("AddDirectorySourceLocationBlock.Associate_with") ); //$NON-NLS-1$ fAssociationText = new Text( composite, SWT.SINGLE | SWT.BORDER ); fAssociationText.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); fAssocitedCheckButton.addSelectionListener( new SelectionAdapter() @@ -145,7 +146,7 @@ public class AddDirectorySourceLocationBlock boolean checked = fAssocitedCheckButton.getSelection(); fAssociationText.setEnabled( checked ); if ( !checked ) - fAssociationText.setText( "" ); + fAssociationText.setText( "" ); //$NON-NLS-1$ } protected void createSearchSubfoldersButton( Composite parent ) @@ -155,7 +156,7 @@ public class AddDirectorySourceLocationBlock GridData data = new GridData( GridData.FILL_BOTH ); composite.setLayoutData( data ); fSearchSubfoldersButton = new Button( composite, SWT.CHECK ); - fSearchSubfoldersButton.setText( "Search sub&folders" ); + fSearchSubfoldersButton.setText( CDebugUIPlugin.getResourceString("AddDirectorySourceLocationBlock.Search_subfolders") ); //$NON-NLS-1$ } protected Button createButton( Composite parent, String label ) @@ -181,7 +182,7 @@ public class AddDirectorySourceLocationBlock { return fAssociationText.getText().trim(); } - return ""; + return ""; //$NON-NLS-1$ } public boolean searchSubfolders() diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddDirectorySourceLocationWizard.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddDirectorySourceLocationWizard.java index 608d207dc57..b7dc4c14044 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddDirectorySourceLocationWizard.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddDirectorySourceLocationWizard.java @@ -20,6 +20,7 @@ import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * @@ -29,7 +30,7 @@ import org.eclipse.swt.widgets.Composite; */ public class AddDirectorySourceLocationWizard extends Wizard implements INewSourceLocationWizard { - protected static final String PAGE_NAME = "AddDirectorySourceLocationWizardPage"; + protected static final String PAGE_NAME = "AddDirectorySourceLocationWizardPage"; //$NON-NLS-1$ /** * @@ -49,9 +50,9 @@ public class AddDirectorySourceLocationWizard extends Wizard implements INewSour */ public AddDirtectorySourceLocationWizardPage( AddDirectorySourceLocationWizard wizard, IPath initialAssociationPath ) { - super( PAGE_NAME, "Select Directory", CDebugImages.DESC_WIZBAN_ADD_DIR_SOURCE_LOCATION ); - setWindowTitle( "Add Directory Source Location" ); - setMessage( "Add a local file system directory to the source locations list." ); + super( PAGE_NAME, CDebugUIPlugin.getResourceString("internal.ui.wizards.AddDirectorySourceLocationWizard.Select_Directory"), CDebugImages.DESC_WIZBAN_ADD_DIR_SOURCE_LOCATION ); //$NON-NLS-1$ + setWindowTitle( CDebugUIPlugin.getResourceString("internal.ui.wizards.AddDirectorySourceLocationWizard.WindowTitle") ); //$NON-NLS-1$ + setMessage( CDebugUIPlugin.getResourceString("internal.ui.wizards.AddDirectorySourceLocationWizard.WindowMessage") ); //$NON-NLS-1$ setWizard( wizard ); fAttachBlock = new AddDirectorySourceLocationBlock( initialAssociationPath ); } @@ -103,7 +104,7 @@ public class AddDirectorySourceLocationWizard extends Wizard implements INewSour String dirText = fAttachBlock.getLocationPath(); if ( dirText.length() == 0 ) { - setErrorMessage( "Directory must not be empty." ); + setErrorMessage( CDebugUIPlugin.getResourceString("internal.ui.wizards.AddDirectorySourceLocationWizard.ErrorDirectoryEmpty") ); //$NON-NLS-1$ complete = false; } else @@ -111,12 +112,12 @@ public class AddDirectorySourceLocationWizard extends Wizard implements INewSour File file = new File( dirText ); if ( !file.exists() || !file.isDirectory() ) { - setErrorMessage( "Directory does not exist." ); + setErrorMessage( CDebugUIPlugin.getResourceString("internal.ui.wizards.AddDirectorySourceLocationWizard.ErrorDirectoryDoesNotExist") ); //$NON-NLS-1$ complete = false; } else if ( !file.isAbsolute() ) { - setErrorMessage( "Directory must be absolute." ); + setErrorMessage( CDebugUIPlugin.getResourceString("internal.ui.wizards.AddDirectorySourceLocationWizard.ErrorDirectoryMustBeAbsolute") ); //$NON-NLS-1$ complete = false; } } @@ -173,7 +174,7 @@ public class AddDirectorySourceLocationWizard extends Wizard implements INewSour */ public String getDescription() { - return "Add a local file system directory to the source locations list."; + return CDebugUIPlugin.getResourceString("internal.ui.wizards.AddDirectorySourceLocationWizard.Description"); //$NON-NLS-1$ } /** diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddProjectSourceLocationWizard.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddProjectSourceLocationWizard.java index c85732746d4..cd3d651943b 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddProjectSourceLocationWizard.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddProjectSourceLocationWizard.java @@ -20,6 +20,7 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * @@ -29,7 +30,7 @@ import org.eclipse.swt.widgets.Composite; */ public class AddProjectSourceLocationWizard extends Wizard implements INewSourceLocationWizard { - protected static final String PAGE_NAME = "AddProjectSourceLocationWizardPage"; + protected static final String PAGE_NAME = "AddProjectSourceLocationWizardPage"; //$NON-NLS-1$ protected IProject[] fProjects = null; @@ -52,9 +53,9 @@ public class AddProjectSourceLocationWizard extends Wizard implements INewSource */ public AddProjectSourceLocationWizardPage( AddProjectSourceLocationWizard wizard ) { - super( PAGE_NAME, "Select Project", CDebugImages.DESC_WIZBAN_ADD_PRJ_SOURCE_LOCATION ); - setWindowTitle( "Add Project Source Location" ); - setMessage( "Add an existing workspace project to the source locations list." ); + super( PAGE_NAME, CDebugUIPlugin.getResourceString("internal.ui.wizards.AddProjectSourceLocationWizard.Select_Project"), CDebugImages.DESC_WIZBAN_ADD_PRJ_SOURCE_LOCATION ); //$NON-NLS-1$ + setWindowTitle( CDebugUIPlugin.getResourceString("internal.ui.wizards.AddProjectSourceLocationWizard.WindowTitle") ); //$NON-NLS-1$ + setMessage( CDebugUIPlugin.getResourceString("internal.ui.wizards.AddProjectSourceLocationWizard.AddProjectLocationMessage") ); //$NON-NLS-1$ setWizard( wizard ); fBlock = new AddProjectSourceLocationBlock( fProjects ); setPageComplete( false ); @@ -128,7 +129,7 @@ public class AddProjectSourceLocationWizard extends Wizard implements INewSource */ public String getDescription() { - return "Add an existing project to the source locations list."; + return CDebugUIPlugin.getResourceString("internal.ui.wizards.AddProjectSourceLocationWizard.Description"); //$NON-NLS-1$ } /** diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddSourceLocationWizard.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddSourceLocationWizard.java index f59b4d167cd..1b67a0ba2d6 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddSourceLocationWizard.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/AddSourceLocationWizard.java @@ -8,6 +8,7 @@ package org.eclipse.cdt.debug.internal.ui.wizards; import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocation; import org.eclipse.cdt.debug.ui.sourcelookup.INewSourceLocationWizard; import org.eclipse.jface.wizard.Wizard; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * Enter type comment. @@ -24,7 +25,7 @@ public class AddSourceLocationWizard extends Wizard implements INewSourceLocatio public AddSourceLocationWizard( ICSourceLocation[] locations ) { super(); - setWindowTitle( "Add Source Location" ); + setWindowTitle( CDebugUIPlugin.getResourceString("AddSourceLocationWizard.Window_Title") ); //$NON-NLS-1$ setForcePreviousAndNextButtons( true ); fLocations = locations; } @@ -60,6 +61,6 @@ public class AddSourceLocationWizard extends Wizard implements INewSourceLocatio */ public String getDescription() { - return ""; + return ""; //$NON-NLS-1$ } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/SourceLocationSelectionPage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/SourceLocationSelectionPage.java index 9632125752f..ba0429bd7e4 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/SourceLocationSelectionPage.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/wizards/SourceLocationSelectionPage.java @@ -33,6 +33,7 @@ import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Table; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; /** * @@ -44,7 +45,7 @@ public class SourceLocationSelectionPage extends WizardSelectionPage implements ISelectionChangedListener, IDoubleClickListener { - private static final String PAGE_NAME = "Add Source Location"; + private static final String PAGE_NAME = CDebugUIPlugin.getResourceString("internal.ui.preferences.SourceLocationSelectionPage.Add_Source_Location"); //$NON-NLS-1$ private final static int SIZING_LISTS_HEIGHT = 200; private final static int SIZING_LISTS_WIDTH = 150; @@ -59,7 +60,7 @@ public class SourceLocationSelectionPage extends WizardSelectionPage public SourceLocationSelectionPage( ICSourceLocation[] locations ) { super( PAGE_NAME ); - setTitle( "Select" ); + setTitle( CDebugUIPlugin.getResourceString("internal.ui.preferences.SourceLocationSelectionPage.WindowTitle") ); //$NON-NLS-1$ setImageDescriptor( CDebugImages.DESC_WIZBAN_ADD_SOURCE_LOCATION ); fElements = new Object[] { new AddProjectSourceLocationWizard( getProjectList( locations ) ), new AddDirectorySourceLocationWizard() }; @@ -75,7 +76,7 @@ public class SourceLocationSelectionPage extends WizardSelectionPage outerContainer.setLayout( new GridLayout() ); outerContainer.setLayoutData( new GridData( GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL ) ); - new Label( outerContainer, SWT.NONE ).setText( "Select source location type:" ); + new Label( outerContainer, SWT.NONE ).setText( CDebugUIPlugin.getResourceString("internal.ui.preferences.SourceLocationSelectionPage.Select_source_location_type") ); //$NON-NLS-1$ //Create a table for the list Table table = new Table( outerContainer, SWT.BORDER ); @@ -107,11 +108,11 @@ public class SourceLocationSelectionPage extends WizardSelectionPage { if ( element instanceof AddProjectSourceLocationWizard ) { - return "Existing Project Into Workspace"; + return CDebugUIPlugin.getResourceString("internal.ui.preferences.SourceLocationSelectionPage.Existing_Project_Into_Workspace"); //$NON-NLS-1$ } if ( element instanceof AddDirectorySourceLocationWizard ) { - return "File System Directory"; + return CDebugUIPlugin.getResourceString("internal.ui.preferences.SourceLocationSelectionPage.File_System_Directory"); //$NON-NLS-1$ } return super.getText( element ); } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java index 825a2545a75..c2360f8f6bc 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPlugin.java @@ -1,5 +1,7 @@ package org.eclipse.cdt.debug.ui; +import java.text.MessageFormat; +import java.text.NumberFormat; import java.util.HashMap; import java.util.Map; import java.util.MissingResourceException; @@ -118,14 +120,23 @@ public class CDebugUIPlugin extends AbstractUIPlugin public static String getResourceString(String key) { ResourceBundle bundle = CDebugUIPlugin.getDefault().getResourceBundle(); - try - { + try { return bundle.getString( key ); + } catch (MissingResourceException e) { + return "!" + key + "!"; + } catch (NullPointerException e) { + return "#" + key + "#"; } - catch ( MissingResourceException e ) - { - return key; - } + } + public static String getFormattedString(String key, String arg) { + return MessageFormat.format(getResourceString(key), new String[] { arg }); + } + public static String getFormattedString(String key, Integer arg) { + return MessageFormat.format(getResourceString(key), new Object[] { arg }); + } + + public static String getFormattedString(String key, String[] args) { + return MessageFormat.format(getResourceString(key), args); } /** diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPluginResources.properties b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPluginResources.properties new file mode 100644 index 00000000000..3ae64fbec28 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/CDebugUIPluginResources.properties @@ -0,0 +1,200 @@ +internal.ui.actions.SignalActionDelegate.Unable_to_deliver_signal_to_target=Unable to deliver the signal ''{0}'' to the target. +internal.ui.actions.SignalActionDelegate.Operation_failed=Operation failed. +internal.ui.actions.ShowRegisterTypesAction.Show_Type_Names_checkbox=Show &Type Names +internal.ui.actions.ShowRegisterTypesAction.Show_Type_Names_tooltip=Show Type Names +internal.ui.actions.LoadSymbolsForAllAction.Load_Symbols_For_all=Load Symbols For All +internal.ui.actions.LoadSymbolsForAllAction.Load_symbols_for_all_shared_libraries.=Load symbols for all shared libraries. +internal.ui.actions.LoadSymbolsForAllAction.Load_Symbols_For_All=Load Symbols For All +internal.ui.actions.LoadSymbolsForAllAction.Unable_to_load_symbols.=Unable to load symbols. +internal.ui.actions.AutoRefreshMemoryAction.Auto-Refresh=Auto-Refresh +internal.ui.actions.AutoRefreshMemoryAction.Automatically_Refresh_Memory_Block=Automatically Refresh Memory Block +internal.ui.actions.AutoRefreshMemoryAction.Auto-Refresh=Auto-Refresh +internal.ui.actions.RestartActionDelegate.Exceptions_occurred_attempting_to_restart=Exceptions occurred attempting to restart. +internal.ui.actions.RestartActionDelegate.Restart_failed=Restart failed. +internal.ui.actions.RestartActionDelegate.Restart=Restart +internal.ui.actions.RestoreDefaultTypeActionDelegate.Unable_to_cast_type=Unable to cast to type. +internal.ui.actions.CBreakpointPropertiesRulerAction.Breakpoint_Properties=Breakpoint &Properties... +internal.ui.actions.ManageFunctionBreakpointActionDelegate.Cannot_add_breakpoint=Cannot add breakpoint +internal.ui.actions.SwitchToDisassemblyActionDelegate.Exceptions_occurred_attempting_to_switch_to_disassemblysource_mode.=Exceptions occurred attempting to switch to disassembly/source mode. +internal.ui.actions.SwitchToDisassemblyActionDelegate.1=Switch to disassembly/source mode failed. +internal.ui.actions.SwitchToDisassemblyActionDelegate.2=Switch to disassembly/source mode +internal.ui.actions.ShowAsciiAction.Show_ASCII=Show ASCII +internal.ui.actions.AddGlobalsActionDelegate.Select_Variables=Select Variables: +internal.ui.actions.AddGlobalsActionDelegate.Exceptions_occurred_attempting_to_add_global_variables.=Exceptions occurred attempting to add global variables. +internal.ui.actions.AddGlobalsActionDelegate.Add_global_variables_failed=Add global variables failed. +internal.ui.actions.EnableDisableBreakpointRulerAction.Enable_Breakpoint=&Enable Breakpoint +internal.ui.actions.EnableDisableBreakpointRulerAction.Enabling_disabling_breakpoints=Enabling/disabling breakpoints +internal.ui.actions.EnableDisableBreakpointRulerAction.Exceptions_occured_enabling_disabling_breakpoint=Exceptions occurred enabling or disabling the breakpoint +internal.ui.actions.EnableDisableBreakpointRulerAction.Disable_breakpoint=&Disable Breakpoint +internal.ui.actions.VariableFormatActionDelegate.Unable_to_set_format_of_variable=Unable to set format of variable. +internal.ui.actions.RefreshAction.Unable_to_refresh=Unable to refresh. +internal.ui.actions.ExpressionDialog.Add_Expression=Add Expression +internal.ui.actions.ExpressionDialog.Expression_to_add=Expression to add: +internal.ui.actions.CastToTypeActionDelegate.Type_field_must_not_be_empty=The 'Type' field must not be empty. +internal.ui.actions.CastToTypeActionDelegate.Cast_To_Type=Cast To Type +internal.ui.actions.CastToTypeActionDelegate.Enter_type=Enter type: +internal.ui.actions.CastToTypeActionDelegate.Unable_to_cast_to_type.=Unable to cast to type. +internal.ui.actions.EnableVariablesActionDelegate.Enable_variables_failed.=Enable variable(s) failed. +internal.ui.actions.EnableVariablesActionDelegate.Exceptions_occurred_enabling_the_variables=Exceptions occurred enabling the variable(s). +internal.ui.actions.MemorySizeAction.Unable_to_change_memory_unit_size=Unable to change memory unit size. +# +# Examples of the display for the following value are "1 byte" and "8 bytes". +# Normally placeholders in {} are not translated, except when they are choice forms, +# where the strings after each "#" are to be translated. +# +internal.ui.actions.MemorySizeAction.byte_bytes={0, number, integer} {0, choice, 1#byte|2#bytes} +internal.ui.actions.MemoryNumberOfColumnsAction.number_of_column={0, number, integer} {0, choice, 0#columns|1#column|2#columns} +internal.ui.actions.SignalZeroWorkbenchActionDelegate.Exceptions_occurred_attempting_to_resume_without_signal=Exceptions occurred attempting to resume without signal. +internal.ui.actions.SignalZeroWorkbenchActionDelegate.ErrorMsg_Resume_without_signal_failed=Resume without signal failed. +internal.ui.actions.SignalZeroWorkbenchActionDelegate.ErrorMsgTitle_Resume_Without_Signal=Resume Without Signal +internal.ui.actions.CastToArrayActionDelegate.Shell_Display_As_Array=Display As Array +internal.ui.actions.CastToArrayActionDelegate.Start_index=Start index: +internal.ui.actions.CastToArrayActionDelegate.Length=Length: +internal.ui.actions.CastToArrayActionDelegate.First_index_field_must_not_be_empty=The 'First index' field must not be empty. +internal.ui.actions.CastToArrayActionDelegate.7=Invalid first index. +internal.ui.actions.CastToArrayActionDelegate.Invalid_first_index=The 'Last index' field must not be empty. +internal.ui.actions.CastToArrayActionDelegate.Invalid_last_index.=Invalid last index. +internal.ui.actions.CastToArrayActionDelegate.The_length_must_be_greater_than_0=The length must be greater than 0. +internal.ui.actions.CastToArrayActionDelegate.Unable_to_display_this_variable_as_an_array=Unable to display this variable as an array. +internal.ui.actions.SignalZeroObjectActionDelegate.Unable_to_resume_ignoring_signal=Unable to resume ignoring signal. +internal.ui.actions.SignalZeroObjectActionDelegate.Operation_failed=Operation failed. +internal.ui.actions.CBreakpointPreferencePage.Ignore_count_must_be_positive_integer=Ignore count must be a positive integer +internal.ui.actions.CBreakpointPreferencePage.Not_available=Not available +internal.ui.actions.CBreakpointPreferencePage.Function_name=Function name: +internal.ui.actions.CBreakpointPreferencePage.Function_Breakpoint_Properties=C/C++ Function Breakpoint Properties +internal.ui.actions.CBreakpointPreferencePage.Address=Address: +internal.ui.actions.CBreakpointPreferencePage.Address_Breakpoint_Properties=C/C++ Address Breakpoint Properties +internal.ui.actions.CBreakpointPreferencePage.File=File: +internal.ui.actions.CBreakpointPreferencePage.Line_Breakpoint_Properties=C/C++ Line Breakpoint Properties +internal.ui.actions.CBreakpointPreferencePage.Line_Number=Line Number: +internal.ui.actions.CBreakpointPreferencePage.Project=Project: +internal.ui.actions.CBreakpointPreferencePage.Read_Watchpoint_Properties=C/C++ Read Watchpoint Properties +internal.ui.actions.CBreakpointPreferencePage.Watchpoint_Properties=C/C++ Watchpoint Properties +internal.ui.actions.CBreakpointPreferencePage.Access_Watchpoint_Properties=C/C++ Access Watchpoint Properties +internal.ui.actions.CBreakpointPreferencePage.Expression_To_Watch=Expression To Watch: +internal.ui.actions.CBreakpointPreferencePage.Condition=&Condition +internal.ui.actions.CBreakpointPreferencePage.Invalid_condition=Invalid_condition +internal.ui.actions.CBreakpointPreferencePage.Ignore_Count=&Ignore Count: +internal.ui.actions.AddWatchpointActionDelegate.Cannot_add_watchpoint=Cannot add watchpoint +internal.ui.actions.MemoryNumberOfColumnAction.Unable_to_change_the_column_number.=Unable to change the column number. +internal.ui.actions.RunToLineRulerAction.Run_To_Line=Run To Line +internal.ui.actions.AddAddressBreakpointActionDelegate.Invalid_address=Invalid address. +internal.ui.actions.AddAddressBreakpointActionDelegate.Address_can_not_be_0=Address can not be 0. +internal.ui.actions.AddAddressBreakpointActionDelegate.Add_Address_Breakpoint=Add Address Breakpoint +internal.ui.actions.AddAddressBreakpointActionDelegate.Enter_address=Enter address: +internal.ui.actions.ClearMemoryAction.Clear=Clear +internal.ui.actions.ClearMemoryAction.Clear_Memory_Block=Clear Memory Block +internal.ui.actions.AddWatchpointDialog.Add_C_C++_Watchpoint=Add C/C++ Watchpoint +internal.ui.actions.AddWatchpointDialog.Expression_to_watch=Expression to watch: +internal.ui.actions.AddWatchpointDialog.Access=Access +internal.ui.actions.AddWatchpointDialog.Write=Write +internal.ui.actions.AddWatchpointDialog.Read=Read +internal.ui.actions.ManageBreakpointRulerAction.Add_Breakpoint=Add Breakpoint +internal.ui.actions.ManageBreakpointRulerAction.Remove_Breakpoint=Remove Breakpoint +internal.ui.actions.ManageBreakpointRulerAction.Cannot_add_breakpoint=Cannot add breakpoint +internal.ui.actions.ManageBreakpointRulerAction.Cannot_remove_breakpoint=Cannot remove breakpoint +internal.ui.actions.AddExpressionActionDelegate.Evaluation_of_expression_failed=Evaluation of expression failed. +internal.ui.actions.LoadSymbolsActionDelegate.Unable_to_load_symbols_of_shared_library=Unable to load symbols of shared library. +internal.ui.actions.LoadSymbolsActionDelegate.Operation_failed=Operation failed. +internal.ui.actions.ChangeRegisterValueAction.Change_Register_Value=Change Register Value +internal.ui.actions.ChangeRegisterValueAction.Setting_the_register_value_failed=Setting the register value failed. +internal.ui.actions.RefreshMemoryAction.Refresh_Memory_Block=Refresh Memory Block +internal.ui.actions.RefreshMemoryAction.Refresh=Refresh +internal.ui.actions.ManageBreakpointActionDelegate.Cannot_add_breakpoint=Cannot add breakpoint +internal.ui.actions.MemoryFormatAction.Unable_to_change_format=Unable to change format. +internal.ui.actions.MemoryFormatAction.Hexadecimal=Hexadecimal +internal.ui.actions.MemoryFormatAction.Signed_Decimal=Signed Decimal +internal.ui.actions.MemoryFormatAction.Unsigned_Decimal=Unsigned Decimal + +internal.ui.editors.CDebugEditor.C_CPP_File_Editor=C/C++ File Editor +internal.ui.editors.CDebugEditor.Source_not_found=Source not found +internal.ui.editors.CDebugEditor.attach_source_location_instructions=You can attach a new source location by pressing the button below: +internal.ui.editors.CDebugEditor.Attach_Source_button=&Attach Source... +internal.ui.editors.CDebugEditor.Can_not_find_file=Can not find the file ''{0}'' in the specified source locations. +internal.ui.editors.DisassemblyEditorInput.Disassembly=Disassembly +internal.ui.preferences.SharedLibrariesViewPreferencePage.Shared_Libraries_View_Settings=Shared Libraries View Settings. +internal.ui.preferences.SharedLibrariesViewPreferencePage.Auto-Refresh_by_default=Auto-Refresh by default +internal.ui.preferences.RegistersViewPreferencePage.Registers_View_Settings=Registers View Settings. +internal.ui.preferences.RegistersViewPreferencePage.Changed_register_value_color=&Changed register value color: +internal.ui.preferences.RegistersViewPreferencePage.Auto-Refresh_by_default=Auto-Refresh by default + +internal.ui.preferences.CDebugPreferencePage.Natural=Natural +internal.ui.preferences.CDebugPreferencePage.Hexadecimal=Hexadecimal +internal.ui.preferences.CDebugPreferencePage.Decimal=Decimal +internal.ui.preferences.CDebugPreferencePage.Preference_page_description=General settings for C/C++ Debugging. +internal.ui.preferences.CDebugPreferencePage.Opened_view_default_settings=Opened view default settings +internal.ui.preferences.CDebugPreferencePage.pathsButton=Show full &paths +internal.ui.preferences.CDebugPreferencePage.variableFormatCombo=Default variable format: +internal.ui.preferences.CDebugPreferencePage.expressionFormatCombo=Default expression format: +internal.ui.preferences.CDebugPreferencePage.registerFormatCombo=Default register format: +internal.ui.preferences.CDebugPreferencePage.Disassembly_options=Disassembly options +internal.ui.preferences.CDebugPreferencePage.autoDisassemblyButton=Automatically switch to &disassembly mode +internal.ui.preferences.CDebugPreferencePage.maxNumberOfInstructions=Maximum number of instructions: +internal.ui.preferences.CDebugPreferencePage.ErrorMaxNumberOfInstructionsRange=The valid value range is [{0},{1}]. +internal.ui.preferences.SourcePreferencePage.Description=Common source lookup settings. +internal.ui.preferences.SourcePreferencePage.Source_locations=Source Locations +internal.ui.preferences.SourcePreferencePage.Search_for_duplicate_source_files=Search for duplicate source files +internal.ui.preferences.MemoryViewPreferencePage.Description=Memory View Settings. +internal.ui.preferences.MemoryViewPreferencePage.Text_Color=Text Color: +internal.ui.preferences.MemoryViewPreferencePage.Background_Color=Background Color: +internal.ui.preferences.MemoryViewPreferencePage.Address_Color=Address Color: +internal.ui.preferences.MemoryViewPreferencePage.Changed_Value_Color=Changed Value Color: +internal.ui.preferences.MemoryViewPreferencePage.Font=Font: +internal.ui.preferences.MemoryViewPreferencePage.Padding_Character=Padding Character: +internal.ui.preferences.MemoryViewPreferencePage.Auto_Refresh_by_default=Auto-Refresh by default +internal.ui.preferences.MemoryViewPreferencePage.Show_ascii_by_default=Show ASCII by default +internal.ui.wizards.AddProjectSourceLocationWizard.Select_Project=Select Project +internal.ui.wizards.AddProjectSourceLocationWizard.WindowTitle=Add Project Source Location +internal.ui.wizards.AddProjectSourceLocationWizard.AddProjectLocationMessage=Add an existing workspace project to the source locations list. +internal.ui.wizards.AddProjectSourceLocationWizard.Description=Add an existing project to the source locations list. +internal.ui.wizards.AddDirectorySourceLocationWizard.Select_Directory=Select Directory +internal.ui.wizards.AddDirectorySourceLocationWizard.WindowTitle=Add Directory Source Location +internal.ui.wizards.AddDirectorySourceLocationWizard.WindowMessage=Add a local file system directory to the source locations list. +internal.ui.wizards.AddDirectorySourceLocationWizard.ErrorDirectoryEmpty=Directory must not be empty. +internal.ui.wizards.AddDirectorySourceLocationWizard.ErrorDirectoryDoesNotExist=Directory does not exist. +internal.ui.wizards.AddDirectorySourceLocationWizard.ErrorDirectoryMustBeAbsolute=Directory must be absolute. +internal.ui.wizards.AddDirectorySourceLocationWizard.Description=Add a local file system directory to the source locations list. +AddSourceLocationWizard.Window_Title=Add Source Location +AddDirectorySourceLocationBlock.Select_location_directory=Select location directory: +AddDirectorySourceLocationBlock.Browse=&Browse... +AddDirectorySourceLocationBlock.Select_Location_Directory=Select Location Directory +AddDirectorySourceLocationBlock.Associate_with=&Associate with +AddDirectorySourceLocationBlock.Search_subfolders=Search sub&folders +internal.ui.preferences.SourceLocationSelectionPage.Add_Source_Location=Add Source Location +internal.ui.preferences.SourceLocationSelectionPage.WindowTitle=Select +internal.ui.preferences.SourceLocationSelectionPage.Select_source_location_type=Select source location type: +internal.ui.preferences.SourceLocationSelectionPage.Existing_Project_Into_Workspace=Existing Project Into Workspace +internal.ui.preferences.SourceLocationSelectionPage.File_System_Directory=File System Directory +internal.ui.dialogfields.SourceListDialogField.yes=yes +internal.ui.dialogfields.SourceListDialogField.no=no +internal.ui.dialogfields.SourceListDialogField.Add=Add... +internal.ui.dialogfields.SourceListDialogField.Up=Up +internal.ui.dialogfields.SourceListDialogField.Down=Down +internal.ui.dialogfields.SourceListDialogField.Remove=Remove +internal.ui.dialogfields.SourceListDialogField.Location=Location +internal.ui.dialogfields.SourceListDialogField.Association=Association +internal.ui.dialogfields.SourceListDialogField.Search_subfolders=Search subfolders + +ui.sourcelookup.SourceListDialogField.yes=yes +ui.sourcelookup.SourceListDialogField.no=no +ui.sourcelookup.SourceListDialogField.Add=Add... +ui.sourcelookup.SourceListDialogField.Up=Up +ui.sourcelookup.SourceListDialogField.Down=Down +ui.sourcelookup.SourceListDialogField.Remove=Remove +ui.sourcelookup.SourceListDialogField.Location=Location +ui.sourcelookup.SourceListDialogField.Association=Association +ui.sourcelookup.SourceListDialogField.Search_subfolders=Search subfolders +ui.sourcelookup.SourcePropertyPage.Terminated=Terminated. +ui.sourcelookup.SourceLookupBlock.Select_All=Select All +ui.sourcelookup.SourceLookupBlock.Deselect_All=Deselect All +ui.sourcelookup.SourceLookupBlock.Generic_Source_Locations=Generic Source Locations +ui.sourcelookup.SourceLookupBlock.Additional_Source_Locations=Additional Source Locations +ui.sourcelookup.SourceLookupBlock.Search_for_dup_src_files=Search for duplicate source files +ui.sourcelookup.DefaultSourceLocator.Always_map_to_selection=Always map to the selection +ui.sourcelookup.DefaultSourceLocator.Unable_to_create_memento_for_src_location=Unable to create memento for C/C++ source locator. +ui.sourcelookup.DefaultSourceLocator.Unable_to_restore_prompting_src_locator=Unable to restore prompting source locator - invalid format. +ui.sourcelookup.DefaultSourceLocator.Unable_to_restore_prompting_src_locator_project_not_found=Unable to restore prompting source locator - project {0} not found. +ui.sourcelookup.DefaultSourceLocator.Exception_initializing_src_locator=Exception occurred initializing source locator. +ui.sourcelookup.DefaultSourceLocator.Selection_needed=Selection needed +ui.sourcelookup.DefaultSourceLocator.Select_file_associated_with_stack_frame=Debugger has found multiple files with the same name.\nPlease select one associated with the selected stack frame. +ui.sourcelookup.DefaultSourceLocator.Project_does_not_exist=Project "{0}" does not exist. \ No newline at end of file diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/DefaultSourceLocator.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/DefaultSourceLocator.java index 3e0167cd310..72361f0adbb 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/DefaultSourceLocator.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/DefaultSourceLocator.java @@ -80,7 +80,7 @@ public class DefaultSourceLocator implements IPersistableSourceLocator, IAdaptab Composite comp = ControlFactory.createComposite( parent, 1 ); super.createDialogArea( comp ); Composite comp1 = ControlFactory.createComposite( comp, 1 ); - fAlwaysUseThisFileButton.setLabelText( "Always map to the selection" ); + fAlwaysUseThisFileButton.setLabelText( CDebugUIPlugin.getResourceString("ui.sourcelookup.DefaultSourceLocator.Always_map_to_selection") ); //$NON-NLS-1$ fAlwaysUseThisFileButton.doFillIntoGrid( comp1, 1 ); return comp; } @@ -125,11 +125,11 @@ public class DefaultSourceLocator implements IPersistableSourceLocator, IAdaptab */ public static final String ID_DEFAULT_SOURCE_LOCATOR = CDebugUIPlugin.getUniqueIdentifier() + ".DefaultSourceLocator"; //$NON-NLS-1$ // to support old configurations - public static final String ID_OLD_DEFAULT_SOURCE_LOCATOR = "org.eclipse.cdt.launch" + ".DefaultSourceLocator"; //$NON-NLS-1$ + public static final String ID_OLD_DEFAULT_SOURCE_LOCATOR = "org.eclipse.cdt.launch" + ".DefaultSourceLocator"; //$NON-NLS-1$ //$NON-NLS-2$ - private static final String ELEMENT_NAME = "PromptingSourceLocator"; - private static final String ATTR_PROJECT = "project"; - private static final String ATTR_MEMENTO = "memento"; + private static final String ELEMENT_NAME = "PromptingSourceLocator"; //$NON-NLS-1$ + private static final String ATTR_PROJECT = "project"; //$NON-NLS-1$ + private static final String ATTR_MEMENTO = "memento"; //$NON-NLS-1$ /** * Underlying source locator. @@ -163,11 +163,11 @@ public class DefaultSourceLocator implements IPersistableSourceLocator, IAdaptab } try { - return CDebugUtils.serializeDocument( doc, " " ); + return CDebugUtils.serializeDocument( doc, " " ); //$NON-NLS-1$ } catch( IOException e ) { - abort( "Unable to create memento for C/C++ source locator.", e ); + abort( CDebugUIPlugin.getResourceString("ui.sourcelookup.DefaultSourceLocator.Unable_to_create_memento_for_src_location"), e ); //$NON-NLS-1$ } } return null; @@ -189,14 +189,14 @@ public class DefaultSourceLocator implements IPersistableSourceLocator, IAdaptab if ( !root.getNodeName().equalsIgnoreCase( ELEMENT_NAME ) ) { - abort( "Unable to restore prompting source locator - invalid format.", null ); + abort( CDebugUIPlugin.getResourceString("ui.sourcelookup.DefaultSourceLocator.Unable_to_restore_prompting_src_locator"), null ); //$NON-NLS-1$ } String projectName = root.getAttribute( ATTR_PROJECT ); String data = root.getAttribute( ATTR_MEMENTO ); if ( isEmpty( projectName ) ) { - abort( "Unable to restore prompting source locator - invalid format.", null ); + abort( CDebugUIPlugin.getResourceString("ui.sourcelookup.DefaultSourceLocator.Unable_to_restore_prompting_src_locator"), null ); //$NON-NLS-1$ } IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject( projectName ); if ( getCSourceLocator() == null ) @@ -204,13 +204,13 @@ public class DefaultSourceLocator implements IPersistableSourceLocator, IAdaptab if ( getCSourceLocator().getProject() != null && !getCSourceLocator().getProject().equals( project ) ) return; if ( project == null || !project.exists() || !project.isOpen() ) - abort( MessageFormat.format( "Unable to restore prompting source locator - project {0} not found.", new String[] { projectName } ), null ); + abort( MessageFormat.format( CDebugUIPlugin.getResourceString("ui.sourcelookup.DefaultSourceLocator.Unable_to_restore_prompting_src_locator_project_not_found"), new String[] { projectName } ), null ); //$NON-NLS-1$ IPersistableSourceLocator psl = getPersistableSourceLocator(); if ( psl != null ) psl.initializeFromMemento( data ); else - abort( "Unable to restore C/C++ source locator - invalid format.", null ); + abort( CDebugUIPlugin.getResourceString("ui.sourcelookup.DefaultSourceLocator.Unable_to_restore_prompting_src_locator_project_not_found"), null ); //$NON-NLS-1$ return; } catch( ParserConfigurationException e ) @@ -225,7 +225,7 @@ public class DefaultSourceLocator implements IPersistableSourceLocator, IAdaptab { ex = e; } - abort( "Exception occurred initializing source locator.", ex ); + abort( CDebugUIPlugin.getResourceString("ui.sourcelookup.DefaultSourceLocator.Exception_initializing_src_locator"), ex ); //$NON-NLS-1$ } /* (non-Javadoc) @@ -234,7 +234,7 @@ public class DefaultSourceLocator implements IPersistableSourceLocator, IAdaptab public void initializeDefaults( ILaunchConfiguration configuration ) throws CoreException { setCSourceLocator( SourceLookupFactory.createSourceLocator( getProject( configuration ) ) ); - String memento = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, "" ); + String memento = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, "" ); //$NON-NLS-1$ if ( !isEmpty( memento ) ) initializeFromMemento( memento ); } @@ -322,8 +322,8 @@ public class DefaultSourceLocator implements IPersistableSourceLocator, IAdaptab dialog.setInput( list.toArray() ); dialog.setContentProvider( new ArrayContentProvider() ); dialog.setLabelProvider( new SourceElementLabelProvider() ); - dialog.setTitle( "Selection needed" ); - dialog.setMessage( "Debugger has found multiple files with the same name.\nPlease select one associated with the selected stack frame." ); + dialog.setTitle( CDebugUIPlugin.getResourceString("ui.sourcelookup.DefaultSourceLocator.Selection_needed") ); //$NON-NLS-1$ + dialog.setMessage( CDebugUIPlugin.getResourceString("ui.sourcelookup.DefaultSourceLocator.Select_file_associated_with_stack_frame") ); //$NON-NLS-1$ dialog.setInitialSelections( new Object[] { list.get( 0 ) } ); return dialog; } @@ -413,7 +413,7 @@ public class DefaultSourceLocator implements IPersistableSourceLocator, IAdaptab return project; } } - abort( MessageFormat.format( "Project \"{0}\" does not exist.", new String[] { projectName } ), null ); + abort( MessageFormat.format( CDebugUIPlugin.getResourceString("ui.sourcelookup.DefaultSourceLocator.Project_does_not_exist"), new String[] { projectName } ), null ); //$NON-NLS-1$ return null; } } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceListDialogField.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceListDialogField.java index 831dc2f83a5..eb1c7e0c4cf 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceListDialogField.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceListDialogField.java @@ -28,6 +28,7 @@ import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; public class SourceListDialogField extends ListDialogField @@ -41,13 +42,13 @@ public class SourceListDialogField extends ListDialogField } // String constants - protected static final String YES_VALUE = "yes"; - protected static final String NO_VALUE = "no"; + protected static final String YES_VALUE = CDebugUIPlugin.getResourceString("ui.sourcelookup.SourceListDialogField.yes"); //$NON-NLS-1$ + protected static final String NO_VALUE = CDebugUIPlugin.getResourceString("ui.sourcelookup.SourceListDialogField.no"); //$NON-NLS-1$ // Column properties - private static final String CP_LOCATION = "location"; - private static final String CP_ASSOCIATION = "association"; - private static final String CP_SEARCH_SUBFOLDERS = "searchSubfolders"; + private static final String CP_LOCATION = "location"; //$NON-NLS-1$ + private static final String CP_ASSOCIATION = "association"; //$NON-NLS-1$ + private static final String CP_SEARCH_SUBFOLDERS = "searchSubfolders"; //$NON-NLS-1$ private ObservableSourceList fObservable = new ObservableSourceList(); @@ -56,12 +57,12 @@ public class SourceListDialogField extends ListDialogField super( listAdapter, new String[] { - /* 0 */ "Add...", + /* 0 */ CDebugUIPlugin.getResourceString("ui.sourcelookup.SourceListDialogField.Add"), //$NON-NLS-1$ /* 1 */ null, - /* 2 */ "Up", - /* 3 */ "Down", + /* 2 */ CDebugUIPlugin.getResourceString("ui.sourcelookup.SourceListDialogField.Up"), //$NON-NLS-1$ + /* 3 */ CDebugUIPlugin.getResourceString("ui.sourcelookup.SourceListDialogField.Down"), //$NON-NLS-1$ /* 4 */ null, - /* 5 */ "Remove", + /* 5 */ CDebugUIPlugin.getResourceString("ui.sourcelookup.SourceListDialogField.Remove"), //$NON-NLS-1$ }, new SourceLookupLabelProvider() ); setUpButtonIndex( 2 ); @@ -100,9 +101,9 @@ public class SourceListDialogField extends ListDialogField tableLayout.addColumnData( new ColumnWeightData( 1, true ) ); TableColumn[] columns = table.getColumns(); - columns[0].setText( "Location" ); - columns[1].setText( "Association" ); - columns[2].setText( "Search subfolders" ); + columns[0].setText( CDebugUIPlugin.getResourceString("ui.sourcelookup.SourceListDialogField.Location") ); //$NON-NLS-1$ + columns[1].setText( CDebugUIPlugin.getResourceString("ui.sourcelookup.SourceListDialogField.Association") ); //$NON-NLS-1$ + columns[2].setText( CDebugUIPlugin.getResourceString("ui.sourcelookup.SourceListDialogField.Search_subfolders") ); //$NON-NLS-1$ CellEditor textCellEditor = new TextCellEditor( table ); CellEditor comboCellEditor = new ComboBoxCellEditor( table, new String[]{ YES_VALUE, NO_VALUE } ); diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupBlock.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupBlock.java index 0970486a82b..80ce5649582 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupBlock.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupBlock.java @@ -129,12 +129,12 @@ public class SourceLookupBlock implements Observer setProject( project ); try { - String id = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "" ); + String id = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "" ); //$NON-NLS-1$ if ( isEmpty( id ) || CDebugUIPlugin.getDefaultSourceLocatorID().equals( id ) || CDebugUIPlugin.getDefaultSourceLocatorOldID().equals( id ) ) { - String memento = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, "" ); + String memento = configuration.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, "" ); //$NON-NLS-1$ if ( !isEmpty( memento ) ) initializeFromMemento( memento ); else @@ -410,8 +410,8 @@ public class SourceLookupBlock implements Observer { String[] generatedSourceButtonLabels = new String[] { - /* 0 */ "Select All", - /* 1 */ "Deselect All", + /* 0 */ CDebugUIPlugin.getResourceString("ui.sourcelookup.SourceLookupBlock.Select_All"), //$NON-NLS-1$ + /* 1 */ CDebugUIPlugin.getResourceString("ui.sourcelookup.SourceLookupBlock.Deselect_All"), //$NON-NLS-1$ }; IListAdapter generatedSourceAdapter = new IListAdapter() @@ -428,7 +428,7 @@ public class SourceLookupBlock implements Observer }; CheckedListDialogField field = new CheckedListDialogField( generatedSourceAdapter, generatedSourceButtonLabels, new SourceLookupLabelProvider() ); - field.setLabelText( "Generic Source Locations" ); + field.setLabelText( CDebugUIPlugin.getResourceString("ui.sourcelookup.SourceLookupBlock.Generic_Source_Locations") ); //$NON-NLS-1$ field.setCheckAllButtonIndex( 0 ); field.setUncheckAllButtonIndex( 1 ); field.setDialogFieldListener( @@ -445,7 +445,7 @@ public class SourceLookupBlock implements Observer private SourceListDialogField createAddedSourceListField() { SourceListDialogField field = - new SourceListDialogField( "Additional Source Locations", + new SourceListDialogField( CDebugUIPlugin.getResourceString("ui.sourcelookup.SourceLookupBlock.Additional_Source_Locations"), //$NON-NLS-1$ new IListAdapter() { public void customButtonPressed( DialogField field, int index ) @@ -464,7 +464,7 @@ public class SourceLookupBlock implements Observer private SelectionButtonDialogField createSearchForDuplicateFilesButton() { SelectionButtonDialogField button = new SelectionButtonDialogField( SWT.CHECK ); - button.setLabelText( "Search for duplicate source files" ); + button.setLabelText( CDebugUIPlugin.getResourceString("ui.sourcelookup.SourceLookupBlock.Search_for_dup_src_files") ); //$NON-NLS-1$ button.setDialogFieldListener( new IDialogFieldListener() { @@ -510,7 +510,7 @@ public class SourceLookupBlock implements Observer { try { - String projectName = configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, "" ); + String projectName = configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, "" ); //$NON-NLS-1$ if ( !isEmpty( projectName ) ) { IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject( projectName ); diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupLabelProvider.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupLabelProvider.java index 1642c2146f0..7e0a9758c7a 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupLabelProvider.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourceLookupLabelProvider.java @@ -60,6 +60,6 @@ public class SourceLookupLabelProvider extends LabelProvider implements ITableLa if ( element instanceof IDirectorySourceLocation ) return ( ((IDirectorySourceLocation)element).searchSubfolders() ) ? SourceListDialogField.YES_VALUE : SourceListDialogField.NO_VALUE; } - return ""; + return ""; //$NON-NLS-1$ } } \ No newline at end of file diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourcePropertyPage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourcePropertyPage.java index 0412ac04414..b1c7ed13176 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourcePropertyPage.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/sourcelookup/SourcePropertyPage.java @@ -56,7 +56,7 @@ public class SourcePropertyPage extends PropertyPage protected Control createTerminatedContents( Composite parent ) { Label label= new Label( parent, SWT.LEFT ); - label.setText( "Terminated." ); + label.setText( CDebugUIPlugin.getResourceString("ui.sourcelookup.SourcePropertyPage.Terminated") ); //$NON-NLS-1$ return label; }