Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8308233

Copy-to-clipboard button should use unprocessed snippet text

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • None
    • tools
    • None

      The snippet `@replace` feature[1] allows parts of the snippet text to be replaced by some placeholder in the snippet presentation. This is mostly useful for parts which are necessary for correctness but not of interest to the user. The copy-to-clipboard feature currently copies the processed version of the snippet text. However, since the purpose of copying snippet text to the clipboard is usually to get working code, it would be more useful to get the unprocessed snippet text.

      [1]: https://docs.oracle.com/en/java/javase/19/code-snippet/index.html#modifying-text

            hannesw Hannes Wallnoefer
            hannesw Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: