MCPcopy Index your code
hub / github.com/benfry/processing4 / formatMessage

Method formatMessage

app/src/processing/app/ui/Toolkit.java:1383–1398  ·  view source on GitHub ↗
(String message)

Source from the content-addressed store, hash-verified

1381
1382
1383 static public String formatMessage(String message) {
1384 String monoName = "Monospaced";
1385 try {
1386 monoName = Toolkit.getMonoFontName();
1387 } catch (Exception ignored) { }
1388
1389 // Necessary to replace \n with <br/> (even if pre) otherwise Java
1390 // treats it as a closed tag and reverts to plain formatting.
1391 return "<html> " +
1392 "<head> <style type=\"text/css\">" +
1393 // if smaller than 12 pt, Source Code Sans doesn't get hinted
1394 // (not clear if that's a font or Java issue) [fry 220803]
1395 "tt { font: 12pt \"" + monoName + "\"; color: #888; }" +
1396 "</style> </head>" +
1397 message.replaceAll("\n", "<br/>");
1398 }
1399
1400
1401 static public String formatMessage(String primary, String secondary) {

Callers 6

showWarningTieredMethod · 0.95
showTraceMethod · 0.95
showYesNoQuestionMethod · 0.95
showCustomQuestionMethod · 0.95
handleCloseMethod · 0.95
checkModifiedMethod · 0.95

Calls 2

getMonoFontNameMethod · 0.95
replaceAllMethod · 0.45

Tested by

no test coverage detected