{"action":"created","comment":{"url":"https://api.github.com/repos/mulesoft/mule/pulls/comments/48554818","id":48554818,"diff_hunk":"@@ -0,0 +1,53 @@\n+/*\n+ * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com\n+ * The software in this package is published under the terms of the CPAL v1.0\n+ * license, a copy of which has been included with this distribution in the\n+ * LICENSE.txt file.\n+ */\n+package org.mule.module.extension.internal.introspection.enricher;\n+\n+import org.mule.extension.annotation.api.capability.Studio;\n+import org.mule.extension.api.introspection.declaration.DescribingContext;\n+import org.mule.extension.api.introspection.declaration.fluent.DeclarationDescriptor;\n+import org.mule.extension.api.introspection.property.StudioModelProperty;\n+import org.mule.module.extension.internal.introspection.ImmutableStudioModelProperty;\n+import org.mule.module.extension.internal.model.AbstractAnnotatedModelEnricher;\n+\n+/**\n+ * Enriches the {@link DeclarationDescriptor} with a model property which key is {@value StudioModelProperty#KEY} and the value an instance of {@link StudioModelProperty}.\n+ * <p/>\n+ * If the extension is annotated with {@link Studio} and it is not marked as provided, the values of it will be used to initialize the {@link StudioModelProperty}. If it is not annotated with it, the model will be enriched with the default values\n+ *\n+ * @since 4.0\n+ */\n+public final class StudioModelEnricher extends AbstractAnnotatedModelEnricher\n+{\n+\n+    public static final String DEFAULT_EDITORS_XML_FILE = \"editors.xml\";\n+    public static final boolean DEFAULT_PROVIDED_STATE = false;\n+\n+    @Override\n+    public void enrich(DescribingContext describingContext)\n+    {\n+        Studio studioStudio = extractAnnotation(describingContext.getDeclarationDescriptor().getDeclaration(), Studio.class);\n+        if (studioStudio == null || (studioStudio != null && !studioStudio.provided()))","path":"modules/extensions-support/src/main/java/org/mule/module/extension/internal/introspection/enricher/StudioModelEnricher.java","position":33,"original_position":33,"commit_id":"4554c253f5d850c35d4fc9647c05f79d66c02c13","original_commit_id":"4554c253f5d850c35d4fc9647c05f79d66c02c13","user":{"login":"marianogonzalez","id":1272771,"avatar_url":"https://avatars.githubusercontent.com/u/1272771?v=3","gravatar_id":"","url":"https://api.github.com/users/marianogonzalez","html_url":"https://github.com/marianogonzalez","followers_url":"https://api.github.com/users/marianogonzalez/followers","following_url":"https://api.github.com/users/marianogonzalez/following{/other_user}","gists_url":"https://api.github.com/users/marianogonzalez/gists{/gist_id}","starred_url":"https://api.github.com/users/marianogonzalez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marianogonzalez/subscriptions","organizations_url":"https://api.github.com/users/marianogonzalez/orgs","repos_url":"https://api.github.com/users/marianogonzalez/repos","events_url":"https://api.github.com/users/marianogonzalez/events{/privacy}","received_events_url":"https://api.github.com/users/marianogonzalez/received_events","type":"User","site_admin":false},"body":"studio != null is redundant","created_at":"2015-12-29T17:17:30Z","updated_at":"2015-12-29T17:17:30Z","html_url":"https://github.com/mulesoft/mule/pull/2276#discussion_r48554818","pull_request_url":"https://api.github.com/repos/mulesoft/mule/pulls/2276","_links":{"self":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/comments/48554818"},"html":{"href":"https://github.com/mulesoft/mule/pull/2276#discussion_r48554818"},"pull_request":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/2276"}}},"pull_request":{"url":"https://api.github.com/repos/mulesoft/mule/pulls/2276","id":54732906,"html_url":"https://github.com/mulesoft/mule/pull/2276","diff_url":"https://github.com/mulesoft/mule/pull/2276.diff","patch_url":"https://github.com/mulesoft/mule/pull/2276.patch","issue_url":"https://api.github.com/repos/mulesoft/mule/issues/2276","number":2276,"state":"open","locked":false,"title":"MULE-9084 - Allow SDK to generate Studio support","user":{"login":"pablocabrera85","id":3269977,"avatar_url":"https://avatars.githubusercontent.com/u/3269977?v=3","gravatar_id":"","url":"https://api.github.com/users/pablocabrera85","html_url":"https://github.com/pablocabrera85","followers_url":"https://api.github.com/users/pablocabrera85/followers","following_url":"https://api.github.com/users/pablocabrera85/following{/other_user}","gists_url":"https://api.github.com/users/pablocabrera85/gists{/gist_id}","starred_url":"https://api.github.com/users/pablocabrera85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pablocabrera85/subscriptions","organizations_url":"https://api.github.com/users/pablocabrera85/orgs","repos_url":"https://api.github.com/users/pablocabrera85/repos","events_url":"https://api.github.com/users/pablocabrera85/events{/privacy}","received_events_url":"https://api.github.com/users/pablocabrera85/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-29T15:05:47Z","updated_at":"2015-12-29T17:17:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"423636f1a673309d2db88cd678ff53b27d3efd86","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mulesoft/mule/pulls/2276/commits","review_comments_url":"https://api.github.com/repos/mulesoft/mule/pulls/2276/comments","review_comment_url":"https://api.github.com/repos/mulesoft/mule/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mulesoft/mule/issues/2276/comments","statuses_url":"https://api.github.com/repos/mulesoft/mule/statuses/4554c253f5d850c35d4fc9647c05f79d66c02c13","head":{"label":"mulesoft:feature/MULE-9084","ref":"feature/MULE-9084","sha":"4554c253f5d850c35d4fc9647c05f79d66c02c13","user":{"login":"mulesoft","id":185740,"avatar_url":"https://avatars.githubusercontent.com/u/185740?v=3","gravatar_id":"","url":"https://api.github.com/users/mulesoft","html_url":"https://github.com/mulesoft","followers_url":"https://api.github.com/users/mulesoft/followers","following_url":"https://api.github.com/users/mulesoft/following{/other_user}","gists_url":"https://api.github.com/users/mulesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mulesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mulesoft/subscriptions","organizations_url":"https://api.github.com/users/mulesoft/orgs","repos_url":"https://api.github.com/users/mulesoft/repos","events_url":"https://api.github.com/users/mulesoft/events{/privacy}","received_events_url":"https://api.github.com/users/mulesoft/received_events","type":"Organization","site_admin":false},"repo":{"id":7058562,"name":"mule","full_name":"mulesoft/mule","owner":{"login":"mulesoft","id":185740,"avatar_url":"https://avatars.githubusercontent.com/u/185740?v=3","gravatar_id":"","url":"https://api.github.com/users/mulesoft","html_url":"https://github.com/mulesoft","followers_url":"https://api.github.com/users/mulesoft/followers","following_url":"https://api.github.com/users/mulesoft/following{/other_user}","gists_url":"https://api.github.com/users/mulesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mulesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mulesoft/subscriptions","organizations_url":"https://api.github.com/users/mulesoft/orgs","repos_url":"https://api.github.com/users/mulesoft/repos","events_url":"https://api.github.com/users/mulesoft/events{/privacy}","received_events_url":"https://api.github.com/users/mulesoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mulesoft/mule","description":"Mule Community Edition","fork":false,"url":"https://api.github.com/repos/mulesoft/mule","forks_url":"https://api.github.com/repos/mulesoft/mule/forks","keys_url":"https://api.github.com/repos/mulesoft/mule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mulesoft/mule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mulesoft/mule/teams","hooks_url":"https://api.github.com/repos/mulesoft/mule/hooks","issue_events_url":"https://api.github.com/repos/mulesoft/mule/issues/events{/number}","events_url":"https://api.github.com/repos/mulesoft/mule/events","assignees_url":"https://api.github.com/repos/mulesoft/mule/assignees{/user}","branches_url":"https://api.github.com/repos/mulesoft/mule/branches{/branch}","tags_url":"https://api.github.com/repos/mulesoft/mule/tags","blobs_url":"https://api.github.com/repos/mulesoft/mule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mulesoft/mule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mulesoft/mule/git/refs{/sha}","trees_url":"https://api.github.com/repos/mulesoft/mule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mulesoft/mule/statuses/{sha}","languages_url":"https://api.github.com/repos/mulesoft/mule/languages","stargazers_url":"https://api.github.com/repos/mulesoft/mule/stargazers","contributors_url":"https://api.github.com/repos/mulesoft/mule/contributors","subscribers_url":"https://api.github.com/repos/mulesoft/mule/subscribers","subscription_url":"https://api.github.com/repos/mulesoft/mule/subscription","commits_url":"https://api.github.com/repos/mulesoft/mule/commits{/sha}","git_commits_url":"https://api.github.com/repos/mulesoft/mule/git/commits{/sha}","comments_url":"https://api.github.com/repos/mulesoft/mule/comments{/number}","issue_comment_url":"https://api.github.com/repos/mulesoft/mule/issues/comments{/number}","contents_url":"https://api.github.com/repos/mulesoft/mule/contents/{+path}","compare_url":"https://api.github.com/repos/mulesoft/mule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mulesoft/mule/merges","archive_url":"https://api.github.com/repos/mulesoft/mule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mulesoft/mule/downloads","issues_url":"https://api.github.com/repos/mulesoft/mule/issues{/number}","pulls_url":"https://api.github.com/repos/mulesoft/mule/pulls{/number}","milestones_url":"https://api.github.com/repos/mulesoft/mule/milestones{/number}","notifications_url":"https://api.github.com/repos/mulesoft/mule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mulesoft/mule/labels{/name}","releases_url":"https://api.github.com/repos/mulesoft/mule/releases{/id}","created_at":"2012-12-07T19:23:06Z","updated_at":"2015-12-28T18:14:53Z","pushed_at":"2015-12-29T17:14:02Z","git_url":"git://github.com/mulesoft/mule.git","ssh_url":"git@github.com:mulesoft/mule.git","clone_url":"https://github.com/mulesoft/mule.git","svn_url":"https://github.com/mulesoft/mule","homepage":null,"size":196374,"stargazers_count":265,"watchers_count":265,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":309,"mirror_url":null,"open_issues_count":19,"forks":309,"open_issues":19,"watchers":265,"default_branch":"mule-3.x"}},"base":{"label":"mulesoft:mule-4.x","ref":"mule-4.x","sha":"a0841b31f37816833b66cd278ab3d190258734f2","user":{"login":"mulesoft","id":185740,"avatar_url":"https://avatars.githubusercontent.com/u/185740?v=3","gravatar_id":"","url":"https://api.github.com/users/mulesoft","html_url":"https://github.com/mulesoft","followers_url":"https://api.github.com/users/mulesoft/followers","following_url":"https://api.github.com/users/mulesoft/following{/other_user}","gists_url":"https://api.github.com/users/mulesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mulesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mulesoft/subscriptions","organizations_url":"https://api.github.com/users/mulesoft/orgs","repos_url":"https://api.github.com/users/mulesoft/repos","events_url":"https://api.github.com/users/mulesoft/events{/privacy}","received_events_url":"https://api.github.com/users/mulesoft/received_events","type":"Organization","site_admin":false},"repo":{"id":7058562,"name":"mule","full_name":"mulesoft/mule","owner":{"login":"mulesoft","id":185740,"avatar_url":"https://avatars.githubusercontent.com/u/185740?v=3","gravatar_id":"","url":"https://api.github.com/users/mulesoft","html_url":"https://github.com/mulesoft","followers_url":"https://api.github.com/users/mulesoft/followers","following_url":"https://api.github.com/users/mulesoft/following{/other_user}","gists_url":"https://api.github.com/users/mulesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mulesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mulesoft/subscriptions","organizations_url":"https://api.github.com/users/mulesoft/orgs","repos_url":"https://api.github.com/users/mulesoft/repos","events_url":"https://api.github.com/users/mulesoft/events{/privacy}","received_events_url":"https://api.github.com/users/mulesoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mulesoft/mule","description":"Mule Community Edition","fork":false,"url":"https://api.github.com/repos/mulesoft/mule","forks_url":"https://api.github.com/repos/mulesoft/mule/forks","keys_url":"https://api.github.com/repos/mulesoft/mule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mulesoft/mule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mulesoft/mule/teams","hooks_url":"https://api.github.com/repos/mulesoft/mule/hooks","issue_events_url":"https://api.github.com/repos/mulesoft/mule/issues/events{/number}","events_url":"https://api.github.com/repos/mulesoft/mule/events","assignees_url":"https://api.github.com/repos/mulesoft/mule/assignees{/user}","branches_url":"https://api.github.com/repos/mulesoft/mule/branches{/branch}","tags_url":"https://api.github.com/repos/mulesoft/mule/tags","blobs_url":"https://api.github.com/repos/mulesoft/mule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mulesoft/mule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mulesoft/mule/git/refs{/sha}","trees_url":"https://api.github.com/repos/mulesoft/mule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mulesoft/mule/statuses/{sha}","languages_url":"https://api.github.com/repos/mulesoft/mule/languages","stargazers_url":"https://api.github.com/repos/mulesoft/mule/stargazers","contributors_url":"https://api.github.com/repos/mulesoft/mule/contributors","subscribers_url":"https://api.github.com/repos/mulesoft/mule/subscribers","subscription_url":"https://api.github.com/repos/mulesoft/mule/subscription","commits_url":"https://api.github.com/repos/mulesoft/mule/commits{/sha}","git_commits_url":"https://api.github.com/repos/mulesoft/mule/git/commits{/sha}","comments_url":"https://api.github.com/repos/mulesoft/mule/comments{/number}","issue_comment_url":"https://api.github.com/repos/mulesoft/mule/issues/comments{/number}","contents_url":"https://api.github.com/repos/mulesoft/mule/contents/{+path}","compare_url":"https://api.github.com/repos/mulesoft/mule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mulesoft/mule/merges","archive_url":"https://api.github.com/repos/mulesoft/mule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mulesoft/mule/downloads","issues_url":"https://api.github.com/repos/mulesoft/mule/issues{/number}","pulls_url":"https://api.github.com/repos/mulesoft/mule/pulls{/number}","milestones_url":"https://api.github.com/repos/mulesoft/mule/milestones{/number}","notifications_url":"https://api.github.com/repos/mulesoft/mule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mulesoft/mule/labels{/name}","releases_url":"https://api.github.com/repos/mulesoft/mule/releases{/id}","created_at":"2012-12-07T19:23:06Z","updated_at":"2015-12-28T18:14:53Z","pushed_at":"2015-12-29T17:14:02Z","git_url":"git://github.com/mulesoft/mule.git","ssh_url":"git@github.com:mulesoft/mule.git","clone_url":"https://github.com/mulesoft/mule.git","svn_url":"https://github.com/mulesoft/mule","homepage":null,"size":196374,"stargazers_count":265,"watchers_count":265,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":309,"mirror_url":null,"open_issues_count":19,"forks":309,"open_issues":19,"watchers":265,"default_branch":"mule-3.x"}},"_links":{"self":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/2276"},"html":{"href":"https://github.com/mulesoft/mule/pull/2276"},"issue":{"href":"https://api.github.com/repos/mulesoft/mule/issues/2276"},"comments":{"href":"https://api.github.com/repos/mulesoft/mule/issues/2276/comments"},"review_comments":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/2276/comments"},"review_comment":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/2276/commits"},"statuses":{"href":"https://api.github.com/repos/mulesoft/mule/statuses/4554c253f5d850c35d4fc9647c05f79d66c02c13"}}}}