Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into sharelatex
Browse files Browse the repository at this point in the history
* 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
  ...
  • Loading branch information
Siedlerchr committed May 27, 2017
2 parents fd75997 + 4c87dde commit baedc74
Show file tree
Hide file tree
Showing 65 changed files with 1,063 additions and 1,712 deletions.
10 changes: 7 additions & 3 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Steps to reproduce:

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

```
Put the excerpt of the log file here
```
<details>
<summary>Log File</summary>

```
Paste an excerpt of your log file here
```
</details>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -269,3 +269,4 @@ gradle-app.setting

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties
scenicView.properties
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,27 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
## [Unreleased]

### Changed
- Continued to redesign the user interface: this time the editor got a fresh coat of paint:
- We moved the `adsurl` field to `url` field when fetching with the ADS fetcher.
- We continued to improve the new groups interface:
- 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).
- We further improved performance of group operations, especially of the new filter feature [#2852](https://github.com/JabRef/jabref/issues/2852).
- It is now possible to resort groups using drag & drop [#2785](https://github.com/JabRef/jabref/issues/2785).
- The entry editor got a fresh coat of paint:
- Homogenize the size of text fields.
- The buttons were changed to icons.
- Completely new interface to add or modify linked files.
- Removed the hidden feature that a double click in the editor inserted the current date.
- All authors and editors are separated using semicolons when exporting to csv. [#2762](https://github.com/JabRef/jabref/issues/2762)
- Improved wording of "Show recommendationns: into "Show 'Related Articles' tab" in the preferences
- Improved wording of "Show recommendations: into "Show 'Related Articles' tab" in the preferences
- 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)

### Fixed
- We fixed the IEEE Xplore web search functionality [#2789](https://github.com/JabRef/jabref/issues/2789)
- We fixed an error in the CrossRef fetcher that occurred if one of the fetched entries had no title
- 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).
- We fixed a bug that only allowed parsing positive timezones from a FileAnnotation [#2839](https://github.com/JabRef/jabref/issues/22839)
- 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).

### Removed


Expand Down
37 changes: 16 additions & 21 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
The MIT License (MIT)
=====================
MIT License

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

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

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

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

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ install4j {


repositories {
mavenLocal()
jcenter()
maven { url "https://oss.sonatype.org/content/groups/public" }
maven { url "https://repo.eclipse.org/content/repositories/paho-snapshots/" }
Expand Down Expand Up @@ -113,6 +114,7 @@ dependencies {
compile 'de.codecentric.centerdevice:javafxsvg:1.2.1'
compile 'org.controlsfx:controlsfx:8.40.12'
compile 'org.fxmisc.easybind:easybind:1.0.3'
compile 'net.corda:jfx:0.11.0'
compile 'org.fxmisc.flowless:flowless:0.5.2'
compile 'de.jensd:fontawesomefx-materialdesignfont:1.7.22-4'

Expand Down
11 changes: 8 additions & 3 deletions external-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,17 @@ URL: http://fxexperience.com/controlsfx/
License: BSD-3-Clause

Id: org.fx.misc.easybin:easybind
Projekt: EasyBind
Project: EasyBind
URL: https://github.com/TomasMikula/EasyBind
License: BSD-2-Clause

Id: net.corda:jfx
Project: Corda
URL: https://github.com/corda/corda/tree/master/client/jfx
License: Apache-2.0

Id: org.fxmisc.flowless:flowless
Projekt: Flowless
Project: Flowless
URL: https://github.com/TomasMikula/Flowless
License: BSD-2-Clause

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

Id: de.jensd:fontawesomefx-materialdesignfont
Projekt: FontAwesomeFX
Project: FontAwesomeFX
URL: https://bitbucket.org/Jerady/fontawesomefx
License: Apache-2.0

Expand Down
68 changes: 3 additions & 65 deletions src/main/java/org/jabref/gui/BasePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.TimerTask;
import java.util.stream.Collectors;

import javax.swing.AbstractAction;
Expand All @@ -37,7 +36,6 @@
import javax.swing.JSplitPane;
import javax.swing.JTextArea;
import javax.swing.SwingUtilities;
import javax.swing.tree.TreePath;
import javax.swing.undo.CannotRedoException;
import javax.swing.undo.CannotUndoException;

Expand Down Expand Up @@ -69,8 +67,6 @@
import org.jabref.gui.filelist.FileListEntry;
import org.jabref.gui.filelist.FileListTableModel;
import org.jabref.gui.groups.GroupAddRemoveDialog;
import org.jabref.gui.groups.GroupSelector;
import org.jabref.gui.groups.GroupTreeNodeViewModel;
import org.jabref.gui.importer.actions.AppendDatabaseAction;
import org.jabref.gui.journals.AbbreviateAction;
import org.jabref.gui.journals.UnabbreviateAction;
Expand Down Expand Up @@ -1313,9 +1309,6 @@ public void actionPerformed(ActionEvent e) {
@Override
public void keyPressed(KeyEvent e) {
final int keyCode = e.getKeyCode();
final TreePath path = frame.getGroupSelector().getSelectionPath();
final GroupTreeNodeViewModel node = path == null ? null : (GroupTreeNodeViewModel) path
.getLastPathComponent();

if (e.isControlDown()) {
switch (keyCode) {
Expand Down Expand Up @@ -1479,7 +1472,6 @@ public void showEntry(final BibEntry be) {
showEntryEditor(entryEditor);

newEntryShowing(be);
setEntryEditorEnabled(true); // Make sure it is enabled.
}

/**
Expand Down Expand Up @@ -1905,10 +1897,6 @@ public BibDatabaseContext getBibDatabaseContext() {
return this.bibDatabaseContext;
}

public GroupSelector getGroupSelector() {
return frame.getGroupSelector();
}

public boolean isUpdatedExternally() {
return updatedExternally;
}
Expand Down Expand Up @@ -2121,68 +2109,18 @@ public void searchAndOpen() {
}

private class GroupTreeListener {

private final Runnable task = new Runnable() {

@Override
public void run() {
// Update group display (for example to reflect that the number of contained entries has changed)
frame.getGroupSelector().revalidateGroups();
}
};

/**
* Only access when you have the lock of the task instance
*
* Guarded by "task"
*/
private TimerTask timerTask = new TimerTask() {

@Override
public void run() {
task.run();
}
};

@Subscribe
public void listen(EntryAddedEvent addedEntryEvent) {
// if the added entry is an undo don't add it to the current group
if (addedEntryEvent.getEntryEventSource() == EntryEventSource.UNDO) {
scheduleUpdate();
return;
}

// Automatically add new entry to the selected group (or set of groups)
if (Globals.prefs.getBoolean(JabRefPreferences.AUTO_ASSIGN_GROUP)
&& frame.getGroupSelector().getToggleAction().isSelected()) {
if (Globals.prefs.getBoolean(JabRefPreferences.AUTO_ASSIGN_GROUP)) {
final List<BibEntry> entries = Collections.singletonList(addedEntryEvent.getBibEntry());
final TreePath[] selection = frame.getGroupSelector().getGroupsTree().getSelectionPaths();
if (selection != null) {
// it is possible that the user selected nothing. Therefore, checked for "!= null"
for (final TreePath tree : selection) {
((GroupTreeNodeViewModel) tree.getLastPathComponent()).addEntriesToGroup(entries);
}
}
SwingUtilities.invokeLater(() -> BasePanel.this.getGroupSelector().valueChanged(null));
}

scheduleUpdate();
}

private void scheduleUpdate() {
// This is a quickfix/dirty hack.
// a better solution would be using RxJava or something reactive instead
// nevertheless it works correctly
synchronized (task) {
timerTask.cancel();
timerTask = new TimerTask() {

@Override
public void run() {
task.run();
}
};
JabRefExecutorService.INSTANCE.submit(timerTask, 200);
Globals.stateManager.getSelectedGroup(bibDatabaseContext).forEach(
selectedGroup -> selectedGroup.addEntriesToGroup(entries));
}
}
}
Expand Down
26 changes: 11 additions & 15 deletions src/main/java/org/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
import org.jabref.gui.exporter.SaveDatabaseAction;
import org.jabref.gui.externalfiletype.ExternalFileTypeEditor;
import org.jabref.gui.groups.EntryTableTransferHandler;
import org.jabref.gui.groups.GroupSelector;
import org.jabref.gui.groups.GroupSidePane;
import org.jabref.gui.help.AboutAction;
import org.jabref.gui.help.HelpAction;
import org.jabref.gui.importer.ImportCustomizationDialog;
Expand Down Expand Up @@ -462,7 +462,7 @@ public void actionPerformed(ActionEvent e) {
private PushToApplications pushApplications;
private GeneralFetcher generalFetcher;
private OpenOfficePanel openOfficePanel;
private GroupSelector groupSelector;
private GroupSidePane groupSidePane;
private int previousTabCount = -1;
private JMenu newSpec;

Expand Down Expand Up @@ -632,7 +632,7 @@ public void windowClosing(WindowEvent e) {

currentBasePanel.getPreviewPanel().updateLayout();

groupSelector.getToggleAction().setSelected(sidePaneManager.isComponentVisible(GroupSelector.class));
groupSidePane.getToggleAction().setSelected(sidePaneManager.isComponentVisible(GroupSidePane.class));
previewToggle.setSelected(Globals.prefs.getPreviewPreferences().isPreviewPanelEnabled());
generalFetcher.getToggleAction().setSelected(sidePaneManager.isComponentVisible(GeneralFetcher.class));
openOfficePanel.getToggleAction().setSelected(sidePaneManager.isComponentVisible(OpenOfficeSidePanel.class));
Expand Down Expand Up @@ -720,11 +720,11 @@ public void setWindowTitle() {
private void initSidePane() {
sidePaneManager = new SidePaneManager(this);

groupSelector = new GroupSelector(this, sidePaneManager);
groupSidePane = new GroupSidePane(this, sidePaneManager);
openOfficePanel = new OpenOfficePanel(this, sidePaneManager);
generalFetcher = new GeneralFetcher(this, sidePaneManager);

sidePaneManager.register(groupSelector);
sidePaneManager.register(groupSidePane);
}

/**
Expand Down Expand Up @@ -1153,10 +1153,10 @@ private void fillMenu() {
}
mb.add(search);

groups.add(new JCheckBoxMenuItem(groupSelector.getToggleAction()));
groups.add(new JCheckBoxMenuItem(groupSidePane.getToggleAction()));
if (prefs.getBoolean(JabRefPreferences.GROUP_SIDEPANE_VISIBLE)) {
sidePaneManager.register(groupSelector);
sidePaneManager.show(GroupSelector.class);
sidePaneManager.register(groupSidePane);
sidePaneManager.show(GroupSidePane.class);
}

groups.addSeparator();
Expand All @@ -1178,7 +1178,7 @@ private void fillMenu() {
view.addSeparator();
view.add(new JCheckBoxMenuItem(toggleToolbar));
view.add(new JCheckBoxMenuItem(enableToggle(generalFetcher.getToggleAction())));
view.add(new JCheckBoxMenuItem(groupSelector.getToggleAction()));
view.add(new JCheckBoxMenuItem(groupSidePane.getToggleAction()));
view.add(new JCheckBoxMenuItem(togglePreview));
view.add(showPdvViewer);
view.add(getNextPreviewStyleAction());
Expand Down Expand Up @@ -1377,7 +1377,7 @@ private void createToolBar() {
previewToggle = new JToggleButton(togglePreview);
tlb.addJToggleButton(previewToggle);

tlb.addJToggleButton(new JToggleButton(groupSelector.getToggleAction()));
tlb.addJToggleButton(new JToggleButton(groupSidePane.getToggleAction()));

tlb.addSeparator();

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

public GroupSelector getGroupSelector() {
return groupSelector;
}

public void setPreviewToggle(boolean enabled) {
previewToggle.setSelected(enabled);
}
Expand Down
Loading

0 comments on commit baedc74

Please sign in to comment.