{"action":"created","comment":{"url":"https://api.github.com/repos/JabRef/jabref/pulls/comments/190857084","pull_request_review_id":123317572,"id":190857084,"diff_hunk":"@@ -37,32 +38,40 @@\n \n     private final JabRefFrame jabRefFrame;\n     private DatabaseSynchronizer dbmsSynchronizer;\n+    private final DialogService dialogService;\n \n     public SharedDatabaseUIManager(JabRefFrame jabRefFrame) {\n         this.jabRefFrame = jabRefFrame;\n+        this.dialogService = jabRefFrame.getDialogService();\n     }\n \n     @Subscribe\n     public void listen(ConnectionLostEvent connectionLostEvent) {\n \n         jabRefFrame.output(Localization.lang(\"Connection lost.\"));\n \n-        String[] options = {Localization.lang(\"Reconnect\"), Localization.lang(\"Work offline\"),\n-                Localization.lang(\"Close library\")};\n-\n-        int answer = JOptionPane.showOptionDialog(null,\n-                Localization.lang(\"The connection to the server has been terminated.\") + \"\\n\\n\",\n-                Localization.lang(\"Connection lost\"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE,\n-                null, options, options[0]);\n-\n-        if (answer == 0) {\n-            jabRefFrame.closeCurrentTab();\n-            ConnectToSharedDatabaseDialog connectToSharedDatabaseDialog = new ConnectToSharedDatabaseDialog(jabRefFrame);\n-            connectToSharedDatabaseDialog.setVisible(true);\n-        } else if (answer == 1) {\n-            connectionLostEvent.getBibDatabaseContext().convertToLocalDatabase();\n-            jabRefFrame.refreshTitleAndTabs();\n-            jabRefFrame.output(Localization.lang(\"Working offline.\"));\n+        ButtonType reconnect = new ButtonType(Localization.lang(\"Reconnect\"), ButtonData.YES);\n+        ButtonType workOffline = new ButtonType(Localization.lang(\"Work offline\"), ButtonData.NO);\n+        ButtonType closeLibrary = new ButtonType(Localization.lang(\"Close library\"), ButtonData.CANCEL_CLOSE);\n+\n+        Optional<ButtonType> answer = dialogService.showCustomButtonDialogAndWait(AlertType.WARNING,\n+                                                                                  Localization.lang(\"Connection lost\"),\n+                                                                                  Localization.lang(\"The connection to the server has been terminated.\"),\n+                                                                                  reconnect,\n+                                                                                  workOffline,\n+                                                                                  closeLibrary);\n+\n+        if (answer.isPresent()) {\n+            if (answer.get().equals(reconnect)) {\n+                jabRefFrame.closeCurrentTab();\n+                new SharedDatabaseLoginDialogView(jabRefFrame).showAndWait();\n+\n+            }","path":"src/main/java/org/jabref/gui/shared/SharedDatabaseUIManager.java","position":65,"original_position":65,"commit_id":"e228e65cbe9c148f68057f4234fcff49fd2429ae","original_commit_id":"e228e65cbe9c148f68057f4234fcff49fd2429ae","user":{"login":"tobiasdiez","id":5037600,"avatar_url":"https://avatars3.githubusercontent.com/u/5037600?v=4","gravatar_id":"","url":"https://api.github.com/users/tobiasdiez","html_url":"https://github.com/tobiasdiez","followers_url":"https://api.github.com/users/tobiasdiez/followers","following_url":"https://api.github.com/users/tobiasdiez/following{/other_user}","gists_url":"https://api.github.com/users/tobiasdiez/gists{/gist_id}","starred_url":"https://api.github.com/users/tobiasdiez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobiasdiez/subscriptions","organizations_url":"https://api.github.com/users/tobiasdiez/orgs","repos_url":"https://api.github.com/users/tobiasdiez/repos","events_url":"https://api.github.com/users/tobiasdiez/events{/privacy}","received_events_url":"https://api.github.com/users/tobiasdiez/received_events","type":"User","site_admin":false},"body":"`else if` (and remove empty line above)","created_at":"2018-05-25T10:44:54Z","updated_at":"2018-05-25T10:48:16Z","html_url":"https://github.com/JabRef/jabref/pull/4040#discussion_r190857084","pull_request_url":"https://api.github.com/repos/JabRef/jabref/pulls/4040","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/JabRef/jabref/pulls/comments/190857084"},"html":{"href":"https://github.com/JabRef/jabref/pull/4040#discussion_r190857084"},"pull_request":{"href":"https://api.github.com/repos/JabRef/jabref/pulls/4040"}}},"pull_request":{"url":"https://api.github.com/repos/JabRef/jabref/pulls/4040","id":189230734,"html_url":"https://github.com/JabRef/jabref/pull/4040","diff_url":"https://github.com/JabRef/jabref/pull/4040.diff","patch_url":"https://github.com/JabRef/jabref/pull/4040.patch","issue_url":"https://api.github.com/repos/JabRef/jabref/issues/4040","number":4040,"state":"open","locked":false,"title":"Convert SharedDatabaseConnect Dialog to Javafx","user":{"login":"Siedlerchr","id":320228,"avatar_url":"https://avatars1.githubusercontent.com/u/320228?v=4","gravatar_id":"","url":"https://api.github.com/users/Siedlerchr","html_url":"https://github.com/Siedlerchr","followers_url":"https://api.github.com/users/Siedlerchr/followers","following_url":"https://api.github.com/users/Siedlerchr/following{/other_user}","gists_url":"https://api.github.com/users/Siedlerchr/gists{/gist_id}","starred_url":"https://api.github.com/users/Siedlerchr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Siedlerchr/subscriptions","organizations_url":"https://api.github.com/users/Siedlerchr/orgs","repos_url":"https://api.github.com/users/Siedlerchr/repos","events_url":"https://api.github.com/users/Siedlerchr/events{/privacy}","received_events_url":"https://api.github.com/users/Siedlerchr/received_events","type":"User","site_admin":false},"body":"Connection works so far.  No more freezes regarding addTabs. in basePanel\r\nSomehow the dialog looks odd, @tobiasdiez  Any idea what is missing? The checkboxes are not visible correct. I just see that it looks really odd in he maintable-beta branch, too. e..g. int he Event Log\r\n\r\nEdit// The conection and the synchronization seems to be working.  \r\n\r\n\r\n![grafik](https://user-images.githubusercontent.com/320228/40278653-9cd1a2be-5c35-11e8-8caf-20223eb87c15.png)\r\n\r\n\r\n\r\n<!-- describe the changes you have made here: what, why, ... \r\n     Link issues by using the following pattern: [#333](https://github.com/JabRef/jabref/issues/333) or [koppor#49](https://github.com/koppor/jabref/issues/47).\r\n     The title of the PR must not reference an issue, because GitHub does not support autolinking there. -->\r\n\r\n\r\n----\r\n\r\nTODO: \r\n- Migration Dialog and check conflic merge dialog\r\n\r\n\r\n- [ ] Change in CHANGELOG.md described\r\n- [ ] Tests created for changes\r\n- [ ] Manually tested changed features in running JabRef\r\n- [ ] Screenshots added in PR description (for bigger UI changes)\r\n- [ ] Ensured that [the git commit message is a good one](https://github.com/joelparkerhenderson/git_commit_message)\r\n- [ ] Check documentation status (Issue created for outdated help page at [help.jabref.org](https://github.com/JabRef/help.jabref.org/issues)?)\r\n","created_at":"2018-05-20T11:56:20Z","updated_at":"2018-05-25T10:48:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f22e957d43271049c8c3e1f11c06600b8a6dc90e","assignee":null,"assignees":[],"requested_reviewers":[{"login":"koppor","id":1366654,"avatar_url":"https://avatars0.githubusercontent.com/u/1366654?v=4","gravatar_id":"","url":"https://api.github.com/users/koppor","html_url":"https://github.com/koppor","followers_url":"https://api.github.com/users/koppor/followers","following_url":"https://api.github.com/users/koppor/following{/other_user}","gists_url":"https://api.github.com/users/koppor/gists{/gist_id}","starred_url":"https://api.github.com/users/koppor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koppor/subscriptions","organizations_url":"https://api.github.com/users/koppor/orgs","repos_url":"https://api.github.com/users/koppor/repos","events_url":"https://api.github.com/users/koppor/events{/privacy}","received_events_url":"https://api.github.com/users/koppor/received_events","type":"User","site_admin":false},{"login":"obraliar","id":15609468,"avatar_url":"https://avatars2.githubusercontent.com/u/15609468?v=4","gravatar_id":"","url":"https://api.github.com/users/obraliar","html_url":"https://github.com/obraliar","followers_url":"https://api.github.com/users/obraliar/followers","following_url":"https://api.github.com/users/obraliar/following{/other_user}","gists_url":"https://api.github.com/users/obraliar/gists{/gist_id}","starred_url":"https://api.github.com/users/obraliar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obraliar/subscriptions","organizations_url":"https://api.github.com/users/obraliar/orgs","repos_url":"https://api.github.com/users/obraliar/repos","events_url":"https://api.github.com/users/obraliar/events{/privacy}","received_events_url":"https://api.github.com/users/obraliar/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":297433180,"url":"https://api.github.com/repos/JabRef/jabref/labels/ready-for-review","name":"ready-for-review","color":"0e8a16","default":false},{"id":481903647,"url":"https://api.github.com/repos/JabRef/jabref/labels/shared-database","name":"shared-database","color":"aeaeae","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/JabRef/jabref/pulls/4040/commits","review_comments_url":"https://api.github.com/repos/JabRef/jabref/pulls/4040/comments","review_comment_url":"https://api.github.com/repos/JabRef/jabref/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JabRef/jabref/issues/4040/comments","statuses_url":"https://api.github.com/repos/JabRef/jabref/statuses/e228e65cbe9c148f68057f4234fcff49fd2429ae","head":{"label":"JabRef:sharedblogin","ref":"sharedblogin","sha":"e228e65cbe9c148f68057f4234fcff49fd2429ae","user":{"login":"JabRef","id":3914421,"avatar_url":"https://avatars1.githubusercontent.com/u/3914421?v=4","gravatar_id":"","url":"https://api.github.com/users/JabRef","html_url":"https://github.com/JabRef","followers_url":"https://api.github.com/users/JabRef/followers","following_url":"https://api.github.com/users/JabRef/following{/other_user}","gists_url":"https://api.github.com/users/JabRef/gists{/gist_id}","starred_url":"https://api.github.com/users/JabRef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JabRef/subscriptions","organizations_url":"https://api.github.com/users/JabRef/orgs","repos_url":"https://api.github.com/users/JabRef/repos","events_url":"https://api.github.com/users/JabRef/events{/privacy}","received_events_url":"https://api.github.com/users/JabRef/received_events","type":"Organization","site_admin":false},"repo":{"id":17634071,"name":"jabref","full_name":"JabRef/jabref","owner":{"login":"JabRef","id":3914421,"avatar_url":"https://avatars1.githubusercontent.com/u/3914421?v=4","gravatar_id":"","url":"https://api.github.com/users/JabRef","html_url":"https://github.com/JabRef","followers_url":"https://api.github.com/users/JabRef/followers","following_url":"https://api.github.com/users/JabRef/following{/other_user}","gists_url":"https://api.github.com/users/JabRef/gists{/gist_id}","starred_url":"https://api.github.com/users/JabRef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JabRef/subscriptions","organizations_url":"https://api.github.com/users/JabRef/orgs","repos_url":"https://api.github.com/users/JabRef/repos","events_url":"https://api.github.com/users/JabRef/events{/privacy}","received_events_url":"https://api.github.com/users/JabRef/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JabRef/jabref","description":"Graphical Java application for managing BibTeX and biblatex (.bib) databases","fork":false,"url":"https://api.github.com/repos/JabRef/jabref","forks_url":"https://api.github.com/repos/JabRef/jabref/forks","keys_url":"https://api.github.com/repos/JabRef/jabref/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JabRef/jabref/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JabRef/jabref/teams","hooks_url":"https://api.github.com/repos/JabRef/jabref/hooks","issue_events_url":"https://api.github.com/repos/JabRef/jabref/issues/events{/number}","events_url":"https://api.github.com/repos/JabRef/jabref/events","assignees_url":"https://api.github.com/repos/JabRef/jabref/assignees{/user}","branches_url":"https://api.github.com/repos/JabRef/jabref/branches{/branch}","tags_url":"https://api.github.com/repos/JabRef/jabref/tags","blobs_url":"https://api.github.com/repos/JabRef/jabref/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JabRef/jabref/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JabRef/jabref/git/refs{/sha}","trees_url":"https://api.github.com/repos/JabRef/jabref/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JabRef/jabref/statuses/{sha}","languages_url":"https://api.github.com/repos/JabRef/jabref/languages","stargazers_url":"https://api.github.com/repos/JabRef/jabref/stargazers","contributors_url":"https://api.github.com/repos/JabRef/jabref/contributors","subscribers_url":"https://api.github.com/repos/JabRef/jabref/subscribers","subscription_url":"https://api.github.com/repos/JabRef/jabref/subscription","commits_url":"https://api.github.com/repos/JabRef/jabref/commits{/sha}","git_commits_url":"https://api.github.com/repos/JabRef/jabref/git/commits{/sha}","comments_url":"https://api.github.com/repos/JabRef/jabref/comments{/number}","issue_comment_url":"https://api.github.com/repos/JabRef/jabref/issues/comments{/number}","contents_url":"https://api.github.com/repos/JabRef/jabref/contents/{+path}","compare_url":"https://api.github.com/repos/JabRef/jabref/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JabRef/jabref/merges","archive_url":"https://api.github.com/repos/JabRef/jabref/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JabRef/jabref/downloads","issues_url":"https://api.github.com/repos/JabRef/jabref/issues{/number}","pulls_url":"https://api.github.com/repos/JabRef/jabref/pulls{/number}","milestones_url":"https://api.github.com/repos/JabRef/jabref/milestones{/number}","notifications_url":"https://api.github.com/repos/JabRef/jabref/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JabRef/jabref/labels{/name}","releases_url":"https://api.github.com/repos/JabRef/jabref/releases{/id}","deployments_url":"https://api.github.com/repos/JabRef/jabref/deployments","created_at":"2014-03-11T14:48:42Z","updated_at":"2018-05-25T09:12:56Z","pushed_at":"2018-05-25T10:18:09Z","git_url":"git://github.com/JabRef/jabref.git","ssh_url":"git@github.com:JabRef/jabref.git","clone_url":"https://github.com/JabRef/jabref.git","svn_url":"https://github.com/JabRef/jabref","homepage":"https://www.jabref.org","size":104990,"stargazers_count":922,"watchers_count":922,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":657,"mirror_url":null,"archived":false,"open_issues_count":195,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":657,"open_issues":195,"watchers":922,"default_branch":"master"}},"base":{"label":"JabRef:maintable-beta","ref":"maintable-beta","sha":"8cbe028ad8d7cf33e8f8b990a57a933d7a2bd875","user":{"login":"JabRef","id":3914421,"avatar_url":"https://avatars1.githubusercontent.com/u/3914421?v=4","gravatar_id":"","url":"https://api.github.com/users/JabRef","html_url":"https://github.com/JabRef","followers_url":"https://api.github.com/users/JabRef/followers","following_url":"https://api.github.com/users/JabRef/following{/other_user}","gists_url":"https://api.github.com/users/JabRef/gists{/gist_id}","starred_url":"https://api.github.com/users/JabRef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JabRef/subscriptions","organizations_url":"https://api.github.com/users/JabRef/orgs","repos_url":"https://api.github.com/users/JabRef/repos","events_url":"https://api.github.com/users/JabRef/events{/privacy}","received_events_url":"https://api.github.com/users/JabRef/received_events","type":"Organization","site_admin":false},"repo":{"id":17634071,"name":"jabref","full_name":"JabRef/jabref","owner":{"login":"JabRef","id":3914421,"avatar_url":"https://avatars1.githubusercontent.com/u/3914421?v=4","gravatar_id":"","url":"https://api.github.com/users/JabRef","html_url":"https://github.com/JabRef","followers_url":"https://api.github.com/users/JabRef/followers","following_url":"https://api.github.com/users/JabRef/following{/other_user}","gists_url":"https://api.github.com/users/JabRef/gists{/gist_id}","starred_url":"https://api.github.com/users/JabRef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JabRef/subscriptions","organizations_url":"https://api.github.com/users/JabRef/orgs","repos_url":"https://api.github.com/users/JabRef/repos","events_url":"https://api.github.com/users/JabRef/events{/privacy}","received_events_url":"https://api.github.com/users/JabRef/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JabRef/jabref","description":"Graphical Java application for managing BibTeX and biblatex (.bib) databases","fork":false,"url":"https://api.github.com/repos/JabRef/jabref","forks_url":"https://api.github.com/repos/JabRef/jabref/forks","keys_url":"https://api.github.com/repos/JabRef/jabref/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JabRef/jabref/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JabRef/jabref/teams","hooks_url":"https://api.github.com/repos/JabRef/jabref/hooks","issue_events_url":"https://api.github.com/repos/JabRef/jabref/issues/events{/number}","events_url":"https://api.github.com/repos/JabRef/jabref/events","assignees_url":"https://api.github.com/repos/JabRef/jabref/assignees{/user}","branches_url":"https://api.github.com/repos/JabRef/jabref/branches{/branch}","tags_url":"https://api.github.com/repos/JabRef/jabref/tags","blobs_url":"https://api.github.com/repos/JabRef/jabref/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JabRef/jabref/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JabRef/jabref/git/refs{/sha}","trees_url":"https://api.github.com/repos/JabRef/jabref/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JabRef/jabref/statuses/{sha}","languages_url":"https://api.github.com/repos/JabRef/jabref/languages","stargazers_url":"https://api.github.com/repos/JabRef/jabref/stargazers","contributors_url":"https://api.github.com/repos/JabRef/jabref/contributors","subscribers_url":"https://api.github.com/repos/JabRef/jabref/subscribers","subscription_url":"https://api.github.com/repos/JabRef/jabref/subscription","commits_url":"https://api.github.com/repos/JabRef/jabref/commits{/sha}","git_commits_url":"https://api.github.com/repos/JabRef/jabref/git/commits{/sha}","comments_url":"https://api.github.com/repos/JabRef/jabref/comments{/number}","issue_comment_url":"https://api.github.com/repos/JabRef/jabref/issues/comments{/number}","contents_url":"https://api.github.com/repos/JabRef/jabref/contents/{+path}","compare_url":"https://api.github.com/repos/JabRef/jabref/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JabRef/jabref/merges","archive_url":"https://api.github.com/repos/JabRef/jabref/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JabRef/jabref/downloads","issues_url":"https://api.github.com/repos/JabRef/jabref/issues{/number}","pulls_url":"https://api.github.com/repos/JabRef/jabref/pulls{/number}","milestones_url":"https://api.github.com/repos/JabRef/jabref/milestones{/number}","notifications_url":"https://api.github.com/repos/JabRef/jabref/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JabRef/jabref/labels{/name}","releases_url":"https://api.github.com/repos/JabRef/jabref/releases{/id}","deployments_url":"https://api.github.com/repos/JabRef/jabref/deployments","created_at":"2014-03-11T14:48:42Z","updated_at":"2018-05-25T09:12:56Z","pushed_at":"2018-05-25T10:18:09Z","git_url":"git://github.com/JabRef/jabref.git","ssh_url":"git@github.com:JabRef/jabref.git","clone_url":"https://github.com/JabRef/jabref.git","svn_url":"https://github.com/JabRef/jabref","homepage":"https://www.jabref.org","size":104990,"stargazers_count":922,"watchers_count":922,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":657,"mirror_url":null,"archived":false,"open_issues_count":195,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":657,"open_issues":195,"watchers":922,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JabRef/jabref/pulls/4040"},"html":{"href":"https://github.com/JabRef/jabref/pull/4040"},"issue":{"href":"https://api.github.com/repos/JabRef/jabref/issues/4040"},"comments":{"href":"https://api.github.com/repos/JabRef/jabref/issues/4040/comments"},"review_comments":{"href":"https://api.github.com/repos/JabRef/jabref/pulls/4040/comments"},"review_comment":{"href":"https://api.github.com/repos/JabRef/jabref/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JabRef/jabref/pulls/4040/commits"},"statuses":{"href":"https://api.github.com/repos/JabRef/jabref/statuses/e228e65cbe9c148f68057f4234fcff49fd2429ae"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tobiasdiez"}}