src/Tools/jEdit/src/jedit/StateViewDockable.scala
changeset 34364 8df6519599ef
parent 34362 917af128270b
child 34371 4a63526bead1
equal deleted inserted replaced
34363:0fec381fb51e 34364:8df6519599ef
    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)