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

Remove add/move/remove from group dialog #4695

Merged
merged 3 commits into from
Mar 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -111,6 +111,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- Set/clear/append/rename fields: available through Edit menu
- Manage keywords: available through Edit menu
- Copy linked files to folder: available through File menu
- Add/move/remove from group: removed completely (functionality still available through group interface)
- We removed the option to change the column widths in the preferences dialog. [#4546](https://github.com/JabRef/jabref/issues/4546)


Expand Down
5 changes: 0 additions & 5 deletions src/main/java/org/jabref/gui/BasePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
import org.jabref.gui.externalfiletype.ExternalFileTypes;
import org.jabref.gui.filelist.FileListEntry;
import org.jabref.gui.filelist.FileListTableModel;
import org.jabref.gui.groups.GroupAddRemoveDialog;
import org.jabref.gui.icon.JabRefIcon;
import org.jabref.gui.importer.actions.AppendDatabaseAction;
import org.jabref.gui.journals.AbbreviateAction;
Expand Down Expand Up @@ -405,10 +404,6 @@ private void setupActions() {
actions.put(Actions.ABBREVIATE_MEDLINE, new AbbreviateAction(this, false));
actions.put(Actions.UNABBREVIATE, new UnabbreviateAction(this));

actions.put(Actions.ADD_TO_GROUP, new GroupAddRemoveDialog(this, true, false));
actions.put(Actions.REMOVE_FROM_GROUP, new GroupAddRemoveDialog(this, false, false));
actions.put(Actions.MOVE_TO_GROUP, new GroupAddRemoveDialog(this, true, true));

actions.put(Actions.DOWNLOAD_FULL_TEXT, new FindFullTextAction(this)::execute);
}

Expand Down
3 changes: 0 additions & 3 deletions src/main/java/org/jabref/gui/actions/Actions.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ public enum Actions {
ABBREVIATE_ISO,
ABBREVIATE_MEDLINE,
ADD_FILE_LINK,
ADD_TO_GROUP,
CLEANUP,
COPY,
COPY_CITATION_ASCII_DOC,
Expand All @@ -34,7 +33,6 @@ public enum Actions {
MERGE_ENTRIES,
MERGE_WITH_FETCHED_ENTRY,
NEXT_PREVIEW_STYLE,
MOVE_TO_GROUP,
OPEN_CONSOLE,
OPEN_EXTERNAL_FILE,
OPEN_FOLDER,
Expand All @@ -43,7 +41,6 @@ public enum Actions {
PREVIOUS_PREVIEW_STYLE,
PULL_CHANGES_FROM_SHARED_DATABASE,
REDO,
REMOVE_FROM_GROUP,
REPLACE_ALL,
SAVE,
SAVE_AS,
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/org/jabref/gui/actions/StandardActions.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ public enum StandardActions implements Action {
OPEN_URL(Localization.lang("Open URL or DOI"), IconTheme.JabRefIcons.WWW, KeyBinding.OPEN_URL_OR_DOI),
MERGE_WITH_FETCHED_ENTRY(Localization.lang("Get BibTeX data from %0", "DOI/ISBN/...")),
ATTACH_FILE(Localization.lang("Attach file"), IconTheme.JabRefIcons.ATTACH_FILE),
ADD_TO_GROUP(Localization.lang("Add to group")),
REMOVE_FROM_GROUP(Localization.lang("Remove from group")),
MOVE_TO_GROUP(Localization.lang("Move to group")),
PRIORITY(Localization.lang("Priority"), IconTheme.JabRefIcons.PRIORITY),
CLEAR_PRIORITY(Localization.lang("Clear priority")),
PRIORITY_HIGH(Localization.lang("Set priority to high"), IconTheme.JabRefIcons.PRIORITY_HIGH),
Expand Down
227 changes: 0 additions & 227 deletions src/main/java/org/jabref/gui/groups/GroupAddRemoveDialog.java

This file was deleted.

29 changes: 0 additions & 29 deletions src/main/java/org/jabref/gui/maintable/RightClickMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.jabref.gui.mergeentries.FetchAndMergeEntry;
import org.jabref.gui.specialfields.SpecialFieldMenuItemFactory;
import org.jabref.logic.citationstyle.CitationStyle;
import org.jabref.model.database.BibDatabaseContext;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.FieldName;
import org.jabref.model.entry.specialfields.SpecialField;
Expand Down Expand Up @@ -85,33 +84,9 @@ public static ContextMenu create(BibEntryTableViewModel entry, KeyBindingReposit
contextMenu.getItems().add(factory.createMenuItem(StandardActions.ATTACH_FILE, new AttachFileAction(panel, dialogService)));
contextMenu.getItems().add(factory.createMenuItem(StandardActions.MERGE_ENTRIES, mergeEntries(panel)));

contextMenu.getItems().add(new SeparatorMenuItem());

contextMenu.getItems().add(factory.createMenuItem(StandardActions.ADD_TO_GROUP, addToGroup(panel)));
contextMenu.getItems().add(factory.createMenuItem(StandardActions.REMOVE_FROM_GROUP, removeFromGroup(panel)));
contextMenu.getItems().add(factory.createMenuItem(StandardActions.MOVE_TO_GROUP, moveToGroup(panel)));

return contextMenu;
}

private static OldCommandWrapper moveToGroup(BasePanel panel) {
OldCommandWrapper command = new OldCommandWrapper(Actions.MOVE_TO_GROUP, panel);
command.setExecutable(areGroupsPresent(panel.getBibDatabaseContext()));
return command;
}

private static OldCommandWrapper removeFromGroup(BasePanel panel) {
OldCommandWrapper command = new OldCommandWrapper(Actions.REMOVE_FROM_GROUP, panel);
command.setExecutable(areGroupsPresent(panel.getBibDatabaseContext()));
return command;
}

private static OldCommandWrapper addToGroup(BasePanel panel) {
OldCommandWrapper command = new OldCommandWrapper(Actions.ADD_TO_GROUP, panel);
command.setExecutable(areGroupsPresent(panel.getBibDatabaseContext()));
return command;
}

private static OldCommandWrapper mergeEntries(BasePanel panel) {
OldCommandWrapper command = new OldCommandWrapper(Actions.MERGE_ENTRIES, panel);
command.setExecutable(panel.getMainTable().getSelectedEntries().size() == 2);
Expand Down Expand Up @@ -169,10 +144,6 @@ private static Menu createCopySubMenu(BasePanel panel, ActionFactory factory, Di
return copySpecialMenu;
}

private static boolean areGroupsPresent(BibDatabaseContext database) {
return database.getMetaData().getGroups().isPresent();
}

private static boolean isFieldSetForSelectedEntry(String field, BasePanel panel) {
return isAnyFieldSetForSelectedEntry(Collections.singletonList(field), panel);
}
Expand Down
4 changes: 0 additions & 4 deletions src/main/resources/l10n/JabRef_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,6 @@ Remove\ selected\ entries\ from\ this\ group=Remove selected entries from this g

Remove\ entry\ type=Remove entry type

Remove\ from\ group=Remove from group

Remove\ group=Remove group

Remove\ group,\ keep\ subgroups=Remove group, keep subgroups
Expand Down Expand Up @@ -1439,8 +1437,6 @@ Show\ extra\ columns=Show extra columns
Parsing\ error=Parsing error
illegal\ backslash\ expression=illegal backslash expression

Move\ to\ group=Move to group

Clear\ read\ status=Clear read status
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')
Deprecated\ fields=Deprecated fields
Expand Down