Skip to content

Commit

Permalink
fix: cleaning up message properties
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmaaa committed Mar 7, 2024
1 parent fcb1041 commit 94cdf51
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ else if (sessionType == SessionType.CORE)
}
catch (ExecutionException e1)
{
if (e1.getMessage().contains("Starting OpenOCD timed out."))
if (e1.getMessage().contains("Starting OpenOCD timed out.")) //$NON-NLS-1$
{
Display.getDefault().asyncExec(() -> {
ServerTimeoutErrorDialog.openError(Display.getDefault().getActiveShell());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class Messages
public static String TabMain_Launch_Config;

public static String TabDebugger_SettingTargetJob;

public static String OpenOCDConsole_ErrorGuideMessage;

public static String TabDebugger_noConfigOptions;
Expand All @@ -71,6 +71,10 @@ public class Messages
public static String TabDebugger_noTclPort;
public static String TabDebugger_noTelnetPort;

public static String ServerTimeoutErrorDialog_title;
public static String ServerTimeoutErrorDialog_message;
public static String ServerTimeoutErrorDialog_customAreaMessage;

// ------------------------------------------------------------------------

static
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,23 @@ public ServerTimeoutErrorDialog(Shell parentShell, String dialogTitle, Image dia
dialogButtonLabels);
}

public static boolean open(int kind, Shell parent, String title, String message, int style)
public static boolean open(int kind, Shell parent, String title, String message)
{
ServerTimeoutErrorDialog dialog = new ServerTimeoutErrorDialog(parent, title, null, message, kind, 0,
new String[] { IDialogConstants.OK_LABEL });
style &= SWT.SHEET;
return dialog.open() == 0;
}

public static void openError(Shell parent)
{
open(ERROR, parent, Messages.getString("ServerTimeoutErrorDialog.title"), //$NON-NLS-1$
Messages.getString("ServerTimeoutErrorDialog.message"), SWT.NONE); //$NON-NLS-1$
open(ERROR, parent, Messages.ServerTimeoutErrorDialog_title, Messages.ServerTimeoutErrorDialog_message);
}

@Override
protected Control createCustomArea(Composite parent)
{
Link link = new Link(parent, SWT.WRAP);
link.setText(Messages.getString("ServerTimeoutErrorDialog.customAreaMessage")); //$NON-NLS-1$
link.setText(Messages.ServerTimeoutErrorDialog_customAreaMessage);
link.addSelectionListener(new SelectionAdapter()
{
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,6 @@ TabMain_Launch_Config=Launch Configuration:
OpenOCDConsole_ErrorGuideMessage=Please refer to the troubleshooting guide below to identify the problem.

## Timeout Exception Dialog ##
ServerTimeoutErrorDialog.customAreaMessage=To increase timeout time visit <a>the Espressif Preference Page</a>.
ServerTimeoutErrorDialog.message=Starting OpenOCD timed out. Try to increase the `GDB server launch timeout`
ServerTimeoutErrorDialog.title=Problem Occurred
ServerTimeoutErrorDialog_customAreaMessage=To increase timeout time visit <a>the Espressif Preference Page</a>.
ServerTimeoutErrorDialog_message=Starting OpenOCD timed out. Try to increase the `GDB server launch timeout`
ServerTimeoutErrorDialog_title=Problem Occurred

0 comments on commit 94cdf51

Please sign in to comment.