diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index 64261e76c9b..899a2fd9191 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -99,7 +99,7 @@ import org.jabref.gui.search.GlobalSearchBar; import org.jabref.gui.shared.ConnectToSharedDatabaseCommand; import org.jabref.gui.specialfields.SpecialFieldMenuItemFactory; -import org.jabref.gui.texparser.ParseTexAction; +import org.jabref.gui.texparser.ParseLatexAction; import org.jabref.gui.undo.CountingUndoManager; import org.jabref.gui.util.BackgroundTask; import org.jabref.gui.util.DefaultTaskExecutor; @@ -770,7 +770,7 @@ private MenuBar createMenu() { pushToApplicationsManager.setMenuItem(pushToApplicationMenuItem); tools.getItems().addAll( - factory.createMenuItem(StandardActions.PARSE_TEX, new ParseTexAction(stateManager)), + factory.createMenuItem(StandardActions.PARSE_LATEX, new ParseLatexAction(stateManager)), factory.createMenuItem(StandardActions.NEW_SUB_LIBRARY_FROM_AUX, new NewSubLibraryAction(this, stateManager)), new SeparatorMenuItem(), diff --git a/src/main/java/org/jabref/gui/actions/StandardActions.java b/src/main/java/org/jabref/gui/actions/StandardActions.java index c1b7a2dfa7c..57399a14770 100644 --- a/src/main/java/org/jabref/gui/actions/StandardActions.java +++ b/src/main/java/org/jabref/gui/actions/StandardActions.java @@ -85,7 +85,7 @@ public enum StandardActions implements Action { TOOGLE_OO(Localization.lang("OpenOffice/LibreOffice"), IconTheme.JabRefIcons.FILE_OPENOFFICE, KeyBinding.OPEN_OPEN_OFFICE_LIBRE_OFFICE_CONNECTION), TOGGLE_WEB_SEARCH(Localization.lang("Web search"), Localization.lang("Toggle web search interface"), IconTheme.JabRefIcons.WWW, KeyBinding.WEB_SEARCH), - PARSE_TEX(Localization.lang("Search for citations in LaTeX files..."), IconTheme.JabRefIcons.LATEX_CITATIONS), + PARSE_LATEX(Localization.lang("Search for citations in LaTeX files..."), IconTheme.JabRefIcons.LATEX_CITATIONS), NEW_SUB_LIBRARY_FROM_AUX(Localization.lang("New sublibrary based on AUX file") + "...", Localization.lang("New BibTeX sublibrary") + Localization.lang("This feature generates a new library based on which entries are needed in an existing LaTeX document."), IconTheme.JabRefIcons.NEW), WRITE_XMP(Localization.lang("Write XMP metadata to PDFs"), Localization.lang("Will write XMP metadata to the PDFs linked from selected entries."), KeyBinding.WRITE_XMP), OPEN_FOLDER(Localization.lang("Open folder"), Localization.lang("Open folder"), KeyBinding.OPEN_FOLDER), diff --git a/src/main/java/org/jabref/gui/entryeditor/LatexCitationsTabViewModel.java b/src/main/java/org/jabref/gui/entryeditor/LatexCitationsTabViewModel.java index 13546cbc64e..5bda2a4c3c0 100644 --- a/src/main/java/org/jabref/gui/entryeditor/LatexCitationsTabViewModel.java +++ b/src/main/java/org/jabref/gui/entryeditor/LatexCitationsTabViewModel.java @@ -26,11 +26,11 @@ import org.jabref.gui.util.DirectoryDialogConfiguration; import org.jabref.gui.util.TaskExecutor; import org.jabref.logic.l10n.Localization; -import org.jabref.logic.texparser.DefaultTexParser; +import org.jabref.logic.texparser.DefaultLatexParser; import org.jabref.model.database.BibDatabaseContext; import org.jabref.model.entry.BibEntry; import org.jabref.model.texparser.Citation; -import org.jabref.model.texparser.TexParserResult; +import org.jabref.model.texparser.LatexParserResult; import org.jabref.preferences.PreferencesService; import org.slf4j.Logger; @@ -56,7 +56,7 @@ enum Status { private final ObjectProperty status; private final StringProperty searchError; private Future searchTask; - private TexParserResult texParserResult; + private LatexParserResult latexParserResult; private BibEntry currentEntry; public LatexCitationsTabViewModel(BibDatabaseContext databaseContext, PreferencesService preferencesService, @@ -129,7 +129,7 @@ private Collection searchAndParse(String citeKey) throws IOException { Path newDirectory = databaseContext.getMetaData().getLatexFileDirectory(preferencesService.getUser()) .orElseGet(preferencesService::getWorkingDir); - if (texParserResult == null || !newDirectory.equals(directory.get())) { + if (latexParserResult == null || !newDirectory.equals(directory.get())) { directory.set(newDirectory); if (!newDirectory.toFile().exists()) { @@ -137,10 +137,10 @@ private Collection searchAndParse(String citeKey) throws IOException { } List texFiles = searchDirectory(newDirectory, new ArrayList<>()); - texParserResult = new DefaultTexParser().parse(texFiles); + latexParserResult = new DefaultLatexParser().parse(texFiles); } - return texParserResult.getCitationsByKey(citeKey); + return latexParserResult.getCitationsByKey(citeKey); } private List searchDirectory(Path directory, List texFiles) { diff --git a/src/main/java/org/jabref/gui/texparser/ParseTexAction.java b/src/main/java/org/jabref/gui/texparser/ParseLatexAction.java similarity index 75% rename from src/main/java/org/jabref/gui/texparser/ParseTexAction.java rename to src/main/java/org/jabref/gui/texparser/ParseLatexAction.java index 215711e2f27..1c5a2bc8274 100644 --- a/src/main/java/org/jabref/gui/texparser/ParseTexAction.java +++ b/src/main/java/org/jabref/gui/texparser/ParseLatexAction.java @@ -5,11 +5,11 @@ import org.jabref.gui.actions.SimpleCommand; import org.jabref.model.database.BibDatabaseContext; -public class ParseTexAction extends SimpleCommand { +public class ParseLatexAction extends SimpleCommand { private final StateManager stateManager; - public ParseTexAction(StateManager stateManager) { + public ParseLatexAction(StateManager stateManager) { this.stateManager = stateManager; executable.bind(ActionHelper.needsDatabase(stateManager)); } @@ -17,7 +17,7 @@ public ParseTexAction(StateManager stateManager) { @Override public void execute() { BibDatabaseContext database = stateManager.getActiveDatabase().orElseThrow(NullPointerException::new); - ParseTexDialogView dialog = new ParseTexDialogView(database); + ParseLatexDialogView dialog = new ParseLatexDialogView(database); dialog.showAndWait(); } } diff --git a/src/main/java/org/jabref/gui/texparser/ParseTexDialog.fxml b/src/main/java/org/jabref/gui/texparser/ParseLatexDialog.fxml similarity index 92% rename from src/main/java/org/jabref/gui/texparser/ParseTexDialog.fxml rename to src/main/java/org/jabref/gui/texparser/ParseLatexDialog.fxml index 956d744f5ad..05f86c531ed 100644 --- a/src/main/java/org/jabref/gui/texparser/ParseTexDialog.fxml +++ b/src/main/java/org/jabref/gui/texparser/ParseLatexDialog.fxml @@ -10,14 +10,14 @@