Skip to content

Commit baedc74

Browse files
committed
Merge remote-tracking branch 'upstream/master' into sharelatex
* upstream/master: (23 commits) Implement #2785: resort groups using drag & drop (#2864) Add Library of Congress as ID-fetcher (#2865) Fix export and import of MS office day/year/month acessed fields (#2862) Adsurl to url (#2861) Update LICENSE.md Update Update LICENSE.md Update license file so that github recognize it properly Improve Issue Template Using a Collapsible Log Area Fix #2852: Improve performance of group filtering. Rename GroupSelector to GroupSidePane Fix #2843: Show information correctly in entry editor Remove old entry editor code related to focus selection Implement feedback Menu Greek Translation (#2836) Relaxed the regex to also match negative timezone formats when parsing pdf annotation dates (#2841) Update localization Remove unnecessary group code (and move remaining settings to preferences) Add Local Maven repo as first lookup resource, to avoid having duplicate libs in gradle and maven Implement #2786: Allow selection of multiple groups ...
2 parents fd75997 + 4c87dde commit baedc74

File tree

65 files changed

+1063
-1712
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1063
-1712
lines changed

.github/ISSUE_TEMPLATE.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ Steps to reproduce:
1313

1414
<!-- If applicable, excerpt of the bibliography file, screenshot, and excerpt of log (available in the error console) -->
1515

16-
```
17-
Put the excerpt of the log file here
18-
```
16+
<details>
17+
<summary>Log File</summary>
18+
19+
```
20+
Paste an excerpt of your log file here
21+
```
22+
</details>

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -269,3 +269,4 @@ gradle-app.setting
269269

270270
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
271271
# gradle/wrapper/gradle-wrapper.properties
272+
scenicView.properties

CHANGELOG.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,27 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
1111
## [Unreleased]
1212

