{"action":"created","comment":{"url":"https://api.github.com/repos/uberfire/uberfire-extensions/pulls/comments/29618284","id":29618284,"diff_hunk":"@@ -0,0 +1,87 @@\n+/*\n+ * Copyright 2015 JBoss by Red Hat.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.uberfire.ext.editor.commons.client.file;\n+\n+import com.github.gwtbootstrap.client.ui.Button;\n+import com.github.gwtbootstrap.client.ui.TextBox;\n+import com.github.gwtbootstrap.client.ui.constants.ButtonType;\n+import com.github.gwtbootstrap.client.ui.constants.IconType;\n+import com.google.gwt.event.dom.client.HasClickHandlers;\n+import com.google.gwt.user.client.Window;\n+import com.google.gwt.user.client.ui.HasText;\n+import org.uberfire.ext.editor.commons.client.resources.CommonImages;\n+import org.uberfire.ext.editor.commons.client.resources.i18n.CommonConstants;\n+import org.uberfire.ext.widgets.common.client.common.popups.FormStylePopup;\n+import org.uberfire.ext.widgets.common.client.common.popups.footers.GenericModalFooter;\n+\n+public class CopyPopupView extends FormStylePopup implements CopyPopup.View {\n+\n+    final private TextBox nameTextBox = new TextBox();\n+    final private TextBox checkInCommentTextBox = new TextBox();\n+    private final Button copy;\n+    private final Button cancel;\n+\n+    public CopyPopupView() {\n+        super( CommonImages.INSTANCE.edit(),\n+               CommonConstants.INSTANCE.CopyPopupTitle() );\n+        //Make sure it appears on top of other popups\n+        getElement().getStyle().setZIndex( Integer.MAX_VALUE );\n+\n+        nameTextBox.setTitle( CommonConstants.INSTANCE.NewName() );\n+        nameTextBox.setWidth( \"200px\" );\n+        addAttribute( CommonConstants.INSTANCE.NewNameColon(),\n+                      nameTextBox );\n+\n+        checkInCommentTextBox.setTitle( CommonConstants.INSTANCE.CheckInComment() );\n+        checkInCommentTextBox.setWidth( \"200px\" );\n+        addAttribute( CommonConstants.INSTANCE.CheckInCommentColon(),\n+                      checkInCommentTextBox );\n+        hide();\n+\n+        GenericModalFooter footer = new GenericModalFooter();\n+        this.copy = footer.addButton( CommonConstants.INSTANCE.CopyPopupCreateACopy(),\n+                                      IconType.SAVE,\n+                                      ButtonType.PRIMARY );","path":"uberfire-commons-editor/uberfire-commons-editor-client/src/main/java/org/uberfire/ext/editor/commons/client/file/CopyPopupView.java","position":57,"original_position":57,"commit_id":"9d0d255e9b45d49d42e85ed0282cf3794919965e","original_commit_id":"9d0d255e9b45d49d42e85ed0282cf3794919965e","user":{"login":"yurloc","id":673386,"avatar_url":"https://avatars.githubusercontent.com/u/673386?v=3","gravatar_id":"","url":"https://api.github.com/users/yurloc","html_url":"https://github.com/yurloc","followers_url":"https://api.github.com/users/yurloc/followers","following_url":"https://api.github.com/users/yurloc/following{/other_user}","gists_url":"https://api.github.com/users/yurloc/gists{/gist_id}","starred_url":"https://api.github.com/users/yurloc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurloc/subscriptions","organizations_url":"https://api.github.com/users/yurloc/orgs","repos_url":"https://api.github.com/users/yurloc/repos","events_url":"https://api.github.com/users/yurloc/events{/privacy}","received_events_url":"https://api.github.com/users/yurloc/received_events","type":"User","site_admin":false},"body":"+1 I like the way with presenter interface better, too.\r\n\r\nI wonder if Uberfire could re-use MVP interfaces from the [GWTP Project](http://dev.arcbees.com/gwtp/features/).","created_at":"2015-05-04T20:09:48Z","updated_at":"2015-05-04T20:09:48Z","html_url":"https://github.com/uberfire/uberfire-extensions/pull/32#discussion_r29618284","pull_request_url":"https://api.github.com/repos/uberfire/uberfire-extensions/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/uberfire/uberfire-extensions/pulls/comments/29618284"},"html":{"href":"https://github.com/uberfire/uberfire-extensions/pull/32#discussion_r29618284"},"pull_request":{"href":"https://api.github.com/repos/uberfire/uberfire-extensions/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/uberfire/uberfire-extensions/pulls/32","id":34467314,"html_url":"https://github.com/uberfire/uberfire-extensions/pull/32","diff_url":"https://github.com/uberfire/uberfire-extensions/pull/32.diff","patch_url":"https://github.com/uberfire/uberfire-extensions/pull/32.patch","issue_url":"https://api.github.com/repos/uberfire/uberfire-extensions/issues/32","number":32,"state":"open","locked":false,"title":"Copy popup test","user":{"login":"yurloc","id":673386,"avatar_url":"https://avatars.githubusercontent.com/u/673386?v=3","gravatar_id":"","url":"https://api.github.com/users/yurloc","html_url":"https://github.com/yurloc","followers_url":"https://api.github.com/users/yurloc/followers","following_url":"https://api.github.com/users/yurloc/following{/other_user}","gists_url":"https://api.github.com/users/yurloc/gists{/gist_id}","starred_url":"https://api.github.com/users/yurloc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurloc/subscriptions","organizations_url":"https://api.github.com/users/yurloc/orgs","repos_url":"https://api.github.com/users/yurloc/repos","events_url":"https://api.github.com/users/yurloc/events{/privacy}","received_events_url":"https://api.github.com/users/yurloc/received_events","type":"User","site_admin":false},"body":"@mrietveld @ederign please review.\r\n\r\nThis is improved version of [CopyPopupTest](https://gist.github.com/yurloc/eb8bc92a6c4ee4731c72) from October 2014. I have separated CopyPopup view layer from the presentation logic (following MVP). The code has become more testable. I could avoid most of the hacks I complained about in this [gist](https://gist.github.com/yurloc/eb8bc92a6c4ee4731c72). Strict separation of widgets usage into view prevents any GWT.create() calls during test execution and so GwtMockito is not needed.","created_at":"2015-04-30T14:52:09Z","updated_at":"2015-05-04T20:09:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f87414632b9d7050ac5df31d0382ec6e06f826e7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/uberfire/uberfire-extensions/pulls/32/commits","review_comments_url":"https://api.github.com/repos/uberfire/uberfire-extensions/pulls/32/comments","review_comment_url":"https://api.github.com/repos/uberfire/uberfire-extensions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uberfire/uberfire-extensions/issues/32/comments","statuses_url":"https://api.github.com/repos/uberfire/uberfire-extensions/statuses/9d0d255e9b45d49d42e85ed0282cf3794919965e","head":{"label":"yurloc:copy-popup-test","ref":"copy-popup-test","sha":"9d0d255e9b45d49d42e85ed0282cf3794919965e","user":{"login":"yurloc","id":673386,"avatar_url":"https://avatars.githubusercontent.com/u/673386?v=3","gravatar_id":"","url":"https://api.github.com/users/yurloc","html_url":"https://github.com/yurloc","followers_url":"https://api.github.com/users/yurloc/followers","following_url":"https://api.github.com/users/yurloc/following{/other_user}","gists_url":"https://api.github.com/users/yurloc/gists{/gist_id}","starred_url":"https://api.github.com/users/yurloc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurloc/subscriptions","organizations_url":"https://api.github.com/users/yurloc/orgs","repos_url":"https://api.github.com/users/yurloc/repos","events_url":"https://api.github.com/users/yurloc/events{/privacy}","received_events_url":"https://api.github.com/users/yurloc/received_events","type":"User","site_admin":false},"repo":{"id":33536178,"name":"uberfire-extensions","full_name":"yurloc/uberfire-extensions","owner":{"login":"yurloc","id":673386,"avatar_url":"https://avatars.githubusercontent.com/u/673386?v=3","gravatar_id":"","url":"https://api.github.com/users/yurloc","html_url":"https://github.com/yurloc","followers_url":"https://api.github.com/users/yurloc/followers","following_url":"https://api.github.com/users/yurloc/following{/other_user}","gists_url":"https://api.github.com/users/yurloc/gists{/gist_id}","starred_url":"https://api.github.com/users/yurloc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurloc/subscriptions","organizations_url":"https://api.github.com/users/yurloc/orgs","repos_url":"https://api.github.com/users/yurloc/repos","events_url":"https://api.github.com/users/yurloc/events{/privacy}","received_events_url":"https://api.github.com/users/yurloc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yurloc/uberfire-extensions","description":"Generic extensions to the Uberfire framework","fork":true,"url":"https://api.github.com/repos/yurloc/uberfire-extensions","forks_url":"https://api.github.com/repos/yurloc/uberfire-extensions/forks","keys_url":"https://api.github.com/repos/yurloc/uberfire-extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yurloc/uberfire-extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yurloc/uberfire-extensions/teams","hooks_url":"https://api.github.com/repos/yurloc/uberfire-extensions/hooks","issue_events_url":"https://api.github.com/repos/yurloc/uberfire-extensions/issues/events{/number}","events_url":"https://api.github.com/repos/yurloc/uberfire-extensions/events","assignees_url":"https://api.github.com/repos/yurloc/uberfire-extensions/assignees{/user}","branches_url":"https://api.github.com/repos/yurloc/uberfire-extensions/branches{/branch}","tags_url":"https://api.github.com/repos/yurloc/uberfire-extensions/tags","blobs_url":"https://api.github.com/repos/yurloc/uberfire-extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yurloc/uberfire-extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yurloc/uberfire-extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/yurloc/uberfire-extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yurloc/uberfire-extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/yurloc/uberfire-extensions/languages","stargazers_url":"https://api.github.com/repos/yurloc/uberfire-extensions/stargazers","contributors_url":"https://api.github.com/repos/yurloc/uberfire-extensions/contributors","subscribers_url":"https://api.github.com/repos/yurloc/uberfire-extensions/subscribers","subscription_url":"https://api.github.com/repos/yurloc/uberfire-extensions/subscription","commits_url":"https://api.github.com/repos/yurloc/uberfire-extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/yurloc/uberfire-extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/yurloc/uberfire-extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/yurloc/uberfire-extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/yurloc/uberfire-extensions/contents/{+path}","compare_url":"https://api.github.com/repos/yurloc/uberfire-extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yurloc/uberfire-extensions/merges","archive_url":"https://api.github.com/repos/yurloc/uberfire-extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yurloc/uberfire-extensions/downloads","issues_url":"https://api.github.com/repos/yurloc/uberfire-extensions/issues{/number}","pulls_url":"https://api.github.com/repos/yurloc/uberfire-extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/yurloc/uberfire-extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/yurloc/uberfire-extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yurloc/uberfire-extensions/labels{/name}","releases_url":"https://api.github.com/repos/yurloc/uberfire-extensions/releases{/id}","created_at":"2015-04-07T10:12:34Z","updated_at":"2015-04-07T10:12:37Z","pushed_at":"2015-05-04T16:13:03Z","git_url":"git://github.com/yurloc/uberfire-extensions.git","ssh_url":"git@github.com:yurloc/uberfire-extensions.git","clone_url":"https://github.com/yurloc/uberfire-extensions.git","svn_url":"https://github.com/yurloc/uberfire-extensions","homepage":null,"size":4051,"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":"uberfire:master","ref":"master","sha":"5a6fe32d11bbba943a43bd9646a0b4e8e0fda6b8","user":{"login":"uberfire","id":5167699,"avatar_url":"https://avatars.githubusercontent.com/u/5167699?v=3","gravatar_id":"","url":"https://api.github.com/users/uberfire","html_url":"https://github.com/uberfire","followers_url":"https://api.github.com/users/uberfire/followers","following_url":"https://api.github.com/users/uberfire/following{/other_user}","gists_url":"https://api.github.com/users/uberfire/gists{/gist_id}","starred_url":"https://api.github.com/users/uberfire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uberfire/subscriptions","organizations_url":"https://api.github.com/users/uberfire/orgs","repos_url":"https://api.github.com/users/uberfire/repos","events_url":"https://api.github.com/users/uberfire/events{/privacy}","received_events_url":"https://api.github.com/users/uberfire/received_events","type":"Organization","site_admin":false},"repo":{"id":26430285,"name":"uberfire-extensions","full_name":"uberfire/uberfire-extensions","owner":{"login":"uberfire","id":5167699,"avatar_url":"https://avatars.githubusercontent.com/u/5167699?v=3","gravatar_id":"","url":"https://api.github.com/users/uberfire","html_url":"https://github.com/uberfire","followers_url":"https://api.github.com/users/uberfire/followers","following_url":"https://api.github.com/users/uberfire/following{/other_user}","gists_url":"https://api.github.com/users/uberfire/gists{/gist_id}","starred_url":"https://api.github.com/users/uberfire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uberfire/subscriptions","organizations_url":"https://api.github.com/users/uberfire/orgs","repos_url":"https://api.github.com/users/uberfire/repos","events_url":"https://api.github.com/users/uberfire/events{/privacy}","received_events_url":"https://api.github.com/users/uberfire/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uberfire/uberfire-extensions","description":"Generic extensions to the Uberfire framework","fork":false,"url":"https://api.github.com/repos/uberfire/uberfire-extensions","forks_url":"https://api.github.com/repos/uberfire/uberfire-extensions/forks","keys_url":"https://api.github.com/repos/uberfire/uberfire-extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uberfire/uberfire-extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uberfire/uberfire-extensions/teams","hooks_url":"https://api.github.com/repos/uberfire/uberfire-extensions/hooks","issue_events_url":"https://api.github.com/repos/uberfire/uberfire-extensions/issues/events{/number}","events_url":"https://api.github.com/repos/uberfire/uberfire-extensions/events","assignees_url":"https://api.github.com/repos/uberfire/uberfire-extensions/assignees{/user}","branches_url":"https://api.github.com/repos/uberfire/uberfire-extensions/branches{/branch}","tags_url":"https://api.github.com/repos/uberfire/uberfire-extensions/tags","blobs_url":"https://api.github.com/repos/uberfire/uberfire-extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uberfire/uberfire-extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uberfire/uberfire-extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/uberfire/uberfire-extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uberfire/uberfire-extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/uberfire/uberfire-extensions/languages","stargazers_url":"https://api.github.com/repos/uberfire/uberfire-extensions/stargazers","contributors_url":"https://api.github.com/repos/uberfire/uberfire-extensions/contributors","subscribers_url":"https://api.github.com/repos/uberfire/uberfire-extensions/subscribers","subscription_url":"https://api.github.com/repos/uberfire/uberfire-extensions/subscription","commits_url":"https://api.github.com/repos/uberfire/uberfire-extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/uberfire/uberfire-extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/uberfire/uberfire-extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/uberfire/uberfire-extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/uberfire/uberfire-extensions/contents/{+path}","compare_url":"https://api.github.com/repos/uberfire/uberfire-extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uberfire/uberfire-extensions/merges","archive_url":"https://api.github.com/repos/uberfire/uberfire-extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uberfire/uberfire-extensions/downloads","issues_url":"https://api.github.com/repos/uberfire/uberfire-extensions/issues{/number}","pulls_url":"https://api.github.com/repos/uberfire/uberfire-extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/uberfire/uberfire-extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/uberfire/uberfire-extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uberfire/uberfire-extensions/labels{/name}","releases_url":"https://api.github.com/repos/uberfire/uberfire-extensions/releases{/id}","created_at":"2014-11-10T09:42:01Z","updated_at":"2015-05-04T19:24:47Z","pushed_at":"2015-05-04T19:24:47Z","git_url":"git://github.com/uberfire/uberfire-extensions.git","ssh_url":"git@github.com:uberfire/uberfire-extensions.git","clone_url":"https://github.com/uberfire/uberfire-extensions.git","svn_url":"https://github.com/uberfire/uberfire-extensions","homepage":null,"size":5153,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":3,"forks":16,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uberfire/uberfire-extensions/pulls/32"},"html":{"href":"https://github.com/uberfire/uberfire-extensions/pull/32"},"issue":{"href":"https://api.github.com/repos/uberfire/uberfire-extensions/issues/32"},"comments":{"href":"https://api.github.com/repos/uberfire/uberfire-extensions/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/uberfire/uberfire-extensions/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/uberfire/uberfire-extensions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uberfire/uberfire-extensions/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/uberfire/uberfire-extensions/statuses/9d0d255e9b45d49d42e85ed0282cf3794919965e"}}}}