From 58648bafe0a807a94f4acccabfe3a9c0902f71cb Mon Sep 17 00:00:00 2001 From: dimitrisdimos00 <56233132+dimitrisdimos00@users.noreply.github.com> Date: Wed, 5 Jan 2022 22:23:30 +0200 Subject: [PATCH] Reset the original import style in CustomEntryTypeDialogViewModel and CustomizeEntryTypeDialogView classes fixes #8194 --- .../CustomEntryTypeDialogViewModel.java | 26 +++++++++---- .../CustomizeEntryTypeDialogView.java | 37 ++++++++++++++----- 2 files changed, 46 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/jabref/gui/customentrytypes/CustomEntryTypeDialogViewModel.java b/src/main/java/org/jabref/gui/customentrytypes/CustomEntryTypeDialogViewModel.java index 80f48372473..bc9263abbfd 100644 --- a/src/main/java/org/jabref/gui/customentrytypes/CustomEntryTypeDialogViewModel.java +++ b/src/main/java/org/jabref/gui/customentrytypes/CustomEntryTypeDialogViewModel.java @@ -1,9 +1,13 @@ package org.jabref.gui.customentrytypes; -import de.saxsys.mvvmfx.utils.validation.FunctionBasedValidator; -import de.saxsys.mvvmfx.utils.validation.ValidationMessage; -import de.saxsys.mvvmfx.utils.validation.ValidationStatus; -import de.saxsys.mvvmfx.utils.validation.Validator; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import java.util.function.Predicate; +import java.util.stream.Collectors; + import javafx.beans.Observable; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleObjectProperty; @@ -12,19 +16,25 @@ import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.util.StringConverter; + import org.jabref.gui.DialogService; import org.jabref.logic.l10n.Localization; import org.jabref.model.database.BibDatabaseMode; import org.jabref.model.entry.BibEntryType; import org.jabref.model.entry.BibEntryTypesManager; -import org.jabref.model.entry.field.*; +import org.jabref.model.entry.field.BibField; +import org.jabref.model.entry.field.Field; +import org.jabref.model.entry.field.FieldFactory; +import org.jabref.model.entry.field.FieldPriority; +import org.jabref.model.entry.field.OrFields; import org.jabref.model.entry.types.EntryType; import org.jabref.model.entry.types.UnknownEntryType; import org.jabref.preferences.PreferencesService; -import java.util.*; -import java.util.function.Predicate; -import java.util.stream.Collectors; +import de.saxsys.mvvmfx.utils.validation.FunctionBasedValidator; +import de.saxsys.mvvmfx.utils.validation.ValidationMessage; +import de.saxsys.mvvmfx.utils.validation.ValidationStatus; +import de.saxsys.mvvmfx.utils.validation.Validator; public class CustomEntryTypeDialogViewModel { diff --git a/src/main/java/org/jabref/gui/customentrytypes/CustomizeEntryTypeDialogView.java b/src/main/java/org/jabref/gui/customentrytypes/CustomizeEntryTypeDialogView.java index 85c14cbbb8d..dcc28253abf 100644 --- a/src/main/java/org/jabref/gui/customentrytypes/CustomizeEntryTypeDialogView.java +++ b/src/main/java/org/jabref/gui/customentrytypes/CustomizeEntryTypeDialogView.java @@ -1,20 +1,37 @@ package org.jabref.gui.customentrytypes; -import com.airhacks.afterburner.views.ViewLoader; -import com.tobiasdiez.easybind.EasyBind; -import de.saxsys.mvvmfx.utils.validation.visualization.ControlsFxVisualizer; +import java.util.EnumSet; + +import javax.inject.Inject; + import javafx.application.Platform; import javafx.beans.property.ReadOnlyStringWrapper; import javafx.fxml.FXML; -import javafx.scene.control.*; +import javafx.scene.control.Button; import javafx.scene.control.ButtonBar.ButtonData; -import javafx.scene.input.*; +import javafx.scene.control.ButtonType; +import javafx.scene.control.ComboBox; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableRow; +import javafx.scene.control.TableView; +import javafx.scene.control.TextField; +import javafx.scene.input.ClipboardContent; +import javafx.scene.input.DragEvent; +import javafx.scene.input.Dragboard; +import javafx.scene.input.MouseEvent; +import javafx.scene.input.TransferMode; + import org.jabref.gui.DialogService; import org.jabref.gui.DragAndDropDataFormats; import org.jabref.gui.StateManager; import org.jabref.gui.customentrytypes.CustomEntryTypeDialogViewModel.FieldType; import org.jabref.gui.icon.IconTheme; -import org.jabref.gui.util.*; +import org.jabref.gui.util.BaseDialog; +import org.jabref.gui.util.ControlHelper; +import org.jabref.gui.util.CustomLocalDragboard; +import org.jabref.gui.util.RadioButtonCell; +import org.jabref.gui.util.ValueTableCellFactory; +import org.jabref.gui.util.ViewModelTableRowFactory; import org.jabref.logic.l10n.Localization; import org.jabref.model.database.BibDatabaseContext; import org.jabref.model.database.BibDatabaseMode; @@ -22,15 +39,17 @@ import org.jabref.model.entry.field.Field; import org.jabref.preferences.PreferencesService; -import javax.inject.Inject; -import java.util.EnumSet; +import com.airhacks.afterburner.views.ViewLoader; +import com.tobiasdiez.easybind.EasyBind; +import de.saxsys.mvvmfx.utils.validation.visualization.ControlsFxVisualizer; public class CustomizeEntryTypeDialogView extends BaseDialog { private final BibDatabaseMode mode; private final BibEntryTypesManager entryTypesManager; - @FXML private TableView entryTypes; + @FXML + private TableView entryTypes; @FXML private TableColumn entryTypColumn; @FXML private TableColumn entryTypeActionsColumn; @FXML private TextField addNewEntryType;