{"action":"created","comment":{"url":"https://api.github.com/repos/droolsjbpm/drools-wb/pulls/comments/67664212","id":67664212,"diff_hunk":"@@ -0,0 +1,75 @@\n+/*\n+ * Copyright 2016 Red Hat, Inc. and/or its affiliates.\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+\n+package org.drools.workbench.screens.guided.dtable.client.widget.table;\n+\n+import org.drools.workbench.models.guided.dtable.shared.model.AttributeCol52;\n+import org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52;\n+import org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52;\n+import org.drools.workbench.screens.guided.dtable.client.resources.i18n.GuidedDecisionTableConstants;\n+import org.drools.workbench.screens.guided.rule.client.editor.AttributeSelectorPopup;\n+import org.drools.workbench.screens.guided.rule.client.editor.RuleAttributeWidget;\n+\n+public class GuidedDecisionTableAttributeSelectorPopup extends AttributeSelectorPopup {\n+\n+    private final String[] existingAttributeNames;\n+    private final GuidedDecisionTableView.Presenter presenter;\n+\n+    public GuidedDecisionTableAttributeSelectorPopup( String[] existingAttributeNames,\n+                                                      GuidedDecisionTableView.Presenter presenter ) {\n+        this.existingAttributeNames = existingAttributeNames;\n+        this.presenter = presenter;\n+\n+        initialize();\n+    }\n+\n+    @Override\n+    protected String[] getAttributes() {\n+        String[] attributes = RuleAttributeWidget.getAttributesList();\n+        attributes[attributes.length] = GuidedDecisionTable52.NEGATE_RULE_ATTR;","path":"drools-wb-screens/drools-wb-guided-dtable-editor/drools-wb-guided-dtable-editor-client/src/main/java/org/drools/workbench/screens/guided/dtable/client/widget/table/GuidedDecisionTableAttributeSelectorPopup.java","position":42,"original_position":42,"commit_id":"024f2e0376e423a1168028f91bddfdbfd30f990d","original_commit_id":"024f2e0376e423a1168028f91bddfdbfd30f990d","user":{"login":"zkrejcov","id":1506293,"avatar_url":"https://avatars.githubusercontent.com/u/1506293?v=3","gravatar_id":"","url":"https://api.github.com/users/zkrejcov","html_url":"https://github.com/zkrejcov","followers_url":"https://api.github.com/users/zkrejcov/followers","following_url":"https://api.github.com/users/zkrejcov/following{/other_user}","gists_url":"https://api.github.com/users/zkrejcov/gists{/gist_id}","starred_url":"https://api.github.com/users/zkrejcov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zkrejcov/subscriptions","organizations_url":"https://api.github.com/users/zkrejcov/orgs","repos_url":"https://api.github.com/users/zkrejcov/repos","events_url":"https://api.github.com/users/zkrejcov/events{/privacy}","received_events_url":"https://api.github.com/users/zkrejcov/received_events","type":"User","site_admin":false},"body":"Thanks for catching that, I'll push a fixed commit soon.","created_at":"2016-06-20T10:02:37Z","updated_at":"2016-06-20T10:02:37Z","html_url":"https://github.com/droolsjbpm/drools-wb/pull/203#discussion_r67664212","pull_request_url":"https://api.github.com/repos/droolsjbpm/drools-wb/pulls/203","_links":{"self":{"href":"https://api.github.com/repos/droolsjbpm/drools-wb/pulls/comments/67664212"},"html":{"href":"https://github.com/droolsjbpm/drools-wb/pull/203#discussion_r67664212"},"pull_request":{"href":"https://api.github.com/repos/droolsjbpm/drools-wb/pulls/203"}}},"pull_request":{"url":"https://api.github.com/repos/droolsjbpm/drools-wb/pulls/203","id":74079579,"html_url":"https://github.com/droolsjbpm/drools-wb/pull/203","diff_url":"https://github.com/droolsjbpm/drools-wb/pull/203.diff","patch_url":"https://github.com/droolsjbpm/drools-wb/pull/203.patch","issue_url":"https://api.github.com/repos/droolsjbpm/drools-wb/issues/203","number":203,"state":"open","locked":false,"title":"refactor AttributeSelectorPopup code, add some tests","user":{"login":"zkrejcov","id":1506293,"avatar_url":"https://avatars.githubusercontent.com/u/1506293?v=3","gravatar_id":"","url":"https://api.github.com/users/zkrejcov","html_url":"https://github.com/zkrejcov","followers_url":"https://api.github.com/users/zkrejcov/followers","following_url":"https://api.github.com/users/zkrejcov/following{/other_user}","gists_url":"https://api.github.com/users/zkrejcov/gists{/gist_id}","starred_url":"https://api.github.com/users/zkrejcov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zkrejcov/subscriptions","organizations_url":"https://api.github.com/users/zkrejcov/orgs","repos_url":"https://api.github.com/users/zkrejcov/repos","events_url":"https://api.github.com/users/zkrejcov/events{/privacy}","received_events_url":"https://api.github.com/users/zkrejcov/received_events","type":"User","site_admin":false},"body":"The original AttributeSelectorPopup code was almost 1:1 copied to GuidedDecisionTableViewImpl. This removes the duplication - the AttributeSelectorPopup is now an abstract parent of 2 separate implementations. Shared code (most logic) stayed there.\r\n\r\nThis also brings the basic metadata input validation that was present in GRE to GDT.\r\n\r\nThere are now also a few small tests checking that validation and that duplicates are not allowed (part of moving selenium tests to community).","created_at":"2016-06-16T13:23:06Z","updated_at":"2016-06-20T10:02:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"be0ebf53ac0efff7736213a8d63bcbf2e34a86e2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/droolsjbpm/drools-wb/pulls/203/commits","review_comments_url":"https://api.github.com/repos/droolsjbpm/drools-wb/pulls/203/comments","review_comment_url":"https://api.github.com/repos/droolsjbpm/drools-wb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/droolsjbpm/drools-wb/issues/203/comments","statuses_url":"https://api.github.com/repos/droolsjbpm/drools-wb/statuses/024f2e0376e423a1168028f91bddfdbfd30f990d","head":{"label":"zkrejcov:gre-gdt-duplicate-attrs-metadata-refactor-test","ref":"gre-gdt-duplicate-attrs-metadata-refactor-test","sha":"024f2e0376e423a1168028f91bddfdbfd30f990d","user":{"login":"zkrejcov","id":1506293,"avatar_url":"https://avatars.githubusercontent.com/u/1506293?v=3","gravatar_id":"","url":"https://api.github.com/users/zkrejcov","html_url":"https://github.com/zkrejcov","followers_url":"https://api.github.com/users/zkrejcov/followers","following_url":"https://api.github.com/users/zkrejcov/following{/other_user}","gists_url":"https://api.github.com/users/zkrejcov/gists{/gist_id}","starred_url":"https://api.github.com/users/zkrejcov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zkrejcov/subscriptions","organizations_url":"https://api.github.com/users/zkrejcov/orgs","repos_url":"https://api.github.com/users/zkrejcov/repos","events_url":"https://api.github.com/users/zkrejcov/events{/privacy}","received_events_url":"https://api.github.com/users/zkrejcov/received_events","type":"User","site_admin":false},"repo":{"id":42049844,"name":"drools-wb","full_name":"zkrejcov/drools-wb","owner":{"login":"zkrejcov","id":1506293,"avatar_url":"https://avatars.githubusercontent.com/u/1506293?v=3","gravatar_id":"","url":"https://api.github.com/users/zkrejcov","html_url":"https://github.com/zkrejcov","followers_url":"https://api.github.com/users/zkrejcov/followers","following_url":"https://api.github.com/users/zkrejcov/following{/other_user}","gists_url":"https://api.github.com/users/zkrejcov/gists{/gist_id}","starred_url":"https://api.github.com/users/zkrejcov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zkrejcov/subscriptions","organizations_url":"https://api.github.com/users/zkrejcov/orgs","repos_url":"https://api.github.com/users/zkrejcov/repos","events_url":"https://api.github.com/users/zkrejcov/events{/privacy}","received_events_url":"https://api.github.com/users/zkrejcov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zkrejcov/drools-wb","description":"Drools Workbench is the web application and repository to govern Drools assets.","fork":true,"url":"https://api.github.com/repos/zkrejcov/drools-wb","forks_url":"https://api.github.com/repos/zkrejcov/drools-wb/forks","keys_url":"https://api.github.com/repos/zkrejcov/drools-wb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zkrejcov/drools-wb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zkrejcov/drools-wb/teams","hooks_url":"https://api.github.com/repos/zkrejcov/drools-wb/hooks","issue_events_url":"https://api.github.com/repos/zkrejcov/drools-wb/issues/events{/number}","events_url":"https://api.github.com/repos/zkrejcov/drools-wb/events","assignees_url":"https://api.github.com/repos/zkrejcov/drools-wb/assignees{/user}","branches_url":"https://api.github.com/repos/zkrejcov/drools-wb/branches{/branch}","tags_url":"https://api.github.com/repos/zkrejcov/drools-wb/tags","blobs_url":"https://api.github.com/repos/zkrejcov/drools-wb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zkrejcov/drools-wb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zkrejcov/drools-wb/git/refs{/sha}","trees_url":"https://api.github.com/repos/zkrejcov/drools-wb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zkrejcov/drools-wb/statuses/{sha}","languages_url":"https://api.github.com/repos/zkrejcov/drools-wb/languages","stargazers_url":"https://api.github.com/repos/zkrejcov/drools-wb/stargazers","contributors_url":"https://api.github.com/repos/zkrejcov/drools-wb/contributors","subscribers_url":"https://api.github.com/repos/zkrejcov/drools-wb/subscribers","subscription_url":"https://api.github.com/repos/zkrejcov/drools-wb/subscription","commits_url":"https://api.github.com/repos/zkrejcov/drools-wb/commits{/sha}","git_commits_url":"https://api.github.com/repos/zkrejcov/drools-wb/git/commits{/sha}","comments_url":"https://api.github.com/repos/zkrejcov/drools-wb/comments{/number}","issue_comment_url":"https://api.github.com/repos/zkrejcov/drools-wb/issues/comments{/number}","contents_url":"https://api.github.com/repos/zkrejcov/drools-wb/contents/{+path}","compare_url":"https://api.github.com/repos/zkrejcov/drools-wb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zkrejcov/drools-wb/merges","archive_url":"https://api.github.com/repos/zkrejcov/drools-wb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zkrejcov/drools-wb/downloads","issues_url":"https://api.github.com/repos/zkrejcov/drools-wb/issues{/number}","pulls_url":"https://api.github.com/repos/zkrejcov/drools-wb/pulls{/number}","milestones_url":"https://api.github.com/repos/zkrejcov/drools-wb/milestones{/number}","notifications_url":"https://api.github.com/repos/zkrejcov/drools-wb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zkrejcov/drools-wb/labels{/name}","releases_url":"https://api.github.com/repos/zkrejcov/drools-wb/releases{/id}","deployments_url":"https://api.github.com/repos/zkrejcov/drools-wb/deployments","created_at":"2015-09-07T11:43:28Z","updated_at":"2015-09-07T11:43:32Z","pushed_at":"2016-06-16T13:21:57Z","git_url":"git://github.com/zkrejcov/drools-wb.git","ssh_url":"git@github.com:zkrejcov/drools-wb.git","clone_url":"https://github.com/zkrejcov/drools-wb.git","svn_url":"https://github.com/zkrejcov/drools-wb","homepage":"","size":132916,"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":"droolsjbpm:master","ref":"master","sha":"9972287656b77d03c7b097f808e465ed35cc010f","user":{"login":"droolsjbpm","id":517980,"avatar_url":"https://avatars.githubusercontent.com/u/517980?v=3","gravatar_id":"","url":"https://api.github.com/users/droolsjbpm","html_url":"https://github.com/droolsjbpm","followers_url":"https://api.github.com/users/droolsjbpm/followers","following_url":"https://api.github.com/users/droolsjbpm/following{/other_user}","gists_url":"https://api.github.com/users/droolsjbpm/gists{/gist_id}","starred_url":"https://api.github.com/users/droolsjbpm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/droolsjbpm/subscriptions","organizations_url":"https://api.github.com/users/droolsjbpm/orgs","repos_url":"https://api.github.com/users/droolsjbpm/repos","events_url":"https://api.github.com/users/droolsjbpm/events{/privacy}","received_events_url":"https://api.github.com/users/droolsjbpm/received_events","type":"Organization","site_admin":false},"repo":{"id":10522020,"name":"drools-wb","full_name":"droolsjbpm/drools-wb","owner":{"login":"droolsjbpm","id":517980,"avatar_url":"https://avatars.githubusercontent.com/u/517980?v=3","gravatar_id":"","url":"https://api.github.com/users/droolsjbpm","html_url":"https://github.com/droolsjbpm","followers_url":"https://api.github.com/users/droolsjbpm/followers","following_url":"https://api.github.com/users/droolsjbpm/following{/other_user}","gists_url":"https://api.github.com/users/droolsjbpm/gists{/gist_id}","starred_url":"https://api.github.com/users/droolsjbpm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/droolsjbpm/subscriptions","organizations_url":"https://api.github.com/users/droolsjbpm/orgs","repos_url":"https://api.github.com/users/droolsjbpm/repos","events_url":"https://api.github.com/users/droolsjbpm/events{/privacy}","received_events_url":"https://api.github.com/users/droolsjbpm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/droolsjbpm/drools-wb","description":"Drools Workbench is the web application and repository to govern Drools assets.","fork":false,"url":"https://api.github.com/repos/droolsjbpm/drools-wb","forks_url":"https://api.github.com/repos/droolsjbpm/drools-wb/forks","keys_url":"https://api.github.com/repos/droolsjbpm/drools-wb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/droolsjbpm/drools-wb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/droolsjbpm/drools-wb/teams","hooks_url":"https://api.github.com/repos/droolsjbpm/drools-wb/hooks","issue_events_url":"https://api.github.com/repos/droolsjbpm/drools-wb/issues/events{/number}","events_url":"https://api.github.com/repos/droolsjbpm/drools-wb/events","assignees_url":"https://api.github.com/repos/droolsjbpm/drools-wb/assignees{/user}","branches_url":"https://api.github.com/repos/droolsjbpm/drools-wb/branches{/branch}","tags_url":"https://api.github.com/repos/droolsjbpm/drools-wb/tags","blobs_url":"https://api.github.com/repos/droolsjbpm/drools-wb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/droolsjbpm/drools-wb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/droolsjbpm/drools-wb/git/refs{/sha}","trees_url":"https://api.github.com/repos/droolsjbpm/drools-wb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/droolsjbpm/drools-wb/statuses/{sha}","languages_url":"https://api.github.com/repos/droolsjbpm/drools-wb/languages","stargazers_url":"https://api.github.com/repos/droolsjbpm/drools-wb/stargazers","contributors_url":"https://api.github.com/repos/droolsjbpm/drools-wb/contributors","subscribers_url":"https://api.github.com/repos/droolsjbpm/drools-wb/subscribers","subscription_url":"https://api.github.com/repos/droolsjbpm/drools-wb/subscription","commits_url":"https://api.github.com/repos/droolsjbpm/drools-wb/commits{/sha}","git_commits_url":"https://api.github.com/repos/droolsjbpm/drools-wb/git/commits{/sha}","comments_url":"https://api.github.com/repos/droolsjbpm/drools-wb/comments{/number}","issue_comment_url":"https://api.github.com/repos/droolsjbpm/drools-wb/issues/comments{/number}","contents_url":"https://api.github.com/repos/droolsjbpm/drools-wb/contents/{+path}","compare_url":"https://api.github.com/repos/droolsjbpm/drools-wb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/droolsjbpm/drools-wb/merges","archive_url":"https://api.github.com/repos/droolsjbpm/drools-wb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/droolsjbpm/drools-wb/downloads","issues_url":"https://api.github.com/repos/droolsjbpm/drools-wb/issues{/number}","pulls_url":"https://api.github.com/repos/droolsjbpm/drools-wb/pulls{/number}","milestones_url":"https://api.github.com/repos/droolsjbpm/drools-wb/milestones{/number}","notifications_url":"https://api.github.com/repos/droolsjbpm/drools-wb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/droolsjbpm/drools-wb/labels{/name}","releases_url":"https://api.github.com/repos/droolsjbpm/drools-wb/releases{/id}","deployments_url":"https://api.github.com/repos/droolsjbpm/drools-wb/deployments","created_at":"2013-06-06T08:26:25Z","updated_at":"2016-06-15T07:20:25Z","pushed_at":"2016-06-18T08:07:48Z","git_url":"git://github.com/droolsjbpm/drools-wb.git","ssh_url":"git@github.com:droolsjbpm/drools-wb.git","clone_url":"https://github.com/droolsjbpm/drools-wb.git","svn_url":"https://github.com/droolsjbpm/drools-wb","homepage":"","size":134601,"stargazers_count":17,"watchers_count":17,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":117,"mirror_url":null,"open_issues_count":6,"forks":117,"open_issues":6,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/droolsjbpm/drools-wb/pulls/203"},"html":{"href":"https://github.com/droolsjbpm/drools-wb/pull/203"},"issue":{"href":"https://api.github.com/repos/droolsjbpm/drools-wb/issues/203"},"comments":{"href":"https://api.github.com/repos/droolsjbpm/drools-wb/issues/203/comments"},"review_comments":{"href":"https://api.github.com/repos/droolsjbpm/drools-wb/pulls/203/comments"},"review_comment":{"href":"https://api.github.com/repos/droolsjbpm/drools-wb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/droolsjbpm/drools-wb/pulls/203/commits"},"statuses":{"href":"https://api.github.com/repos/droolsjbpm/drools-wb/statuses/024f2e0376e423a1168028f91bddfdbfd30f990d"}}}}
{"actor":{"display_login":"zkrejcov"}}