{"action":"created","comment":{"url":"https://api.github.com/repos/fusesource/fuseide/pulls/comments/110230349","pull_request_review_id":31389117,"id":110230349,"diff_hunk":"@@ -0,0 +1,81 @@\n+/*******************************************************************************\n+ * Copyright (c) 2017 Red Hat, Inc.\n+ * Distributed under license by Red Hat, Inc. All rights reserved.\n+ * This program is made available under the terms of the\n+ * Eclipse Public License v1.0 which accompanies this distribution,\n+ * and is available at http://www.eclipse.org/legal/epl-v10.html\n+ *\n+ * Contributors:\n+ *     Red Hat, Inc. - initial API and implementation\n+ ******************************************************************************/\n+package org.fusesource.ide.camel.editor.properties.bean;\n+\n+import org.eclipse.core.databinding.DataBindingContext;\n+import org.eclipse.core.databinding.observable.map.IObservableMap;\n+import org.eclipse.jface.databinding.swt.WidgetProperties;\n+import org.eclipse.swt.SWT;\n+import org.eclipse.swt.widgets.Composite;\n+import org.eclipse.swt.widgets.Text;\n+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;\n+import org.fusesource.ide.camel.editor.properties.creators.AbstractTextFieldParameterPropertyUICreator;\n+import org.fusesource.ide.camel.editor.properties.creators.modifylisteners.text.AbstractTextParameterPropertyModifyListener;\n+import org.fusesource.ide.camel.model.service.core.catalog.Parameter;\n+import org.fusesource.ide.camel.model.service.core.catalog.eips.Eip;\n+import org.fusesource.ide.camel.model.service.core.model.AbstractCamelModelElement;\n+import org.fusesource.ide.camel.model.service.core.model.CamelBean;\n+import org.w3c.dom.Node;\n+\n+/**\n+ * @author brianf\n+ *\n+ */\n+public class AttributeTextFieldPropertyUICreator extends AbstractTextFieldParameterPropertyUICreator {\n+\n+\tpublic AttributeTextFieldPropertyUICreator(DataBindingContext dbc, IObservableMap<String, String> modelMap, Eip eip, AbstractCamelModelElement camelModelElement, Parameter parameter,\n+\t\t\tComposite parent, TabbedPropertySheetWidgetFactory widgetFactory) {\n+\t\tsuper(dbc, modelMap, eip, camelModelElement, parameter, parent, widgetFactory, \n+\t\t\t\tnew AttributeTextParameterPropertyModifyListenerForAdvanced(camelModelElement, parameter));\n+\t}\n+\n+\tpublic AttributeTextFieldPropertyUICreator(DataBindingContext dbc, IObservableMap<String, String> modelMap, Eip eip, AbstractCamelModelElement camelModelElement, Parameter parameter,\n+\t\t\tComposite parent, TabbedPropertySheetWidgetFactory widgetFactory, AbstractTextParameterPropertyModifyListener listener) {\n+\t\tsuper(dbc, modelMap, eip, camelModelElement, parameter, parent, widgetFactory, listener);\n+\t}\n+\n+\t@Override\n+\tpublic String getInitialValue() {\n+\t\tfinal String parameterName = parameter.getName();\n+\t\tfinal Object parameterValue = camelModelElement.getParameter(parameterName);\n+\t\tfinal Parameter param = eip.getParameter(parameterName);\n+\t\tString defaultValue = null;\n+\t\tif (param != null && param.getDefaultValue() != null) {\n+\t\t\tdefaultValue = param.getDefaultValue();\n+\t\t}\n+\t\tif (camelModelElement instanceof CamelBean && parameterValue == null) {\n+\t\t\tfinal Object attrValue = getAttributeValue(parameterName);\n+\t\t\treturn (String) (attrValue != null ? attrValue : param != null ? defaultValue : \"\");","path":"editor/plugins/org.fusesource.ide.camel.editor/src/org/fusesource/ide/camel/editor/properties/bean/AttributeTextFieldPropertyUICreator.java","position":56,"original_position":56,"commit_id":"b30d624a560fc73541bf64b7bfc37e5856a204a0","original_commit_id":"b30d624a560fc73541bf64b7bfc37e5856a204a0","user":{"login":"rhdevelopers-ci","id":18214726,"avatar_url":"https://avatars0.githubusercontent.com/u/18214726?v=3","gravatar_id":"","url":"https://api.github.com/users/rhdevelopers-ci","html_url":"https://github.com/rhdevelopers-ci","followers_url":"https://api.github.com/users/rhdevelopers-ci/followers","following_url":"https://api.github.com/users/rhdevelopers-ci/following{/other_user}","gists_url":"https://api.github.com/users/rhdevelopers-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/rhdevelopers-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhdevelopers-ci/subscriptions","organizations_url":"https://api.github.com/users/rhdevelopers-ci/orgs","repos_url":"https://api.github.com/users/rhdevelopers-ci/repos","events_url":"https://api.github.com/users/rhdevelopers-ci/events{/privacy}","received_events_url":"https://api.github.com/users/rhdevelopers-ci/received_events","type":"User","site_admin":false},"body":"![MAJOR](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/severity-major.png 'Severity: MAJOR') Extract this nested ternary operation into an independent statement. [![rule](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/rule.png)](https://sonarqube.com/coding_rules#rule_key=squid%3AS3358)\n","created_at":"2017-04-06T18:11:45Z","updated_at":"2017-04-06T18:11:45Z","html_url":"https://github.com/fusesource/fuseide/pull/880#discussion_r110230349","pull_request_url":"https://api.github.com/repos/fusesource/fuseide/pulls/880","_links":{"self":{"href":"https://api.github.com/repos/fusesource/fuseide/pulls/comments/110230349"},"html":{"href":"https://github.com/fusesource/fuseide/pull/880#discussion_r110230349"},"pull_request":{"href":"https://api.github.com/repos/fusesource/fuseide/pulls/880"}}},"pull_request":{"url":"https://api.github.com/repos/fusesource/fuseide/pulls/880","id":110131329,"html_url":"https://github.com/fusesource/fuseide/pull/880","diff_url":"https://github.com/fusesource/fuseide/pull/880.diff","patch_url":"https://github.com/fusesource/fuseide/pull/880.patch","issue_url":"https://api.github.com/repos/fusesource/fuseide/issues/880","number":880,"state":"open","locked":false,"title":"FUSETOOLS-1585 - beginnings of adding bean support","user":{"login":"bfitzpat","id":530878,"avatar_url":"https://avatars3.githubusercontent.com/u/530878?v=3","gravatar_id":"","url":"https://api.github.com/users/bfitzpat","html_url":"https://github.com/bfitzpat","followers_url":"https://api.github.com/users/bfitzpat/followers","following_url":"https://api.github.com/users/bfitzpat/following{/other_user}","gists_url":"https://api.github.com/users/bfitzpat/gists{/gist_id}","starred_url":"https://api.github.com/users/bfitzpat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfitzpat/subscriptions","organizations_url":"https://api.github.com/users/bfitzpat/orgs","repos_url":"https://api.github.com/users/bfitzpat/repos","events_url":"https://api.github.com/users/bfitzpat/events{/privacy}","received_events_url":"https://api.github.com/users/bfitzpat/received_events","type":"User","site_admin":false},"body":"-- adding to Global Configuration page as an \"Add\" possibility\r\n-- started work on the Bean wizard\r\n\r\nDO NOT MERGE -- merely to enable discussion at this point with @apupier ","created_at":"2017-03-10T13:49:07Z","updated_at":"2017-04-06T18:11:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de2fd40cb73fe8577cd917a11409a64279a9e213","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fusesource/fuseide/pulls/880/commits","review_comments_url":"https://api.github.com/repos/fusesource/fuseide/pulls/880/comments","review_comment_url":"https://api.github.com/repos/fusesource/fuseide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fusesource/fuseide/issues/880/comments","statuses_url":"https://api.github.com/repos/fusesource/fuseide/statuses/b30d624a560fc73541bf64b7bfc37e5856a204a0","head":{"label":"bfitzpat:FUSETOOLS-1585","ref":"FUSETOOLS-1585","sha":"b30d624a560fc73541bf64b7bfc37e5856a204a0","user":{"login":"bfitzpat","id":530878,"avatar_url":"https://avatars3.githubusercontent.com/u/530878?v=3","gravatar_id":"","url":"https://api.github.com/users/bfitzpat","html_url":"https://github.com/bfitzpat","followers_url":"https://api.github.com/users/bfitzpat/followers","following_url":"https://api.github.com/users/bfitzpat/following{/other_user}","gists_url":"https://api.github.com/users/bfitzpat/gists{/gist_id}","starred_url":"https://api.github.com/users/bfitzpat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfitzpat/subscriptions","organizations_url":"https://api.github.com/users/bfitzpat/orgs","repos_url":"https://api.github.com/users/bfitzpat/repos","events_url":"https://api.github.com/users/bfitzpat/events{/privacy}","received_events_url":"https://api.github.com/users/bfitzpat/received_events","type":"User","site_admin":false},"repo":{"id":43711216,"name":"fuseide","full_name":"bfitzpat/fuseide","owner":{"login":"bfitzpat","id":530878,"avatar_url":"https://avatars3.githubusercontent.com/u/530878?v=3","gravatar_id":"","url":"https://api.github.com/users/bfitzpat","html_url":"https://github.com/bfitzpat","followers_url":"https://api.github.com/users/bfitzpat/followers","following_url":"https://api.github.com/users/bfitzpat/following{/other_user}","gists_url":"https://api.github.com/users/bfitzpat/gists{/gist_id}","starred_url":"https://api.github.com/users/bfitzpat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfitzpat/subscriptions","organizations_url":"https://api.github.com/users/bfitzpat/orgs","repos_url":"https://api.github.com/users/bfitzpat/repos","events_url":"https://api.github.com/users/bfitzpat/events{/privacy}","received_events_url":"https://api.github.com/users/bfitzpat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bfitzpat/fuseide","description":"Fuse IDE ","fork":true,"url":"https://api.github.com/repos/bfitzpat/fuseide","forks_url":"https://api.github.com/repos/bfitzpat/fuseide/forks","keys_url":"https://api.github.com/repos/bfitzpat/fuseide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bfitzpat/fuseide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bfitzpat/fuseide/teams","hooks_url":"https://api.github.com/repos/bfitzpat/fuseide/hooks","issue_events_url":"https://api.github.com/repos/bfitzpat/fuseide/issues/events{/number}","events_url":"https://api.github.com/repos/bfitzpat/fuseide/events","assignees_url":"https://api.github.com/repos/bfitzpat/fuseide/assignees{/user}","branches_url":"https://api.github.com/repos/bfitzpat/fuseide/branches{/branch}","tags_url":"https://api.github.com/repos/bfitzpat/fuseide/tags","blobs_url":"https://api.github.com/repos/bfitzpat/fuseide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bfitzpat/fuseide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bfitzpat/fuseide/git/refs{/sha}","trees_url":"https://api.github.com/repos/bfitzpat/fuseide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bfitzpat/fuseide/statuses/{sha}","languages_url":"https://api.github.com/repos/bfitzpat/fuseide/languages","stargazers_url":"https://api.github.com/repos/bfitzpat/fuseide/stargazers","contributors_url":"https://api.github.com/repos/bfitzpat/fuseide/contributors","subscribers_url":"https://api.github.com/repos/bfitzpat/fuseide/subscribers","subscription_url":"https://api.github.com/repos/bfitzpat/fuseide/subscription","commits_url":"https://api.github.com/repos/bfitzpat/fuseide/commits{/sha}","git_commits_url":"https://api.github.com/repos/bfitzpat/fuseide/git/commits{/sha}","comments_url":"https://api.github.com/repos/bfitzpat/fuseide/comments{/number}","issue_comment_url":"https://api.github.com/repos/bfitzpat/fuseide/issues/comments{/number}","contents_url":"https://api.github.com/repos/bfitzpat/fuseide/contents/{+path}","compare_url":"https://api.github.com/repos/bfitzpat/fuseide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bfitzpat/fuseide/merges","archive_url":"https://api.github.com/repos/bfitzpat/fuseide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bfitzpat/fuseide/downloads","issues_url":"https://api.github.com/repos/bfitzpat/fuseide/issues{/number}","pulls_url":"https://api.github.com/repos/bfitzpat/fuseide/pulls{/number}","milestones_url":"https://api.github.com/repos/bfitzpat/fuseide/milestones{/number}","notifications_url":"https://api.github.com/repos/bfitzpat/fuseide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bfitzpat/fuseide/labels{/name}","releases_url":"https://api.github.com/repos/bfitzpat/fuseide/releases{/id}","deployments_url":"https://api.github.com/repos/bfitzpat/fuseide/deployments","created_at":"2015-10-05T20:15:26Z","updated_at":"2016-01-15T15:41:38Z","pushed_at":"2017-04-06T17:24:52Z","git_url":"git://github.com/bfitzpat/fuseide.git","ssh_url":"git@github.com:bfitzpat/fuseide.git","clone_url":"https://github.com/bfitzpat/fuseide.git","svn_url":"https://github.com/bfitzpat/fuseide","homepage":null,"size":173360,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"fusesource:master","ref":"master","sha":"f8c7b787f39ab8ca15cc69e804f10b5cea6be865","user":{"login":"fusesource","id":309484,"avatar_url":"https://avatars2.githubusercontent.com/u/309484?v=3","gravatar_id":"","url":"https://api.github.com/users/fusesource","html_url":"https://github.com/fusesource","followers_url":"https://api.github.com/users/fusesource/followers","following_url":"https://api.github.com/users/fusesource/following{/other_user}","gists_url":"https://api.github.com/users/fusesource/gists{/gist_id}","starred_url":"https://api.github.com/users/fusesource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusesource/subscriptions","organizations_url":"https://api.github.com/users/fusesource/orgs","repos_url":"https://api.github.com/users/fusesource/repos","events_url":"https://api.github.com/users/fusesource/events{/privacy}","received_events_url":"https://api.github.com/users/fusesource/received_events","type":"Organization","site_admin":false},"repo":{"id":6250543,"name":"fuseide","full_name":"fusesource/fuseide","owner":{"login":"fusesource","id":309484,"avatar_url":"https://avatars2.githubusercontent.com/u/309484?v=3","gravatar_id":"","url":"https://api.github.com/users/fusesource","html_url":"https://github.com/fusesource","followers_url":"https://api.github.com/users/fusesource/followers","following_url":"https://api.github.com/users/fusesource/following{/other_user}","gists_url":"https://api.github.com/users/fusesource/gists{/gist_id}","starred_url":"https://api.github.com/users/fusesource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusesource/subscriptions","organizations_url":"https://api.github.com/users/fusesource/orgs","repos_url":"https://api.github.com/users/fusesource/repos","events_url":"https://api.github.com/users/fusesource/events{/privacy}","received_events_url":"https://api.github.com/users/fusesource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fusesource/fuseide","description":"JBoss Fuse Tooling for Apache Camel","fork":false,"url":"https://api.github.com/repos/fusesource/fuseide","forks_url":"https://api.github.com/repos/fusesource/fuseide/forks","keys_url":"https://api.github.com/repos/fusesource/fuseide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fusesource/fuseide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fusesource/fuseide/teams","hooks_url":"https://api.github.com/repos/fusesource/fuseide/hooks","issue_events_url":"https://api.github.com/repos/fusesource/fuseide/issues/events{/number}","events_url":"https://api.github.com/repos/fusesource/fuseide/events","assignees_url":"https://api.github.com/repos/fusesource/fuseide/assignees{/user}","branches_url":"https://api.github.com/repos/fusesource/fuseide/branches{/branch}","tags_url":"https://api.github.com/repos/fusesource/fuseide/tags","blobs_url":"https://api.github.com/repos/fusesource/fuseide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fusesource/fuseide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fusesource/fuseide/git/refs{/sha}","trees_url":"https://api.github.com/repos/fusesource/fuseide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fusesource/fuseide/statuses/{sha}","languages_url":"https://api.github.com/repos/fusesource/fuseide/languages","stargazers_url":"https://api.github.com/repos/fusesource/fuseide/stargazers","contributors_url":"https://api.github.com/repos/fusesource/fuseide/contributors","subscribers_url":"https://api.github.com/repos/fusesource/fuseide/subscribers","subscription_url":"https://api.github.com/repos/fusesource/fuseide/subscription","commits_url":"https://api.github.com/repos/fusesource/fuseide/commits{/sha}","git_commits_url":"https://api.github.com/repos/fusesource/fuseide/git/commits{/sha}","comments_url":"https://api.github.com/repos/fusesource/fuseide/comments{/number}","issue_comment_url":"https://api.github.com/repos/fusesource/fuseide/issues/comments{/number}","contents_url":"https://api.github.com/repos/fusesource/fuseide/contents/{+path}","compare_url":"https://api.github.com/repos/fusesource/fuseide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fusesource/fuseide/merges","archive_url":"https://api.github.com/repos/fusesource/fuseide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fusesource/fuseide/downloads","issues_url":"https://api.github.com/repos/fusesource/fuseide/issues{/number}","pulls_url":"https://api.github.com/repos/fusesource/fuseide/pulls{/number}","milestones_url":"https://api.github.com/repos/fusesource/fuseide/milestones{/number}","notifications_url":"https://api.github.com/repos/fusesource/fuseide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fusesource/fuseide/labels{/name}","releases_url":"https://api.github.com/repos/fusesource/fuseide/releases{/id}","deployments_url":"https://api.github.com/repos/fusesource/fuseide/deployments","created_at":"2012-10-16T19:45:49Z","updated_at":"2017-04-06T10:27:30Z","pushed_at":"2017-04-06T17:24:54Z","git_url":"git://github.com/fusesource/fuseide.git","ssh_url":"git@github.com:fusesource/fuseide.git","clone_url":"https://github.com/fusesource/fuseide.git","svn_url":"https://github.com/fusesource/fuseide","homepage":"http://tools.jboss.org/features/apachecamel.html","size":174753,"stargazers_count":59,"watchers_count":59,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":83,"mirror_url":null,"open_issues_count":8,"forks":83,"open_issues":8,"watchers":59,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fusesource/fuseide/pulls/880"},"html":{"href":"https://github.com/fusesource/fuseide/pull/880"},"issue":{"href":"https://api.github.com/repos/fusesource/fuseide/issues/880"},"comments":{"href":"https://api.github.com/repos/fusesource/fuseide/issues/880/comments"},"review_comments":{"href":"https://api.github.com/repos/fusesource/fuseide/pulls/880/comments"},"review_comment":{"href":"https://api.github.com/repos/fusesource/fuseide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fusesource/fuseide/pulls/880/commits"},"statuses":{"href":"https://api.github.com/repos/fusesource/fuseide/statuses/b30d624a560fc73541bf64b7bfc37e5856a204a0"}}}}
{"actor":{"display_login":"rhdevelopers-ci"}}