Skip to content

Fix Permissions of LaTeXintegration#5134

Merged
Siedlerchr merged 4 commits into
masterfrom
latexintegration-macos
Aug 18, 2019
Merged

Fix Permissions of LaTeXintegration#5134
Siedlerchr merged 4 commits into
masterfrom
latexintegration-macos

Conversation

@LinusDietz

Copy link
Copy Markdown
Member

This fixes one problem of JabRef trying to parse a directory, which it has no permission for.

Instead a generic exception dialog with a StackTrace, a more useful error message is displayed to the users.
Screen Shot 2019-07-18 at 11 44 20

@LinusDietz LinusDietz requested a review from davidemdot July 18, 2019 09:47
@LinusDietz LinusDietz added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jul 18, 2019

@tobiasdiez tobiasdiez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, two small sugestions from my side

searchInProgress.set(false);
successfulSearch.set(false);

final boolean permissionProblem = exception instanceof IOException && exception.getCause() instanceof FileSystemException && exception.getCause().getMessage().endsWith("Operation not permitted");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to move this code to dialogService.showErrorDialogAndWait(exception) so that access issues in other parts of JabRef are treated similarly?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't do that because the dialogService is a global thing, whereas how we handle the exception here is quite special.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, so the same exception but e.g. thrown while opening a bib file should still be displayed in the default error dialog with the stack trace instead of by the specialized permission problem dialog?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure, but I think that in those cases the selection file dialog should show a warning like this. Here the problem is related to the deep search in all subdirectories, if I understood properly.

Warning

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least add a complete error message with stack trace to the log. I hate error messages without stack traces.

Comment thread src/main/java/org/jabref/gui/texparser/ParseTexDialogViewModel.java Outdated

@davidemdot davidemdot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Although I think that some lines are redundant. It is explained over the code.

Comment thread src/main/java/org/jabref/gui/texparser/ParseTexDialogViewModel.java Outdated
@Siedlerchr Siedlerchr merged commit 7ec70a5 into master Aug 18, 2019
@Siedlerchr Siedlerchr deleted the latexintegration-macos branch August 18, 2019 12:31
Siedlerchr added a commit to Siedlerchr/jabref that referenced this pull request Aug 23, 2019
* upstream/master:
  Bugfix/5045 : Modified the existing logic to comply crossref resolution with biblatex specification (JabRef#5086)
  Fix issue with missing year value in year column (JabRef#5197)
  Bump com.gradle.build-scan from 2.4 to 2.4.1 (JabRef#5199)
  Add citation commands to TexParser: autocite, blockcquote, and textcquote (JabRef#5195)
  Conversion of preferencesDialog/advancedTab, networkTab and groupsTab to mvvm (JabRef#5141)
  Fix Permissions of LaTeXintegration (JabRef#5134)
  Border for group color indicator and some space for tooltip (JabRef#5190)
  Fix issue 5152, tooltip and icon added to group cell (JabRef#5191)
  Fix tooltips in CitationsDisplay (JabRef#5188)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: ui project: gsoc status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants