{"action":"created","comment":{"url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/pulls/comments/59114442","id":59114442,"diff_hunk":"@@ -104,6 +90,17 @@ private static boolean isSameName(String className) {\n     return LOMBOK_VAL_SHORT_NAME.equals(className) || LOMBOK_VAL_FQN.equals(className);\n   }\n \n+  public Boolean hasModifierProperty(@NotNull PsiModifierList modifierList, @NotNull String name) {\n+    final PsiElement parent = modifierList.getParent();\n+\n+    //Only apply final modifier to val local variables\n+    if (parent instanceof PsiLocalVariable && isVal((PsiLocalVariable) parent)) {\n+      return PsiModifier.FINAL.equals(name) ? Boolean.TRUE : null;","path":"src/main/java/de/plushnikov/intellij/plugin/processor/ValProcessor.java","position":50,"original_position":50,"commit_id":"e422a9a1ed7727d7f10b548df7ced9dc20b6b8ef","original_commit_id":"e422a9a1ed7727d7f10b548df7ced9dc20b6b8ef","user":{"login":"mplushnikov","id":1204509,"avatar_url":"https://avatars.githubusercontent.com/u/1204509?v=3","gravatar_id":"","url":"https://api.github.com/users/mplushnikov","html_url":"https://github.com/mplushnikov","followers_url":"https://api.github.com/users/mplushnikov/followers","following_url":"https://api.github.com/users/mplushnikov/following{/other_user}","gists_url":"https://api.github.com/users/mplushnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/mplushnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mplushnikov/subscriptions","organizations_url":"https://api.github.com/users/mplushnikov/orgs","repos_url":"https://api.github.com/users/mplushnikov/repos","events_url":"https://api.github.com/users/mplushnikov/events{/privacy}","received_events_url":"https://api.github.com/users/mplushnikov/received_events","type":"User","site_admin":false},"body":"It could be better to check for PsiModifier.FINAL.equals(name) first, before checking for instanceof and isVal","created_at":"2016-04-09T12:18:39Z","updated_at":"2016-04-09T12:18:39Z","html_url":"https://github.com/mplushnikov/lombok-intellij-plugin/pull/203#discussion_r59114442","pull_request_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/pulls/203","_links":{"self":{"href":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/pulls/comments/59114442"},"html":{"href":"https://github.com/mplushnikov/lombok-intellij-plugin/pull/203#discussion_r59114442"},"pull_request":{"href":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/pulls/203"}}},"pull_request":{"url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/pulls/203","id":65879299,"html_url":"https://github.com/mplushnikov/lombok-intellij-plugin/pull/203","diff_url":"https://github.com/mplushnikov/lombok-intellij-plugin/pull/203.diff","patch_url":"https://github.com/mplushnikov/lombok-intellij-plugin/pull/203.patch","issue_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/issues/203","number":203,"state":"open","locked":false,"title":"Support for val final modifier","user":{"login":"AlexejK","id":104794,"avatar_url":"https://avatars.githubusercontent.com/u/104794?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexejK","html_url":"https://github.com/AlexejK","followers_url":"https://api.github.com/users/AlexejK/followers","following_url":"https://api.github.com/users/AlexejK/following{/other_user}","gists_url":"https://api.github.com/users/AlexejK/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexejK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexejK/subscriptions","organizations_url":"https://api.github.com/users/AlexejK/orgs","repos_url":"https://api.github.com/users/AlexejK/repos","events_url":"https://api.github.com/users/AlexejK/events{/privacy}","received_events_url":"https://api.github.com/users/AlexejK/received_events","type":"User","site_admin":false},"body":"Fixes #158 \r\n\r\nBased on latest IDEA Trunk snapshot, the desired functionality is in place and allows `val` to be seen as final.\r\n\r\nThis PR does not cover `@Value` and similar issues, but is purely focused on `val`. For other issues I believe a small structural change might be needed.\r\n\r\nPS: I've also updated the build files a bit to make it more flexible and also test against bleeding edge versions to spot possible failures.","created_at":"2016-04-09T12:06:16Z","updated_at":"2016-04-09T12:18:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"10a8158347bcd57956e75c02e86855aa25430e50","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/pulls/203/commits","review_comments_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/pulls/203/comments","review_comment_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/issues/203/comments","statuses_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/statuses/e422a9a1ed7727d7f10b548df7ced9dc20b6b8ef","head":{"label":"AlexejK:val-final","ref":"val-final","sha":"e422a9a1ed7727d7f10b548df7ced9dc20b6b8ef","user":{"login":"AlexejK","id":104794,"avatar_url":"https://avatars.githubusercontent.com/u/104794?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexejK","html_url":"https://github.com/AlexejK","followers_url":"https://api.github.com/users/AlexejK/followers","following_url":"https://api.github.com/users/AlexejK/following{/other_user}","gists_url":"https://api.github.com/users/AlexejK/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexejK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexejK/subscriptions","organizations_url":"https://api.github.com/users/AlexejK/orgs","repos_url":"https://api.github.com/users/AlexejK/repos","events_url":"https://api.github.com/users/AlexejK/events{/privacy}","received_events_url":"https://api.github.com/users/AlexejK/received_events","type":"User","site_admin":false},"repo":{"id":55772004,"name":"lombok-intellij-plugin","full_name":"AlexejK/lombok-intellij-plugin","owner":{"login":"AlexejK","id":104794,"avatar_url":"https://avatars.githubusercontent.com/u/104794?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexejK","html_url":"https://github.com/AlexejK","followers_url":"https://api.github.com/users/AlexejK/followers","following_url":"https://api.github.com/users/AlexejK/following{/other_user}","gists_url":"https://api.github.com/users/AlexejK/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexejK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexejK/subscriptions","organizations_url":"https://api.github.com/users/AlexejK/orgs","repos_url":"https://api.github.com/users/AlexejK/repos","events_url":"https://api.github.com/users/AlexejK/events{/privacy}","received_events_url":"https://api.github.com/users/AlexejK/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AlexejK/lombok-intellij-plugin","description":"Lombok Plugin for IntelliJ IDEA","fork":true,"url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin","forks_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/forks","keys_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/teams","hooks_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/hooks","issue_events_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/events","assignees_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/tags","blobs_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/languages","stargazers_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/stargazers","contributors_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/contributors","subscribers_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/subscribers","subscription_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/subscription","commits_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/merges","archive_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/downloads","issues_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/labels{/name}","releases_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/AlexejK/lombok-intellij-plugin/deployments","created_at":"2016-04-08T10:50:03Z","updated_at":"2016-04-08T10:50:05Z","pushed_at":"2016-04-09T12:05:34Z","git_url":"git://github.com/AlexejK/lombok-intellij-plugin.git","ssh_url":"git@github.com:AlexejK/lombok-intellij-plugin.git","clone_url":"https://github.com/AlexejK/lombok-intellij-plugin.git","svn_url":"https://github.com/AlexejK/lombok-intellij-plugin","homepage":null,"size":7844,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"master"}},"base":{"label":"mplushnikov:master","ref":"master","sha":"3dfcd23f5a0adb5acca80fbc321ef73c0ea2f026","user":{"login":"mplushnikov","id":1204509,"avatar_url":"https://avatars.githubusercontent.com/u/1204509?v=3","gravatar_id":"","url":"https://api.github.com/users/mplushnikov","html_url":"https://github.com/mplushnikov","followers_url":"https://api.github.com/users/mplushnikov/followers","following_url":"https://api.github.com/users/mplushnikov/following{/other_user}","gists_url":"https://api.github.com/users/mplushnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/mplushnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mplushnikov/subscriptions","organizations_url":"https://api.github.com/users/mplushnikov/orgs","repos_url":"https://api.github.com/users/mplushnikov/repos","events_url":"https://api.github.com/users/mplushnikov/events{/privacy}","received_events_url":"https://api.github.com/users/mplushnikov/received_events","type":"User","site_admin":false},"repo":{"id":13455471,"name":"lombok-intellij-plugin","full_name":"mplushnikov/lombok-intellij-plugin","owner":{"login":"mplushnikov","id":1204509,"avatar_url":"https://avatars.githubusercontent.com/u/1204509?v=3","gravatar_id":"","url":"https://api.github.com/users/mplushnikov","html_url":"https://github.com/mplushnikov","followers_url":"https://api.github.com/users/mplushnikov/followers","following_url":"https://api.github.com/users/mplushnikov/following{/other_user}","gists_url":"https://api.github.com/users/mplushnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/mplushnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mplushnikov/subscriptions","organizations_url":"https://api.github.com/users/mplushnikov/orgs","repos_url":"https://api.github.com/users/mplushnikov/repos","events_url":"https://api.github.com/users/mplushnikov/events{/privacy}","received_events_url":"https://api.github.com/users/mplushnikov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mplushnikov/lombok-intellij-plugin","description":"Lombok Plugin for IntelliJ IDEA","fork":false,"url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin","forks_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/forks","keys_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/teams","hooks_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/hooks","issue_events_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/events","assignees_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/tags","blobs_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/languages","stargazers_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/stargazers","contributors_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/contributors","subscribers_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/subscribers","subscription_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/subscription","commits_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/merges","archive_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/downloads","issues_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/labels{/name}","releases_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/deployments","created_at":"2013-10-09T21:49:01Z","updated_at":"2016-04-09T06:52:17Z","pushed_at":"2016-04-09T12:06:18Z","git_url":"git://github.com/mplushnikov/lombok-intellij-plugin.git","ssh_url":"git@github.com:mplushnikov/lombok-intellij-plugin.git","clone_url":"https://github.com/mplushnikov/lombok-intellij-plugin.git","svn_url":"https://github.com/mplushnikov/lombok-intellij-plugin","homepage":null,"size":7894,"stargazers_count":335,"watchers_count":335,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":70,"mirror_url":null,"open_issues_count":34,"forks":70,"open_issues":34,"watchers":335,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/pulls/203"},"html":{"href":"https://github.com/mplushnikov/lombok-intellij-plugin/pull/203"},"issue":{"href":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/issues/203"},"comments":{"href":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/issues/203/comments"},"review_comments":{"href":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/pulls/203/comments"},"review_comment":{"href":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/pulls/203/commits"},"statuses":{"href":"https://api.github.com/repos/mplushnikov/lombok-intellij-plugin/statuses/e422a9a1ed7727d7f10b548df7ced9dc20b6b8ef"}}}}