{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/xtext/pulls/comments/41833820","id":41833820,"diff_hunk":"@@ -0,0 +1,123 @@\n+/*******************************************************************************\n+ * Copyright (c) 2015 itemis AG (http://www.itemis.eu) and others.\n+ * All rights reserved. This program and the accompanying materials\n+ * are made available under the terms of the Eclipse Public License v1.0\n+ * which accompanies this distribution, and is available at\n+ * http://www.eclipse.org/legal/epl-v10.html\n+ *******************************************************************************/\n+package org.eclipse.xtext.xtext.generator.ui.templates\n+\n+import com.google.inject.Inject\n+import java.util.Collection\n+import java.util.Collections\n+import org.eclipse.xtend2.lib.StringConcatenationClient\n+import org.eclipse.xtext.AbstractRule\n+import org.eclipse.xtext.Grammar\n+import org.eclipse.xtext.util.PolymorphicDispatcher\n+import org.eclipse.xtext.xtext.generator.AbstractGeneratorFragment2\n+import org.eclipse.xtext.xtext.generator.XtextGeneratorNaming\n+import org.eclipse.xtext.xtext.generator.model.FileAccessFactory\n+import org.eclipse.xtext.xtext.generator.model.GuiceModuleAccess\n+import org.eclipse.xtext.xtext.generator.model.TypeReference\n+import org.eclipse.xtext.xtext.generator.parser.antlr.GrammarNaming\n+\n+import static extension org.eclipse.xtext.GrammarUtil.*\n+import static extension org.eclipse.xtext.xtext.generator.model.TypeReference.typeRef\n+\n+/**\n+ * Contributes the 'Partial...ContentAssisParser' and performs further\n+ *  Guice-based registrations. Does not contribute 'plugin.xml' entries.\n+ *  \n+ *\n+ * @author Christian Schneider - Initial contribution and API\n+ */\n+class CodetemplatesGeneratorFragment2 extends AbstractGeneratorFragment2 {\n+\n+\t@Inject\n+\textension GrammarNaming\n+\n+\t@Inject\n+\textension XtextGeneratorNaming\n+\n+\t@Inject\n+\tFileAccessFactory fileAccessFactory\n+\n+\tdef TypeReference getPartialContentAssistParserClass(Grammar g) {\n+\t\tnew TypeReference(g.genericIdeBasePackage + \".contentassist.antlr\", \"Partial\" + g.simpleName + \"ContentAssistParser\")\n+\t}\n+\n+\toverride generate() {\n+\t\tif (projectConfig.eclipsePlugin?.manifest != null) {\n+\t\t\tprojectConfig.eclipsePlugin?.manifest.requiredBundles += #[\n+\t\t\t\t\"org.eclipse.xtext.ui\", \"org.eclipse.xtext.ui.codetemplates.ui\"\n+\t\t\t]\n+\t\t}\n+\t\t\n+\t\tnew GuiceModuleAccess.BindingFactory()\n+\t\t\t\t.addTypeToProviderInstance(\n+\t\t\t\t\t\"org.eclipse.xtext.ui.codetemplates.ui.preferences.TemplatesLanguageConfiguration\".typeRef,\n+\t\t\t\t\t'''org.eclipse.xtext.ui.codetemplates.ui.AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider()''')","path":"plugins/org.eclipse.xtext.xtext.generator/src/org/eclipse/xtext/xtext/generator/ui/templates/CodetemplatesGeneratorFragment2.xtend","position":59,"original_position":59,"commit_id":"21585d8d35c49914177e973ad0ab049552efd839","original_commit_id":"21585d8d35c49914177e973ad0ab049552efd839","user":{"login":"sailingKieler","id":8513883,"avatar_url":"https://avatars.githubusercontent.com/u/8513883?v=3","gravatar_id":"","url":"https://api.github.com/users/sailingKieler","html_url":"https://github.com/sailingKieler","followers_url":"https://api.github.com/users/sailingKieler/followers","following_url":"https://api.github.com/users/sailingKieler/following{/other_user}","gists_url":"https://api.github.com/users/sailingKieler/gists{/gist_id}","starred_url":"https://api.github.com/users/sailingKieler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sailingKieler/subscriptions","organizations_url":"https://api.github.com/users/sailingKieler/orgs","repos_url":"https://api.github.com/users/sailingKieler/repos","events_url":"https://api.github.com/users/sailingKieler/events{/privacy}","received_events_url":"https://api.github.com/users/sailingKieler/received_events","type":"User","site_admin":false},"body":"which wrapping do you mean? the template part is not wrapped here","created_at":"2015-10-13T07:23:32Z","updated_at":"2015-10-13T07:23:32Z","html_url":"https://github.com/eclipse/xtext/pull/674#discussion_r41833820","pull_request_url":"https://api.github.com/repos/eclipse/xtext/pulls/674","_links":{"self":{"href":"https://api.github.com/repos/eclipse/xtext/pulls/comments/41833820"},"html":{"href":"https://github.com/eclipse/xtext/pull/674#discussion_r41833820"},"pull_request":{"href":"https://api.github.com/repos/eclipse/xtext/pulls/674"}}},"pull_request":{"url":"https://api.github.com/repos/eclipse/xtext/pulls/674","id":47413968,"html_url":"https://github.com/eclipse/xtext/pull/674","diff_url":"https://github.com/eclipse/xtext/pull/674.diff","patch_url":"https://github.com/eclipse/xtext/pull/674.patch","issue_url":"https://api.github.com/repos/eclipse/xtext/issues/674","number":674,"state":"open","locked":false,"title":"[xtext generator] Migration of 'CodetemplateGeneratorFragment'","user":{"login":"sailingKieler","id":8513883,"avatar_url":"https://avatars.githubusercontent.com/u/8513883?v=3","gravatar_id":"","url":"https://api.github.com/users/sailingKieler","html_url":"https://github.com/sailingKieler","followers_url":"https://api.github.com/users/sailingKieler/followers","following_url":"https://api.github.com/users/sailingKieler/following{/other_user}","gists_url":"https://api.github.com/users/sailingKieler/gists{/gist_id}","starred_url":"https://api.github.com/users/sailingKieler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sailingKieler/subscriptions","organizations_url":"https://api.github.com/users/sailingKieler/orgs","repos_url":"https://api.github.com/users/sailingKieler/repos","events_url":"https://api.github.com/users/sailingKieler/events{/privacy}","received_events_url":"https://api.github.com/users/sailingKieler/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Christian Schneider <christian.schneider@itemis.de>","created_at":"2015-10-12T12:29:11Z","updated_at":"2015-10-13T07:23:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e0365a92e8271a98f33b0314a484b01b873a6d7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/xtext/pulls/674/commits","review_comments_url":"https://api.github.com/repos/eclipse/xtext/pulls/674/comments","review_comment_url":"https://api.github.com/repos/eclipse/xtext/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/xtext/issues/674/comments","statuses_url":"https://api.github.com/repos/eclipse/xtext/statuses/21585d8d35c49914177e973ad0ab049552efd839","head":{"label":"sailingKieler:aa/codetemplatesGenerator","ref":"aa/codetemplatesGenerator","sha":"21585d8d35c49914177e973ad0ab049552efd839","user":{"login":"sailingKieler","id":8513883,"avatar_url":"https://avatars.githubusercontent.com/u/8513883?v=3","gravatar_id":"","url":"https://api.github.com/users/sailingKieler","html_url":"https://github.com/sailingKieler","followers_url":"https://api.github.com/users/sailingKieler/followers","following_url":"https://api.github.com/users/sailingKieler/following{/other_user}","gists_url":"https://api.github.com/users/sailingKieler/gists{/gist_id}","starred_url":"https://api.github.com/users/sailingKieler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sailingKieler/subscriptions","organizations_url":"https://api.github.com/users/sailingKieler/orgs","repos_url":"https://api.github.com/users/sailingKieler/repos","events_url":"https://api.github.com/users/sailingKieler/events{/privacy}","received_events_url":"https://api.github.com/users/sailingKieler/received_events","type":"User","site_admin":false},"repo":{"id":43501675,"name":"xtext","full_name":"sailingKieler/xtext","owner":{"login":"sailingKieler","id":8513883,"avatar_url":"https://avatars.githubusercontent.com/u/8513883?v=3","gravatar_id":"","url":"https://api.github.com/users/sailingKieler","html_url":"https://github.com/sailingKieler","followers_url":"https://api.github.com/users/sailingKieler/followers","following_url":"https://api.github.com/users/sailingKieler/following{/other_user}","gists_url":"https://api.github.com/users/sailingKieler/gists{/gist_id}","starred_url":"https://api.github.com/users/sailingKieler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sailingKieler/subscriptions","organizations_url":"https://api.github.com/users/sailingKieler/orgs","repos_url":"https://api.github.com/users/sailingKieler/repos","events_url":"https://api.github.com/users/sailingKieler/events{/privacy}","received_events_url":"https://api.github.com/users/sailingKieler/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sailingKieler/xtext","description":"Xtext is a language development framework ","fork":true,"url":"https://api.github.com/repos/sailingKieler/xtext","forks_url":"https://api.github.com/repos/sailingKieler/xtext/forks","keys_url":"https://api.github.com/repos/sailingKieler/xtext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sailingKieler/xtext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sailingKieler/xtext/teams","hooks_url":"https://api.github.com/repos/sailingKieler/xtext/hooks","issue_events_url":"https://api.github.com/repos/sailingKieler/xtext/issues/events{/number}","events_url":"https://api.github.com/repos/sailingKieler/xtext/events","assignees_url":"https://api.github.com/repos/sailingKieler/xtext/assignees{/user}","branches_url":"https://api.github.com/repos/sailingKieler/xtext/branches{/branch}","tags_url":"https://api.github.com/repos/sailingKieler/xtext/tags","blobs_url":"https://api.github.com/repos/sailingKieler/xtext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sailingKieler/xtext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sailingKieler/xtext/git/refs{/sha}","trees_url":"https://api.github.com/repos/sailingKieler/xtext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sailingKieler/xtext/statuses/{sha}","languages_url":"https://api.github.com/repos/sailingKieler/xtext/languages","stargazers_url":"https://api.github.com/repos/sailingKieler/xtext/stargazers","contributors_url":"https://api.github.com/repos/sailingKieler/xtext/contributors","subscribers_url":"https://api.github.com/repos/sailingKieler/xtext/subscribers","subscription_url":"https://api.github.com/repos/sailingKieler/xtext/subscription","commits_url":"https://api.github.com/repos/sailingKieler/xtext/commits{/sha}","git_commits_url":"https://api.github.com/repos/sailingKieler/xtext/git/commits{/sha}","comments_url":"https://api.github.com/repos/sailingKieler/xtext/comments{/number}","issue_comment_url":"https://api.github.com/repos/sailingKieler/xtext/issues/comments{/number}","contents_url":"https://api.github.com/repos/sailingKieler/xtext/contents/{+path}","compare_url":"https://api.github.com/repos/sailingKieler/xtext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sailingKieler/xtext/merges","archive_url":"https://api.github.com/repos/sailingKieler/xtext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sailingKieler/xtext/downloads","issues_url":"https://api.github.com/repos/sailingKieler/xtext/issues{/number}","pulls_url":"https://api.github.com/repos/sailingKieler/xtext/pulls{/number}","milestones_url":"https://api.github.com/repos/sailingKieler/xtext/milestones{/number}","notifications_url":"https://api.github.com/repos/sailingKieler/xtext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sailingKieler/xtext/labels{/name}","releases_url":"https://api.github.com/repos/sailingKieler/xtext/releases{/id}","created_at":"2015-10-01T14:38:21Z","updated_at":"2015-10-01T14:40:13Z","pushed_at":"2015-10-12T14:04:28Z","git_url":"git://github.com/sailingKieler/xtext.git","ssh_url":"git@github.com:sailingKieler/xtext.git","clone_url":"https://github.com/sailingKieler/xtext.git","svn_url":"https://github.com/sailingKieler/xtext","homepage":"http://xtext.org","size":484271,"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":"eclipse:master","ref":"master","sha":"8b7de40f1fd54aae923f234a8d709f7b430593d9","user":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":1553758,"name":"xtext","full_name":"eclipse/xtext","owner":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eclipse/xtext","description":"Xtext is a language development framework ","fork":false,"url":"https://api.github.com/repos/eclipse/xtext","forks_url":"https://api.github.com/repos/eclipse/xtext/forks","keys_url":"https://api.github.com/repos/eclipse/xtext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/xtext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/xtext/teams","hooks_url":"https://api.github.com/repos/eclipse/xtext/hooks","issue_events_url":"https://api.github.com/repos/eclipse/xtext/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/xtext/events","assignees_url":"https://api.github.com/repos/eclipse/xtext/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/xtext/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/xtext/tags","blobs_url":"https://api.github.com/repos/eclipse/xtext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/xtext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/xtext/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/xtext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/xtext/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/xtext/languages","stargazers_url":"https://api.github.com/repos/eclipse/xtext/stargazers","contributors_url":"https://api.github.com/repos/eclipse/xtext/contributors","subscribers_url":"https://api.github.com/repos/eclipse/xtext/subscribers","subscription_url":"https://api.github.com/repos/eclipse/xtext/subscription","commits_url":"https://api.github.com/repos/eclipse/xtext/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/xtext/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/xtext/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/xtext/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/xtext/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/xtext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/xtext/merges","archive_url":"https://api.github.com/repos/eclipse/xtext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/xtext/downloads","issues_url":"https://api.github.com/repos/eclipse/xtext/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/xtext/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/xtext/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/xtext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/xtext/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/xtext/releases{/id}","created_at":"2011-04-01T02:12:17Z","updated_at":"2015-10-08T17:38:24Z","pushed_at":"2015-10-12T22:53:28Z","git_url":"git://github.com/eclipse/xtext.git","ssh_url":"git@github.com:eclipse/xtext.git","clone_url":"https://github.com/eclipse/xtext.git","svn_url":"https://github.com/eclipse/xtext","homepage":"http://xtext.org","size":827098,"stargazers_count":184,"watchers_count":184,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":85,"mirror_url":null,"open_issues_count":12,"forks":85,"open_issues":12,"watchers":184,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/xtext/pulls/674"},"html":{"href":"https://github.com/eclipse/xtext/pull/674"},"issue":{"href":"https://api.github.com/repos/eclipse/xtext/issues/674"},"comments":{"href":"https://api.github.com/repos/eclipse/xtext/issues/674/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/xtext/pulls/674/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/xtext/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/xtext/pulls/674/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/xtext/statuses/21585d8d35c49914177e973ad0ab049552efd839"}}}}