{"action":"created","comment":{"url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/pulls/comments/85365222","pull_request_review_id":6086408,"id":85365222,"diff_hunk":"@@ -71,4 +72,47 @@ public static void updateAllSonarMarkerSeverity() throws CoreException {\n     }\n   }\n \n+  public static FlatTextRange toFlatTextRange(final IDocument document, TextRange textRange) {\n+    if (textRange == null || textRange.getStartLine() == null) {\n+      return null;\n+    }\n+    if (textRange.getStartLineOffset() == null) {\n+      return toFlatTextRange(document, textRange.getStartLine());\n+    }\n+    return toFlatTextRange(document, textRange.getStartLine(), textRange.getStartLineOffset(), textRange.getEndLine(), textRange.getEndLineOffset());\n+  }\n+\n+  public static FlatTextRange toFlatTextRange(final IDocument document, int startLine) {\n+    int startLineStartOffset;\n+    int length;\n+    String lineDelimiter;\n+    try {\n+      startLineStartOffset = document.getLineOffset(startLine - 1);\n+      length = document.getLineLength(startLine - 1);\n+      lineDelimiter = document.getLineDelimiter(startLine - 1);\n+    } catch (BadLocationException e) {","path":"org.sonarlint.eclipse.core/src/org/sonarlint/eclipse/core/internal/markers/MarkerUtils.java","position":39,"original_position":39,"commit_id":"59d85af876d350902a10db684bc53c53b1893867","original_commit_id":"59d85af876d350902a10db684bc53c53b1893867","user":{"login":"SonarTech","id":1842438,"avatar_url":"https://avatars.githubusercontent.com/u/1842438?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarTech","html_url":"https://github.com/SonarTech","followers_url":"https://api.github.com/users/SonarTech/followers","following_url":"https://api.github.com/users/SonarTech/following{/other_user}","gists_url":"https://api.github.com/users/SonarTech/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarTech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarTech/subscriptions","organizations_url":"https://api.github.com/users/SonarTech/orgs","repos_url":"https://api.github.com/users/SonarTech/repos","events_url":"https://api.github.com/users/SonarTech/events{/privacy}","received_events_url":"https://api.github.com/users/SonarTech/received_events","type":"User","site_admin":false},"body":"![MAJOR](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/severity-major.png) Either log or rethrow this exception. [![rule](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/rule.png)](https://dory.sonarsource.com/sonarqube/coding_rules#rule_key=squid%3AS1166)\n","created_at":"2016-10-27T15:40:06Z","updated_at":"2016-10-27T15:40:07Z","html_url":"https://github.com/SonarSource/sonarlint-eclipse/pull/41#discussion_r85365222","pull_request_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/pulls/comments/85365222"},"html":{"href":"https://github.com/SonarSource/sonarlint-eclipse/pull/41#discussion_r85365222"},"pull_request":{"href":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/pulls/41","id":91225254,"html_url":"https://github.com/SonarSource/sonarlint-eclipse/pull/41","diff_url":"https://github.com/SonarSource/sonarlint-eclipse/pull/41.diff","patch_url":"https://github.com/SonarSource/sonarlint-eclipse/pull/41.patch","issue_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/issues/41","number":41,"state":"open","locked":false,"title":"Fixes for issue tracking display and tests","user":{"login":"janos-ss","id":21700885,"avatar_url":"https://avatars.githubusercontent.com/u/21700885?v=3","gravatar_id":"","url":"https://api.github.com/users/janos-ss","html_url":"https://github.com/janos-ss","followers_url":"https://api.github.com/users/janos-ss/followers","following_url":"https://api.github.com/users/janos-ss/following{/other_user}","gists_url":"https://api.github.com/users/janos-ss/gists{/gist_id}","starred_url":"https://api.github.com/users/janos-ss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janos-ss/subscriptions","organizations_url":"https://api.github.com/users/janos-ss/orgs","repos_url":"https://api.github.com/users/janos-ss/repos","events_url":"https://api.github.com/users/janos-ss/events{/privacy}","received_events_url":"https://api.github.com/users/janos-ss/received_events","type":"User","site_admin":false},"body":"Note: the PR target is not `master`, but `feature/issue-tracking`.\r\n\r\nWhat should work:\r\n\r\n- Issue tracking in standalone or connected mode, except matching by checksum (text range hash and line hash are broken at the moment)\r\n- Hide resolved issues\r\n- Fix marker severity display in issues view\r\n- Fix marker display in editor view\r\n- Tests (travis) should pass\r\n\r\nRegressions (prevent merging to `master`):\r\n\r\n- Trigger analysis only on file open and on explicit command (currently Save triggers it too)\r\n- Fix matching by text-range-hash (see `AnalyzeProjectJob.computeChecksum` for a hint)\r\n- Make `IssueTrackerCache` persistent, initialized at startup\r\n\r\nOther TODO:\r\n\r\n- Improve the initialization of the per-project `IssueTracker` instances: should happen on project import / open event\r\n- Implement matching by line hash using MD5 as on the server (is the md5 implementation osgi-ready?)\r\n- Confirm correct resolution of module key and file path in nested maven project\r\n- Download and store server issues on binding\r\n- Unit tests\r\n- Other smelly stuff (for example, `Logger` and `Console` in `org.sonarlint.eclipse.core.internal.tracking` package)","created_at":"2016-10-27T15:32:34Z","updated_at":"2016-10-27T15:40:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"65919e7edf10f535fc6ad40e512df4c444522b34","assignee":{"login":"dbmeneses","id":12492673,"avatar_url":"https://avatars.githubusercontent.com/u/12492673?v=3","gravatar_id":"","url":"https://api.github.com/users/dbmeneses","html_url":"https://github.com/dbmeneses","followers_url":"https://api.github.com/users/dbmeneses/followers","following_url":"https://api.github.com/users/dbmeneses/following{/other_user}","gists_url":"https://api.github.com/users/dbmeneses/gists{/gist_id}","starred_url":"https://api.github.com/users/dbmeneses/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbmeneses/subscriptions","organizations_url":"https://api.github.com/users/dbmeneses/orgs","repos_url":"https://api.github.com/users/dbmeneses/repos","events_url":"https://api.github.com/users/dbmeneses/events{/privacy}","received_events_url":"https://api.github.com/users/dbmeneses/received_events","type":"User","site_admin":false},"assignees":[{"login":"dbmeneses","id":12492673,"avatar_url":"https://avatars.githubusercontent.com/u/12492673?v=3","gravatar_id":"","url":"https://api.github.com/users/dbmeneses","html_url":"https://github.com/dbmeneses","followers_url":"https://api.github.com/users/dbmeneses/followers","following_url":"https://api.github.com/users/dbmeneses/following{/other_user}","gists_url":"https://api.github.com/users/dbmeneses/gists{/gist_id}","starred_url":"https://api.github.com/users/dbmeneses/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbmeneses/subscriptions","organizations_url":"https://api.github.com/users/dbmeneses/orgs","repos_url":"https://api.github.com/users/dbmeneses/repos","events_url":"https://api.github.com/users/dbmeneses/events{/privacy}","received_events_url":"https://api.github.com/users/dbmeneses/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/pulls/41/commits","review_comments_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/pulls/41/comments","review_comment_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/issues/41/comments","statuses_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/statuses/59d85af876d350902a10db684bc53c53b1893867","head":{"label":"SonarSource:feature/issue-tracking-fixes","ref":"feature/issue-tracking-fixes","sha":"59d85af876d350902a10db684bc53c53b1893867","user":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"repo":{"id":1350022,"name":"sonarlint-eclipse","full_name":"SonarSource/sonarlint-eclipse","owner":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SonarSource/sonarlint-eclipse","description":null,"fork":false,"url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse","forks_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/forks","keys_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/events","assignees_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/merges","archive_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/releases{/id}","deployments_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/deployments","created_at":"2011-02-10T09:32:22Z","updated_at":"2016-10-26T07:20:07Z","pushed_at":"2016-10-27T15:32:34Z","git_url":"git://github.com/SonarSource/sonarlint-eclipse.git","ssh_url":"git@github.com:SonarSource/sonarlint-eclipse.git","clone_url":"https://github.com/SonarSource/sonarlint-eclipse.git","svn_url":"https://github.com/SonarSource/sonarlint-eclipse","homepage":"http://docs.sonarqube.org/display/SONAR/Installing+SonarQube+in+Eclipse","size":14111,"stargazers_count":88,"watchers_count":88,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":65,"mirror_url":null,"open_issues_count":1,"forks":65,"open_issues":1,"watchers":88,"default_branch":"master"}},"base":{"label":"SonarSource:feature/issue-tracking","ref":"feature/issue-tracking","sha":"3692560f367efbece1ea1b70cd93d5b41276ce1b","user":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"repo":{"id":1350022,"name":"sonarlint-eclipse","full_name":"SonarSource/sonarlint-eclipse","owner":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SonarSource/sonarlint-eclipse","description":null,"fork":false,"url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse","forks_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/forks","keys_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/events","assignees_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/merges","archive_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/releases{/id}","deployments_url":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/deployments","created_at":"2011-02-10T09:32:22Z","updated_at":"2016-10-26T07:20:07Z","pushed_at":"2016-10-27T15:32:34Z","git_url":"git://github.com/SonarSource/sonarlint-eclipse.git","ssh_url":"git@github.com:SonarSource/sonarlint-eclipse.git","clone_url":"https://github.com/SonarSource/sonarlint-eclipse.git","svn_url":"https://github.com/SonarSource/sonarlint-eclipse","homepage":"http://docs.sonarqube.org/display/SONAR/Installing+SonarQube+in+Eclipse","size":14111,"stargazers_count":88,"watchers_count":88,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":65,"mirror_url":null,"open_issues_count":1,"forks":65,"open_issues":1,"watchers":88,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/pulls/41"},"html":{"href":"https://github.com/SonarSource/sonarlint-eclipse/pull/41"},"issue":{"href":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/issues/41"},"comments":{"href":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/SonarSource/sonarlint-eclipse/statuses/59d85af876d350902a10db684bc53c53b1893867"}}}}
{"actor":{"display_login":"SonarTech"}}