{"action":"created","comment":{"url":"https://api.github.com/repos/TiVo/intellij-haxe/pulls/comments/31865457","id":31865457,"diff_hunk":"@@ -0,0 +1,302 @@\n+/*\n+ * Copyright 2000-2013 JetBrains s.r.o.\n+ * Copyright 2014-2015 AS3Boyan\n+ * Copyright 2014-2014 Elias Ku\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package com.intellij.plugins.haxe.ide.annotator;\n+\n+import com.intellij.codeInsight.intention.IntentionAction;\n+import com.intellij.lang.ASTNode;\n+import com.intellij.lang.annotation.Annotation;\n+import com.intellij.lang.annotation.AnnotationHolder;\n+import com.intellij.lang.annotation.Annotator;\n+import com.intellij.openapi.editor.Document;\n+import com.intellij.openapi.editor.Editor;\n+import com.intellij.openapi.module.Module;\n+import com.intellij.openapi.module.ModuleManager;\n+import com.intellij.openapi.project.Project;\n+import com.intellij.openapi.projectRoots.Sdk;\n+import com.intellij.openapi.roots.ModuleRootManager;\n+import com.intellij.openapi.roots.OrderRootType;\n+import com.intellij.openapi.roots.ProjectRootManager;\n+import com.intellij.openapi.util.Key;\n+import com.intellij.openapi.util.TextRange;\n+import com.intellij.openapi.vfs.VirtualFile;\n+import com.intellij.plugins.haxe.lang.lexer.HaxeTokenTypes;\n+import com.intellij.plugins.haxe.lang.psi.*;\n+import com.intellij.plugins.haxe.util.HaxeClassModel;\n+import com.intellij.plugins.haxe.util.HaxeMethodModel;\n+import com.intellij.plugins.haxe.util.HaxePsiUtils;\n+import com.intellij.plugins.haxe.util.HaxeResolveUtil;\n+import com.intellij.psi.*;\n+import com.intellij.psi.util.PsiTreeUtil;\n+import com.intellij.psi.util.PsiUtil;\n+import com.intellij.util.IncorrectOperationException;\n+import org.apache.commons.lang.StringUtils;\n+import org.jetbrains.annotations.Nls;\n+import org.jetbrains.annotations.NotNull;\n+\n+import java.util.ArrayList;\n+import java.util.Arrays;\n+import java.util.LinkedList;\n+import java.util.List;\n+\n+public class HaxeSemanticAnnotator implements Annotator {\n+\n+\n+  @Override\n+  public void annotate(PsiElement element, AnnotationHolder holder) {\n+    PsiFile file = element.getContainingFile();\n+    // Analyze upon file changes\n+    Long analyzedFileTime = file.getUserData(HaxeSemanticError.KEY_ANALYZED_METHOD_TIME);\n+    if (analyzedFileTime == null || analyzedFileTime != file.getModificationStamp()) {\n+      analyze(file);\n+      file.putUserData(HaxeSemanticError.KEY_ANALYZED_METHOD_TIME, file.getModificationStamp());\n+    }","path":"src/common/com/intellij/plugins/haxe/ide/annotator/HaxeSemanticAnnotator.java","position":null,"original_position":67,"commit_id":"c07fad2c95aef89733f156cd28993c05372ed6cb","original_commit_id":"0ce7d3aba581cda5b07b130355e42200da92b9a9","user":{"login":"soywiz","id":570848,"avatar_url":"https://avatars.githubusercontent.com/u/570848?v=3","gravatar_id":"","url":"https://api.github.com/users/soywiz","html_url":"https://github.com/soywiz","followers_url":"https://api.github.com/users/soywiz/followers","following_url":"https://api.github.com/users/soywiz/following{/other_user}","gists_url":"https://api.github.com/users/soywiz/gists{/gist_id}","starred_url":"https://api.github.com/users/soywiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soywiz/subscriptions","organizations_url":"https://api.github.com/users/soywiz/orgs","repos_url":"https://api.github.com/users/soywiz/repos","events_url":"https://api.github.com/users/soywiz/events{/privacy}","received_events_url":"https://api.github.com/users/soywiz/received_events","type":"User","site_admin":false},"body":"Not applying anymore. Also I moved in another commit. But in the last commit they don't exists anymore.","created_at":"2015-06-06T07:07:40Z","updated_at":"2015-06-06T07:07:40Z","html_url":"https://github.com/TiVo/intellij-haxe/pull/290#discussion_r31865457","pull_request_url":"https://api.github.com/repos/TiVo/intellij-haxe/pulls/290","_links":{"self":{"href":"https://api.github.com/repos/TiVo/intellij-haxe/pulls/comments/31865457"},"html":{"href":"https://github.com/TiVo/intellij-haxe/pull/290#discussion_r31865457"},"pull_request":{"href":"https://api.github.com/repos/TiVo/intellij-haxe/pulls/290"}}},"pull_request":{"url":"https://api.github.com/repos/TiVo/intellij-haxe/pulls/290","id":36879415,"html_url":"https://github.com/TiVo/intellij-haxe/pull/290","diff_url":"https://github.com/TiVo/intellij-haxe/pull/290.diff","patch_url":"https://github.com/TiVo/intellij-haxe/pull/290.patch","issue_url":"https://api.github.com/repos/TiVo/intellij-haxe/issues/290","number":290,"state":"open","locked":false,"title":"WIP detecting method return type from body","user":{"login":"soywiz","id":570848,"avatar_url":"https://avatars.githubusercontent.com/u/570848?v=3","gravatar_id":"","url":"https://api.github.com/users/soywiz","html_url":"https://github.com/soywiz","followers_url":"https://api.github.com/users/soywiz/followers","following_url":"https://api.github.com/users/soywiz/following{/other_user}","gists_url":"https://api.github.com/users/soywiz/gists{/gist_id}","starred_url":"https://api.github.com/users/soywiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soywiz/subscriptions","organizations_url":"https://api.github.com/users/soywiz/orgs","repos_url":"https://api.github.com/users/soywiz/repos","events_url":"https://api.github.com/users/soywiz/events{/privacy}","received_events_url":"https://api.github.com/users/soywiz/received_events","type":"User","site_admin":false},"body":"Ok. So this is a first try on #288.\r\n\r\nI'm still a noob on this codebase so probably, things are pretty bad done.","created_at":"2015-06-03T21:20:54Z","updated_at":"2015-06-06T07:07:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2a721592fb2d1ca9b19ba3529cf21879e7e0663e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TiVo/intellij-haxe/pulls/290/commits","review_comments_url":"https://api.github.com/repos/TiVo/intellij-haxe/pulls/290/comments","review_comment_url":"https://api.github.com/repos/TiVo/intellij-haxe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TiVo/intellij-haxe/issues/290/comments","statuses_url":"https://api.github.com/repos/TiVo/intellij-haxe/statuses/c07fad2c95aef89733f156cd28993c05372ed6cb","head":{"label":"soywiz:DetectFunctionBodyType","ref":"DetectFunctionBodyType","sha":"c07fad2c95aef89733f156cd28993c05372ed6cb","user":{"login":"soywiz","id":570848,"avatar_url":"https://avatars.githubusercontent.com/u/570848?v=3","gravatar_id":"","url":"https://api.github.com/users/soywiz","html_url":"https://github.com/soywiz","followers_url":"https://api.github.com/users/soywiz/followers","following_url":"https://api.github.com/users/soywiz/following{/other_user}","gists_url":"https://api.github.com/users/soywiz/gists{/gist_id}","starred_url":"https://api.github.com/users/soywiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soywiz/subscriptions","organizations_url":"https://api.github.com/users/soywiz/orgs","repos_url":"https://api.github.com/users/soywiz/repos","events_url":"https://api.github.com/users/soywiz/events{/privacy}","received_events_url":"https://api.github.com/users/soywiz/received_events","type":"User","site_admin":false},"repo":{"id":35885054,"name":"intellij-haxe","full_name":"soywiz/intellij-haxe","owner":{"login":"soywiz","id":570848,"avatar_url":"https://avatars.githubusercontent.com/u/570848?v=3","gravatar_id":"","url":"https://api.github.com/users/soywiz","html_url":"https://github.com/soywiz","followers_url":"https://api.github.com/users/soywiz/followers","following_url":"https://api.github.com/users/soywiz/following{/other_user}","gists_url":"https://api.github.com/users/soywiz/gists{/gist_id}","starred_url":"https://api.github.com/users/soywiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soywiz/subscriptions","organizations_url":"https://api.github.com/users/soywiz/orgs","repos_url":"https://api.github.com/users/soywiz/repos","events_url":"https://api.github.com/users/soywiz/events{/privacy}","received_events_url":"https://api.github.com/users/soywiz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/soywiz/intellij-haxe","description":"Haxe plugin for IntelliJ Platform based IDEs","fork":true,"url":"https://api.github.com/repos/soywiz/intellij-haxe","forks_url":"https://api.github.com/repos/soywiz/intellij-haxe/forks","keys_url":"https://api.github.com/repos/soywiz/intellij-haxe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/soywiz/intellij-haxe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/soywiz/intellij-haxe/teams","hooks_url":"https://api.github.com/repos/soywiz/intellij-haxe/hooks","issue_events_url":"https://api.github.com/repos/soywiz/intellij-haxe/issues/events{/number}","events_url":"https://api.github.com/repos/soywiz/intellij-haxe/events","assignees_url":"https://api.github.com/repos/soywiz/intellij-haxe/assignees{/user}","branches_url":"https://api.github.com/repos/soywiz/intellij-haxe/branches{/branch}","tags_url":"https://api.github.com/repos/soywiz/intellij-haxe/tags","blobs_url":"https://api.github.com/repos/soywiz/intellij-haxe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/soywiz/intellij-haxe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/soywiz/intellij-haxe/git/refs{/sha}","trees_url":"https://api.github.com/repos/soywiz/intellij-haxe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/soywiz/intellij-haxe/statuses/{sha}","languages_url":"https://api.github.com/repos/soywiz/intellij-haxe/languages","stargazers_url":"https://api.github.com/repos/soywiz/intellij-haxe/stargazers","contributors_url":"https://api.github.com/repos/soywiz/intellij-haxe/contributors","subscribers_url":"https://api.github.com/repos/soywiz/intellij-haxe/subscribers","subscription_url":"https://api.github.com/repos/soywiz/intellij-haxe/subscription","commits_url":"https://api.github.com/repos/soywiz/intellij-haxe/commits{/sha}","git_commits_url":"https://api.github.com/repos/soywiz/intellij-haxe/git/commits{/sha}","comments_url":"https://api.github.com/repos/soywiz/intellij-haxe/comments{/number}","issue_comment_url":"https://api.github.com/repos/soywiz/intellij-haxe/issues/comments{/number}","contents_url":"https://api.github.com/repos/soywiz/intellij-haxe/contents/{+path}","compare_url":"https://api.github.com/repos/soywiz/intellij-haxe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/soywiz/intellij-haxe/merges","archive_url":"https://api.github.com/repos/soywiz/intellij-haxe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/soywiz/intellij-haxe/downloads","issues_url":"https://api.github.com/repos/soywiz/intellij-haxe/issues{/number}","pulls_url":"https://api.github.com/repos/soywiz/intellij-haxe/pulls{/number}","milestones_url":"https://api.github.com/repos/soywiz/intellij-haxe/milestones{/number}","notifications_url":"https://api.github.com/repos/soywiz/intellij-haxe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/soywiz/intellij-haxe/labels{/name}","releases_url":"https://api.github.com/repos/soywiz/intellij-haxe/releases{/id}","created_at":"2015-05-19T13:51:35Z","updated_at":"2015-05-19T13:51:37Z","pushed_at":"2015-06-05T15:56:53Z","git_url":"git://github.com/soywiz/intellij-haxe.git","ssh_url":"git@github.com:soywiz/intellij-haxe.git","clone_url":"https://github.com/soywiz/intellij-haxe.git","svn_url":"https://github.com/soywiz/intellij-haxe","homepage":null,"size":28511,"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":"TiVo:master","ref":"master","sha":"8117bdc5757c0dada105e83e0322d142cba49a5b","user":{"login":"TiVo","id":4993382,"avatar_url":"https://avatars.githubusercontent.com/u/4993382?v=3","gravatar_id":"","url":"https://api.github.com/users/TiVo","html_url":"https://github.com/TiVo","followers_url":"https://api.github.com/users/TiVo/followers","following_url":"https://api.github.com/users/TiVo/following{/other_user}","gists_url":"https://api.github.com/users/TiVo/gists{/gist_id}","starred_url":"https://api.github.com/users/TiVo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TiVo/subscriptions","organizations_url":"https://api.github.com/users/TiVo/orgs","repos_url":"https://api.github.com/users/TiVo/repos","events_url":"https://api.github.com/users/TiVo/events{/privacy}","received_events_url":"https://api.github.com/users/TiVo/received_events","type":"Organization","site_admin":false},"repo":{"id":16564608,"name":"intellij-haxe","full_name":"TiVo/intellij-haxe","owner":{"login":"TiVo","id":4993382,"avatar_url":"https://avatars.githubusercontent.com/u/4993382?v=3","gravatar_id":"","url":"https://api.github.com/users/TiVo","html_url":"https://github.com/TiVo","followers_url":"https://api.github.com/users/TiVo/followers","following_url":"https://api.github.com/users/TiVo/following{/other_user}","gists_url":"https://api.github.com/users/TiVo/gists{/gist_id}","starred_url":"https://api.github.com/users/TiVo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TiVo/subscriptions","organizations_url":"https://api.github.com/users/TiVo/orgs","repos_url":"https://api.github.com/users/TiVo/repos","events_url":"https://api.github.com/users/TiVo/events{/privacy}","received_events_url":"https://api.github.com/users/TiVo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TiVo/intellij-haxe","description":"Haxe plugin for IntelliJ Platform based IDEs","fork":true,"url":"https://api.github.com/repos/TiVo/intellij-haxe","forks_url":"https://api.github.com/repos/TiVo/intellij-haxe/forks","keys_url":"https://api.github.com/repos/TiVo/intellij-haxe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TiVo/intellij-haxe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TiVo/intellij-haxe/teams","hooks_url":"https://api.github.com/repos/TiVo/intellij-haxe/hooks","issue_events_url":"https://api.github.com/repos/TiVo/intellij-haxe/issues/events{/number}","events_url":"https://api.github.com/repos/TiVo/intellij-haxe/events","assignees_url":"https://api.github.com/repos/TiVo/intellij-haxe/assignees{/user}","branches_url":"https://api.github.com/repos/TiVo/intellij-haxe/branches{/branch}","tags_url":"https://api.github.com/repos/TiVo/intellij-haxe/tags","blobs_url":"https://api.github.com/repos/TiVo/intellij-haxe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TiVo/intellij-haxe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TiVo/intellij-haxe/git/refs{/sha}","trees_url":"https://api.github.com/repos/TiVo/intellij-haxe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TiVo/intellij-haxe/statuses/{sha}","languages_url":"https://api.github.com/repos/TiVo/intellij-haxe/languages","stargazers_url":"https://api.github.com/repos/TiVo/intellij-haxe/stargazers","contributors_url":"https://api.github.com/repos/TiVo/intellij-haxe/contributors","subscribers_url":"https://api.github.com/repos/TiVo/intellij-haxe/subscribers","subscription_url":"https://api.github.com/repos/TiVo/intellij-haxe/subscription","commits_url":"https://api.github.com/repos/TiVo/intellij-haxe/commits{/sha}","git_commits_url":"https://api.github.com/repos/TiVo/intellij-haxe/git/commits{/sha}","comments_url":"https://api.github.com/repos/TiVo/intellij-haxe/comments{/number}","issue_comment_url":"https://api.github.com/repos/TiVo/intellij-haxe/issues/comments{/number}","contents_url":"https://api.github.com/repos/TiVo/intellij-haxe/contents/{+path}","compare_url":"https://api.github.com/repos/TiVo/intellij-haxe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TiVo/intellij-haxe/merges","archive_url":"https://api.github.com/repos/TiVo/intellij-haxe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TiVo/intellij-haxe/downloads","issues_url":"https://api.github.com/repos/TiVo/intellij-haxe/issues{/number}","pulls_url":"https://api.github.com/repos/TiVo/intellij-haxe/pulls{/number}","milestones_url":"https://api.github.com/repos/TiVo/intellij-haxe/milestones{/number}","notifications_url":"https://api.github.com/repos/TiVo/intellij-haxe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TiVo/intellij-haxe/labels{/name}","releases_url":"https://api.github.com/repos/TiVo/intellij-haxe/releases{/id}","created_at":"2014-02-06T01:06:24Z","updated_at":"2015-05-10T15:12:30Z","pushed_at":"2015-06-06T01:18:37Z","git_url":"git://github.com/TiVo/intellij-haxe.git","ssh_url":"git@github.com:TiVo/intellij-haxe.git","clone_url":"https://github.com/TiVo/intellij-haxe.git","svn_url":"https://github.com/TiVo/intellij-haxe","homepage":null,"size":30365,"stargazers_count":46,"watchers_count":46,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":103,"forks":9,"open_issues":103,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TiVo/intellij-haxe/pulls/290"},"html":{"href":"https://github.com/TiVo/intellij-haxe/pull/290"},"issue":{"href":"https://api.github.com/repos/TiVo/intellij-haxe/issues/290"},"comments":{"href":"https://api.github.com/repos/TiVo/intellij-haxe/issues/290/comments"},"review_comments":{"href":"https://api.github.com/repos/TiVo/intellij-haxe/pulls/290/comments"},"review_comment":{"href":"https://api.github.com/repos/TiVo/intellij-haxe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TiVo/intellij-haxe/pulls/290/commits"},"statuses":{"href":"https://api.github.com/repos/TiVo/intellij-haxe/statuses/c07fad2c95aef89733f156cd28993c05372ed6cb"}}}}