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

Method evaluateLine

ij/src/main/java/ij/plugin/frame/Editor.java:706–725  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

704 }
705
706 void evaluateLine() {
707 int start = ta.getSelectionStart();
708 int end = ta.getSelectionEnd();
709 if (end>start)
710 {runMacro(false); return;}
711 String text = ta.getText();
712 while (start>0) {
713 start--;
714 if (text.charAt(start)=='\n')
715 {start++; break;}
716 }
717 while (end<text.length()-1) {
718 end++;
719 if (text.charAt(end)=='\n')
720 break;
721 }
722 ta.setSelectionStart(start);
723 ta.setSelectionEnd(end);
724 runMacro(false);
725 }
726
727 void print () {
728 PrintJob pjob = Toolkit.getDefaultToolkit().getPrintJob(this, "Cool Stuff", p);

Callers 1

actionPerformedMethod · 0.95

Calls 6

runMacroMethod · 0.95
charAtMethod · 0.80
lengthMethod · 0.65
getSelectionStartMethod · 0.45
getSelectionEndMethod · 0.45
getTextMethod · 0.45

Tested by

no test coverage detected