MCPcopy Index your code
hub / github.com/processing/processing / copy

Method copy

app/src/processing/app/syntax/JEditTextArea.java:1579–1593  ·  view source on GitHub ↗

Places the selected text into the clipboard.

()

Source from the content-addressed store, hash-verified

1577 * Places the selected text into the clipboard.
1578 */
1579 public void copy() {
1580 if (selectionStart != selectionEnd) {
1581 Clipboard clipboard = getToolkit().getSystemClipboard();
1582
1583 String selection = getSelectedText();
1584 if (selection != null) {
1585 int repeatCount = inputHandler.getRepeatCount();
1586 StringBuilder sb = new StringBuilder();
1587 for(int i = 0; i < repeatCount; i++)
1588 sb.append(selection);
1589
1590 clipboard.setContents(new StringSelection(sb.toString()), null);
1591 }
1592 }
1593 }
1594
1595
1596 /**

Callers 1

cutMethod · 0.95

Calls 5

getSelectedTextMethod · 0.95
getSystemClipboardMethod · 0.80
getRepeatCountMethod · 0.80
appendMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected