{"action":"created","comment":{"url":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/comments/45056568","id":45056568,"diff_hunk":"@@ -174,27 +160,27 @@ public static SimulationStopCode run() {\n \t\tnotifyChange(ExecutionState.TIME_CHANGED);\n \t\tnotifyChange(ExecutionState.STATE_CHANGED);\n \n-\t\tSimulationStopCode dptCheck = INSTANCE.checkDPT();\n-\t\tif (dptCheck != SimulationStopCode.SIMULATION_CONTINUES)\n-\t\t\treturn stop(dptCheck);\n+\t\twhile (!INSTANCE.executionAborted) {\n+\t\t\tif (INSTANCE.checkTerminate())\n+\t\t\t\treturn stop(SimulationStopCode.TERMINATE_CONDITION);\n \n-\t\twhile (INSTANCE.eventScheduler.haveEvents()) {\n-\t\t\tEvent current = INSTANCE.eventScheduler.popEvent();\n+\t\t\tif (INSTANCE.dptManager.checkDPT()) {\n+\t\t\t\tnotifyChange(ExecutionState.STATE_CHANGED);\n+\t\t\t\tcontinue;\n+\t\t\t}\n+\n+\t\t\tif (!INSTANCE.eventScheduler.haveEvents())\n+\t\t\t\treturn stop(SimulationStopCode.NO_MORE_EVENTS);\n \n+\t\t\tEvent current = INSTANCE.eventScheduler.popEvent();","path":"ru.bmstu.rk9.rao.lib/src/ru/bmstu/rk9/rao/lib/simulator/Simulator.java","position":42,"original_position":42,"commit_id":"f2371266f163e5fdea9a9af8fdb588d65910703d","original_commit_id":"f2371266f163e5fdea9a9af8fdb588d65910703d","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},"body":"- имя типа `Event`\r\n- событие запрашивается у `eventScheduler`\r\n- `popEvent()` тоже возвращает событие (кстати, тут можно просто оставить `pop()`)\r\n\r\n`currentEvent` вызывает больше вопросов, чем `event`.","created_at":"2015-11-17T13:01:39Z","updated_at":"2015-11-17T13:01:39Z","html_url":"https://github.com/aurusov/rdo-xtext/pull/272#discussion_r45056568","pull_request_url":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/272","_links":{"self":{"href":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/comments/45056568"},"html":{"href":"https://github.com/aurusov/rdo-xtext/pull/272#discussion_r45056568"},"pull_request":{"href":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/272"}}},"pull_request":{"url":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/272","id":50861284,"html_url":"https://github.com/aurusov/rdo-xtext/pull/272","diff_url":"https://github.com/aurusov/rdo-xtext/pull/272.diff","patch_url":"https://github.com/aurusov/rdo-xtext/pull/272.patch","issue_url":"https://api.github.com/repos/aurusov/rdo-xtext/issues/272","number":272,"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":"Исправлял в соответствии с обсуждением тут: https://github.com/k-alexandrovsky/k-alexandrovsky.github.io/issues/1#issuecomment-113613594\r\n","created_at":"2015-11-16T20:29:02Z","updated_at":"2015-11-17T13:01:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1265860c667c49bb6266cbebf2337cad3702e24f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/272/commits","review_comments_url":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/272/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/272/comments","statuses_url":"https://api.github.com/repos/aurusov/rdo-xtext/statuses/f2371266f163e5fdea9a9af8fdb588d65910703d","head":{"label":"bogachev-pa:refactoring/simulation_algorithm","ref":"refactoring/simulation_algorithm","sha":"f2371266f163e5fdea9a9af8fdb588d65910703d","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-11-17T07:28:21Z","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":8654,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":7,"forks":1,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"aurusov:release/2.11","ref":"release/2.11","sha":"73b79539e4a6d4b16feaa527e1aa9f529e796a41","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-11-08T20:59:25Z","pushed_at":"2015-11-17T07:28:22Z","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":17959,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":75,"forks":11,"open_issues":75,"watchers":1,"default_branch":"release/current"}},"_links":{"self":{"href":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/272"},"html":{"href":"https://github.com/aurusov/rdo-xtext/pull/272"},"issue":{"href":"https://api.github.com/repos/aurusov/rdo-xtext/issues/272"},"comments":{"href":"https://api.github.com/repos/aurusov/rdo-xtext/issues/272/comments"},"review_comments":{"href":"https://api.github.com/repos/aurusov/rdo-xtext/pulls/272/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/272/commits"},"statuses":{"href":"https://api.github.com/repos/aurusov/rdo-xtext/statuses/f2371266f163e5fdea9a9af8fdb588d65910703d"}}}}