1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 01:15:29 +02:00

Bug 478740: Missing externalized strings

Change-Id: Ia343d2c055e167fe093586aca32a209b4a8a1c11
This commit is contained in:
Marc Khouzam 2016-02-23 09:52:37 -05:00
parent d6611cfcfa
commit aff7275044
3 changed files with 50 additions and 7 deletions

View file

@ -0,0 +1,28 @@
/*******************************************************************************
* Copyright (c) 2016 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.cdt.debug.internal.ui.commands;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
public static String ReverseDebugging_Error;
public static String ReverseDebugging_UndefinedTraceMethod;
public static String ReverseDebugging_HardwareTracingNotAvailable;
public static String ReverseDebugging_DoNotShowAgain;
public static String ReverseDebugging_ToggleHardwareTrace;
public static String ReverseDebugging_ToggleSoftwareTrace;
public static String ReverseDebugging_ToggleReverseDebugging;
static {
// initialize resource bundle
NLS.initializeMessages(Messages.class.getName(), Messages.class);
}
private Messages() {
}
}

View file

@ -0,0 +1,15 @@
#######################################################################################
# Copyright (c) 2016 Ericsson and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#######################################################################################
ReverseDebugging_Error=Error
ReverseDebugging_UndefinedTraceMethod=Undefined trace method for Reverse Debugging.
ReverseDebugging_HardwareTracingNotAvailable=Hardware Tracing Method not available, Reverse debugging is switched Off, please select another method
ReverseDebugging_DoNotShowAgain=Don't show this message again
ReverseDebugging_ToggleHardwareTrace=Toggle Hardware Trace
ReverseDebugging_ToggleSoftwareTrace=Toggle Software Trace
ReverseDebugging_ToggleReverseDebugging=Toggle Reverse Debugging

View file

@ -191,7 +191,7 @@ public class ReverseToggleCommandHandler extends DebugCommandHandler implements
traceMethod = ReverseTraceMethod.HARDWARE_TRACE;
} else {
// undefined trace method
throw new ExecutionException("Undefined trace method for Reverse Debugging."); //$NON-NLS-1$
throw new ExecutionException(Messages.ReverseDebugging_UndefinedTraceMethod);
}
// store the parameter in the gdb command handler class
@ -249,10 +249,10 @@ public class ReverseToggleCommandHandler extends DebugCommandHandler implements
} else {
activeShell = new Shell(PlatformUI.getWorkbench().getDisplay());
}
MessageDialogWithToggle dialogbox = new MessageDialogWithToggle(activeShell, "Error", //$NON-NLS-1$
null, "Hardware Tracing Method not available, Reverse debugging is switched Off, please select another method", MessageDialog.QUESTION, //$NON-NLS-1$
MessageDialogWithToggle dialogbox = new MessageDialogWithToggle(activeShell, Messages.ReverseDebugging_Error,
null, Messages.ReverseDebugging_HardwareTracingNotAvailable, MessageDialog.QUESTION,
new String[] {IDialogConstants.OK_LABEL}, 0,
"Don't show this message again", false); //$NON-NLS-1$
Messages.ReverseDebugging_DoNotShowAgain, false);
dialogbox.setPrefStore(CDebugUIPlugin.getDefault().getPreferenceStore());
dialogbox.setPrefKey(ICDebugPreferenceConstants.PREF_SHOW_ERROR_REVERSE_TRACE_METHOD_NOT_AVAILABLE);
if (dialogbox.open() == 0) {
@ -291,14 +291,14 @@ public class ReverseToggleCommandHandler extends DebugCommandHandler implements
try{
if (fTraceMethod != ReverseTraceMethod.STOP_TRACE && fTraceMethod != ReverseTraceMethod.FULL_TRACE) {
HandlerUtil.updateRadioState(commandService.getCommand(REVERSE_TOGGLE_COMMAND_ID), "UseHardTrace"); //$NON-NLS-1$
element.setTooltip("Toggle Hardware Trace"); //$NON-NLS-1$
element.setTooltip(Messages.ReverseDebugging_ToggleHardwareTrace);
element.setIcon(fTracemethodOnImages[1]);
} else if (fTraceMethod == ReverseTraceMethod.FULL_TRACE) {
HandlerUtil.updateRadioState(commandService.getCommand(REVERSE_TOGGLE_COMMAND_ID), "UseSoftTrace"); //$NON-NLS-1$
element.setTooltip("Toggle Software Trace"); //$NON-NLS-1$
element.setTooltip(Messages.ReverseDebugging_ToggleSoftwareTrace);
element.setIcon(fTracemethodOnImages[0]);
} else {
element.setTooltip("Toggle Reverse Debugging"); //$NON-NLS-1$
element.setTooltip(Messages.ReverseDebugging_ToggleReverseDebugging);
if (fLastTraceMethod != ReverseTraceMethod.STOP_TRACE && fLastTraceMethod != ReverseTraceMethod.FULL_TRACE) {
HandlerUtil.updateRadioState(commandService.getCommand(REVERSE_TOGGLE_COMMAND_ID), "UseHardTrace"); //$NON-NLS-1$
element.setIcon(fTracemethodOffImages[1]);