{"action":"created","comment":{"url":"https://api.github.com/repos/NetLogo/NetLogo/pulls/comments/74860362","id":74860362,"diff_hunk":"@@ -470,4 +477,48 @@ class EditorArea(\n     }\n   }\n \n+  class LinePainter(private var component: JTextComponent) extends Highlighter.HighlightPainter with CaretListener {\n+\n+    private var lastView: Rectangle = new Rectangle(0, 0, 0, 0)\n+    private val color = new Color(255, 249, 228, 100)\n+    component.addCaretListener(this)\n+    try {\n+      component.getHighlighter.addHighlight(0, 0, this)\n+    } catch {\n+      case ble: BadLocationException =>\n+    }\n+\n+    def paint(g: Graphics,\n+              p0: Int,\n+              p1: Int,\n+              bounds: Shape,\n+              c: JTextComponent) {\n+      try {\n+        val r = c.modelToView(c.getCaretPosition)\n+        g.setColor(color)\n+        g.fillRect(0, r.y, c.getWidth, r.height)\n+        if (lastView == null) lastView = r\n+      } catch {\n+        case ble: BadLocationException => println(ble)","path":"netlogo-gui/src/main/editor/EditorArea.scala","position":64,"original_position":64,"commit_id":"ca9fe46aa31c03ae75367429f95a01bfb9bb01c6","original_commit_id":"ca9fe46aa31c03ae75367429f95a01bfb9bb01c6","user":{"login":"mrerrormessage","id":143198,"avatar_url":"https://avatars.githubusercontent.com/u/143198?v=3","gravatar_id":"","url":"https://api.github.com/users/mrerrormessage","html_url":"https://github.com/mrerrormessage","followers_url":"https://api.github.com/users/mrerrormessage/followers","following_url":"https://api.github.com/users/mrerrormessage/following{/other_user}","gists_url":"https://api.github.com/users/mrerrormessage/gists{/gist_id}","starred_url":"https://api.github.com/users/mrerrormessage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrerrormessage/subscriptions","organizations_url":"https://api.github.com/users/mrerrormessage/orgs","repos_url":"https://api.github.com/users/mrerrormessage/repos","events_url":"https://api.github.com/users/mrerrormessage/events{/privacy}","received_events_url":"https://api.github.com/users/mrerrormessage/received_events","type":"User","site_admin":false},"body":"Catching exceptions is good, but let's print this to `stderr` instead of `stdout`. Also, let's provide a little more context.","created_at":"2016-08-16T00:36:27Z","updated_at":"2016-08-16T00:36:27Z","html_url":"https://github.com/NetLogo/NetLogo/pull/1133#discussion_r74860362","pull_request_url":"https://api.github.com/repos/NetLogo/NetLogo/pulls/1133","_links":{"self":{"href":"https://api.github.com/repos/NetLogo/NetLogo/pulls/comments/74860362"},"html":{"href":"https://github.com/NetLogo/NetLogo/pull/1133#discussion_r74860362"},"pull_request":{"href":"https://api.github.com/repos/NetLogo/NetLogo/pulls/1133"}}},"pull_request":{"url":"https://api.github.com/repos/NetLogo/NetLogo/pulls/1133","id":81386136,"html_url":"https://github.com/NetLogo/NetLogo/pull/1133","diff_url":"https://github.com/NetLogo/NetLogo/pull/1133.diff","patch_url":"https://github.com/NetLogo/NetLogo/pull/1133.patch","issue_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/1133","number":1133,"state":"open","locked":false,"title":"Added highlighting for the current line","user":{"login":"Akarshit","id":7762605,"avatar_url":"https://avatars.githubusercontent.com/u/7762605?v=3","gravatar_id":"","url":"https://api.github.com/users/Akarshit","html_url":"https://github.com/Akarshit","followers_url":"https://api.github.com/users/Akarshit/followers","following_url":"https://api.github.com/users/Akarshit/following{/other_user}","gists_url":"https://api.github.com/users/Akarshit/gists{/gist_id}","starred_url":"https://api.github.com/users/Akarshit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Akarshit/subscriptions","organizations_url":"https://api.github.com/users/Akarshit/orgs","repos_url":"https://api.github.com/users/Akarshit/repos","events_url":"https://api.github.com/users/Akarshit/events{/privacy}","received_events_url":"https://api.github.com/users/Akarshit/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-15T22:25:29Z","updated_at":"2016-08-16T00:36:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41ed9b8508a959058849eec4ee0e18fe7ca1b563","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/NetLogo/NetLogo/pulls/1133/commits","review_comments_url":"https://api.github.com/repos/NetLogo/NetLogo/pulls/1133/comments","review_comment_url":"https://api.github.com/repos/NetLogo/NetLogo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/1133/comments","statuses_url":"https://api.github.com/repos/NetLogo/NetLogo/statuses/ca9fe46aa31c03ae75367429f95a01bfb9bb01c6","head":{"label":"Akarshit:enhan-highlightLine","ref":"enhan-highlightLine","sha":"ca9fe46aa31c03ae75367429f95a01bfb9bb01c6","user":{"login":"Akarshit","id":7762605,"avatar_url":"https://avatars.githubusercontent.com/u/7762605?v=3","gravatar_id":"","url":"https://api.github.com/users/Akarshit","html_url":"https://github.com/Akarshit","followers_url":"https://api.github.com/users/Akarshit/followers","following_url":"https://api.github.com/users/Akarshit/following{/other_user}","gists_url":"https://api.github.com/users/Akarshit/gists{/gist_id}","starred_url":"https://api.github.com/users/Akarshit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Akarshit/subscriptions","organizations_url":"https://api.github.com/users/Akarshit/orgs","repos_url":"https://api.github.com/users/Akarshit/repos","events_url":"https://api.github.com/users/Akarshit/events{/privacy}","received_events_url":"https://api.github.com/users/Akarshit/received_events","type":"User","site_admin":false},"repo":{"id":52901963,"name":"NetLogo","full_name":"Akarshit/NetLogo","owner":{"login":"Akarshit","id":7762605,"avatar_url":"https://avatars.githubusercontent.com/u/7762605?v=3","gravatar_id":"","url":"https://api.github.com/users/Akarshit","html_url":"https://github.com/Akarshit","followers_url":"https://api.github.com/users/Akarshit/followers","following_url":"https://api.github.com/users/Akarshit/following{/other_user}","gists_url":"https://api.github.com/users/Akarshit/gists{/gist_id}","starred_url":"https://api.github.com/users/Akarshit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Akarshit/subscriptions","organizations_url":"https://api.github.com/users/Akarshit/orgs","repos_url":"https://api.github.com/users/Akarshit/repos","events_url":"https://api.github.com/users/Akarshit/events{/privacy}","received_events_url":"https://api.github.com/users/Akarshit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Akarshit/NetLogo","description":"turtles, patches, and links for kids, teachers, and scientists","fork":true,"url":"https://api.github.com/repos/Akarshit/NetLogo","forks_url":"https://api.github.com/repos/Akarshit/NetLogo/forks","keys_url":"https://api.github.com/repos/Akarshit/NetLogo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Akarshit/NetLogo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Akarshit/NetLogo/teams","hooks_url":"https://api.github.com/repos/Akarshit/NetLogo/hooks","issue_events_url":"https://api.github.com/repos/Akarshit/NetLogo/issues/events{/number}","events_url":"https://api.github.com/repos/Akarshit/NetLogo/events","assignees_url":"https://api.github.com/repos/Akarshit/NetLogo/assignees{/user}","branches_url":"https://api.github.com/repos/Akarshit/NetLogo/branches{/branch}","tags_url":"https://api.github.com/repos/Akarshit/NetLogo/tags","blobs_url":"https://api.github.com/repos/Akarshit/NetLogo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Akarshit/NetLogo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Akarshit/NetLogo/git/refs{/sha}","trees_url":"https://api.github.com/repos/Akarshit/NetLogo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Akarshit/NetLogo/statuses/{sha}","languages_url":"https://api.github.com/repos/Akarshit/NetLogo/languages","stargazers_url":"https://api.github.com/repos/Akarshit/NetLogo/stargazers","contributors_url":"https://api.github.com/repos/Akarshit/NetLogo/contributors","subscribers_url":"https://api.github.com/repos/Akarshit/NetLogo/subscribers","subscription_url":"https://api.github.com/repos/Akarshit/NetLogo/subscription","commits_url":"https://api.github.com/repos/Akarshit/NetLogo/commits{/sha}","git_commits_url":"https://api.github.com/repos/Akarshit/NetLogo/git/commits{/sha}","comments_url":"https://api.github.com/repos/Akarshit/NetLogo/comments{/number}","issue_comment_url":"https://api.github.com/repos/Akarshit/NetLogo/issues/comments{/number}","contents_url":"https://api.github.com/repos/Akarshit/NetLogo/contents/{+path}","compare_url":"https://api.github.com/repos/Akarshit/NetLogo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Akarshit/NetLogo/merges","archive_url":"https://api.github.com/repos/Akarshit/NetLogo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Akarshit/NetLogo/downloads","issues_url":"https://api.github.com/repos/Akarshit/NetLogo/issues{/number}","pulls_url":"https://api.github.com/repos/Akarshit/NetLogo/pulls{/number}","milestones_url":"https://api.github.com/repos/Akarshit/NetLogo/milestones{/number}","notifications_url":"https://api.github.com/repos/Akarshit/NetLogo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Akarshit/NetLogo/labels{/name}","releases_url":"https://api.github.com/repos/Akarshit/NetLogo/releases{/id}","deployments_url":"https://api.github.com/repos/Akarshit/NetLogo/deployments","created_at":"2016-03-01T19:02:04Z","updated_at":"2016-03-01T19:02:08Z","pushed_at":"2016-08-15T22:18:47Z","git_url":"git://github.com/Akarshit/NetLogo.git","ssh_url":"git@github.com:Akarshit/NetLogo.git","clone_url":"https://github.com/Akarshit/NetLogo.git","svn_url":"https://github.com/Akarshit/NetLogo","homepage":"http://ccl.northwestern.edu/netlogo/","size":40580,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"5.x"}},"base":{"label":"NetLogo:hexy","ref":"hexy","sha":"34be5cc4f017b594b5472d9c1ea15182187486e1","user":{"login":"NetLogo","id":767367,"avatar_url":"https://avatars.githubusercontent.com/u/767367?v=3","gravatar_id":"","url":"https://api.github.com/users/NetLogo","html_url":"https://github.com/NetLogo","followers_url":"https://api.github.com/users/NetLogo/followers","following_url":"https://api.github.com/users/NetLogo/following{/other_user}","gists_url":"https://api.github.com/users/NetLogo/gists{/gist_id}","starred_url":"https://api.github.com/users/NetLogo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NetLogo/subscriptions","organizations_url":"https://api.github.com/users/NetLogo/orgs","repos_url":"https://api.github.com/users/NetLogo/repos","events_url":"https://api.github.com/users/NetLogo/events{/privacy}","received_events_url":"https://api.github.com/users/NetLogo/received_events","type":"Organization","site_admin":false},"repo":{"id":2594187,"name":"NetLogo","full_name":"NetLogo/NetLogo","owner":{"login":"NetLogo","id":767367,"avatar_url":"https://avatars.githubusercontent.com/u/767367?v=3","gravatar_id":"","url":"https://api.github.com/users/NetLogo","html_url":"https://github.com/NetLogo","followers_url":"https://api.github.com/users/NetLogo/followers","following_url":"https://api.github.com/users/NetLogo/following{/other_user}","gists_url":"https://api.github.com/users/NetLogo/gists{/gist_id}","starred_url":"https://api.github.com/users/NetLogo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NetLogo/subscriptions","organizations_url":"https://api.github.com/users/NetLogo/orgs","repos_url":"https://api.github.com/users/NetLogo/repos","events_url":"https://api.github.com/users/NetLogo/events{/privacy}","received_events_url":"https://api.github.com/users/NetLogo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NetLogo/NetLogo","description":"turtles, patches, and links for kids, teachers, and scientists (current version: https://github.com/NetLogo/NetLogo/tree/5.x)","fork":false,"url":"https://api.github.com/repos/NetLogo/NetLogo","forks_url":"https://api.github.com/repos/NetLogo/NetLogo/forks","keys_url":"https://api.github.com/repos/NetLogo/NetLogo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NetLogo/NetLogo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NetLogo/NetLogo/teams","hooks_url":"https://api.github.com/repos/NetLogo/NetLogo/hooks","issue_events_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/events{/number}","events_url":"https://api.github.com/repos/NetLogo/NetLogo/events","assignees_url":"https://api.github.com/repos/NetLogo/NetLogo/assignees{/user}","branches_url":"https://api.github.com/repos/NetLogo/NetLogo/branches{/branch}","tags_url":"https://api.github.com/repos/NetLogo/NetLogo/tags","blobs_url":"https://api.github.com/repos/NetLogo/NetLogo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NetLogo/NetLogo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NetLogo/NetLogo/git/refs{/sha}","trees_url":"https://api.github.com/repos/NetLogo/NetLogo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NetLogo/NetLogo/statuses/{sha}","languages_url":"https://api.github.com/repos/NetLogo/NetLogo/languages","stargazers_url":"https://api.github.com/repos/NetLogo/NetLogo/stargazers","contributors_url":"https://api.github.com/repos/NetLogo/NetLogo/contributors","subscribers_url":"https://api.github.com/repos/NetLogo/NetLogo/subscribers","subscription_url":"https://api.github.com/repos/NetLogo/NetLogo/subscription","commits_url":"https://api.github.com/repos/NetLogo/NetLogo/commits{/sha}","git_commits_url":"https://api.github.com/repos/NetLogo/NetLogo/git/commits{/sha}","comments_url":"https://api.github.com/repos/NetLogo/NetLogo/comments{/number}","issue_comment_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/comments{/number}","contents_url":"https://api.github.com/repos/NetLogo/NetLogo/contents/{+path}","compare_url":"https://api.github.com/repos/NetLogo/NetLogo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NetLogo/NetLogo/merges","archive_url":"https://api.github.com/repos/NetLogo/NetLogo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NetLogo/NetLogo/downloads","issues_url":"https://api.github.com/repos/NetLogo/NetLogo/issues{/number}","pulls_url":"https://api.github.com/repos/NetLogo/NetLogo/pulls{/number}","milestones_url":"https://api.github.com/repos/NetLogo/NetLogo/milestones{/number}","notifications_url":"https://api.github.com/repos/NetLogo/NetLogo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NetLogo/NetLogo/labels{/name}","releases_url":"https://api.github.com/repos/NetLogo/NetLogo/releases{/id}","deployments_url":"https://api.github.com/repos/NetLogo/NetLogo/deployments","created_at":"2011-10-17T19:20:01Z","updated_at":"2016-08-14T16:20:04Z","pushed_at":"2016-08-16T00:01:44Z","git_url":"git://github.com/NetLogo/NetLogo.git","ssh_url":"git@github.com:NetLogo/NetLogo.git","clone_url":"https://github.com/NetLogo/NetLogo.git","svn_url":"https://github.com/NetLogo/NetLogo","homepage":"http://ccl.northwestern.edu/netlogo/","size":52125,"stargazers_count":317,"watchers_count":317,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":93,"mirror_url":null,"open_issues_count":279,"forks":93,"open_issues":279,"watchers":317,"default_branch":"hexy"}},"_links":{"self":{"href":"https://api.github.com/repos/NetLogo/NetLogo/pulls/1133"},"html":{"href":"https://github.com/NetLogo/NetLogo/pull/1133"},"issue":{"href":"https://api.github.com/repos/NetLogo/NetLogo/issues/1133"},"comments":{"href":"https://api.github.com/repos/NetLogo/NetLogo/issues/1133/comments"},"review_comments":{"href":"https://api.github.com/repos/NetLogo/NetLogo/pulls/1133/comments"},"review_comment":{"href":"https://api.github.com/repos/NetLogo/NetLogo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NetLogo/NetLogo/pulls/1133/commits"},"statuses":{"href":"https://api.github.com/repos/NetLogo/NetLogo/statuses/ca9fe46aa31c03ae75367429f95a01bfb9bb01c6"}}}}
{"actor":{"display_login":"mrerrormessage"}}