MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / log

Method log

ij/src/main/java/ij/IJ.java:624–649  ·  view source on GitHub ↗
(String s)

Source from the content-addressed store, hash-verified

622 }
623
624 public static synchronized void log(String s) {
625 if (s==null) return;
626 if (logPanel==null && ij!=null) {
627 TextWindow logWindow = new TextWindow("Log", "", 400, 250);
628 logPanel = logWindow.getTextPanel();
629 logPanel.setFont(new Font("SansSerif", Font.PLAIN, 16));
630 }
631 if (logPanel!=null) {
632 if (s.startsWith("\\"))
633 handleLogCommand(s);
634 else {
635 if (s.endsWith("\n")) {
636 if (s.equals("\n\n"))
637 s= "\n \n ";
638 else if (s.endsWith("\n\n"))
639 s = s.substring(0, s.length()-2)+"\n \n ";
640 else
641 s = s+" ";
642 }
643 logPanel.append(s);
644 }
645 } else {
646 LogStream.redirectSystem(false);
647 System.out.println(s);
648 }
649 }
650
651 static void handleLogCommand(String s) {
652 if (s.equals("\\Closed"))

Callers 15

lockMethod · 0.95
unlockMethod · 0.95
setImageMethod · 0.95
setStackMethod · 0.95
trimProcessorMethod · 0.95
saveRoiMethod · 0.95
copyAttributesMethod · 0.95
logImageListenersMethod · 0.95
flattenMethod · 0.95
flattenStackMethod · 0.95
runPlugInMethod · 0.95
runUserPlugInMethod · 0.95

Calls 10

getTextPanelMethod · 0.95
handleLogCommandMethod · 0.95
redirectSystemMethod · 0.95
startsWithMethod · 0.80
substringMethod · 0.80
printlnMethod · 0.80
setFontMethod · 0.65
lengthMethod · 0.65
appendMethod · 0.65
equalsMethod · 0.45

Tested by

no test coverage detected