{"action":"created","comment":{"url":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/comments/33414004","id":33414004,"diff_hunk":"@@ -155,53 +150,53 @@ class RDOResourceTypeCompiler\n \t\t\t\tmanagerCurrent = manager;\n \t\t\t}\n \n-\t\t\t«IF rtp.eAllContents.filter(typeof(RDOEnum)).toList.size > 0»// ENUMS«ENDIF»\n-\t\t\t«FOR e : rtp.eAllContents.toIterable.filter(typeof(RDOEnum))»\n-\t\t\t\tpublic enum «e.getEnumParentName(false)»_enum\n-\t\t\t\t{\n-\t\t\t\t\t«e.makeEnumBody»\n-\t\t\t\t}\n-\n-\t\t\t«ENDFOR»\n \t\t\t«FOR parameter : rtp.parameters»\n-\t\t\t\tprivate volatile «parameter.type.compileType» «parameter.name»«parameter.type.getDefault»;\n+\t\t\t\tprivate volatile «parameter.compileType» «parameter.name»«parameter.getDefault»;\n \n-\t\t\t\tpublic «parameter.type.compileType» get_«parameter.name»()\n+\t\t\t\tpublic «parameter.compileType» get_«parameter.name»()\n \t\t\t\t{\n \t\t\t\t\treturn «parameter.name»;\n \t\t\t\t}\n \n-\t\t\t\tpublic «parameter.type.compileType» set_«parameter.name»(«parameter.type.compileType» «parameter.name»)\n+\t\t\t\tpublic «parameter.compileType» set_«parameter.name»(«parameter.compileType» «parameter.name»)\n \t\t\t\t{\n-\t\t\t\t\tif(managerOwner == managerCurrent)\n-\t\t\t\t\t\tthis.«parameter.name» = «parameter.name»;\n-\t\t\t\t\telse\n-\t\t\t\t\t\tthis.copyForNewOwner().«parameter.name» = «parameter.name»;\n+\t\t\t\t\tif(managerOwner != managerCurrent)\n+\t\t\t\t\t\tthis.copyForNewOwner();\n \n-\t\t\t\t\treturn «parameter.name»;\n-\t\t\t\t}\n-\n-\t\t\t\tpublic «parameter.type.compileType» set_«parameter.name»_after(«parameter.type.compileType» «parameter.name»)\n-\t\t\t\t{\n-\t\t\t\t\t«parameter.type.compileTypePrimitive» copy = this.«parameter.name»;\n+\t\t\t\t\tthis.«parameter.name» = «parameter.name»;\n \n-\t\t\t\t\tset_«parameter.name»(«parameter.name»);\n+\t\t\t\t\tSimulator.getDatabase().memorizeResourceEntry(\n+\t\t\t\t\t\t\tthis.copy(),\n+\t\t\t\t\t\t\tDatabase.ResourceEntryType.ALTERED);\n \n-\t\t\t\t\treturn copy;\n+\t\t\t\t\treturn this.«parameter.name»;\n \t\t\t\t}\n-\n \t\t\t«ENDFOR»\n+\n \t\t\tprivate «rtp.name» copyForNewOwner()\n \t\t\t{\n-\t\t\t\t«rtp.name» copy = new «rtp.name»(«rtp.parameters.compileResourceTypeParametersCopyCall»);\n+\t\t\t\t«rtp.name» copy = new «rtp.name»(«rtp.parameters.compileParameterTypesCopyCall»);\n+\n+\t\t\t\tcopy.name = name;\n+\t\t\t\tcopy.number = number;\n+\t\t\t\tcopy.managerOwner = managerOwner;\n+\t\t\t\tmanagerOwner.addResource(copy);\n+\t\t\t\tmanagerOwner = managerCurrent;\n+\n+\t\t\t\treturn copy;\n+\t\t\t}\n+\n+\t\t\tpublic «rtp.name» copy()\n+\t\t\t{\n+\t\t\t\t«rtp.name» copy = new «rtp.name»(«rtp.parameters.compileParameterTypesCopyCall»);\n \n \t\t\t\tcopy.name = name;\n \t\t\t\tcopy.number = number;\n-\t\t\t\tmanagerCurrent.addResource(copy);\n+","path":"ru.bmstu.rk9.rdo/src/ru/bmstu/rk9/rdo/compilers/RDOResourceTypeCompiler.xtend","position":144,"original_position":144,"commit_id":"a415ca6f2fdcf90226a2b52d725b1d9c0478e0f7","original_commit_id":"980c20984331ae2a460a742ef38fbd084ffd7706","user":{"login":"bogachev-pa","id":6528492,"avatar_url":"https://avatars.githubusercontent.com/u/6528492?v=3","gravatar_id":"","url":"https://api.github.com/users/bogachev-pa","html_url":"https://github.com/bogachev-pa","followers_url":"https://api.github.com/users/bogachev-pa/followers","following_url":"https://api.github.com/users/bogachev-pa/following{/other_user}","gists_url":"https://api.github.com/users/bogachev-pa/gists{/gist_id}","starred_url":"https://api.github.com/users/bogachev-pa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bogachev-pa/subscriptions","organizations_url":"https://api.github.com/users/bogachev-pa/orgs","repos_url":"https://api.github.com/users/bogachev-pa/repos","events_url":"https://api.github.com/users/bogachev-pa/events{/privacy}","received_events_url":"https://api.github.com/users/bogachev-pa/received_events","type":"User","site_admin":false},"body":"1. Что именно увеличит читаемость? Использование одного метода вместо двух или какое-то переименование?\r\n2. Вместо метода `copy()`? И заодно вызвать его внутри `copyForNewOwner()`?","created_at":"2015-06-27T16:55:25Z","updated_at":"2015-06-27T16:55:25Z","html_url":"https://github.com/aurusov/rdo-xtext/pull/45#discussion_r33414004","pull_request_url":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/comments/33414004"},"html":{"href":"https://github.com/aurusov/rdo-xtext/pull/45#discussion_r33414004"},"pull_request":{"href":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/45","id":38658725,"html_url":"https://github.com/aurusov/rdo-xtext/pull/45","diff_url":"https://github.com/aurusov/rdo-xtext/pull/45.diff","patch_url":"https://github.com/aurusov/rdo-xtext/pull/45.patch","issue_url":"https://api.github.com/repos/aurusov/rdo-xtext/issues/45","number":45,"state":"open","locked":false,"title":"Новая грамматика языка","user":{"login":"bogachev-pa","id":6528492,"avatar_url":"https://avatars.githubusercontent.com/u/6528492?v=3","gravatar_id":"","url":"https://api.github.com/users/bogachev-pa","html_url":"https://github.com/bogachev-pa","followers_url":"https://api.github.com/users/bogachev-pa/followers","following_url":"https://api.github.com/users/bogachev-pa/following{/other_user}","gists_url":"https://api.github.com/users/bogachev-pa/gists{/gist_id}","starred_url":"https://api.github.com/users/bogachev-pa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bogachev-pa/subscriptions","organizations_url":"https://api.github.com/users/bogachev-pa/orgs","repos_url":"https://api.github.com/users/bogachev-pa/repos","events_url":"https://api.github.com/users/bogachev-pa/events{/privacy}","received_events_url":"https://api.github.com/users/bogachev-pa/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-26T15:09:54Z","updated_at":"2015-06-27T16:55:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"769eb50ea12a47bae6ca7e3a8e2ef2c8f6c8b5db","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/45/commits","review_comments_url":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/45/comments","review_comment_url":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aurusov/rdo-xtext/issues/45/comments","statuses_url":"https://api.github.com/repos/aurusov/rdo-xtext/statuses/a415ca6f2fdcf90226a2b52d725b1d9c0478e0f7","head":{"label":"bogachev-pa:feature/new_grammar","ref":"feature/new_grammar","sha":"a415ca6f2fdcf90226a2b52d725b1d9c0478e0f7","user":{"login":"bogachev-pa","id":6528492,"avatar_url":"https://avatars.githubusercontent.com/u/6528492?v=3","gravatar_id":"","url":"https://api.github.com/users/bogachev-pa","html_url":"https://github.com/bogachev-pa","followers_url":"https://api.github.com/users/bogachev-pa/followers","following_url":"https://api.github.com/users/bogachev-pa/following{/other_user}","gists_url":"https://api.github.com/users/bogachev-pa/gists{/gist_id}","starred_url":"https://api.github.com/users/bogachev-pa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bogachev-pa/subscriptions","organizations_url":"https://api.github.com/users/bogachev-pa/orgs","repos_url":"https://api.github.com/users/bogachev-pa/repos","events_url":"https://api.github.com/users/bogachev-pa/events{/privacy}","received_events_url":"https://api.github.com/users/bogachev-pa/received_events","type":"User","site_admin":false},"repo":{"id":23986910,"name":"rdo-xtext","full_name":"bogachev-pa/rdo-xtext","owner":{"login":"bogachev-pa","id":6528492,"avatar_url":"https://avatars.githubusercontent.com/u/6528492?v=3","gravatar_id":"","url":"https://api.github.com/users/bogachev-pa","html_url":"https://github.com/bogachev-pa","followers_url":"https://api.github.com/users/bogachev-pa/followers","following_url":"https://api.github.com/users/bogachev-pa/following{/other_user}","gists_url":"https://api.github.com/users/bogachev-pa/gists{/gist_id}","starred_url":"https://api.github.com/users/bogachev-pa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bogachev-pa/subscriptions","organizations_url":"https://api.github.com/users/bogachev-pa/orgs","repos_url":"https://api.github.com/users/bogachev-pa/repos","events_url":"https://api.github.com/users/bogachev-pa/events{/privacy}","received_events_url":"https://api.github.com/users/bogachev-pa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bogachev-pa/rdo-xtext","description":"RDO modelling language written in Xtext","fork":true,"url":"https://api.github.com/repos/bogachev-pa/rdo-xtext","forks_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/forks","keys_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/teams","hooks_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/hooks","issue_events_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/issues/events{/number}","events_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/events","assignees_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/assignees{/user}","branches_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/branches{/branch}","tags_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/tags","blobs_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/git/refs{/sha}","trees_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/statuses/{sha}","languages_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/languages","stargazers_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/stargazers","contributors_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/contributors","subscribers_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/subscribers","subscription_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/subscription","commits_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/commits{/sha}","git_commits_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/git/commits{/sha}","comments_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/comments{/number}","issue_comment_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/issues/comments{/number}","contents_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/contents/{+path}","compare_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/merges","archive_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/downloads","issues_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/issues{/number}","pulls_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/pulls{/number}","milestones_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/milestones{/number}","notifications_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/labels{/name}","releases_url":"https://api.github.com/repos/bogachev-pa/rdo-xtext/releases{/id}","created_at":"2014-09-13T05:40:06Z","updated_at":"2015-04-20T21:32:31Z","pushed_at":"2015-06-27T14:35:14Z","git_url":"git://github.com/bogachev-pa/rdo-xtext.git","ssh_url":"git@github.com:bogachev-pa/rdo-xtext.git","clone_url":"https://github.com/bogachev-pa/rdo-xtext.git","svn_url":"https://github.com/bogachev-pa/rdo-xtext","homepage":"","size":1720,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":15,"forks":0,"open_issues":15,"watchers":0,"default_branch":"master"}},"base":{"label":"aurusov:release/1.3","ref":"release/1.3","sha":"dac94c848809117ec878469dd535c043ff9b1605","user":{"login":"aurusov","id":5585202,"avatar_url":"https://avatars.githubusercontent.com/u/5585202?v=3","gravatar_id":"","url":"https://api.github.com/users/aurusov","html_url":"https://github.com/aurusov","followers_url":"https://api.github.com/users/aurusov/followers","following_url":"https://api.github.com/users/aurusov/following{/other_user}","gists_url":"https://api.github.com/users/aurusov/gists{/gist_id}","starred_url":"https://api.github.com/users/aurusov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aurusov/subscriptions","organizations_url":"https://api.github.com/users/aurusov/orgs","repos_url":"https://api.github.com/users/aurusov/repos","events_url":"https://api.github.com/users/aurusov/events{/privacy}","received_events_url":"https://api.github.com/users/aurusov/received_events","type":"User","site_admin":false},"repo":{"id":17812682,"name":"rdo-xtext","full_name":"aurusov/rdo-xtext","owner":{"login":"aurusov","id":5585202,"avatar_url":"https://avatars.githubusercontent.com/u/5585202?v=3","gravatar_id":"","url":"https://api.github.com/users/aurusov","html_url":"https://github.com/aurusov","followers_url":"https://api.github.com/users/aurusov/followers","following_url":"https://api.github.com/users/aurusov/following{/other_user}","gists_url":"https://api.github.com/users/aurusov/gists{/gist_id}","starred_url":"https://api.github.com/users/aurusov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aurusov/subscriptions","organizations_url":"https://api.github.com/users/aurusov/orgs","repos_url":"https://api.github.com/users/aurusov/repos","events_url":"https://api.github.com/users/aurusov/events{/privacy}","received_events_url":"https://api.github.com/users/aurusov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aurusov/rdo-xtext","description":"RDO modelling language written in Xtext","fork":false,"url":"https://api.github.com/repos/aurusov/rdo-xtext","forks_url":"https://api.github.com/repos/aurusov/rdo-xtext/forks","keys_url":"https://api.github.com/repos/aurusov/rdo-xtext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aurusov/rdo-xtext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aurusov/rdo-xtext/teams","hooks_url":"https://api.github.com/repos/aurusov/rdo-xtext/hooks","issue_events_url":"https://api.github.com/repos/aurusov/rdo-xtext/issues/events{/number}","events_url":"https://api.github.com/repos/aurusov/rdo-xtext/events","assignees_url":"https://api.github.com/repos/aurusov/rdo-xtext/assignees{/user}","branches_url":"https://api.github.com/repos/aurusov/rdo-xtext/branches{/branch}","tags_url":"https://api.github.com/repos/aurusov/rdo-xtext/tags","blobs_url":"https://api.github.com/repos/aurusov/rdo-xtext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aurusov/rdo-xtext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aurusov/rdo-xtext/git/refs{/sha}","trees_url":"https://api.github.com/repos/aurusov/rdo-xtext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aurusov/rdo-xtext/statuses/{sha}","languages_url":"https://api.github.com/repos/aurusov/rdo-xtext/languages","stargazers_url":"https://api.github.com/repos/aurusov/rdo-xtext/stargazers","contributors_url":"https://api.github.com/repos/aurusov/rdo-xtext/contributors","subscribers_url":"https://api.github.com/repos/aurusov/rdo-xtext/subscribers","subscription_url":"https://api.github.com/repos/aurusov/rdo-xtext/subscription","commits_url":"https://api.github.com/repos/aurusov/rdo-xtext/commits{/sha}","git_commits_url":"https://api.github.com/repos/aurusov/rdo-xtext/git/commits{/sha}","comments_url":"https://api.github.com/repos/aurusov/rdo-xtext/comments{/number}","issue_comment_url":"https://api.github.com/repos/aurusov/rdo-xtext/issues/comments{/number}","contents_url":"https://api.github.com/repos/aurusov/rdo-xtext/contents/{+path}","compare_url":"https://api.github.com/repos/aurusov/rdo-xtext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aurusov/rdo-xtext/merges","archive_url":"https://api.github.com/repos/aurusov/rdo-xtext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aurusov/rdo-xtext/downloads","issues_url":"https://api.github.com/repos/aurusov/rdo-xtext/issues{/number}","pulls_url":"https://api.github.com/repos/aurusov/rdo-xtext/pulls{/number}","milestones_url":"https://api.github.com/repos/aurusov/rdo-xtext/milestones{/number}","notifications_url":"https://api.github.com/repos/aurusov/rdo-xtext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aurusov/rdo-xtext/labels{/name}","releases_url":"https://api.github.com/repos/aurusov/rdo-xtext/releases{/id}","created_at":"2014-03-17T00:15:25Z","updated_at":"2015-06-14T09:03:27Z","pushed_at":"2015-06-27T16:42:40Z","git_url":"git://github.com/aurusov/rdo-xtext.git","ssh_url":"git@github.com:aurusov/rdo-xtext.git","clone_url":"https://github.com/aurusov/rdo-xtext.git","svn_url":"https://github.com/aurusov/rdo-xtext","homepage":"","size":1967,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":16,"forks":4,"open_issues":16,"watchers":1,"default_branch":"release/current"}},"_links":{"self":{"href":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/45"},"html":{"href":"https://github.com/aurusov/rdo-xtext/pull/45"},"issue":{"href":"https://api.github.com/repos/aurusov/rdo-xtext/issues/45"},"comments":{"href":"https://api.github.com/repos/aurusov/rdo-xtext/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/aurusov/rdo-xtext/statuses/a415ca6f2fdcf90226a2b52d725b1d9c0478e0f7"}}}}