{"action":"created","comment":{"url":"https://api.github.com/repos/SpineEventEngine/tools/pulls/comments/69966499","id":69966499,"diff_hunk":"@@ -117,48 +118,61 @@ class ProtoToJavaMapperPlugin implements Plugin<Project> {\n         String javaPackage = \"\";\n         String protoPackage = \"\";\n         String commonOuterJavaClass = \"\";\n+        String typeUrlPrefix = \"\";\n         final List<String> protoClasses = new ArrayList<>();\n         final List<String> javaClasses = new ArrayList<>();\n         int nestedClassDepth = 0; // for inner protoClasses\n-        for (String line : lines) {\n-            final String trimmedLine = line.trim();\n-            if (trimmedLine.startsWith(MESSAGE_PREFIX)) {\n-                addClass(findLineData(trimmedLine, MESSAGE_PATTERN), protoClasses, javaClasses, nestedClassDepth);\n-            } else if (trimmedLine.startsWith(ENUM_PREFIX)) {\n-                addClass(findLineData(trimmedLine, ENUM_PATTERN), protoClasses, javaClasses, nestedClassDepth);\n-            } else if (trimmedLine.startsWith(JAVA_PACKAGE_PREFIX) && javaPackage.isEmpty()) {\n-                javaPackage = findLineData(trimmedLine, JAVA_PACKAGE_PATTERN) + \".\";\n-            } else if (trimmedLine.startsWith(PROTO_PACKAGE_PREFIX) && protoPackage.isEmpty()) {\n-                protoPackage = findLineData(trimmedLine, PROTO_PACKAGE_PATTERN) + \".\";\n-            } else if (trimmedLine.startsWith(JAVA_MULTIPLE_FILES_OPT_PREFIX) && commonOuterJavaClass.isEmpty()) {\n-                commonOuterJavaClass = getCommonOuterJavaClass(trimmedLine, file);\n+        for (String lineRaw : lines) {\n+            final String line = lineRaw.trim();","path":"protobuf-plugin/plugin/src/main/groovy/org/spine3/gradle/lookup/proto/ProtoToJavaMapperPlugin.groovy","position":null,"original_position":83,"commit_id":"15dfc1523bd8dbea2b17634cbdc7bf378b2d066b","original_commit_id":"4ef28a565403386ee648206467c1205bb75019ae","user":{"login":"alexander-yevsyukov","id":3116444,"avatar_url":"https://avatars.githubusercontent.com/u/3116444?v=3","gravatar_id":"","url":"https://api.github.com/users/alexander-yevsyukov","html_url":"https://github.com/alexander-yevsyukov","followers_url":"https://api.github.com/users/alexander-yevsyukov/followers","following_url":"https://api.github.com/users/alexander-yevsyukov/following{/other_user}","gists_url":"https://api.github.com/users/alexander-yevsyukov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexander-yevsyukov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexander-yevsyukov/subscriptions","organizations_url":"https://api.github.com/users/alexander-yevsyukov/orgs","repos_url":"https://api.github.com/users/alexander-yevsyukov/repos","events_url":"https://api.github.com/users/alexander-yevsyukov/events{/privacy}","received_events_url":"https://api.github.com/users/alexander-yevsyukov/received_events","type":"User","site_admin":false},"body":"This block is another good reason for having a method object.","created_at":"2016-07-07T19:01:02Z","updated_at":"2016-07-07T19:01:02Z","html_url":"https://github.com/SpineEventEngine/tools/pull/22#discussion_r69966499","pull_request_url":"https://api.github.com/repos/SpineEventEngine/tools/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/SpineEventEngine/tools/pulls/comments/69966499"},"html":{"href":"https://github.com/SpineEventEngine/tools/pull/22#discussion_r69966499"},"pull_request":{"href":"https://api.github.com/repos/SpineEventEngine/tools/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/SpineEventEngine/tools/pulls/22","id":76611273,"html_url":"https://github.com/SpineEventEngine/tools/pull/22","diff_url":"https://github.com/SpineEventEngine/tools/pull/22.diff","patch_url":"https://github.com/SpineEventEngine/tools/pull/22.patch","issue_url":"https://api.github.com/repos/SpineEventEngine/tools/issues/22","number":22,"state":"open","locked":false,"title":"Known types generation change","user":{"login":"AlexanderLitus","id":8298183,"avatar_url":"https://avatars.githubusercontent.com/u/8298183?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderLitus","html_url":"https://github.com/AlexanderLitus","followers_url":"https://api.github.com/users/AlexanderLitus/followers","following_url":"https://api.github.com/users/AlexanderLitus/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderLitus/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderLitus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderLitus/subscriptions","organizations_url":"https://api.github.com/users/AlexanderLitus/orgs","repos_url":"https://api.github.com/users/AlexanderLitus/repos","events_url":"https://api.github.com/users/AlexanderLitus/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderLitus/received_events","type":"User","site_admin":false},"body":"Map proto type URL to the Java class FQN in known types file.","created_at":"2016-07-07T15:04:13Z","updated_at":"2016-07-07T19:01:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0659ffee43149a3dbb46bb42685845c495c94cce","assignee":{"login":"alexander-yevsyukov","id":3116444,"avatar_url":"https://avatars.githubusercontent.com/u/3116444?v=3","gravatar_id":"","url":"https://api.github.com/users/alexander-yevsyukov","html_url":"https://github.com/alexander-yevsyukov","followers_url":"https://api.github.com/users/alexander-yevsyukov/followers","following_url":"https://api.github.com/users/alexander-yevsyukov/following{/other_user}","gists_url":"https://api.github.com/users/alexander-yevsyukov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexander-yevsyukov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexander-yevsyukov/subscriptions","organizations_url":"https://api.github.com/users/alexander-yevsyukov/orgs","repos_url":"https://api.github.com/users/alexander-yevsyukov/repos","events_url":"https://api.github.com/users/alexander-yevsyukov/events{/privacy}","received_events_url":"https://api.github.com/users/alexander-yevsyukov/received_events","type":"User","site_admin":false},"assignees":[{"login":"alexander-yevsyukov","id":3116444,"avatar_url":"https://avatars.githubusercontent.com/u/3116444?v=3","gravatar_id":"","url":"https://api.github.com/users/alexander-yevsyukov","html_url":"https://github.com/alexander-yevsyukov","followers_url":"https://api.github.com/users/alexander-yevsyukov/followers","following_url":"https://api.github.com/users/alexander-yevsyukov/following{/other_user}","gists_url":"https://api.github.com/users/alexander-yevsyukov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexander-yevsyukov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexander-yevsyukov/subscriptions","organizations_url":"https://api.github.com/users/alexander-yevsyukov/orgs","repos_url":"https://api.github.com/users/alexander-yevsyukov/repos","events_url":"https://api.github.com/users/alexander-yevsyukov/events{/privacy}","received_events_url":"https://api.github.com/users/alexander-yevsyukov/received_events","type":"User","site_admin":false},{"login":"mikhailmikhaylov","id":8265843,"avatar_url":"https://avatars.githubusercontent.com/u/8265843?v=3","gravatar_id":"","url":"https://api.github.com/users/mikhailmikhaylov","html_url":"https://github.com/mikhailmikhaylov","followers_url":"https://api.github.com/users/mikhailmikhaylov/followers","following_url":"https://api.github.com/users/mikhailmikhaylov/following{/other_user}","gists_url":"https://api.github.com/users/mikhailmikhaylov/gists{/gist_id}","starred_url":"https://api.github.com/users/mikhailmikhaylov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikhailmikhaylov/subscriptions","organizations_url":"https://api.github.com/users/mikhailmikhaylov/orgs","repos_url":"https://api.github.com/users/mikhailmikhaylov/repos","events_url":"https://api.github.com/users/mikhailmikhaylov/events{/privacy}","received_events_url":"https://api.github.com/users/mikhailmikhaylov/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/SpineEventEngine/tools/pulls/22/commits","review_comments_url":"https://api.github.com/repos/SpineEventEngine/tools/pulls/22/comments","review_comment_url":"https://api.github.com/repos/SpineEventEngine/tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SpineEventEngine/tools/issues/22/comments","statuses_url":"https://api.github.com/repos/SpineEventEngine/tools/statuses/15dfc1523bd8dbea2b17634cbdc7bf378b2d066b","head":{"label":"SpineEventEngine:known-types-generation-change","ref":"known-types-generation-change","sha":"15dfc1523bd8dbea2b17634cbdc7bf378b2d066b","user":{"login":"SpineEventEngine","id":12821626,"avatar_url":"https://avatars.githubusercontent.com/u/12821626?v=3","gravatar_id":"","url":"https://api.github.com/users/SpineEventEngine","html_url":"https://github.com/SpineEventEngine","followers_url":"https://api.github.com/users/SpineEventEngine/followers","following_url":"https://api.github.com/users/SpineEventEngine/following{/other_user}","gists_url":"https://api.github.com/users/SpineEventEngine/gists{/gist_id}","starred_url":"https://api.github.com/users/SpineEventEngine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpineEventEngine/subscriptions","organizations_url":"https://api.github.com/users/SpineEventEngine/orgs","repos_url":"https://api.github.com/users/SpineEventEngine/repos","events_url":"https://api.github.com/users/SpineEventEngine/events{/privacy}","received_events_url":"https://api.github.com/users/SpineEventEngine/received_events","type":"Organization","site_admin":false},"repo":{"id":42251175,"name":"tools","full_name":"SpineEventEngine/tools","owner":{"login":"SpineEventEngine","id":12821626,"avatar_url":"https://avatars.githubusercontent.com/u/12821626?v=3","gravatar_id":"","url":"https://api.github.com/users/SpineEventEngine","html_url":"https://github.com/SpineEventEngine","followers_url":"https://api.github.com/users/SpineEventEngine/followers","following_url":"https://api.github.com/users/SpineEventEngine/following{/other_user}","gists_url":"https://api.github.com/users/SpineEventEngine/gists{/gist_id}","starred_url":"https://api.github.com/users/SpineEventEngine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpineEventEngine/subscriptions","organizations_url":"https://api.github.com/users/SpineEventEngine/orgs","repos_url":"https://api.github.com/users/SpineEventEngine/repos","events_url":"https://api.github.com/users/SpineEventEngine/events{/privacy}","received_events_url":"https://api.github.com/users/SpineEventEngine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SpineEventEngine/tools","description":"Code generation and veritifcation tools","fork":false,"url":"https://api.github.com/repos/SpineEventEngine/tools","forks_url":"https://api.github.com/repos/SpineEventEngine/tools/forks","keys_url":"https://api.github.com/repos/SpineEventEngine/tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpineEventEngine/tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpineEventEngine/tools/teams","hooks_url":"https://api.github.com/repos/SpineEventEngine/tools/hooks","issue_events_url":"https://api.github.com/repos/SpineEventEngine/tools/issues/events{/number}","events_url":"https://api.github.com/repos/SpineEventEngine/tools/events","assignees_url":"https://api.github.com/repos/SpineEventEngine/tools/assignees{/user}","branches_url":"https://api.github.com/repos/SpineEventEngine/tools/branches{/branch}","tags_url":"https://api.github.com/repos/SpineEventEngine/tools/tags","blobs_url":"https://api.github.com/repos/SpineEventEngine/tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpineEventEngine/tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpineEventEngine/tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpineEventEngine/tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpineEventEngine/tools/statuses/{sha}","languages_url":"https://api.github.com/repos/SpineEventEngine/tools/languages","stargazers_url":"https://api.github.com/repos/SpineEventEngine/tools/stargazers","contributors_url":"https://api.github.com/repos/SpineEventEngine/tools/contributors","subscribers_url":"https://api.github.com/repos/SpineEventEngine/tools/subscribers","subscription_url":"https://api.github.com/repos/SpineEventEngine/tools/subscription","commits_url":"https://api.github.com/repos/SpineEventEngine/tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpineEventEngine/tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpineEventEngine/tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpineEventEngine/tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/SpineEventEngine/tools/contents/{+path}","compare_url":"https://api.github.com/repos/SpineEventEngine/tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpineEventEngine/tools/merges","archive_url":"https://api.github.com/repos/SpineEventEngine/tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpineEventEngine/tools/downloads","issues_url":"https://api.github.com/repos/SpineEventEngine/tools/issues{/number}","pulls_url":"https://api.github.com/repos/SpineEventEngine/tools/pulls{/number}","milestones_url":"https://api.github.com/repos/SpineEventEngine/tools/milestones{/number}","notifications_url":"https://api.github.com/repos/SpineEventEngine/tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpineEventEngine/tools/labels{/name}","releases_url":"https://api.github.com/repos/SpineEventEngine/tools/releases{/id}","deployments_url":"https://api.github.com/repos/SpineEventEngine/tools/deployments","created_at":"2015-09-10T14:54:43Z","updated_at":"2016-02-03T11:14:32Z","pushed_at":"2016-07-07T15:25:26Z","git_url":"git://github.com/SpineEventEngine/tools.git","ssh_url":"git@github.com:SpineEventEngine/tools.git","clone_url":"https://github.com/SpineEventEngine/tools.git","svn_url":"https://github.com/SpineEventEngine/tools","homepage":null,"size":413,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"SpineEventEngine:master","ref":"master","sha":"38be7d01637f88cd3b78cb36aee224c80b159d6c","user":{"login":"SpineEventEngine","id":12821626,"avatar_url":"https://avatars.githubusercontent.com/u/12821626?v=3","gravatar_id":"","url":"https://api.github.com/users/SpineEventEngine","html_url":"https://github.com/SpineEventEngine","followers_url":"https://api.github.com/users/SpineEventEngine/followers","following_url":"https://api.github.com/users/SpineEventEngine/following{/other_user}","gists_url":"https://api.github.com/users/SpineEventEngine/gists{/gist_id}","starred_url":"https://api.github.com/users/SpineEventEngine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpineEventEngine/subscriptions","organizations_url":"https://api.github.com/users/SpineEventEngine/orgs","repos_url":"https://api.github.com/users/SpineEventEngine/repos","events_url":"https://api.github.com/users/SpineEventEngine/events{/privacy}","received_events_url":"https://api.github.com/users/SpineEventEngine/received_events","type":"Organization","site_admin":false},"repo":{"id":42251175,"name":"tools","full_name":"SpineEventEngine/tools","owner":{"login":"SpineEventEngine","id":12821626,"avatar_url":"https://avatars.githubusercontent.com/u/12821626?v=3","gravatar_id":"","url":"https://api.github.com/users/SpineEventEngine","html_url":"https://github.com/SpineEventEngine","followers_url":"https://api.github.com/users/SpineEventEngine/followers","following_url":"https://api.github.com/users/SpineEventEngine/following{/other_user}","gists_url":"https://api.github.com/users/SpineEventEngine/gists{/gist_id}","starred_url":"https://api.github.com/users/SpineEventEngine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpineEventEngine/subscriptions","organizations_url":"https://api.github.com/users/SpineEventEngine/orgs","repos_url":"https://api.github.com/users/SpineEventEngine/repos","events_url":"https://api.github.com/users/SpineEventEngine/events{/privacy}","received_events_url":"https://api.github.com/users/SpineEventEngine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SpineEventEngine/tools","description":"Code generation and veritifcation tools","fork":false,"url":"https://api.github.com/repos/SpineEventEngine/tools","forks_url":"https://api.github.com/repos/SpineEventEngine/tools/forks","keys_url":"https://api.github.com/repos/SpineEventEngine/tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpineEventEngine/tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpineEventEngine/tools/teams","hooks_url":"https://api.github.com/repos/SpineEventEngine/tools/hooks","issue_events_url":"https://api.github.com/repos/SpineEventEngine/tools/issues/events{/number}","events_url":"https://api.github.com/repos/SpineEventEngine/tools/events","assignees_url":"https://api.github.com/repos/SpineEventEngine/tools/assignees{/user}","branches_url":"https://api.github.com/repos/SpineEventEngine/tools/branches{/branch}","tags_url":"https://api.github.com/repos/SpineEventEngine/tools/tags","blobs_url":"https://api.github.com/repos/SpineEventEngine/tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpineEventEngine/tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpineEventEngine/tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpineEventEngine/tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpineEventEngine/tools/statuses/{sha}","languages_url":"https://api.github.com/repos/SpineEventEngine/tools/languages","stargazers_url":"https://api.github.com/repos/SpineEventEngine/tools/stargazers","contributors_url":"https://api.github.com/repos/SpineEventEngine/tools/contributors","subscribers_url":"https://api.github.com/repos/SpineEventEngine/tools/subscribers","subscription_url":"https://api.github.com/repos/SpineEventEngine/tools/subscription","commits_url":"https://api.github.com/repos/SpineEventEngine/tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpineEventEngine/tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpineEventEngine/tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpineEventEngine/tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/SpineEventEngine/tools/contents/{+path}","compare_url":"https://api.github.com/repos/SpineEventEngine/tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpineEventEngine/tools/merges","archive_url":"https://api.github.com/repos/SpineEventEngine/tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpineEventEngine/tools/downloads","issues_url":"https://api.github.com/repos/SpineEventEngine/tools/issues{/number}","pulls_url":"https://api.github.com/repos/SpineEventEngine/tools/pulls{/number}","milestones_url":"https://api.github.com/repos/SpineEventEngine/tools/milestones{/number}","notifications_url":"https://api.github.com/repos/SpineEventEngine/tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpineEventEngine/tools/labels{/name}","releases_url":"https://api.github.com/repos/SpineEventEngine/tools/releases{/id}","deployments_url":"https://api.github.com/repos/SpineEventEngine/tools/deployments","created_at":"2015-09-10T14:54:43Z","updated_at":"2016-02-03T11:14:32Z","pushed_at":"2016-07-07T15:25:26Z","git_url":"git://github.com/SpineEventEngine/tools.git","ssh_url":"git@github.com:SpineEventEngine/tools.git","clone_url":"https://github.com/SpineEventEngine/tools.git","svn_url":"https://github.com/SpineEventEngine/tools","homepage":null,"size":413,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SpineEventEngine/tools/pulls/22"},"html":{"href":"https://github.com/SpineEventEngine/tools/pull/22"},"issue":{"href":"https://api.github.com/repos/SpineEventEngine/tools/issues/22"},"comments":{"href":"https://api.github.com/repos/SpineEventEngine/tools/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/SpineEventEngine/tools/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/SpineEventEngine/tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SpineEventEngine/tools/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/SpineEventEngine/tools/statuses/15dfc1523bd8dbea2b17634cbdc7bf378b2d066b"}}}}
{"actor":{"display_login":"alexander-yevsyukov"}}