{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/hawkbit/pulls/comments/56017557","id":56017557,"diff_hunk":"@@ -231,4 +185,64 @@ public boolean equals(final Object obj) {// NOSONAR - as this is generated\n         void okButton(final String namePrefix, final String tenant, final int amount, final int pollDelay,\n                 final URL basePollURL, final String gatewayToken, final Protocol protocol);\n     }\n+\n+    private OptionGroup createProtocolGroup() {\n+\n+        final OptionGroup protocolGroup = new OptionGroup(\"Simulated Device Protocol\");\n+        protocolGroup.addItem(Protocol.DMF_AMQP);\n+        protocolGroup.addItem(Protocol.DDI_HTTP);\n+        protocolGroup.setItemCaption(Protocol.DMF_AMQP, \"Device Management Federation API (AMQP push)\");\n+        protocolGroup.setItemCaption(Protocol.DDI_HTTP, \"Direct Device Interface (HTTP poll)\");\n+        protocolGroup.setNullSelectionAllowed(false);\n+        protocolGroup.select(Protocol.DMF_AMQP);\n+        protocolGroup.addValueChangeListener(event -> {\n+            pollDelayTextField.setVisible(!pollDelayTextField.isVisible());\n+            pollUrlTextField.setVisible(!pollUrlTextField.isVisible());\n+            gatewayTokenTextField.setVisible(!gatewayTokenTextField.isVisible());\n+        });\n+        return protocolGroup;\n+    }\n+\n+    private Button createOkButton(final GenerateDialogCallback callback) {\n+\n+        final Button buttonOk = new Button(\"generate\");\n+        buttonOk.setImmediate(true);\n+        buttonOk.setIcon(FontAwesome.GEARS);\n+        buttonOk.addClickListener(event -> {\n+            try {\n+                callback.okButton(namePrefixTextField.getValue(), tenantTextField.getValue(),\n+                        Integer.valueOf(amountTextField.getValue().replace(\".\", \"\").replace(\",\", \"\")),\n+                        Integer.valueOf(pollDelayTextField.getValue().replace(\".\", \"\")),\n+                        new URL(pollUrlTextField.getValue()), gatewayTokenTextField.getValue(),\n+                        (Protocol) protocolGroup.getValue());\n+            } catch (final NumberFormatException e) {\n+                LOGGER.info(e.getMessage(), e);\n+            } catch (final MalformedURLException e) {\n+                LOGGER.info(e.getMessage(), e);\n+            }\n+            GenerateDialog.this.close();\n+        });\n+        return buttonOk;\n+    }\n+\n+    private TextField createRequiredTextfield(final String caption, final String value, final Resource icon,\n+            final boolean required, final Validator validator) {\n+        final TextField textField = new TextField(caption, value);\n+        textField.setIcon(icon);\n+        textField.setRequired(required);","path":"examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/ui/GenerateDialog.java","position":229,"original_position":229,"commit_id":"c91bb15ccb92549ebc4cd7ccbce2e04cc189c962","original_commit_id":"c91bb15ccb92549ebc4cd7ccbce2e04cc189c962","user":{"login":"SirWayne","id":6340898,"avatar_url":"https://avatars.githubusercontent.com/u/6340898?v=3","gravatar_id":"","url":"https://api.github.com/users/SirWayne","html_url":"https://github.com/SirWayne","followers_url":"https://api.github.com/users/SirWayne/followers","following_url":"https://api.github.com/users/SirWayne/following{/other_user}","gists_url":"https://api.github.com/users/SirWayne/gists{/gist_id}","starred_url":"https://api.github.com/users/SirWayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SirWayne/subscriptions","organizations_url":"https://api.github.com/users/SirWayne/orgs","repos_url":"https://api.github.com/users/SirWayne/repos","events_url":"https://api.github.com/users/SirWayne/events{/privacy}","received_events_url":"https://api.github.com/users/SirWayne/received_events","type":"User","site_admin":false},"body":"every textfield is required set it direct to true","created_at":"2016-03-14T15:21:57Z","updated_at":"2016-03-14T15:21:57Z","html_url":"https://github.com/eclipse/hawkbit/pull/82#discussion_r56017557","pull_request_url":"https://api.github.com/repos/eclipse/hawkbit/pulls/82","_links":{"self":{"href":"https://api.github.com/repos/eclipse/hawkbit/pulls/comments/56017557"},"html":{"href":"https://github.com/eclipse/hawkbit/pull/82#discussion_r56017557"},"pull_request":{"href":"https://api.github.com/repos/eclipse/hawkbit/pulls/82"}}},"pull_request":{"url":"https://api.github.com/repos/eclipse/hawkbit/pulls/82","id":62538382,"html_url":"https://github.com/eclipse/hawkbit/pull/82","diff_url":"https://github.com/eclipse/hawkbit/pull/82.diff","patch_url":"https://github.com/eclipse/hawkbit/pull/82.patch","issue_url":"https://api.github.com/repos/eclipse/hawkbit/issues/82","number":82,"state":"open","locked":false,"title":"Fix for sonar issue: Methods should not have too many lines","user":{"login":"Jonkno","id":14817818,"avatar_url":"https://avatars.githubusercontent.com/u/14817818?v=3","gravatar_id":"","url":"https://api.github.com/users/Jonkno","html_url":"https://github.com/Jonkno","followers_url":"https://api.github.com/users/Jonkno/followers","following_url":"https://api.github.com/users/Jonkno/following{/other_user}","gists_url":"https://api.github.com/users/Jonkno/gists{/gist_id}","starred_url":"https://api.github.com/users/Jonkno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jonkno/subscriptions","organizations_url":"https://api.github.com/users/Jonkno/orgs","repos_url":"https://api.github.com/users/Jonkno/repos","events_url":"https://api.github.com/users/Jonkno/events{/privacy}","received_events_url":"https://api.github.com/users/Jonkno/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com>","created_at":"2016-03-11T12:46:54Z","updated_at":"2016-03-14T15:21:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bc58e05a439f0d0d46a5545396e1742510a7e05","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/hawkbit/pulls/82/commits","review_comments_url":"https://api.github.com/repos/eclipse/hawkbit/pulls/82/comments","review_comment_url":"https://api.github.com/repos/eclipse/hawkbit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/hawkbit/issues/82/comments","statuses_url":"https://api.github.com/repos/eclipse/hawkbit/statuses/c91bb15ccb92549ebc4cd7ccbce2e04cc189c962","head":{"label":"bsinno:Sonar_Issue_Methods_should_not_have_too_many_lines","ref":"Sonar_Issue_Methods_should_not_have_too_many_lines","sha":"c91bb15ccb92549ebc4cd7ccbce2e04cc189c962","user":{"login":"bsinno","id":9215699,"avatar_url":"https://avatars.githubusercontent.com/u/9215699?v=3","gravatar_id":"","url":"https://api.github.com/users/bsinno","html_url":"https://github.com/bsinno","followers_url":"https://api.github.com/users/bsinno/followers","following_url":"https://api.github.com/users/bsinno/following{/other_user}","gists_url":"https://api.github.com/users/bsinno/gists{/gist_id}","starred_url":"https://api.github.com/users/bsinno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsinno/subscriptions","organizations_url":"https://api.github.com/users/bsinno/orgs","repos_url":"https://api.github.com/users/bsinno/repos","events_url":"https://api.github.com/users/bsinno/events{/privacy}","received_events_url":"https://api.github.com/users/bsinno/received_events","type":"Organization","site_admin":false},"repo":{"id":50108079,"name":"hawkbit","full_name":"bsinno/hawkbit","owner":{"login":"bsinno","id":9215699,"avatar_url":"https://avatars.githubusercontent.com/u/9215699?v=3","gravatar_id":"","url":"https://api.github.com/users/bsinno","html_url":"https://github.com/bsinno","followers_url":"https://api.github.com/users/bsinno/followers","following_url":"https://api.github.com/users/bsinno/following{/other_user}","gists_url":"https://api.github.com/users/bsinno/gists{/gist_id}","starred_url":"https://api.github.com/users/bsinno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsinno/subscriptions","organizations_url":"https://api.github.com/users/bsinno/orgs","repos_url":"https://api.github.com/users/bsinno/repos","events_url":"https://api.github.com/users/bsinno/events{/privacy}","received_events_url":"https://api.github.com/users/bsinno/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bsinno/hawkbit","description":"","fork":true,"url":"https://api.github.com/repos/bsinno/hawkbit","forks_url":"https://api.github.com/repos/bsinno/hawkbit/forks","keys_url":"https://api.github.com/repos/bsinno/hawkbit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bsinno/hawkbit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bsinno/hawkbit/teams","hooks_url":"https://api.github.com/repos/bsinno/hawkbit/hooks","issue_events_url":"https://api.github.com/repos/bsinno/hawkbit/issues/events{/number}","events_url":"https://api.github.com/repos/bsinno/hawkbit/events","assignees_url":"https://api.github.com/repos/bsinno/hawkbit/assignees{/user}","branches_url":"https://api.github.com/repos/bsinno/hawkbit/branches{/branch}","tags_url":"https://api.github.com/repos/bsinno/hawkbit/tags","blobs_url":"https://api.github.com/repos/bsinno/hawkbit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bsinno/hawkbit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bsinno/hawkbit/git/refs{/sha}","trees_url":"https://api.github.com/repos/bsinno/hawkbit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bsinno/hawkbit/statuses/{sha}","languages_url":"https://api.github.com/repos/bsinno/hawkbit/languages","stargazers_url":"https://api.github.com/repos/bsinno/hawkbit/stargazers","contributors_url":"https://api.github.com/repos/bsinno/hawkbit/contributors","subscribers_url":"https://api.github.com/repos/bsinno/hawkbit/subscribers","subscription_url":"https://api.github.com/repos/bsinno/hawkbit/subscription","commits_url":"https://api.github.com/repos/bsinno/hawkbit/commits{/sha}","git_commits_url":"https://api.github.com/repos/bsinno/hawkbit/git/commits{/sha}","comments_url":"https://api.github.com/repos/bsinno/hawkbit/comments{/number}","issue_comment_url":"https://api.github.com/repos/bsinno/hawkbit/issues/comments{/number}","contents_url":"https://api.github.com/repos/bsinno/hawkbit/contents/{+path}","compare_url":"https://api.github.com/repos/bsinno/hawkbit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bsinno/hawkbit/merges","archive_url":"https://api.github.com/repos/bsinno/hawkbit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bsinno/hawkbit/downloads","issues_url":"https://api.github.com/repos/bsinno/hawkbit/issues{/number}","pulls_url":"https://api.github.com/repos/bsinno/hawkbit/pulls{/number}","milestones_url":"https://api.github.com/repos/bsinno/hawkbit/milestones{/number}","notifications_url":"https://api.github.com/repos/bsinno/hawkbit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bsinno/hawkbit/labels{/name}","releases_url":"https://api.github.com/repos/bsinno/hawkbit/releases{/id}","deployments_url":"https://api.github.com/repos/bsinno/hawkbit/deployments","created_at":"2016-01-21T13:05:15Z","updated_at":"2016-02-08T13:37:16Z","pushed_at":"2016-03-14T15:08:45Z","git_url":"git://github.com/bsinno/hawkbit.git","ssh_url":"git@github.com:bsinno/hawkbit.git","clone_url":"https://github.com/bsinno/hawkbit.git","svn_url":"https://github.com/bsinno/hawkbit","homepage":null,"size":2734,"stargazers_count":2,"watchers_count":2,"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":2,"default_branch":"master"}},"base":{"label":"eclipse:master","ref":"master","sha":"4b5795d18b995697f98ef3d9b2cc42283edfbe7c","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":45860898,"name":"hawkbit","full_name":"eclipse/hawkbit","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/hawkbit","description":"","fork":false,"url":"https://api.github.com/repos/eclipse/hawkbit","forks_url":"https://api.github.com/repos/eclipse/hawkbit/forks","keys_url":"https://api.github.com/repos/eclipse/hawkbit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/hawkbit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/hawkbit/teams","hooks_url":"https://api.github.com/repos/eclipse/hawkbit/hooks","issue_events_url":"https://api.github.com/repos/eclipse/hawkbit/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/hawkbit/events","assignees_url":"https://api.github.com/repos/eclipse/hawkbit/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/hawkbit/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/hawkbit/tags","blobs_url":"https://api.github.com/repos/eclipse/hawkbit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/hawkbit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/hawkbit/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/hawkbit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/hawkbit/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/hawkbit/languages","stargazers_url":"https://api.github.com/repos/eclipse/hawkbit/stargazers","contributors_url":"https://api.github.com/repos/eclipse/hawkbit/contributors","subscribers_url":"https://api.github.com/repos/eclipse/hawkbit/subscribers","subscription_url":"https://api.github.com/repos/eclipse/hawkbit/subscription","commits_url":"https://api.github.com/repos/eclipse/hawkbit/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/hawkbit/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/hawkbit/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/hawkbit/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/hawkbit/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/hawkbit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/hawkbit/merges","archive_url":"https://api.github.com/repos/eclipse/hawkbit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/hawkbit/downloads","issues_url":"https://api.github.com/repos/eclipse/hawkbit/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/hawkbit/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/hawkbit/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/hawkbit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/hawkbit/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/hawkbit/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/hawkbit/deployments","created_at":"2015-11-09T19:19:06Z","updated_at":"2016-02-14T16:30:25Z","pushed_at":"2016-03-14T15:08:45Z","git_url":"git://github.com/eclipse/hawkbit.git","ssh_url":"git@github.com:eclipse/hawkbit.git","clone_url":"https://github.com/eclipse/hawkbit.git","svn_url":"https://github.com/eclipse/hawkbit","homepage":null,"size":2964,"stargazers_count":7,"watchers_count":7,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/hawkbit/pulls/82"},"html":{"href":"https://github.com/eclipse/hawkbit/pull/82"},"issue":{"href":"https://api.github.com/repos/eclipse/hawkbit/issues/82"},"comments":{"href":"https://api.github.com/repos/eclipse/hawkbit/issues/82/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/hawkbit/pulls/82/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/hawkbit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/hawkbit/pulls/82/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/hawkbit/statuses/c91bb15ccb92549ebc4cd7ccbce2e04cc189c962"}}}}