Skip to content

Commit f1de7bd

Browse files
authored
Remove add/move/remove from group dialog (#4695)
* Remove add/move/remove from group dialog * Update CHANGELOG.md
1 parent 75b7517 commit f1de7bd

File tree

7 files changed

+1
-271
lines changed

7 files changed

+1
-271
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
111111
- Set/clear/append/rename fields: available through Edit menu
112112
- Manage keywords: available through Edit menu
113113
- Copy linked files to folder: available through File menu
114+
- Add/move/remove from group: removed completely (functionality still available through group interface)
114115
- We removed the option to change the column widths in the preferences dialog. [#4546](https://github.com/JabRef/jabref/issues/4546)
115116

116117

src/main/java/org/jabref/gui/BasePanel.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
import org.jabref.gui.externalfiletype.ExternalFileTypes;
5353
import org.jabref.gui.filelist.FileListEntry;
5454
import org.jabref.gui.filelist.FileListTableModel;
55-
import org.jabref.gui.groups.GroupAddRemoveDialog;
5655
import org.jabref.gui.icon.JabRefIcon;
5756
import org.jabref.gui.importer.actions.AppendDatabaseAction;
5857
import org.jabref.gui.journals.AbbreviateAction;
@@ -405,10 +404,6 @@ private void setupActions() {
405404
actions.put(Actions.ABBREVIATE_MEDLINE, new AbbreviateAction(this, false));
406405
actions.put(Actions.UNABBREVIATE, new UnabbreviateAction(this));
407406

408-
actions.put(Actions.ADD_TO_GROUP, new GroupAddRemoveDialog(this, true, false));
409-
actions.put(Actions.REMOVE_FROM_GROUP, new GroupAddRemoveDialog(this, false, false));
410-
actions.put(Actions.MOVE_TO_GROUP, new GroupAddRemoveDialog(this, true, true));
411-
412407
actions.put(Actions.DOWNLOAD_FULL_TEXT, new FindFullTextAction(this)::execute);
413408
}
414409

src/main/java/org/jabref/gui/actions/Actions.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ public enum Actions {
88
ABBREVIATE_ISO,
99
ABBREVIATE_MEDLINE,
1010
ADD_FILE_LINK,
11-
ADD_TO_GROUP,
1211
CLEANUP,
1312
COPY,
1413
COPY_CITATION_ASCII_DOC,
@@ -34,7 +33,6 @@ public enum Actions {
3433
MERGE_ENTRIES,
3534
MERGE_WITH_FETCHED_ENTRY,
3635
NEXT_PREVIEW_STYLE,
37-
MOVE_TO_GROUP,
3836
OPEN_CONSOLE,
3937
OPEN_EXTERNAL_FILE,
4038
OPEN_FOLDER,
@@ -43,7 +41,6 @@ public enum Actions {
4341
PREVIOUS_PREVIEW_STYLE,
4442
PULL_CHANGES_FROM_SHARED_DATABASE,
4543
REDO,
46-
REMOVE_FROM_GROUP,
4744
REPLACE_ALL,
4845
SAVE,
4946
SAVE_AS,

src/main/java/org/jabref/gui/actions/StandardActions.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ public enum StandardActions implements Action {
3535
OPEN_URL(Localization.lang("Open URL or DOI"), IconTheme.JabRefIcons.WWW, KeyBinding.OPEN_URL_OR_DOI),
3636
MERGE_WITH_FETCHED_ENTRY(Localization.lang("Get BibTeX data from %0", "DOI/ISBN/...")),
3737
ATTACH_FILE(Localization.lang("Attach file"), IconTheme.JabRefIcons.ATTACH_FILE),
38-
ADD_TO_GROUP(Localization.lang("Add to group")),
39-
REMOVE_FROM_GROUP(Localization.lang("Remove from group")),
40-
MOVE_TO_GROUP(Localization.lang("Move to group")),
4138
PRIORITY(Localization.lang("Priority"), IconTheme.JabRefIcons.PRIORITY),
4239
CLEAR_PRIORITY(Localization.lang("Clear priority")),
4340
PRIORITY_HIGH(Localization.lang("Set priority to high"), IconTheme.JabRefIcons.PRIORITY_HIGH),

src/main/java/org/jabref/gui/groups/GroupAddRemoveDialog.java

Lines changed: 0 additions & 227 deletions
This file was deleted.

src/main/java/org/jabref/gui/maintable/RightClickMenu.java

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import org.jabref.gui.mergeentries.FetchAndMergeEntry;
2222
import org.jabref.gui.specialfields.SpecialFieldMenuItemFactory;
2323
import org.jabref.logic.citationstyle.CitationStyle;
24-
import org.jabref.model.database.BibDatabaseContext;
2524
import org.jabref.model.entry.BibEntry;
2625
import org.jabref.model.entry.FieldName;
2726
import org.jabref.model.entry.specialfields.SpecialField;
@@ -85,33 +84,9 @@ public static ContextMenu create(BibEntryTableViewModel entry, KeyBindingReposit
8584
contextMenu.getItems().add(factory.createMenuItem(StandardActions.ATTACH_FILE, new AttachFileAction(panel, dialogService)));
8685
contextMenu.getItems().add(factory.createMenuItem(StandardActions.MERGE_ENTRIES, mergeEntries(panel)));
8786

88-
contextMenu.getItems().add(new SeparatorMenuItem());
89-
90-
contextMenu.getItems().add(factory.createMenuItem(StandardActions.ADD_TO_GROUP, addToGroup(panel)));
91-
contextMenu.getItems().add(factory.createMenuItem(StandardActions.REMOVE_FROM_GROUP, removeFromGroup(panel)));
92-
contextMenu.getItems().add(factory.createMenuItem(StandardActions.MOVE_TO_GROUP, moveToGroup(panel)));
93-
9487
return contextMenu;
9588
}
9689

97-
private static OldCommandWrapper moveToGroup(BasePanel panel) {
98-
OldCommandWrapper command = new OldCommandWrapper(Actions.MOVE_TO_GROUP, panel);
99-
command.setExecutable(areGroupsPresent(panel.getBibDatabaseContext()));
100-
return command;
101-
}
102-
103-
private static OldCommandWrapper removeFromGroup(BasePanel panel) {
104-
OldCommandWrapper command = new OldCommandWrapper(Actions.REMOVE_FROM_GROUP, panel);
105-
command.setExecutable(areGroupsPresent(panel.getBibDatabaseContext()));
106-
return command;
107-
}
108-
109-
private static OldCommandWrapper addToGroup(BasePanel panel) {
110-
OldCommandWrapper command = new OldCommandWrapper(Actions.ADD_TO_GROUP, panel);
111-
command.setExecutable(areGroupsPresent(panel.getBibDatabaseContext()));
112-
return command;
113-
}
114-
11590
private static OldCommandWrapper mergeEntries(BasePanel panel) {
11691
OldCommandWrapper command = new OldCommandWrapper(Actions.MERGE_ENTRIES, panel);
11792
command.setExecutable(panel.getMainTable().getSelectedEntries().size() == 2);
@@ -169,10 +144,6 @@ private static Menu createCopySubMenu(BasePanel panel, ActionFactory factory, Di
169144
return copySpecialMenu;
170145
}
171146

172-
private static boolean areGroupsPresent(BibDatabaseContext database) {
173-
return database.getMetaData().getGroups().isPresent();
174-
}
175-
176147
private static boolean isFieldSetForSelectedEntry(String field, BasePanel panel) {
177148
return isAnyFieldSetForSelectedEntry(Collections.singletonList(field), panel);
178149
}

src/main/resources/l10n/JabRef_en.properties

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -801,8 +801,6 @@ Remove\ selected\ entries\ from\ this\ group=Remove selected entries from this g
801801

802802
Remove\ entry\ type=Remove entry type
803803

804-
Remove\ from\ group=Remove from group
805-
806804
Remove\ group=Remove group
807805

808806
Remove\ group,\ keep\ subgroups=Remove group, keep subgroups
@@ -1439,8 +1437,6 @@ Show\ extra\ columns=Show extra columns
14391437
Parsing\ error=Parsing error
14401438
illegal\ backslash\ expression=illegal backslash expression
14411439

1442-
Move\ to\ group=Move to group
1443-
14441440
Clear\ read\ status=Clear read status
14451441
Convert\ to\ biblatex\ format\ (for\ example,\ move\ the\ value\ of\ the\ 'journal'\ field\ to\ 'journaltitle')=Convert to biblatex format (for example, move the value of the 'journal' field to 'journaltitle')
14461442
Deprecated\ fields=Deprecated fields

0 commit comments

Comments
 (0)