Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign "Manage field names & content" dialog #8892

Merged
merged 48 commits into from
Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
376760c
Update README.md
HoussemNasri Mar 24, 2022
d898da1
Merge branch 'JabRef:main' into main
HoussemNasri Mar 31, 2022
752954b
Merge branch 'JabRef:main' into main
HoussemNasri Apr 11, 2022
41b499f
Merge branch 'JabRef:main' into main
HoussemNasri Apr 26, 2022
a63045f
Merge branch 'JabRef:main' into main
HoussemNasri May 7, 2022
0901768
Merge branch 'JabRef:main' into main
HoussemNasri May 8, 2022
5874b4e
Merge remote-tracking branch 'origin/main' into main
HoussemNasri May 30, 2022
4e4372c
Design layout in FXML
HoussemNasri Jun 7, 2022
f077806
Fix Readme
HoussemNasri Jun 7, 2022
4157397
Create needed classes
HoussemNasri Jun 9, 2022
404247a
Fix typo
HoussemNasri Jun 9, 2022
cdc37da
Localize tab names
HoussemNasri Jun 9, 2022
fc222a0
Commit so I don't loose progress
HoussemNasri Jun 9, 2022
062ccd3
Show visible field names in edit field tab
HoussemNasri Jun 9, 2022
83dbc3d
Implement clear field
HoussemNasri Jun 9, 2022
774553c
Set the type of value for the combobox to Field
HoussemNasri Jun 10, 2022
909e5ce
Select the first item in the fields combobox
HoussemNasri Jun 10, 2022
9ca2cf1
Implement setting field value
HoussemNasri Jun 10, 2022
f624e72
Implement appending to field value
HoussemNasri Jun 10, 2022
793c461
Sort field names in combobox alphabetically
HoussemNasri Jun 10, 2022
5193892
Add the ability to save or cancel changes before closing the dialog
HoussemNasri Jun 10, 2022
18efff8
Remove debugging print statement
HoussemNasri Jun 10, 2022
fea30d9
Implement renaming field name
HoussemNasri Jun 10, 2022
77e48f4
Design UI and bind properties for the Two Fields automatic field editor
HoussemNasri Jun 10, 2022
60bc190
Fix language tests & Checkstyle
HoussemNasri Jun 10, 2022
e8dd342
Fix a bug in which setting a field value only affected the first sele…
HoussemNasri Jun 11, 2022
9c58ffe
Polish UI a little
HoussemNasri Jun 11, 2022
3ce1c6b
Add 'Automatic Field Editor' to the menu bar and disable it when no e…
HoussemNasri Jun 11, 2022
e0d9c92
Fix checkstyle
HoussemNasri Jun 11, 2022
da4dc59
Menu bar names should be formatted in camel case.
HoussemNasri Jun 11, 2022
512b3dd
DO NOT modify other language properties files other than English
HoussemNasri Jun 11, 2022
e42d65f
Remove call to System.out.println
HoussemNasri Jun 11, 2022
c821afd
Implement moving field value from one field to another
HoussemNasri Jun 11, 2022
83e2c4a
Change action buttons names to 'Keep Modifications' and 'Revert'
HoussemNasri Jun 11, 2022
a223f94
Implement copying field value from one field to another
HoussemNasri Jun 11, 2022
0c7a5a2
Implement swapping field values between two fields
HoussemNasri Jun 11, 2022
774a266
Create a new list to prevent ConcurrentModificationException in forEa…
HoussemNasri Jun 11, 2022
6c86e75
Add an icon to 'Clear field' button
HoussemNasri Jun 11, 2022
81153b7
Delete MassSetFieldsAction.java and MassSetFieldsAction.java
HoussemNasri Jun 11, 2022
33c83be
Update CHANGELOG.md
HoussemNasri Jun 11, 2022
d89f710
Merge branch 'main' into automatic-field-editor
HoussemNasri Jun 11, 2022
b710294
Remove obsolete keys found in language properties file
HoussemNasri Jun 11, 2022
f77d197
Merge remote-tracking branch 'origin/automatic-field-editor' into aut…
HoussemNasri Jun 11, 2022
d0b1b83
Merge branch 'main' into automatic-field-editor
HoussemNasri Jun 12, 2022
673e9c6
Inject DialogService dependency into AutomaticFieldEditorAction in Ja…
HoussemNasri Jun 20, 2022
7d28f8d
Cleanup
HoussemNasri Jun 20, 2022
d04e6db
Merge remote-tracking branch 'origin/automatic-field-editor' into aut…
HoussemNasri Jun 20, 2022
5544248
Checkstyle
HoussemNasri Jun 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- The Medline/Pubmed search now also supports the [default fields and operators for searching](https://docs.jabref.org/collect/import-using-online-bibliographic-database#search-syntax). [forum#3554](https://discourse.jabref.org/t/native-pubmed-search/3354)
- We improved group expansion arrow that prevent it from activating group when expanding or collapsing. [#7982](https://github.com/JabRef/jabref/issues/7982), [#3176](https://github.com/JabRef/jabref/issues/3176)
- When configured SSL certificates changed, JabRef warns the user to restart to apply the configuration.
- We improved the appearances and logic of the "Manage field names & content" dialog, and renamed it to "Automatic field editor". [#6536](https://github.com/JabRef/jabref/issues/6536)
- We fixed an issue that caused JabRef to sometimes open multiple instances when "Remote Operation" is enabled. [#8653](https://github.com/JabRef/jabref/issues/8653)

### Fixed
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/org/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@
import org.jabref.gui.edit.CopyMoreAction;
import org.jabref.gui.edit.EditAction;
import org.jabref.gui.edit.ManageKeywordsAction;
import org.jabref.gui.edit.MassSetFieldsAction;
import org.jabref.gui.edit.OpenBrowserAction;
import org.jabref.gui.edit.ReplaceStringAction;
import org.jabref.gui.edit.automaticfiededitor.AutomaticFieldEditorAction;
import org.jabref.gui.entryeditor.OpenEntryEditorAction;
import org.jabref.gui.entryeditor.PreviewSwitchAction;
import org.jabref.gui.exporter.ExportCommand;
Expand Down Expand Up @@ -750,8 +750,7 @@ private MenuBar createMenu() {
new SeparatorMenuItem(),

factory.createMenuItem(StandardActions.MANAGE_KEYWORDS, new ManageKeywordsAction(stateManager)),
factory.createMenuItem(StandardActions.MASS_SET_FIELDS, new MassSetFieldsAction(stateManager, dialogService, undoManager)));

factory.createMenuItem(StandardActions.AUTOMATIC_FIELD_EDITOR, new AutomaticFieldEditorAction(stateManager, dialogService)));
SeparatorMenuItem specialFieldsSeparator = new SeparatorMenuItem();
specialFieldsSeparator.visibleProperty().bind(prefs.getSpecialFieldsPreferences().specialFieldsEnabledProperty());

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/jabref/gui/actions/StandardActions.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public enum StandardActions implements Action {
REPLACE_ALL(Localization.lang("Find and replace"), KeyBinding.REPLACE_STRING),
MANAGE_KEYWORDS(Localization.lang("Manage keywords")),
MASS_SET_FIELDS(Localization.lang("Manage field names & content")),

AUTOMATIC_FIELD_EDITOR(Localization.lang("Automatic field editor")),
TOGGLE_GROUPS(Localization.lang("Groups"), IconTheme.JabRefIcons.TOGGLE_GROUPS, KeyBinding.TOGGLE_GROUPS_INTERFACE),
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),
Expand Down
42 changes: 0 additions & 42 deletions src/main/java/org/jabref/gui/edit/MassSetFieldsAction.java

This file was deleted.

245 changes: 0 additions & 245 deletions src/main/java/org/jabref/gui/edit/MassSetFieldsDialog.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.jabref.gui.edit.automaticfiededitor;

import javafx.scene.layout.AnchorPane;

public abstract class AbstractAutomaticFieldEditorTabView extends AnchorPane implements AutomaticFieldEditorTab {

@Override
public AnchorPane getContent() {
return this;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package org.jabref.gui.edit.automaticfiededitor;

import org.jabref.gui.DialogService;
import org.jabref.gui.StateManager;
import org.jabref.gui.actions.SimpleCommand;

import static org.jabref.gui.actions.ActionHelper.needsDatabase;
import static org.jabref.gui.actions.ActionHelper.needsEntriesSelected;

public class AutomaticFieldEditorAction extends SimpleCommand {
private final StateManager stateManager;
private final DialogService dialogService;

public AutomaticFieldEditorAction(StateManager stateManager, DialogService dialogService) {
this.stateManager = stateManager;
this.dialogService = dialogService;

this.executable.bind(needsDatabase(stateManager).and(needsEntriesSelected(stateManager)));
}

@Override
public void execute() {
dialogService.showCustomDialogAndWait(new AutomaticFieldEditorDialog(stateManager.getSelectedEntries(),
stateManager.getActiveDatabase().orElseThrow()));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.control.ButtonType?>
<?import javafx.scene.control.DialogPane?>
<?import javafx.scene.control.TabPane?>
<DialogPane xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml"
fx:controller="org.jabref.gui.edit.automaticfiededitor.AutomaticFieldEditorDialog"
prefHeight="400.0" prefWidth="600.0">
<content>
<TabPane fx:id="tabPane" tabClosingPolicy="UNAVAILABLE"/>
</content>
<ButtonType fx:id="saveButton" text="Keep Modifications" buttonData="OK_DONE"/>
<ButtonType fx:id="cancelButton"
text="Revert" buttonData="CANCEL_CLOSE"/>
</DialogPane>
Loading