equal
deleted
inserted
replaced
27 val clipboard = java.awt.Toolkit.getDefaultToolkit().getSystemClipboard; |
27 val clipboard = java.awt.Toolkit.getDefaultToolkit().getSystemClipboard; |
28 val sel_highlighter = new SelectionHighlighter |
28 val sel_highlighter = new SelectionHighlighter |
29 |
29 |
30 val copyaction = new SelectionHighlighter.CopyAction { |
30 val copyaction = new SelectionHighlighter.CopyAction { |
31 override def actionPerformed(e: java.awt.event.ActionEvent) { |
31 override def actionPerformed(e: java.awt.event.ActionEvent) { |
32 val inter = new isabelle.Symbol.Interpretation |
|
33 val selected_string = sel_highlighter.getSelectionRange.toString |
32 val selected_string = sel_highlighter.getSelectionRange.toString |
34 val encoded = inter.encode (selected_string) |
33 val encoded = VFS.converter.encode (selected_string) |
35 System.err.println ("-- copy --") |
34 System.err.println ("-- copy --") |
36 System.err.println (selected_string) |
35 System.err.println (selected_string) |
37 System.err.println (encoded) |
36 System.err.println (encoded) |
38 val transferable = new java.awt.datatransfer.StringSelection(encoded) |
37 val transferable = new java.awt.datatransfer.StringSelection(encoded) |
39 clipboard.setContents(transferable, null) |
38 clipboard.setContents(transferable, null) |