1313
### Changed
14-
- Continued to redesign the user interface: this time the editor got a fresh coat of paint:
14+
- We moved the `adsurl` field to `url` field when fetching with the ADS fetcher.
15+
- We continued to improve the new groups interface:
16+
- You can now again select multiple groups (and a few related settings were added to the preferences) [#2786](https://github.com/JabRef/jabref/issues/2786).
17+
- We further improved performance of group operations, especially of the new filter feature [#2852](https://github.com/JabRef/jabref/issues/2852).
18+
- It is now possible to resort groups using drag & drop [#2785](https://github.com/JabRef/jabref/issues/2785).
19+
- The entry editor got a fresh coat of paint:
20+
- Homogenize the size of text fields.
1521
- The buttons were changed to icons.
22+
- Completely new interface to add or modify linked files.
1623
- Removed the hidden feature that a double click in the editor inserted the current date.
1724
- All authors and editors are separated using semicolons when exporting to csv. [#2762](https://github.com/JabRef/jabref/issues/2762)
18-
- Improved wording of "Show recommendationns: into "Show 'Related Articles' tab" in the preferences
25+
- Improved wording of "Show recommendations: into "Show 'Related Articles' tab" in the preferences
26+
- We added integration of the Library of Congress catalog as a fetcher based on the [LCCN identifier](https://en.wikipedia.org/wiki/Library_of_Congress_Control_Number). [Feature request 636 in the forum](http://discourse.jabref.org/t/loc-marc-mods-connection/636)
1927

2028
### Fixed
2129
- We fixed the IEEE Xplore web search functionality [#2789](https://github.com/JabRef/jabref/issues/2789)
2230
- We fixed an error in the CrossRef fetcher that occurred if one of the fetched entries had no title
31+
- We fixed an issue that prevented new entries to be automatically assigned to the currently selected group [#2783](https://github.com/JabRef/jabref/issues/2783).
32+
- We fixed a bug that only allowed parsing positive timezones from a FileAnnotation [#2839](https://github.com/JabRef/jabref/issues/22839)
33+
- We fixed a bug that did not allow the correct re-export of the MS-Office XML field `msbib-accessed` with a different date format [#2859](https://github.com/JabRef/jabref/issues/2859).
34+
2335
### Removed
2436

2537

LICENSE.md

+16-21
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,21 @@
1-
The MIT License (MIT)
2-
=====================
1+
MIT License
32

43
Copyright © 2003-2016 [JabRef Authors](https://github.com/JabRef/jabref/blob/master/AUTHORS)
54

6-
Permission is hereby granted, free of charge, to any person
7-
obtaining a copy of this software and associated documentation
8-
files (the “Software”), to deal in the Software without
9-
restriction, including without limitation the rights to use,
10-
copy, modify, merge, publish, distribute, sublicense, and/or sell
11-
copies of the Software, and to permit persons to whom the
12-
Software is furnished to do so, subject to the following
13-
conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
1411

15-
The above copyright notice and this permission notice shall be
16-
included in all copies or substantial portions of the Software.
17-
18-
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
19-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20-
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23-
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25-
OTHER DEALINGS IN THE SOFTWARE.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
2614

15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ install4j {
5555

5656

5757
repositories {
58+
mavenLocal()
5859
jcenter()
5960
maven { url "https://oss.sonatype.org/content/groups/public" }
6061
maven { url "https://repo.eclipse.org/content/repositories/paho-snapshots/" }
@@ -113,6 +114,7 @@ dependencies {
113114
compile 'de.codecentric.centerdevice:javafxsvg:1.2.1'
114115
compile 'org.controlsfx:controlsfx:8.40.12'
115116
compile 'org.fxmisc.easybind:easybind:1.0.3'
117+
compile 'net.corda:jfx:0.11.0'
116118
compile 'org.fxmisc.flowless:flowless:0.5.2'
117119
compile 'de.jensd:fontawesomefx-materialdesignfont:1.7.22-4'
118120

external-libraries.txt

+8-3
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,17 @@ URL: http://fxexperience.com/controlsfx/
131131
License: BSD-3-Clause
132132

133133
Id: org.fx.misc.easybin:easybind
134-
Projekt: EasyBind
134+
Project: EasyBind
135135
URL: https://github.com/TomasMikula/EasyBind
136136
License: BSD-2-Clause
137137

138+
Id: net.corda:jfx
139+
Project: Corda
140+
URL: https://github.com/corda/corda/tree/master/client/jfx
141+
License: Apache-2.0
142+
138143
Id: org.fxmisc.flowless:flowless
139-
Projekt: Flowless
144+
Project: Flowless
140145
URL: https://github.com/TomasMikula/Flowless
141146
License: BSD-2-Clause
142147

@@ -151,7 +156,7 @@ URL: https://github.com/google/gson
151156
License: Apache-2.0
152157

153158
Id: de.jensd:fontawesomefx-materialdesignfont
154-
Projekt: FontAwesomeFX
159+
Project: FontAwesomeFX
155160
URL: https://bitbucket.org/Jerady/fontawesomefx
156161
License: Apache-2.0
157162

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

+3-65
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import java.util.Objects;
2727
import java.util.Optional;
2828
import java.util.Set;
29-
import java.util.TimerTask;
3029
import java.util.stream.Collectors;
3130

3231
import javax.swing.AbstractAction;
@@ -37,7 +36,6 @@
3736
import javax.swing.JSplitPane;
3837
import javax.swing.JTextArea;
3938
import javax.swing.SwingUtilities;
40-
import javax.swing.tree.TreePath;
4139
import javax.swing.undo.CannotRedoException;
4240
import javax.swing.undo.CannotUndoException;
4341

@@ -69,8 +67,6 @@
6967
import org.jabref.gui.filelist.FileListEntry;
7068
import org.jabref.gui.filelist.FileListTableModel;
7169
import org.jabref.gui.groups.GroupAddRemoveDialog;
72-
import org.jabref.gui.groups.GroupSelector;
73-
import org.jabref.gui.groups.GroupTreeNodeViewModel;
7470
import org.jabref.gui.importer.actions.AppendDatabaseAction;
7571
import org.jabref.gui.journals.AbbreviateAction;
7672
import org.jabref.gui.journals.UnabbreviateAction;
@@ -1313,9 +1309,6 @@ public void actionPerformed(ActionEvent e) {
13131309
@Override
13141310
public void keyPressed(KeyEvent e) {
13151311
final int keyCode = e.getKeyCode();
1316-
final TreePath path = frame.getGroupSelector().getSelectionPath();
1317-
final GroupTreeNodeViewModel node = path == null ? null : (GroupTreeNodeViewModel) path
1318-
.getLastPathComponent();
13191312

13201313
if (e.isControlDown()) {
13211314
switch (keyCode) {
@@ -1479,7 +1472,6 @@ public void showEntry(final BibEntry be) {
14791472
showEntryEditor(entryEditor);
14801473

14811474
newEntryShowing(be);
1482-
setEntryEditorEnabled(true); // Make sure it is enabled.
14831475
}
14841476

14851477
/**
@@ -1905,10 +1897,6 @@ public BibDatabaseContext getBibDatabaseContext() {
19051897
return this.bibDatabaseContext;
19061898
}
19071899

1908-
public GroupSelector getGroupSelector() {
1909-
return frame.getGroupSelector();
1910-
}
1911-
19121900
public boolean isUpdatedExternally() {
19131901
return updatedExternally;
19141902
}
@@ -2121,68 +2109,18 @@ public void searchAndOpen() {
21212109
}
21222110

21232111
private class GroupTreeListener {
2124-
2125-
private final Runnable task = new Runnable() {
2126-
2127-
@Override
2128-
public void run() {
2129-
// Update group display (for example to reflect that the number of contained entries has changed)
2130-
frame.getGroupSelector().revalidateGroups();
2131-
}
2132-
};
2133-
2134-
/**
2135-
* Only access when you have the lock of the task instance
2136-
*
2137-
* Guarded by "task"
2138-
*/
2139-
private TimerTask timerTask = new TimerTask() {
2140-
2141-
@Override
2142-
public void run() {
2143-
task.run();
2144-
}
2145-
};
2146-
21472112
@Subscribe
21482113
public void listen(EntryAddedEvent addedEntryEvent) {
21492114
// if the added entry is an undo don't add it to the current group
21502115
if (addedEntryEvent.getEntryEventSource() == EntryEventSource.UNDO) {
2151-
scheduleUpdate();
21522116
return;
21532117
}
21542118

21552119
// Automatically add new entry to the selected group (or set of groups)
2156-
if (Globals.prefs.getBoolean(JabRefPreferences.AUTO_ASSIGN_GROUP)
2157-
&& frame.getGroupSelector().getToggleAction().isSelected()) {
2120+
if (Globals.prefs.getBoolean(JabRefPreferences.AUTO_ASSIGN_GROUP)) {
21582121
final List<BibEntry> entries = Collections.singletonList(addedEntryEvent.getBibEntry());
2159-
final TreePath[] selection = frame.getGroupSelector().getGroupsTree().getSelectionPaths();
2160-
if (selection != null) {
2161-
// it is possible that the user selected nothing. Therefore, checked for "!= null"
2162-
for (final TreePath tree : selection) {
2163-
((GroupTreeNodeViewModel) tree.getLastPathComponent()).addEntriesToGroup(entries);
2164-
}
2165-
}
2166-
SwingUtilities.invokeLater(() -> BasePanel.this.getGroupSelector().valueChanged(null));
2167-
}
2168-
2169-
scheduleUpdate();
2170-
}
2171-
2172-
private void scheduleUpdate() {
2173-
// This is a quickfix/dirty hack.
2174-
// a better solution would be using RxJava or something reactive instead
2175-
// nevertheless it works correctly
2176-
synchronized (task) {
2177-
timerTask.cancel();
2178-
timerTask = new TimerTask() {
2179-
2180-
@Override
2181-
public void run() {
2182-
task.run();
2183-
}
2184-
};
2185-
JabRefExecutorService.INSTANCE.submit(timerTask, 200);
2122+
Globals.stateManager.getSelectedGroup(bibDatabaseContext).forEach(
2123+
selectedGroup -> selectedGroup.addEntriesToGroup(entries));
21862124
}
21872125
}
21882126
}

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

+11-15
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
import org.jabref.gui.exporter.SaveDatabaseAction;
9292
import org.jabref.gui.externalfiletype.ExternalFileTypeEditor;
9393
import org.jabref.gui.groups.EntryTableTransferHandler;
94-
import org.jabref.gui.groups.GroupSelector;
94+
import org.jabref.gui.groups.GroupSidePane;
9595
import org.jabref.gui.help.AboutAction;
9696
import org.jabref.gui.help.HelpAction;
9797
import org.jabref.gui.importer.ImportCustomizationDialog;
@@ -462,7 +462,7 @@ public void actionPerformed(ActionEvent e) {
462462
private PushToApplications pushApplications;
463463
private GeneralFetcher generalFetcher;
464464
private OpenOfficePanel openOfficePanel;
465-
private GroupSelector groupSelector;
465+
private GroupSidePane groupSidePane;
466466
private int previousTabCount = -1;
467467
private JMenu newSpec;
468468

@@ -632,7 +632,7 @@ public void windowClosing(WindowEvent e) {
632632

633633
currentBasePanel.getPreviewPanel().updateLayout();
634634

635-
groupSelector.getToggleAction().setSelected(sidePaneManager.isComponentVisible(GroupSelector.class));
635+
groupSidePane.getToggleAction().setSelected(sidePaneManager.isComponentVisible(GroupSidePane.class));
636636
previewToggle.setSelected(Globals.prefs.getPreviewPreferences().isPreviewPanelEnabled());
637637
generalFetcher.getToggleAction().setSelected(sidePaneManager.isComponentVisible(GeneralFetcher.class));
638638
openOfficePanel.getToggleAction().setSelected(sidePaneManager.isComponentVisible(OpenOfficeSidePanel.class));
@@ -720,11 +720,11 @@ public void setWindowTitle() {
720720
private void initSidePane() {
721721
sidePaneManager = new SidePaneManager(this);
722722

723-
groupSelector = new GroupSelector(this, sidePaneManager);
723+
groupSidePane = new GroupSidePane(this, sidePaneManager);
724724
openOfficePanel = new OpenOfficePanel(this, sidePaneManager);
725725
generalFetcher = new GeneralFetcher(this, sidePaneManager);
726726

727-
sidePaneManager.register(groupSelector);
727+
sidePaneManager.register(groupSidePane);
728728
}
729729

730730
/**
@@ -1153,10 +1153,10 @@ private void fillMenu() {
11531153
}
11541154
mb.add(search);
11551155

1156-
groups.add(new JCheckBoxMenuItem(groupSelector.getToggleAction()));
1156+
groups.add(new JCheckBoxMenuItem(groupSidePane.getToggleAction()));
11571157
if (prefs.getBoolean(JabRefPreferences.GROUP_SIDEPANE_VISIBLE)) {
1158-
sidePaneManager.register(groupSelector);
1159-
sidePaneManager.show(GroupSelector.class);
1158+
sidePaneManager.register(groupSidePane);
1159+
sidePaneManager.show(GroupSidePane.class);
11601160
}
11611161

11621162
groups.addSeparator();
@@ -1178,7 +1178,7 @@ private void fillMenu() {
11781178
view.addSeparator();
11791179
view.add(new JCheckBoxMenuItem(toggleToolbar));
11801180
view.add(new JCheckBoxMenuItem(enableToggle(generalFetcher.getToggleAction())));
1181-
view.add(new JCheckBoxMenuItem(groupSelector.getToggleAction()));
1181+
view.add(new JCheckBoxMenuItem(groupSidePane.getToggleAction()));
11821182
view.add(new JCheckBoxMenuItem(togglePreview));
11831183
view.add(showPdvViewer);
11841184
view.add(getNextPreviewStyleAction());
@@ -1377,7 +1377,7 @@ private void createToolBar() {
13771377
previewToggle = new JToggleButton(togglePreview);
13781378
tlb.addJToggleButton(previewToggle);
13791379

1380-
tlb.addJToggleButton(new JToggleButton(groupSelector.getToggleAction()));
1380+
tlb.addJToggleButton(new JToggleButton(groupSidePane.getToggleAction()));
13811381

13821382
tlb.addSeparator();
13831383

@@ -1404,7 +1404,7 @@ private void initActions() {
14041404
openDatabaseOnlyActions.addAll(Arrays.asList(manageSelectors, mergeDatabaseAction, newSubDatabaseAction, save, copyPreview,
14051405
saveAs, saveSelectedAs, saveSelectedAsPlain, editModeAction, undo, redo, cut, deleteEntry, copy, paste, mark, markSpecific, unmark,
14061406
unmarkAll, rankSubMenu, editEntry, selectAll, copyKey, copyCiteKey, copyKeyAndTitle, copyKeyAndLink, editPreamble, editStrings,
1407-
groupSelector.getToggleAction(), makeKeyAction, normalSearch, generalFetcher.getToggleAction(), mergeEntries, cleanupEntries, exportToClipboard, replaceAll,
1407+
groupSidePane.getToggleAction(), makeKeyAction, normalSearch, generalFetcher.getToggleAction(), mergeEntries, cleanupEntries, exportToClipboard, replaceAll,
14081408
sendAsEmail, downloadFullText, lookupIdentifiers, writeXmpAction, openOfficePanel.getToggleAction(), findUnlinkedFiles, addToGroup, removeFromGroup,
14091409
moveToGroup, autoLinkFile, resolveDuplicateKeys, openUrl, openFolder, openFile, togglePreview,
14101410
dupliCheck, autoSetFile, newEntryAction, newSpec, customizeAction, plainTextImport, getMassSetField(), getManageKeywords(),
@@ -1918,10 +1918,6 @@ public SidePaneManager getSidePaneManager() {
19181918
return sidePaneManager;
19191919
}
19201920

1921-
public GroupSelector getGroupSelector() {
1922-
return groupSelector;
1923-
}
1924-
19251921
public void setPreviewToggle(boolean enabled) {
19261922
previewToggle.setSelected(enabled);
19271923
}

0 commit comments

Comments
 (0)