-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'customizeEntrydlg' of github.com:JabRef/jabref into cus…
…tomizeEntrydlg * 'customizeEntrydlg' of github.com:JabRef/jabref: increase width move reloading custom entry types from pref to apply add missing l10n fix l10n add changelog fix typo refactor and pass entrytypes manager as ctor param move RadioButtonCell to util use common fields instead of all TableView is now properly updated when radio button is toggled Add commit handler TODO: commit event is not propagated somehow
- Loading branch information
Showing
15 changed files
with
126 additions
and
474 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,4 +75,5 @@ | |
requires org.antlr.antlr4.runtime; | ||
requires flowless; | ||
requires org.apache.tika.core; | ||
requires javafx.base; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 13 additions & 5 deletions
18
src/main/java/org/jabref/gui/customentrytypes/CustomizeEntryAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
package org.jabref.gui.customentrytypes; | ||
|
||
import org.jabref.gui.JabRefFrame; | ||
import org.jabref.gui.StateManager; | ||
import org.jabref.gui.actions.SimpleCommand; | ||
import org.jabref.model.database.BibDatabaseContext; | ||
import org.jabref.model.entry.BibEntryTypesManager; | ||
|
||
import static org.jabref.gui.actions.ActionHelper.needsDatabase; | ||
|
||
public class CustomizeEntryAction extends SimpleCommand { | ||
|
||
private final JabRefFrame frame; | ||
private final StateManager stateManager; | ||
private final BibEntryTypesManager entryTypesManager; | ||
|
||
public CustomizeEntryAction(JabRefFrame frame) { | ||
this.frame = frame; | ||
public CustomizeEntryAction(StateManager stateManager, BibEntryTypesManager entryTypesManager) { | ||
this.stateManager = stateManager; | ||
this.executable.bind(needsDatabase(this.stateManager)); | ||
this.entryTypesManager = entryTypesManager; | ||
} | ||
|
||
@Override | ||
public void execute() { | ||
CustomizeEntryTypeDialogView dialog = new CustomizeEntryTypeDialogView(this.frame.getCurrentBasePanel().getBibDatabaseContext()); | ||
BibDatabaseContext database = stateManager.getActiveDatabase().orElseThrow(() -> new NullPointerException("Database null")); | ||
CustomizeEntryTypeDialogView dialog = new CustomizeEntryTypeDialogView(database, entryTypesManager); | ||
dialog.showAndWait(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.