src/Tools/jEdit/src/bibtex_jedit.scala
author wenzelm
Sun Oct 05 17:58:36 2014 +0200 (2014-10-05 ago)
changeset 58545 30b75b7958d6
child 58546 72e2b2a609c4
permissions -rw-r--r--
citation tooltip/hyperlink based on open buffers with .bib files;
     1 /*  Title:      Tools/jEdit/src/bibtex_jedit.scala
     2     Author:     Makarius
     3 
     4 BibTeX support in Isabelle/jEdit.
     5 */
     6 
     7 package isabelle.jedit
     8 
     9 
    10 import isabelle._
    11 
    12 
    13 import org.gjt.sp.jedit.Buffer
    14 
    15 
    16 object Bibtex_JEdit
    17 {
    18   /* buffer model entries */
    19 
    20   def entries_iterator(): Iterator[(String, Buffer, Text.Offset)] =
    21     for {
    22       buffer <- JEdit_Lib.jedit_buffers()
    23       model <- PIDE.document_model(buffer).iterator
    24       (name, offset) <- model.bibtex_entries.iterator
    25     } yield (name, buffer, offset)
    26 }
    27