{"action":"created","comment":{"url":"https://api.github.com/repos/aurusov/raox-game5/pulls/comments/84025429","pull_request_review_id":4828327,"id":84025429,"diff_hunk":"@@ -93,67 +96,57 @@ private static final void configureProject() throws CoreException,\n \t\tfinal List<IClasspathEntry> entries = new ArrayList<IClasspathEntry>();\n \t\tfinal IExecutionEnvironmentsManager executionEnvironmentsManager = JavaRuntime\n \t\t\t\t.getExecutionEnvironmentsManager();\n-\t\tfinal IExecutionEnvironment[] executionEnvironments = executionEnvironmentsManager\n-\t\t\t\t.getExecutionEnvironments();\n+\t\tfinal IExecutionEnvironment[] executionEnvironments = executionEnvironmentsManager.getExecutionEnvironments();\n \n \t\tfinal String JSEVersion = \"JavaSE-1.8\";\n \t\tfor (IExecutionEnvironment iExecutionEnvironment : executionEnvironments) {\n \t\t\tif (iExecutionEnvironment.getId().equals(JSEVersion)) {\n-\t\t\t\tentries.add(JavaCore.newContainerEntry(JavaRuntime\n-\t\t\t\t\t\t.newJREContainerPath(iExecutionEnvironment)));\n+\t\t\t\tentries.add(JavaCore.newContainerEntry(JavaRuntime.newJREContainerPath(iExecutionEnvironment)));\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n-\n \t\tfinal IPath sourceFolderPath = sourceFolder.getFullPath();\n-\t\tfinal IClasspathEntry srcEntry = JavaCore\n-\t\t\t\t.newSourceEntry(sourceFolderPath);\n+\t\tfinal IClasspathEntry srcEntry = JavaCore.newSourceEntry(sourceFolderPath);\n \t\tentries.add(srcEntry);\n-\t\tgame5JavaProject.setRawClasspath(\n-\t\t\t\tentries.toArray(new IClasspathEntry[entries.size()]), null);\n+\n+\t\tBundle lib = Platform.getBundle(\"ru.bmstu.rk9.rao.lib\");\n+\t\tFile libPath = FileLocator.getBundleFile(lib);\n+\t\tIPath libPathBinary;\n+\t\tif (libPath.isDirectory())\n+\t\t\tlibPathBinary = new Path(libPath.getAbsolutePath() + \"/bin/\");\n+\t\telse\n+\t\t\tlibPathBinary = new Path(libPath.getAbsolutePath());\n+\t\tIPath sourcePath = new Path(libPath.getAbsolutePath());\n+\t\tIClasspathEntry libEntry = JavaCore.newLibraryEntry(libPathBinary, sourcePath, null);\n+\t\tentries.add(libEntry);\n+\n+\t\tBundle xbaseLib = Platform.getBundle(\"org.eclipse.xtext.xbase.lib\");\n+\t\tFile xbaseLibPath = FileLocator.getBundleFile(xbaseLib);\n+\t\tIPath xbaseLibPathBinary = new Path(xbaseLibPath.getAbsolutePath());\n+\t\tIClasspathEntry xbaseLibEntry = JavaCore.newLibraryEntry(xbaseLibPathBinary, null, null);\n+\t\tentries.add(xbaseLibEntry);\n+\n+\t\tgame5JavaProject.setRawClasspath(entries.toArray(new IClasspathEntry[entries.size()]), null);\n \t}\n \n-\t@SuppressWarnings(\"resource\")\n-\tprivate static void createModelFile(IFile configIFile) throws IOException,\n-\t\t\tCoreException {\n-\n-\t\tfinal String modelName = \"game5.rao\";\n-\t\tIPath modelIPath = root.getLocation()\n-\t\t\t\t.append(game5Project.getFullPath()).append(modelName);\n-\t\tFile modelFile = new File(modelIPath.toString());\n-\t\tIFile modelIFile = game5Project.getFile(modelName);\n-\t\tfinal String modelTemplatePath = \"/model_template/game_5.rao\";\n-\n-\t\tmodelFile.createNewFile();\n-\t\tInputStream inputStream = Game5ProjectConfigurator.class\n-\t\t\t\t.getClassLoader().getResourceAsStream(modelTemplatePath);\n-\t\tmodelIFile.create(inputStream, true, null);\n-\t\tOutputStream outputStream = new FileOutputStream(configIFile\n-\t\t\t\t.getLocation().removeLastSegments(1).append(\"/game5.rao\")\n-\t\t\t\t.toString(), true);\n-\t\tPrintStream printStream = new PrintStream(outputStream, true,\n-\t\t\t\tStandardCharsets.UTF_8.name());\n-\t\tfinal JSONObject object = ConfigurationParser.parseObject(configIFile);\n-\t\tfinal String configuration = ConfigurationParser.parseConfig(object);\n-\t\tprintStream.print(configuration);\n+\tprivate static void createFile(String name) throws IOException, CoreException {\n+\t\tIPath path = root.getLocation().append(game5Project.getFullPath()).append(name);\n+\t\tFile file = new File(path.toString());\n+\t\tfile.createNewFile();\n \t}\n \n-\tprivate static final IFile createConfigFile() throws IOException,\n-\t\t\tCoreException {\n-\n-\t\tfinal String configName = \"game5.json\";\n-\t\tIPath configIPath = root.getLocation().append(\n-\t\t\t\tgame5Project.getFullPath().append(configName));\n-\t\tfinal File configFile = new File(configIPath.toString());\n-\t\tfinal String configFilePath = \"/model_template/config.json\";\n-\t\tfinal IWorkbenchPage page = PlatformUI.getWorkbench()\n-\t\t\t\t.getActiveWorkbenchWindow().getActivePage();\n-\t\tconfigFile.createNewFile();\n-\t\tIFile configIFile = game5Project.getFile(configName);\n-\t\tInputStream inputStream = Game5ProjectConfigurator.class\n-\t\t\t\t.getClassLoader().getResourceAsStream(configFilePath);\n-\t\tconfigIFile.create(inputStream, true, null);\n-\t\tpage.openEditor(new FileEditorInput(configIFile), Game5View.ID);\n-\t\treturn configIFile;\n+\tprivate static void openFile(String name, String template, String editorID) throws IOException, CoreException {\n+\t\tfinal IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();\n+\t\tIFile file = game5Project.getFile(name);\n+\t\tInputStream inputStream;\n+\n+\t\tif (template != null) {\n+\t\t\tinputStream = Game5ProjectConfigurator.class.getClassLoader().getResourceAsStream(template);\n+\t\t} else {\n+\t\t\tinputStream = new ByteArrayInputStream(\"\".getBytes());","path":"rdo-game5/src/rdo/game5/Game5ProjectConfigurator.java","position":null,"original_position":198,"commit_id":"a5efaeb969b6da3ab1840e66852e63046a235f02","original_commit_id":"072a47404f83d9c17363600938d6834743cc0f9a","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":"Да я видел изменения, норм. Оказывается там было совсем не то, что я ожидал.","created_at":"2016-10-19T09:00:59Z","updated_at":"2016-10-19T09:00:59Z","html_url":"https://github.com/aurusov/raox-game5/pull/74#discussion_r84025429","pull_request_url":"https://api.github.com/repos/aurusov/raox-game5/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/aurusov/raox-game5/pulls/comments/84025429"},"html":{"href":"https://github.com/aurusov/raox-game5/pull/74#discussion_r84025429"},"pull_request":{"href":"https://api.github.com/repos/aurusov/raox-game5/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/aurusov/raox-game5/pulls/74","id":89723353,"html_url":"https://github.com/aurusov/raox-game5/pull/74","diff_url":"https://github.com/aurusov/raox-game5/pull/74.diff","patch_url":"https://github.com/aurusov/raox-game5/pull/74.patch","issue_url":"https://api.github.com/repos/aurusov/raox-game5/issues/74","number":74,"state":"open","locked":false,"title":"Интеграция с raox 3","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":"Недостатки на данный момент:\r\n- эдитор эвристик в отдельном окне: неплохо было бы поместить его под окном конфигурации\r\n- обращение к эвристикам надо делать через имя файла с эвристиками, т.е. `heuristics.a()`","created_at":"2016-10-17T23:41:29Z","updated_at":"2016-10-19T09:00:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"12fe7ab1a9d130eb1e38c04ea3bf8caceeff7415","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/aurusov/raox-game5/pulls/74/commits","review_comments_url":"https://api.github.com/repos/aurusov/raox-game5/pulls/74/comments","review_comment_url":"https://api.github.com/repos/aurusov/raox-game5/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aurusov/raox-game5/issues/74/comments","statuses_url":"https://api.github.com/repos/aurusov/raox-game5/statuses/a5efaeb969b6da3ab1840e66852e63046a235f02","head":{"label":"bogachev-pa:feature/use_raox_3","ref":"feature/use_raox_3","sha":"a5efaeb969b6da3ab1840e66852e63046a235f02","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":45557701,"name":"raox-game5","full_name":"bogachev-pa/raox-game5","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/raox-game5","description":"game5 plugin for rdo-xtext","fork":true,"url":"https://api.github.com/repos/bogachev-pa/raox-game5","forks_url":"https://api.github.com/repos/bogachev-pa/raox-game5/forks","keys_url":"https://api.github.com/repos/bogachev-pa/raox-game5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bogachev-pa/raox-game5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bogachev-pa/raox-game5/teams","hooks_url":"https://api.github.com/repos/bogachev-pa/raox-game5/hooks","issue_events_url":"https://api.github.com/repos/bogachev-pa/raox-game5/issues/events{/number}","events_url":"https://api.github.com/repos/bogachev-pa/raox-game5/events","assignees_url":"https://api.github.com/repos/bogachev-pa/raox-game5/assignees{/user}","branches_url":"https://api.github.com/repos/bogachev-pa/raox-game5/branches{/branch}","tags_url":"https://api.github.com/repos/bogachev-pa/raox-game5/tags","blobs_url":"https://api.github.com/repos/bogachev-pa/raox-game5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bogachev-pa/raox-game5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bogachev-pa/raox-game5/git/refs{/sha}","trees_url":"https://api.github.com/repos/bogachev-pa/raox-game5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bogachev-pa/raox-game5/statuses/{sha}","languages_url":"https://api.github.com/repos/bogachev-pa/raox-game5/languages","stargazers_url":"https://api.github.com/repos/bogachev-pa/raox-game5/stargazers","contributors_url":"https://api.github.com/repos/bogachev-pa/raox-game5/contributors","subscribers_url":"https://api.github.com/repos/bogachev-pa/raox-game5/subscribers","subscription_url":"https://api.github.com/repos/bogachev-pa/raox-game5/subscription","commits_url":"https://api.github.com/repos/bogachev-pa/raox-game5/commits{/sha}","git_commits_url":"https://api.github.com/repos/bogachev-pa/raox-game5/git/commits{/sha}","comments_url":"https://api.github.com/repos/bogachev-pa/raox-game5/comments{/number}","issue_comment_url":"https://api.github.com/repos/bogachev-pa/raox-game5/issues/comments{/number}","contents_url":"https://api.github.com/repos/bogachev-pa/raox-game5/contents/{+path}","compare_url":"https://api.github.com/repos/bogachev-pa/raox-game5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bogachev-pa/raox-game5/merges","archive_url":"https://api.github.com/repos/bogachev-pa/raox-game5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bogachev-pa/raox-game5/downloads","issues_url":"https://api.github.com/repos/bogachev-pa/raox-game5/issues{/number}","pulls_url":"https://api.github.com/repos/bogachev-pa/raox-game5/pulls{/number}","milestones_url":"https://api.github.com/repos/bogachev-pa/raox-game5/milestones{/number}","notifications_url":"https://api.github.com/repos/bogachev-pa/raox-game5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bogachev-pa/raox-game5/labels{/name}","releases_url":"https://api.github.com/repos/bogachev-pa/raox-game5/releases{/id}","deployments_url":"https://api.github.com/repos/bogachev-pa/raox-game5/deployments","created_at":"2015-11-04T18:09:08Z","updated_at":"2015-11-04T18:09:09Z","pushed_at":"2016-10-18T23:01:49Z","git_url":"git://github.com/bogachev-pa/raox-game5.git","ssh_url":"git@github.com:bogachev-pa/raox-game5.git","clone_url":"https://github.com/bogachev-pa/raox-game5.git","svn_url":"https://github.com/bogachev-pa/raox-game5","homepage":"","size":175,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"release/current"}},"base":{"label":"aurusov:release/2.0","ref":"release/2.0","sha":"cd2c31a71124e36b158684d4679b85f677530389","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":38208014,"name":"raox-game5","full_name":"aurusov/raox-game5","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/raox-game5","description":"game5 plugin for raox","fork":false,"url":"https://api.github.com/repos/aurusov/raox-game5","forks_url":"https://api.github.com/repos/aurusov/raox-game5/forks","keys_url":"https://api.github.com/repos/aurusov/raox-game5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aurusov/raox-game5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aurusov/raox-game5/teams","hooks_url":"https://api.github.com/repos/aurusov/raox-game5/hooks","issue_events_url":"https://api.github.com/repos/aurusov/raox-game5/issues/events{/number}","events_url":"https://api.github.com/repos/aurusov/raox-game5/events","assignees_url":"https://api.github.com/repos/aurusov/raox-game5/assignees{/user}","branches_url":"https://api.github.com/repos/aurusov/raox-game5/branches{/branch}","tags_url":"https://api.github.com/repos/aurusov/raox-game5/tags","blobs_url":"https://api.github.com/repos/aurusov/raox-game5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aurusov/raox-game5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aurusov/raox-game5/git/refs{/sha}","trees_url":"https://api.github.com/repos/aurusov/raox-game5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aurusov/raox-game5/statuses/{sha}","languages_url":"https://api.github.com/repos/aurusov/raox-game5/languages","stargazers_url":"https://api.github.com/repos/aurusov/raox-game5/stargazers","contributors_url":"https://api.github.com/repos/aurusov/raox-game5/contributors","subscribers_url":"https://api.github.com/repos/aurusov/raox-game5/subscribers","subscription_url":"https://api.github.com/repos/aurusov/raox-game5/subscription","commits_url":"https://api.github.com/repos/aurusov/raox-game5/commits{/sha}","git_commits_url":"https://api.github.com/repos/aurusov/raox-game5/git/commits{/sha}","comments_url":"https://api.github.com/repos/aurusov/raox-game5/comments{/number}","issue_comment_url":"https://api.github.com/repos/aurusov/raox-game5/issues/comments{/number}","contents_url":"https://api.github.com/repos/aurusov/raox-game5/contents/{+path}","compare_url":"https://api.github.com/repos/aurusov/raox-game5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aurusov/raox-game5/merges","archive_url":"https://api.github.com/repos/aurusov/raox-game5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aurusov/raox-game5/downloads","issues_url":"https://api.github.com/repos/aurusov/raox-game5/issues{/number}","pulls_url":"https://api.github.com/repos/aurusov/raox-game5/pulls{/number}","milestones_url":"https://api.github.com/repos/aurusov/raox-game5/milestones{/number}","notifications_url":"https://api.github.com/repos/aurusov/raox-game5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aurusov/raox-game5/labels{/name}","releases_url":"https://api.github.com/repos/aurusov/raox-game5/releases{/id}","deployments_url":"https://api.github.com/repos/aurusov/raox-game5/deployments","created_at":"2015-06-28T17:41:47Z","updated_at":"2016-10-07T19:42:42Z","pushed_at":"2016-10-18T23:01:49Z","git_url":"git://github.com/aurusov/raox-game5.git","ssh_url":"git@github.com:aurusov/raox-game5.git","clone_url":"https://github.com/aurusov/raox-game5.git","svn_url":"https://github.com/aurusov/raox-game5","homepage":"","size":176,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":8,"forks":4,"open_issues":8,"watchers":0,"default_branch":"release/current"}},"_links":{"self":{"href":"https://api.github.com/repos/aurusov/raox-game5/pulls/74"},"html":{"href":"https://github.com/aurusov/raox-game5/pull/74"},"issue":{"href":"https://api.github.com/repos/aurusov/raox-game5/issues/74"},"comments":{"href":"https://api.github.com/repos/aurusov/raox-game5/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/aurusov/raox-game5/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/aurusov/raox-game5/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aurusov/raox-game5/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/aurusov/raox-game5/statuses/a5efaeb969b6da3ab1840e66852e63046a235f02"}}}}
{"actor":{"display_login":"aurusov"}}