Logo Search packages:      
Sourcecode: jabref-plugin-oo version File versions  Download package

static void net::sf::jabref::oo::OOUtil::insertFullReferenceAtCurrentLocation ( XText  text,
XTextCursor  cursor,
Layout  layout,
String  parStyle,
BibtexEntry  entry,
BibtexDatabase  database,
String  uniquefier 
) throws UndefinedParagraphFormatException, Exception [inline, static]

Insert a reference, formatted using a Layout, at the position of a given cursor.

text The text to insert in.
cursor The cursor giving the insert location.
layout The Layout to format the reference with.
parStyle The name of the paragraph style to use.
entry The entry to insert.
database The database the entry belongs to.
uniquefier Uniqiefier letter, if any, to append to the entry's year.

Definition at line 41 of file OOUtil.java.

References insertOOFormattedTextAtCurrentLocation().


        final String UNIQUEFIER_FIELD = "uniq";

        // Backup the value of the uniq field, just in case the entry already has it:
        String oldUniqVal = (String)entry.getField(UNIQUEFIER_FIELD);

        // Set the uniq field with the supplied uniquefier:
        entry.setField(UNIQUEFIER_FIELD, uniquefier);

        // Do the layout for this entry:
        String lText = layout.doLayout(entry, database);

        // Afterwards, reset the old value:
        entry.setField(UNIQUEFIER_FIELD, oldUniqVal);

        // Insert the formatted text:
        insertOOFormattedTextAtCurrentLocation(text, cursor, lText, parStyle);

Generated by  Doxygen 1.6.0   Back to index