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

Small issues regarding the new style selection dialog for LibreOffice #1294

Closed
teertinker opened this issue Apr 25, 2016 · 10 comments
Closed

Comments

@teertinker
Copy link
Contributor

JabRef version 3.3 on Ubuntu 14.04
image

The new style dialog is beautiful, thank you very much!

What I miss from before is:

a) a file-filter, allowing to show only *.jstyle files in the window on the far right.
b) in case other users store the style files in one folder: that jabref remembers the folder selected the last time and one does not need to go through all the folders again

a further, real minor, issue might be the option to show the file definition.

  • if you right click on the left window (choose style), there is the option to "show" the file definition.
    -> the content should be refreshed as this click is triggered, because if there are file modifications between adding a new style and refreshing the bibliography, the file shown, is not the one saved on the hard drive and used to compile the list of references.
@Siedlerchr
Copy link
Member

I will look into that. @oscargus You can assign this to me

Siedlerchr added a commit to Siedlerchr/jabref that referenced this issue Apr 26, 2016
JabRef#1294
Extended BrowseAction to display file filter
Fixed NPE when selecting invalid jstyle (prevented style dialog from opening)
Siedlerchr added a commit to Siedlerchr/jabref that referenced this issue Apr 28, 2016
JabRef#1294
Extended BrowseAction to display file filter
Fixed NPE when selecting invalid jstyle (prevented style dialog from opening)
@Siedlerchr
Copy link
Member

@teertinker Would you please test it with one of the current master snapshots? If all is okay, then we can close this. http://builds.jabref.org/master/
Code has been merged a few days ago.

@teertinker
Copy link
Contributor Author

Checked with current master:
I am not able to open the "choose style" dialog anymore. The following exceptions seems to be raised:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at net.sf.jabref.logic.openoffice.OOBibStyle.compareTo(OOBibStyle.java:885)
    at net.sf.jabref.logic.openoffice.OOBibStyle.compareTo(OOBibStyle.java:68)
    at ca.odell.glazedlists.impl.sort.ComparableComparator.compare(ComparableComparator.java:27)
    at ca.odell.glazedlists.impl.sort.ComparableComparator.compare(ComparableComparator.java:18)
    at ca.odell.glazedlists.SortedList$ElementComparator.compare(SortedList.java:647)
    at ca.odell.glazedlists.impl.adt.barcode2.SimpleTree.insertIntoSubtreeInSortedOrder(SimpleTree.java:353)
    at ca.odell.glazedlists.impl.adt.barcode2.SimpleTree.addInSortedOrder(SimpleTree.java:324)
    at ca.odell.glazedlists.SortedList.insertByUnsortedNode(SortedList.java:368)
    at ca.odell.glazedlists.SortedList.listChanged(SortedList.java:352)
    at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:424)
    at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:421)
    at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher$SubjectAndListener.firePendingEvent(SequenceDependenciesEventPublisher.java:445)
    at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher.fireEvent(SequenceDependenciesEventPublisher.java:344)
    at ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:317)
    at ca.odell.glazedlists.BasicEventList.addAll(BasicEventList.java:167)
    at ca.odell.glazedlists.BasicEventList.addAll(BasicEventList.java:149)
    at net.sf.jabref.gui.openoffice.StyleSelectDialog.updateStyles(StyleSelectDialog.java:316)
    at net.sf.jabref.gui.openoffice.StyleSelectDialog.init(StyleSelectDialog.java:153)
    at net.sf.jabref.gui.openoffice.StyleSelectDialog.<init>(StyleSelectDialog.java:123)
    at net.sf.jabref.gui.openoffice.OpenOfficePanel.lambda$initPanel$5(OpenOfficePanel.java:186)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    at java.awt.Component.processMouseEvent(Component.java:6535)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6300)
    at java.awt.Container.processEvent(Container.java:2236)
    at java.awt.Component.dispatchEventImpl(Component.java:4891)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4713)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    at java.awt.Container.dispatchEventImpl(Container.java:2280)
    at java.awt.Window.dispatchEventImpl(Window.java:2750)
    at java.awt.Component.dispatchEvent(Component.java:4713)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

@Siedlerchr
Copy link
Member

Hm, I will check it again. This is weird as I already took care of it in the PR.
This could happen when you selected an invalid style file (e.g. another file).
Could you please check the style file you have selected and maybe upload it here?

@teertinker
Copy link
Contributor Author

I was not able to open the dialog to choose a style: Nothing happens after clicking on "Stil wählen" .

image

OK: The problem was my fault. I used the following jstyle file:
campus_format english.txt

with this file stored in my settings, it doesn't work in 3.3 either

-> The style file seems to have problems on my linux machine with encoding. The tricky thing is, I used notepad++ to change encoding the last time on my windows machine, because the list of references was somehow not parsed properly.

@teertinker
Copy link
Contributor Author

This means: the features implemented work properly now! Thanks.

@Siedlerchr
Copy link
Member

@teertinker Okay. I also added a check which prevents wrong style files from being saved. That should solve the problem with being not able to open the stye dialog. So please try selecting the "invalid/wrong" file in the style dialog. And have a look in the Error Log then, at one point there should be a Log message about an invalid style

@teertinker
Copy link
Contributor Author

I tried the master http://builds.jabref.org/master/JabRef-3.4dev--snapshot--2016-05-02--master--abb1f56.jar build at 13:41
the behavior remains the same with an incorrect style file:

  • dialog to choose styles cannot be opened
  • an exception is raised (as can be seen in the exceptions section of the console)
  • the protocol section has no information about a wrong style file.

@Siedlerchr
Copy link
Member

I will look into that further. I think the only cased I probably missed is when reading the settings.

@Siedlerchr
Copy link
Member

@teertinker The fix just got merged and will be avaiable in one of the next snapshots build on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants