Skip to content

Commit

Permalink
Refactoring for PR #2051 (#2202)
Browse files Browse the repository at this point in the history
* Fixing: Sensible default settings for "Enable save actions" and "Cleanup"

* Sensible default settings for "Enable save actions" in database properties and "Cleanup entries" in menu are now identical

* Insert allTextField fieldName and refactoring the reset entries of database properties

* CHANGELOG Fixing

* Feedback
* rename all_text_fields to all-text-fields
* remove ISBN and ISSN, MONTH, DATE, YEAR form all-text-fields

* Create Recommend Button for BibTex and BibLatex and refactor reset button incl. defaut setting

* Refactoring:
* Rename BibTex and BibLaTex to BibTeX and BibLaTeX
* Rename Formatter list of BibTeX and BibLaTeX

* Refactoring_15102016_2343:
"Recommended for %0" button is now disabled, if save actions are not enabled

* Fix LocalizationConsistencyTest FAIL:
* Testcase ensureNoDuplicates in JabRef_vi.properties

* Refactoring:
* create test for fieldformattercleanup
* refactoring for default

* add OrdinalsToSuperscriptFormatter to recommand button

* REFACTORING_27102016_0744:
* rename the recommended list
* change "isBibTex" to "isBibLatex"

* Follow to refactor_27102016_1340
  • Loading branch information
motokito authored and tobiasdiez committed Oct 27, 2016
1 parent 5ea3a7d commit 58997cb
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import net.sf.jabref.model.cleanup.FieldFormatterCleanup;
import net.sf.jabref.model.cleanup.FieldFormatterCleanups;
import net.sf.jabref.model.cleanup.Formatter;
import net.sf.jabref.model.database.BibDatabaseContext;
import net.sf.jabref.model.entry.BibEntry;
import net.sf.jabref.model.entry.InternalBibtexFields;
import net.sf.jabref.model.metadata.MetaData;
Expand Down Expand Up @@ -133,18 +134,12 @@ public void contentsChanged(ListDataEvent e) {
resetButton = new JButton(Localization.lang("Reset"));
resetButton.addActionListener(e -> ((CleanupActionsListModel) actionsList.getModel()).reset(defaultFormatters));

boolean isBibLaTeX = JabRefGUI.getMainFrame().getCurrentBasePanel().getDatabaseContext().isBiblatexMode();
String mode;
BibDatabaseContext databaseContext = JabRefGUI.getMainFrame().getCurrentBasePanel().getDatabaseContext();

if (isBibLaTeX) {
mode = "BibLaTeX";
} else {
mode = "BibTeX";
}
recommendButton = new JButton(Localization.lang("Recommended for %0", databaseContext.getMode().getFormattedName()));
boolean isBibLaTeX = databaseContext.isBiblatexMode();

recommendButton = new JButton(Localization.lang("Recommended for %0", mode));
recommendButton.addActionListener(e -> {

if (isBibLaTeX) {
((CleanupActionsListModel) actionsList.getModel()).reset(Cleanups.RECOMMEND_BIBLATEX_ACTIONS);
} else {
Expand Down

0 comments on commit 58997cb

Please sign in to comment.