diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index 8346fe58e7f..f89fa8fc21d 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -58,7 +58,6 @@ import org.jabref.gui.actions.BibtexKeyPatternAction; import org.jabref.gui.actions.ConnectToSharedDatabaseCommand; import org.jabref.gui.actions.CopyFilesAction; -import org.jabref.gui.actions.CustomizeEntryAction; import org.jabref.gui.actions.CustomizeKeyBindingAction; import org.jabref.gui.actions.DatabasePropertiesAction; import org.jabref.gui.actions.EditExternalFileTypesAction; @@ -942,7 +941,8 @@ private MenuBar createMenu() { new SeparatorMenuItem(), factory.createMenuItem(StandardActions.MANAGE_CONTENT_SELECTORS, new ManageContentSelectorAction(this)), - factory.createMenuItem(StandardActions.CUSTOMIZE_ENTRY_TYPES, new CustomizeEntryAction(this)), + // TODO: Reenable customize entry types feature (https://github.com/JabRef/jabref/issues/4719) + //factory.createMenuItem(StandardActions.CUSTOMIZE_ENTRY_TYPES, new CustomizeEntryAction(this)), factory.createMenuItem(StandardActions.MANAGE_CITE_KEY_PATTERNS, new BibtexKeyPatternAction(this))); help.getItems().addAll( diff --git a/src/main/java/org/jabref/gui/actions/CustomizeEntryAction.java b/src/main/java/org/jabref/gui/customentrytypes/CustomizeEntryAction.java similarity index 54% rename from src/main/java/org/jabref/gui/actions/CustomizeEntryAction.java rename to src/main/java/org/jabref/gui/customentrytypes/CustomizeEntryAction.java index b8ea7ee567b..3fb6a635a53 100644 --- a/src/main/java/org/jabref/gui/actions/CustomizeEntryAction.java +++ b/src/main/java/org/jabref/gui/customentrytypes/CustomizeEntryAction.java @@ -1,9 +1,7 @@ -package org.jabref.gui.actions; - -import javax.swing.JDialog; +package org.jabref.gui.customentrytypes; import org.jabref.gui.JabRefFrame; -import org.jabref.gui.customentrytypes.EntryTypeCustomizationDialog; +import org.jabref.gui.actions.SimpleCommand; public class CustomizeEntryAction extends SimpleCommand { @@ -15,7 +13,7 @@ public CustomizeEntryAction(JabRefFrame frame) { @Override public void execute() { - JDialog dialog = new EntryTypeCustomizationDialog(frame); - dialog.setVisible(true); + EntryTypeCustomizationDialog dialog = new EntryTypeCustomizationDialog(); + dialog.showAndWait(); } } diff --git a/src/main/java/org/jabref/gui/customentrytypes/EntryTypeCustomizationDialog.java b/src/main/java/org/jabref/gui/customentrytypes/EntryTypeCustomizationDialog.java index 0361f3013a1..cf0439125d1 100644 --- a/src/main/java/org/jabref/gui/customentrytypes/EntryTypeCustomizationDialog.java +++ b/src/main/java/org/jabref/gui/customentrytypes/EntryTypeCustomizationDialog.java @@ -1,56 +1,11 @@ package org.jabref.gui.customentrytypes; -import java.awt.BorderLayout; -import java.awt.Container; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.GridLayout; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; - -import javax.swing.AbstractAction; -import javax.swing.ActionMap; -import javax.swing.BorderFactory; -import javax.swing.InputMap; -import javax.swing.JButton; -import javax.swing.JComponent; -import javax.swing.JList; -import javax.swing.JPanel; -import javax.swing.ListSelectionModel; -import javax.swing.event.ListDataEvent; -import javax.swing.event.ListDataListener; -import javax.swing.event.ListSelectionEvent; -import javax.swing.event.ListSelectionListener; - -import org.jabref.Globals; -import org.jabref.gui.BasePanel; -import org.jabref.gui.JabRefDialog; -import org.jabref.gui.JabRefFrame; -import org.jabref.gui.keyboard.KeyBinding; -import org.jabref.logic.l10n.Localization; -import org.jabref.model.EntryTypes; -import org.jabref.model.database.BibDatabaseMode; -import org.jabref.model.entry.BibEntry; -import org.jabref.model.entry.CustomEntryType; -import org.jabref.model.entry.EntryType; -import org.jabref.model.entry.InternalBibtexFields; -import org.jabref.model.strings.StringUtil; - -import com.jgoodies.forms.builder.ButtonBarBuilder; - -public class EntryTypeCustomizationDialog extends JabRefDialog implements ListSelectionListener { +import org.jabref.gui.util.BaseDialog; +public class EntryTypeCustomizationDialog extends BaseDialog { + + // TODO: Re-implement customize entry types feature (https://github.com/JabRef/jabref/issues/4719) + /* protected GridBagLayout gbl = new GridBagLayout(); protected GridBagConstraints con = new GridBagConstraints(); protected JButton delete; @@ -70,9 +25,6 @@ public class EntryTypeCustomizationDialog extends JabRefDialog implements ListSe private boolean biblatexMode; private BibDatabaseMode bibDatabaseMode; - /** - * Creates a new instance of EntryTypeCustomizationDialog - */ public EntryTypeCustomizationDialog(JabRefFrame frame) { super(Localization.lang("Customize entry types"), false, EntryTypeCustomizationDialog.class); @@ -419,6 +371,7 @@ private void record() { changed.add(lastSelected); typeComp.enable(lastSelected, true); } - } + + */ }