Search in sources :

Example 1 with LatexFieldFormatterPreferences

use of org.jabref.logic.bibtex.LatexFieldFormatterPreferences in project jabref by JabRef.

the class SavePreferences method loadForExportFromPreferences.

public static SavePreferences loadForExportFromPreferences(JabRefPreferences preferences) {
    Boolean saveInOriginalOrder = preferences.getBoolean(JabRefPreferences.EXPORT_IN_ORIGINAL_ORDER);
    SaveOrderConfig saveOrder = null;
    if (!saveInOriginalOrder) {
        if (preferences.getBoolean(JabRefPreferences.EXPORT_IN_SPECIFIED_ORDER)) {
            saveOrder = preferences.loadExportSaveOrder();
        } else {
            saveOrder = preferences.loadTableSaveOrder();
        }
    }
    Charset encoding = preferences.getDefaultEncoding();
    Boolean makeBackup = preferences.getBoolean(JabRefPreferences.BACKUP);
    DatabaseSaveType saveType = DatabaseSaveType.ALL;
    Boolean takeMetadataSaveOrderInAccount = false;
    Boolean reformatFile = preferences.getBoolean(JabRefPreferences.REFORMAT_FILE_ON_SAVE_AND_EXPORT);
    LatexFieldFormatterPreferences latexFieldFormatterPreferences = preferences.getLatexFieldFormatterPreferences();
    GlobalBibtexKeyPattern globalCiteKeyPattern = preferences.getKeyPattern();
    return new SavePreferences(saveInOriginalOrder, saveOrder, encoding, makeBackup, saveType, takeMetadataSaveOrderInAccount, reformatFile, latexFieldFormatterPreferences, globalCiteKeyPattern);
}
Also used : GlobalBibtexKeyPattern(org.jabref.model.bibtexkeypattern.GlobalBibtexKeyPattern) Charset(java.nio.charset.Charset) LatexFieldFormatterPreferences(org.jabref.logic.bibtex.LatexFieldFormatterPreferences) SaveOrderConfig(org.jabref.model.metadata.SaveOrderConfig)

Example 2 with LatexFieldFormatterPreferences

use of org.jabref.logic.bibtex.LatexFieldFormatterPreferences in project jabref by JabRef.

the class SavePreferences method loadForSaveFromPreferences.

public static SavePreferences loadForSaveFromPreferences(JabRefPreferences preferences) {
    Boolean saveInOriginalOrder = false;
    SaveOrderConfig saveOrder = null;
    Charset encoding = preferences.getDefaultEncoding();
    Boolean makeBackup = preferences.getBoolean(JabRefPreferences.BACKUP);
    DatabaseSaveType saveType = DatabaseSaveType.ALL;
    Boolean takeMetadataSaveOrderInAccount = true;
    Boolean reformatFile = preferences.getBoolean(JabRefPreferences.REFORMAT_FILE_ON_SAVE_AND_EXPORT);
    LatexFieldFormatterPreferences latexFieldFormatterPreferences = preferences.getLatexFieldFormatterPreferences();
    GlobalBibtexKeyPattern globalCiteKeyPattern = preferences.getKeyPattern();
    return new SavePreferences(saveInOriginalOrder, saveOrder, encoding, makeBackup, saveType, takeMetadataSaveOrderInAccount, reformatFile, latexFieldFormatterPreferences, globalCiteKeyPattern);
}
Also used : GlobalBibtexKeyPattern(org.jabref.model.bibtexkeypattern.GlobalBibtexKeyPattern) Charset(java.nio.charset.Charset) LatexFieldFormatterPreferences(org.jabref.logic.bibtex.LatexFieldFormatterPreferences) SaveOrderConfig(org.jabref.model.metadata.SaveOrderConfig)

Aggregations

Charset (java.nio.charset.Charset)2 LatexFieldFormatterPreferences (org.jabref.logic.bibtex.LatexFieldFormatterPreferences)2 GlobalBibtexKeyPattern (org.jabref.model.bibtexkeypattern.GlobalBibtexKeyPattern)2 SaveOrderConfig (org.jabref.model.metadata.SaveOrderConfig)2